======================
Simple many2one widget
======================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/15.0/web_widget_many2one_simple
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_widget_many2one_simple
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/162/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
This module adds a new widget to many2one fields that allows to link records
without any extra features (no autocomplete and no partial search).
* Preview
.. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_widget_many2one_simple/static/img/preview.gif
**Table of contents**
.. contents::
:local:
Configuration
=============
Attributes:
~~~~~~~~~~~
* regex [String]: Defines the regex to test the search criteria
* can_create [Boolean]: Allow create new records
* can_write [Boolean]: Allow edit the linked record
Options:
~~~~~~~~
* search [Dictionary]
* field: The field to use in the search process [Default is 'id']
* oper: The operator (like, ilike, etc...) [Default is '=']
* no_create: Invalidates the 'can_create' flag
* no_write: Invalidates the 'can_write' flag
* no_open: Disables open the linked record
Usage
=====
You need to declare the usage of the new widget as follows:
``<field name="xxx" widget="many2one_simple" options="...">``
If you have a database with demo data, you can test this widget following these instructions:
#. Go to Contacts.
#. Create or edit a record.
#. Set "Industry" field (in Sales & Purchase tab).
#. Only if you set the correct industry name ("Administrative" for example), it will be defined. Otherwise, it will try to create one with that name.
Example:
~~~~~~~~
.. code:: xml
<field name="partner_id" widget="many2one_simple" regex="^1\d*" options="{"search": { "field": "name", "oper": "ilike" }}"/
** Only allows search by id's that starts with '1' ...
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_many2one_simple%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Tecnativa
Contributors
~~~~~~~~~~~~
* `Tecnativa <https://www.tecnativa.com>`_:
* Alexandre D. Díaz
* Foram Shah <foram.shah@initos.com>
* Thanakrit Pintana <thanakrit.p39@gmail.com>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
.. |maintainer-Tardo| image:: https://github.com/Tardo.png?size=40px
:target: https://github.com/Tardo
:alt: Tardo
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-Tardo|
This module is part of the `OCA/web <https://github.com/OCA/web/tree/15.0/web_widget_many2one_simple>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Raw data
{
"_id": null,
"home_page": "https://github.com/OCA/web",
"name": "odoo-addon-web-widget-many2one-simple",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Tecnativa, Odoo Community Association (OCA)",
"author_email": "support@odoo-community.org",
"download_url": "",
"platform": null,
"description": "======================\nSimple many2one widget\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%2Fweb-lightgray.png?logo=github\n :target: https://github.com/OCA/web/tree/15.0/web_widget_many2one_simple\n :alt: OCA/web\n.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png\n :target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_widget_many2one_simple\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/162/15.0\n :alt: Try me on Runbot\n\n|badge1| |badge2| |badge3| |badge4| |badge5| \n\nThis module adds a new widget to many2one fields that allows to link records\nwithout any extra features (no autocomplete and no partial search).\n\n* Preview\n\n .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_widget_many2one_simple/static/img/preview.gif\n\n**Table of contents**\n\n.. contents::\n :local:\n\nConfiguration\n=============\n\nAttributes:\n~~~~~~~~~~~\n\n* regex [String]: Defines the regex to test the search criteria\n* can_create [Boolean]: Allow create new records\n* can_write [Boolean]: Allow edit the linked record\n\nOptions:\n~~~~~~~~\n\n* search [Dictionary]\n * field: The field to use in the search process [Default is 'id']\n * oper: The operator (like, ilike, etc...) [Default is '=']\n\n* no_create: Invalidates the 'can_create' flag\n* no_write: Invalidates the 'can_write' flag\n* no_open: Disables open the linked record\n\nUsage\n=====\n\nYou need to declare the usage of the new widget as follows:\n``<field name=\"xxx\" widget=\"many2one_simple\" options=\"...\">``\n\nIf you have a database with demo data, you can test this widget following these instructions:\n\n#. Go to Contacts.\n#. Create or edit a record.\n#. Set \"Industry\" field (in Sales & Purchase tab).\n#. Only if you set the correct industry name (\"Administrative\" for example), it will be defined. Otherwise, it will try to create one with that name.\n\nExample:\n~~~~~~~~\n\n.. code:: xml\n\n <field name=\"partner_id\" widget=\"many2one_simple\" regex=\"^1\\d*\" options=\"{"search": { "field": "name", "oper": "ilike" }}\"/\n\n** Only allows search by id's that starts with '1' ...\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues <https://github.com/OCA/web/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 <https://github.com/OCA/web/issues/new?body=module:%20web_widget_many2one_simple%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.\n\nDo not contact contributors directly about support or help with technical issues.\n\nCredits\n=======\n\nAuthors\n~~~~~~~\n\n* Tecnativa\n\nContributors\n~~~~~~~~~~~~\n\n* `Tecnativa <https://www.tecnativa.com>`_:\n\n * Alexandre D. D\u00edaz\n\n* Foram Shah <foram.shah@initos.com>\n* Thanakrit Pintana <thanakrit.p39@gmail.com>\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\n.. |maintainer-Tardo| image:: https://github.com/Tardo.png?size=40px\n :target: https://github.com/Tardo\n :alt: Tardo\n\nCurrent `maintainer <https://odoo-community.org/page/maintainer-role>`__:\n\n|maintainer-Tardo| \n\nThis module is part of the `OCA/web <https://github.com/OCA/web/tree/15.0/web_widget_many2one_simple>`_ project on GitHub.\n\nYou are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.\n\n\n",
"bugtrack_url": null,
"license": "AGPL-3",
"summary": "Simple many2one widget",
"version": "15.0.1.1.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "94df957f596df96be497332741497448",
"sha256": "76dd4694cb0474838fac9b3d33e78b82f2cfd965854c5462d2fb39b6bdd7ec75"
},
"downloads": -1,
"filename": "odoo_addon_web_widget_many2one_simple-15.0.1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "94df957f596df96be497332741497448",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 490853,
"upload_time": "2022-11-30T11:21:54",
"upload_time_iso_8601": "2022-11-30T11:21:54.809365Z",
"url": "https://files.pythonhosted.org/packages/0f/ab/1ac4743812da090e8e51c4c2d4ddda4b8270d039b5d424544517e54a907f/odoo_addon_web_widget_many2one_simple-15.0.1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-30 11:21:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "OCA",
"github_project": "web",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "bokeh",
"specs": [
[
"==",
"2.4.2"
]
]
}
],
"lcname": "odoo-addon-web-widget-many2one-simple"
}