mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX+IMP+MIG] contract: Several refinements:
* Remove incorrect oldname attributes. * Add filter on partners for running contracts (+ a support o2m field for that). * Cover more tables in model renaming + cleaner code using a loop. * Don't copy contract lines, but rename table + copy contract records on pre. * Contract code is now populated to "Reference/Description" field in invoice. * Order on new contract model has been restored to the same as old analytic accounts.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="model">res.partner</field>
|
||||
<field type="xml" name="arch">
|
||||
@@ -21,7 +21,22 @@
|
||||
<field name="purchase_contract_count" widget="statinfo" string="Purchase Contracts"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_res_partner_filter" model="ir.ui.view">
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter" />
|
||||
<field name="model">res.partner</field>
|
||||
<field type="xml" name="arch">
|
||||
<filter name="inactive" position="after">
|
||||
<separator/>
|
||||
<filter
|
||||
name="filter_running_contract"
|
||||
string="With running contracts"
|
||||
domain="['|', ('contract_ids.date_end', '>=', context_today().strftime('%Y-%m-%d')), ('contract_ids.date_end', '=', False)]"
|
||||
/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user