Contributors mailing list archives

contributors@odoo-community.org

RE: How to update field context by xml

by
Bista Solutions, Ray Carnes
- 10/04/2017 20:12:37

OK.


Don’t know then! (if you can’t have the combined context in your module)

 

Sorry!

 

From: Alex Comba [mailto:alex.comba@agilebg.com]
Sent: Monday, April 10, 2017 1:08 PM
To: Contributors <contributors@odoo-community.org>
Subject: Re: How to update field context by xml

 

Hi Ray,

 

 

thanks for your quick answer!

 

But what I meant is kept all values passed to the context by the two modules.

 

module 1, set invoice_line_ids context as follows:

<attribute name="context">{'partner_id': partner_id}</attribute>

 

module 2, set invoice_line_ids context as follows:

<attribute name="context">{'fiscal_position_id': fiscal_position_id, 'type': type, 'journal_id': journal_id, 'default_invoice_id': id}</attribute>

 

Expected behavior:

invoice_line_ids context is equal to {'partner_id': partner_id, 'fiscal_position_id': fiscal_position_id, 'type': type, 'journal_id': journal_id, 'default_invoice_id': id}

 

Thanks,

 

--