{ "info": { "author": "Akretion,Camptocamp,Odoo Community Association (OCA)", "author_email": "support@odoo-community.org", "bugtrack_url": null, "classifiers": [ "Framework :: Odoo", "License :: OSI Approved :: GNU Affero General Public License v3", "Programming Language :: Python" ], "description": "===============\nOnchange Helper\n===============\n\n.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n !! This file is generated by oca-gen-addon-readme !!\n !! changes will be overwritten. !!\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png\n :target: https://odoo-community.org/page/development-status\n :alt: Beta\n.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png\n :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html\n :alt: License: AGPL-3\n.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github\n :target: https://github.com/OCA/server-tools/tree/12.0/onchange_helper\n :alt: OCA/server-tools\n.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png\n :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-onchange_helper\n :alt: Translate me on Weblate\n.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png\n :target: https://runbot.odoo-community.org/runbot/149/12.0\n :alt: Try me on Runbot\n\n|badge1| |badge2| |badge3| |badge4| |badge5| \n\nThis is a technical module. Its goal is to ease the play of onchange method directly called from Python code.\n\n**Table of contents**\n\n.. contents::\n :local:\n\nUsage\n=====\n\nTo use this module, you need to:\n\n* depend on this module\n* call `yourmodel.play_onchanges(values, ['field'])`\n\nExample 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)\n\n `vals = {'partner_id': 1}`\n\n `vals = self.env['sale.order'].play_onchanges(vals, ['partner_id'])`\n\nThen, `vals` will be updated with partner_invoice_id, partner_shipping_id, pricelist_id, etc...\n\nDefault values will be used to process onchange methods, if respective fields are not set in `vals`.\nYou can get them if you pass fields name in the list of fields.\n\n\n `vals = {'partner_id': 1}`\n\n `vals = self.env['sale.order'].play_onchanges(vals, ['partner_id', 'date_order'])`\n\n`vals` will contain, in addition to the changed values, the default value for `date_order`\n\n\nYou can also use it on existing record for example:\n\n `vals = {'partner_shipping_id': 1}`\n\n `vals = sale.play_onchanges(vals, ['partner_shipping_id'])`\n\nThen the onchange will be played with the vals passed and the existing vals of the sale. `vals` will be updated with partner_invoice_id, pricelist_id, etc..\n\nBehind the scene, `play_onchanges` will execute **all the methods** registered for the list of changed fields, so you do not have to call manually each onchange. To avoid performance issue when the method is called on a record, the record will be transformed into a memory record before calling the registered methods to avoid to trigger SQL updates command when values are assigned to the record by the onchange\n\n\nNotes:\n\n- Order in onchange_fields is very important as onchanges methods will be played in that order.\n- If you use memory object in `vals`, be award that onchange method in base model call `self.invalidate_cache()` that reset it.\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues `_.\nIn case of trouble, please check there if your issue has already been reported.\nIf you spotted it first, help us smashing it by providing a detailed and welcomed\n`feedback `_.\n\nDo not contact contributors directly about support or help with technical issues.\n\nCredits\n=======\n\nAuthors\n~~~~~~~\n\n* Akretion\n* Camptocamp\n\nContributors\n~~~~~~~~~~~~\n\n* Guewen Baconnier \n* Florian da Costa \n* Andrea Stirpe \n* Souheil Bejaoui \n\nMaintainers\n~~~~~~~~~~~\n\nThis module is maintained by the OCA.\n\n.. image:: https://odoo-community.org/logo.png\n :alt: Odoo Community Association\n :target: https://odoo-community.org\n\nOCA, or the Odoo Community Association, is a nonprofit organization whose\nmission is to support the collaborative development of Odoo features and\npromote its widespread use.\n\nThis module is part of the `OCA/server-tools `_ project on GitHub.\n\nYou are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/OCA/server-tools", "keywords": "", "license": "AGPL-3", "maintainer": "", "maintainer_email": "", "name": "odoo12-addon-onchange-helper", "package_url": "https://pypi.org/project/odoo12-addon-onchange-helper/", "platform": "", "project_url": "https://pypi.org/project/odoo12-addon-onchange-helper/", "project_urls": { "Homepage": "https://github.com/OCA/server-tools" }, "release_url": "https://pypi.org/project/odoo12-addon-onchange-helper/12.0.1.0.0.99.dev13/", "requires_dist": [ "odoo (<12.1dev,>=12.0a)" ], "requires_python": ">=3.5", "summary": "Technical module that ease execution of onchange in Python code", "version": "12.0.1.0.0.99.dev13" }, "last_serial": 5768856, "releases": { "12.0.1.0.0.99.dev10": [ { "comment_text": "", "digests": { "md5": "7678bddaf9cbf951e243b81f77394ad3", "sha256": "71f3dd293c49435668dad81b6c0b2890d84402623bfe7f55b1cf42dce4e9b7a2" }, "downloads": -1, "filename": "odoo12_addon_onchange_helper-12.0.1.0.0.99.dev10-py3-none-any.whl", "has_sig": false, "md5_digest": "7678bddaf9cbf951e243b81f77394ad3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 29195, "upload_time": "2019-05-21T04:35:56", "url": "https://files.pythonhosted.org/packages/e2/24/ced39fec0b4a787bdf8027466b86bcb35c2e91e16fefc4ac2db5f3fb2517/odoo12_addon_onchange_helper-12.0.1.0.0.99.dev10-py3-none-any.whl" } ], "12.0.1.0.0.99.dev11": [ { "comment_text": "", "digests": { "md5": "7130a7a4de1bedc48b54e1c5422c98b5", "sha256": "2a820e072d174824633eb97d9e6125da1035a16087401d4996b5f5d650d042dc" }, "downloads": -1, "filename": "odoo12_addon_onchange_helper-12.0.1.0.0.99.dev11-py3-none-any.whl", "has_sig": false, "md5_digest": "7130a7a4de1bedc48b54e1c5422c98b5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 29192, "upload_time": "2019-07-30T04:41:01", "url": "https://files.pythonhosted.org/packages/07/38/c38290566345e5a1ec644536811e68a95da2d6909af692713c8cf82e4693/odoo12_addon_onchange_helper-12.0.1.0.0.99.dev11-py3-none-any.whl" } ], "12.0.1.0.0.99.dev13": [ { "comment_text": "", "digests": { "md5": "657010378c4f760430c0921ace8a5e09", "sha256": "551f0ecd00e3cdfa0d1238439f261ae873b574ee38e1f32f2d6470f540aedd64" }, "downloads": -1, "filename": "odoo12_addon_onchange_helper-12.0.1.0.0.99.dev13-py3-none-any.whl", "has_sig": false, "md5_digest": "657010378c4f760430c0921ace8a5e09", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 29795, "upload_time": "2019-09-02T04:35:56", "url": "https://files.pythonhosted.org/packages/5f/06/638898608da9f5798f14ab2a9d8514d8fe7da607112c01c9defed76d2a85/odoo12_addon_onchange_helper-12.0.1.0.0.99.dev13-py3-none-any.whl" } ], "12.0.1.0.0.99.dev9": [ { "comment_text": "", "digests": { "md5": "6878bcb28ab7a1f8c4ef558730d6edb8", "sha256": "d539174710ed8437336c1e2a94e07bd953401e9df29a9aa4772ce9593fb6f046" }, "downloads": -1, "filename": "odoo12_addon_onchange_helper-12.0.1.0.0.99.dev9-py3-none-any.whl", "has_sig": false, "md5_digest": "6878bcb28ab7a1f8c4ef558730d6edb8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 29144, "upload_time": "2019-05-15T04:34:26", "url": "https://files.pythonhosted.org/packages/47/3c/5c832fec584e035b14439bc614ab769b24b1838011ae5a1d2e1e6c883a1c/odoo12_addon_onchange_helper-12.0.1.0.0.99.dev9-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "657010378c4f760430c0921ace8a5e09", "sha256": "551f0ecd00e3cdfa0d1238439f261ae873b574ee38e1f32f2d6470f540aedd64" }, "downloads": -1, "filename": "odoo12_addon_onchange_helper-12.0.1.0.0.99.dev13-py3-none-any.whl", "has_sig": false, "md5_digest": "657010378c4f760430c0921ace8a5e09", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 29795, "upload_time": "2019-09-02T04:35:56", "url": "https://files.pythonhosted.org/packages/5f/06/638898608da9f5798f14ab2a9d8514d8fe7da607112c01c9defed76d2a85/odoo12_addon_onchange_helper-12.0.1.0.0.99.dev13-py3-none-any.whl" } ] }