Skip to content

Commit

Permalink
[12.0][MIG] - onchange_helper migration to 12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbejaoui authored and PieterPaulussen committed Jul 18, 2024
1 parent 515944a commit ea30f4c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion onchange_helper/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions onchange_helper/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Guewen Baconnier <[email protected]>
* Florian da Costa <[email protected]>
* Andrea Stirpe <[email protected]>
1 change: 1 addition & 0 deletions onchange_helper/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a technical module. Its goal is to ease the play of onchange method directly called from Python code.
12 changes: 12 additions & 0 deletions onchange_helper/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -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...

0 comments on commit ea30f4c

Please sign in to comment.