-
-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] contract_price_revision: Migration to 16.0
Fix views in the process; variation % was not showing inside line list embedded into contract forms.
- Loading branch information
1 parent
f645d0f
commit d4768e6
Showing
7 changed files
with
48 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<!-- Add into contract line list view embedded into contract forms. --> | ||
<record id="contract_contract_form_view" model="ir.ui.view"> | ||
<field name="model">contract.contract</field> | ||
<field name="inherit_id" ref="contract.contract_contract_form_view" /> | ||
<field name="arch" type="xml"> | ||
<xpath | ||
expr="//field[@name='contract_line_ids']/tree/field[@name='last_date_invoiced']" | ||
position="after" | ||
> | ||
<field name="variation_percent" groups="base.group_no_one" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="contract_line_tree_view" model="ir.ui.view"> | ||
<field name="model">contract.line</field> | ||
<field name="inherit_id" ref="contract.contract_line_tree_view" /> | ||
<field name="arch" type="xml"> | ||
<field name="last_date_invoiced" position="after"> | ||
<field name="never_revise_price" /> | ||
<field name="variation_percent" groups="base.group_no_one" /> | ||
</field> | ||
</field> | ||
</record> | ||
<!-- Add our fields within contract line views. | ||
Note: We do not add them within their parent contract.abstract.contract.line views as | ||
price revision only works on contracts with recurrence at line level. --> | ||
<record id="contract_line_form_view" model="ir.ui.view"> | ||
<field name="model">contract.line</field> | ||
<field name="inherit_id" ref="contract.contract_line_form_view" /> | ||
<field name="arch" type="xml"> | ||
<field name="discount" position="after"> | ||
<field name="never_revise_price" /> | ||
<field | ||
name="variation_percent" | ||
groups="base.group_no_one" | ||
attrs="{'invisible': [('predecessor_contract_line_id', '=', False)]}" | ||
/> | ||
</field> | ||
<label for="name" position="before"> | ||
<group> | ||
<field name="never_revise_price" /> | ||
<field | ||
name="variation_percent" | ||
groups="base.group_no_one" | ||
attrs="{'invisible': [('predecessor_contract_line_id', '=', False)]}" | ||
/> | ||
</group> | ||
</label> | ||
</field> | ||
</record> | ||
</odoo> |
1 change: 1 addition & 0 deletions
1
setup/contract_price_revision/odoo/addons/contract_price_revision
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../contract_price_revision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |