Browse Source

[12.0][MIG] - onchange_helper migration to 12.0

pull/1461/head
sbejaoui 6 years ago
parent
commit
340603078b
  1. 2
      onchange_helper/__manifest__.py
  2. 3
      onchange_helper/readme/CONTRIBUTORS.rst
  3. 1
      onchange_helper/readme/DESCRIPTION.rst
  4. 12
      onchange_helper/readme/USAGE.rst

2
onchange_helper/__manifest__.py

@ -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',

3
onchange_helper/readme/CONTRIBUTORS.rst

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

1
onchange_helper/readme/DESCRIPTION.rst

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

12
onchange_helper/readme/USAGE.rst

@ -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...
Loading…
Cancel
Save