Commit dcc61442 authored by agb80's avatar agb80

refactor(account.invoice): stop using replace on views

Stop using replace views as it's a bad practice that can lead into several troubles. Instead

override attributes as needed. Also created an issue on account module to copy changes done in

options for field `res_partner`: account/account#11
parent 2aa4151f
Pipeline #3129 passed with stage
in 4 minutes and 2 seconds
......@@ -22,12 +22,10 @@
attrs="{'readonly': [('state', 'in', ('paid', 'open', 'cancel'))]}"
options="{'no_create':True}"/>
</field>
<xpath expr="//field[@name='partner_id']" position="replace">
<field string="Customer" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
groups="base.group_user" context="{'search_default_customer':1, 'show_address': 1, 'default_is_company': 1}"
options="{'always_reload': True,'no_quick_create': True}"
domain="[('customer', '=', True), ('is_company', '=', True)]"/>
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="context">{'search_default_customer':1, 'show_address': 1, 'default_is_company': 1}</attribute>
<attribute name="domain">[('customer', '=', True), ('is_company', '=', True)]</attribute>
<attribute name="options">{'always_reload': True,'no_quick_create': True}</attribute>
</xpath>
</field>
</record>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment