[12.0][MIG] - onchange_helper migration to 12.0

pull/2479/head
sbejaoui 2018-12-17 15:42:03 +01:00 committed by Kevin Khao
parent 2b5fe33dc7
commit b03be53c00
4 changed files with 17 additions and 1 deletions

View File

@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{'name': 'Onchange Helper',
'version': '11.0.1.0.0',
'version': '12.0.1.0.0',
'summary': 'Technical module that ease execution of onchange in Python code',
'author': 'Akretion,Camptocamp,Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/server-tools',

View File

@ -0,0 +1,3 @@
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
* Florian da Costa <florian.dacosta@akretion.com>
* Andrea Stirpe <a.stirpe@onestein.nl>

View File

@ -0,0 +1 @@
This is a technical module. Its goal is to ease the play of onchange method directly called from Python code.

View File

@ -0,0 +1,12 @@
To use this module, you need to:
* depend on this module
* call `yourmodel.play_onchanges(values, ['field'])`
Example if you want to create a sale order and you want to get the values relative to partner_id field (as if you fill the field from UI)
`vals = {'partner_id': 1}`
`vals = self.env['sale.order'].play_onchanges(vals, ['partner_id'])`
Then, `vals` will be updated with partner_invoice_id, partner_shipping_id, pricelist_id, etc...