Contributors mailing list archives
contributors@odoo-community.org
Browse archives
RE: How to update field context by xml
byIncreate the priority of your view to higher than the one in the other module.
Thanks and have a great day!
Ray Carnes | Senior Odoo Consultant | Bista Solutions | (909) 864 4576
From: Alex Comba [mailto:alex.comba@agilebg.com]
Sent: Monday, April 10, 2017 11:54 AM
To: Contributors <contributors@odoo-community.org>
Subject: How to update field context by xml
Hi everyone,
in a module I'm developing I would need to set a default on the invoice line getting value from partner. To do this I set context on invoice_line_ids field as follows:
<xpath expr="//field[@name='invoice_line_ids']" position="attributes">
<attribute name="context">{'partner_id': partner_id}</attribute>
</xpath>
Unfortunately, in the customer database is installed another module (on which I cannot depend) that overwrites the context of the same field and the result is that partner_id is overwritten at all.
A quick and dirty solution could be create a bridge module that passes to the field context all the values added by two modules.
Anyone knows if there is a cleaner way to update the context by xml?
Any feedback would be very appreciated.
Thank you in advance,
--
Alex Comba
Tel (CH): +41 91 210 23 40
Tel (IT): +39 0331 158 7090
https://www.agilebg.com
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Reference
-
How to update field context by xml
byAGILE BUSINESS GROUP ITALIA SRL, Alex Comba.-
Re: How to update field context by xml
byAGILE BUSINESS GROUP ITALIA SRL, Alex Comba. -
Re: How to update field context by xml
byAGILE BUSINESS GROUP ITALIA SRL, Alex Comba. -
Re: How to update field context by xml
byAGILE BUSINESS GROUP ITALIA SRL, Alex Comba. -
Re: How to update field context by xml
byAGILE BUSINESS GROUP ITALIA SRL, Alex Comba. -
Re: How to update field context by xml
by Jay Vora <vora.jay@serpentcs.com> - 10/04/2017 20:59:24 - 0
-