{ "info": { "author": "ACSONE SA/NV,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": ".. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg\n :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html\n :alt: License: AGPL-3\n\n================\nWeb Domain Field\n================\n\nWhen you define a view you can specify on the relational fields a domain\nattribute. This attribute is evaluated as filter to apply when displaying\nexisting records for selection.\n\n.. code-block:: xml\n\n \n\nThe value provided for the domain attribute must be a string representing a\nvalid Odoo domain. This string is evaluated on the client side in a\nrestricted context where we can reference as right operand the values of\nfields present into the form and a limited set of functions.\n\nIn this context it's hard to build complex domain and we are facing to some\nlimitations as:\n\n * The syntax to include in your domain a criteria involving values from a\n x2many field is complex.\n * The right side of domain in case of x2many can involve huge amount of ids\n (performance problem).\n * Domains computed by an onchange on an other field are not recomputed when\n you modify the form and don't modify the field triggering the onchange.\n * It's not possible to extend an existing domain. You must completely redefine\n the domain in your specialized addon\n * ...\n\nIn order to mitigate these limitations this new addon allows you to use the\nvalue of a field as domain of an other field in the xml definition of your\nview.\n\n.. code-block:: xml\n\n \n \n\nThe field used as domain must provide the domain as a JSON encoded string.\n\n.. code-block:: python\n\n product_id_domain = fields.Char(\n compute=\"_compute_product_id_domain\",\n readonly=True,\n store=False,\n )\n\n @api.multi\n @api.depends('name')\n def _compute_product_id_domain(self):\n for rec in self:\n rec.product_id_domain = json.dumps(\n [('type', '=', 'product'), ('name', 'like', rec.name)]\n )\n\n\nUsage\n=====\n\n.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas\n :alt: Try me on Runbot\n :target: https://runbot.odoo-community.org/runbot/162/10.0\n\n\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues\n`_. In case of trouble, please\ncheck there if your issue has already been reported. If you spotted it first,\nhelp us smashing it by providing a detailed and welcomed feedback.\n\nCredits\n=======\n\nImages\n------\n\n* Odoo Community Association: `Icon `_.\n\nContributors\n------------\n\n* Laurent Mignon \n* Denis Roussel \n\nMaintainer\n----------\n\n.. image:: https://odoo-community.org/logo.png\n :alt: Odoo Community Association\n :target: https://odoo-community.org\n\nThis module is maintained by the OCA.\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\nTo contribute to this module, please visit https://odoo-community.org.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://acsone.eu/", "keywords": "", "license": "AGPL-3", "maintainer": "", "maintainer_email": "", "name": "odoo10-addon-web-domain-field", "package_url": "https://pypi.org/project/odoo10-addon-web-domain-field/", "platform": "", "project_url": "https://pypi.org/project/odoo10-addon-web-domain-field/", "project_urls": { "Homepage": "https://acsone.eu/" }, "release_url": "https://pypi.org/project/odoo10-addon-web-domain-field/10.0.1.0.0/", "requires_dist": [ "odoo (<10.1dev,>=10.0)" ], "requires_python": "~=2.7", "summary": "Use computed field as domain", "version": "10.0.1.0.0" }, "last_serial": 3994133, "releases": { "10.0.1.0.0": [ { "comment_text": "", "digests": { "md5": "94747116ddeb6b2dab39080fd766b73e", "sha256": "04ceba9348c7f1a89c21a1a3e735b0da5b042c7f4accf39ba1904f2ee26ba853" }, "downloads": -1, "filename": "odoo10_addon_web_domain_field-10.0.1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "94747116ddeb6b2dab39080fd766b73e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": "~=2.7", "size": 20986, "upload_time": "2017-11-04T05:30:12", "url": "https://files.pythonhosted.org/packages/02/9f/74628212a6be77cac15970a0cc5e06e897a6a46c0689f25c409118fc5b32/odoo10_addon_web_domain_field-10.0.1.0.0-py2-none-any.whl" } ], "10.0.1.0.0.99.dev1": [ { "comment_text": "", "digests": { "md5": "576e77afa2bb2f18a500950694fb61fe", "sha256": "fe149740b0077803e608eb6185052cca128505f5b09b2b600919e55c63cd1dd9" }, "downloads": -1, "filename": "odoo10_addon_web_domain_field-10.0.1.0.0.99.dev1-py2-none-any.whl", "has_sig": false, "md5_digest": "576e77afa2bb2f18a500950694fb61fe", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": "~=2.7", "size": 21144, "upload_time": "2018-02-08T05:30:10", "url": "https://files.pythonhosted.org/packages/d7/c3/ee13d00b36d8582469f8cc6352f6bd05c0657a736dc39a442a37fd7bdd99/odoo10_addon_web_domain_field-10.0.1.0.0.99.dev1-py2-none-any.whl" } ], "10.0.1.0.0.99.dev2": [ { "comment_text": "", "digests": { "md5": "6b9d218b73574826c08142c76a5fb9de", "sha256": "dfb3d02e505dfd62f06386141d14f4c67c7080d56c63ed752396f1074e65f648" }, "downloads": -1, "filename": "odoo10_addon_web_domain_field-10.0.1.0.0.99.dev2-py2-none-any.whl", "has_sig": false, "md5_digest": "6b9d218b73574826c08142c76a5fb9de", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": "~=2.7", "size": 21702, "upload_time": "2018-06-24T04:30:16", "url": "https://files.pythonhosted.org/packages/80/0e/7cd191a08fc26f69bce87474e2df885e8eb3b579f0d322eb3d6150c0f385/odoo10_addon_web_domain_field-10.0.1.0.0.99.dev2-py2-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "94747116ddeb6b2dab39080fd766b73e", "sha256": "04ceba9348c7f1a89c21a1a3e735b0da5b042c7f4accf39ba1904f2ee26ba853" }, "downloads": -1, "filename": "odoo10_addon_web_domain_field-10.0.1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "94747116ddeb6b2dab39080fd766b73e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": "~=2.7", "size": 20986, "upload_time": "2017-11-04T05:30:12", "url": "https://files.pythonhosted.org/packages/02/9f/74628212a6be77cac15970a0cc5e06e897a6a46c0689f25c409118fc5b32/odoo10_addon_web_domain_field-10.0.1.0.0-py2-none-any.whl" } ] }