Browse Source

Mar 27 [UPDT] : Updated 'edit_save_button'

pull/278/merge
AjmalCybro 1 year ago
parent
commit
b9a49fddf0
  1. 2
      edit_save_button/__manifest__.py
  2. 5
      edit_save_button/doc/RELEASE_NOTES.md
  3. 4
      edit_save_button/static/src/views/form/form_controller.js
  4. 17
      edit_save_button/views/product_views.xml
  5. 26
      edit_save_button/views/test.xml

2
edit_save_button/__manifest__.py

@ -22,7 +22,7 @@
{
'name': 'Edit Button In Odoo16',
'version': '16.0.1.0.3',
'version': '16.0.1.0.4',
'summary': 'Edit Button Odoo16',
'description': 'Edit Button in Odoo16',
'author': 'Cybrosys Techno Solutions',

5
edit_save_button/doc/RELEASE_NOTES.md

@ -16,3 +16,8 @@
#### Fix
- Bug fixed
#### 13.02.2024
#### Version 16.0.1.0.4
#### Fix
- Bug fixed

4
edit_save_button/static/src/views/form/form_controller.js

@ -29,7 +29,7 @@ patch(FormController.prototype, "save",{
},
async saveButtonClicked(params = {}){
this._super();
if (this.env.inDialog == false){
if (!this.env.inDialog){
await this.model.root.switchMode("readonly");
}
else {
@ -38,7 +38,7 @@ patch(FormController.prototype, "save",{
},
async discard(){
this._super();
if (this.env.inDialog == false){
if (!this.env.inDialog){
await this.model.root.switchMode("readonly");
}
else {

17
edit_save_button/views/product_views.xml

@ -5,14 +5,7 @@
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='group_standard_price']" position='replace'>
<group name="group_standard_price">
<label for="list_price"/>
<div name="pricing">
<field name="list_price" class="oe_inline" widget='monetary'
options="{'currency_field': 'currency_id', 'field_digits': True}"/>
</div>
<label for="standard_price" attrs="{'invisible': [('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}"/>
<xpath expr="//div[@name='standard_price_uom']" position='replace'>
<div name="standard_price_uom" style="display: flex;" attrs="{'invisible': [('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}">
<field name="standard_price" class="oe_inline" widget='monetary' options="{'currency_field': 'cost_currency_id', 'field_digits': True}"/>
<div style="margin-left:10px;">
@ -21,14 +14,6 @@
</span>
</div>
</div>
<field name="categ_id" string="Product Category"/>
<field name="product_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="company_id" groups="base.group_multi_company"
options="{'no_create': True}"/>
<field name="currency_id" invisible="1"/>
<field name="cost_currency_id" invisible="1"/>
<field name="product_variant_id" invisible="1"/>
</group>
</xpath>
</field>
</record>

26
edit_save_button/views/test.xml

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_backend" name="Backend Assets (used in backend interface)">
<!-- <t t-call="web._assets_helpers">-->
<!-- <t t-call="web._assets_backend_helpers"/>-->
<!-- </t>-->
<!-- <t t-call="web._assets_bootstrap"/>-->
<!-- <script type="text/javascript" charset="utf-8">-->
<!-- odoo._modules = <t t-raw="get_modules_order()"/>;-->
<!-- </script>-->
<script type="text/javascript" src="/edit_save_button/static/src/views/form/form_controller.js"></script>
</template>
<!-- <template id="assets_backend" name="testing" inherit_id="web.assets_backend">-->
<!-- <xpath expr="." position="inside">-->
<!--&lt;!&ndash; <script type="text/javascript" src="/crm/static/src/js/crm_form.js"/>&ndash;&gt;-->
<!--&lt;!&ndash; <script type="text/javascript" src="/crm/static/src/js/crm_kanban.js"/>&ndash;&gt;-->
<!--&lt;!&ndash; <script type="text/javascript" src="/crm/static/src/js/systray_activity_menu.js"/>&ndash;&gt;-->
<!--&lt;!&ndash; <script type="text/javascript" src="/crm/static/src/js/tours/crm.js"></script>&ndash;&gt;-->
<!-- <script type="text/javascript" src="/edit_save_button/static/src/views/form/form_controller.js"></script>-->
<!-- </xpath>-->
<!-- </template>-->
</odoo>
Loading…
Cancel
Save