diff --git a/onchange_helper/__manifest__.py b/onchange_helper/__manifest__.py index 82f03bcc1..993f7bc7b 100644 --- a/onchange_helper/__manifest__.py +++ b/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', diff --git a/onchange_helper/readme/CONTRIBUTORS.rst b/onchange_helper/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..85d5fd7e1 --- /dev/null +++ b/onchange_helper/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Guewen Baconnier +* Florian da Costa +* Andrea Stirpe \ No newline at end of file diff --git a/onchange_helper/readme/DESCRIPTION.rst b/onchange_helper/readme/DESCRIPTION.rst new file mode 100644 index 000000000..012f36c6f --- /dev/null +++ b/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. \ No newline at end of file diff --git a/onchange_helper/readme/USAGE.rst b/onchange_helper/readme/USAGE.rst new file mode 100644 index 000000000..183b6e728 --- /dev/null +++ b/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...