-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] web_widget_one2many_product_picker_sale_elaboration
- Loading branch information
Showing
12 changed files
with
843 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...t_picker_sale_elaboration/odoo/addons/web_widget_one2many_product_picker_sale_elaboration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../web_widget_one2many_product_picker_sale_elaboration |
6 changes: 6 additions & 0 deletions
6
setup/web_widget_one2many_product_picker_sale_elaboration/setup.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
136 changes: 136 additions & 0 deletions
136
web_widget_one2many_product_picker_sale_elaboration/README.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
================================== | ||
Web Widget One2Many Product Picker | ||
================================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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/12.0/web_widget_one2many_product_picker | ||
:alt: OCA/web | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_one2many_product_picker | ||
: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/12.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Adds the 'one2many_product_picker' friendly mobile widget to create one2many lines linked with product.template records. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
Create or edit a new view and use the new widget called 'one2many_product_picker'. | ||
|
||
Widget options: | ||
~~~~~~~~~~~~~~~ | ||
|
||
* product_per_page > Integer -> Used to control the auto-load behaviour (scroll-pagination) | ||
* groups > Array of dictionaries -> Declare the groups | ||
* field_map > Dictionary: | ||
|
||
* product -> The field that represent the product_id | ||
* name -> The field that represent a name | ||
* product_uom -> The field that represent a product_uom | ||
* product_uom_qty -> The field that represent a product_uom_qty | ||
* price_unit -> The field that represent a price_unit | ||
* parent_id -> The field that represent the main record | ||
|
||
|
||
Group dictionary definition: | ||
|
||
* name -> The group name | ||
* domain -> Forced domain to use | ||
* order -> The order | ||
|
||
* name -> The field name to order | ||
* asc -> Flag to use 'asc' order | ||
|
||
|
||
Example: | ||
|
||
```t-options="{'groups': [{'name': 'Cheap', 'domain': [('list_price', '<', 10.0)], 'field_map': { 'product': 'my_product_id' }}]}"``` | ||
|
||
|
||
Also you need define the view fields. The view must be an 'kanban' view. | ||
This is an example that uses the 'sale.order.line' fields: | ||
|
||
.. code:: xml | ||
<field | ||
name="order_line" | ||
attrs="{'readonly': [('state', 'in', ('done','cancel'))]}" | ||
nolabel="1" | ||
widget="one2many_product_picker" | ||
options="{'groups': [{'name': 'Desk', 'domain': [('name', 'ilike', '%desk%')], 'order': {'name': 'id', 'asc': true}}, {'name': 'Chairs', 'domain': [('name', 'ilike', '%chair%')]}]}" | ||
> | ||
<kanban> | ||
<field name="name"/> | ||
<field name="product_id" /> | ||
<field name="product_uom_qty" /> | ||
<field name="product_uom"/> | ||
<field name="price_unit"/> | ||
<field name="order_id"/> | ||
</kanban> | ||
</field> | ||
** In this example we don't use 'field_map' option because the default match with the sale.order.line field names. | ||
|
||
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_one2many_product_picker%0Aversion:%2012.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 | ||
* Pedro M. Baeza | ||
|
||
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. | ||
|
||
This module is part of the `OCA/web <https://github.com/OCA/web/tree/12.0/web_widget_one2many_product_picker>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
1 change: 1 addition & 0 deletions
1
web_widget_one2many_product_picker_sale_elaboration/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
18 changes: 18 additions & 0 deletions
18
web_widget_one2many_product_picker_sale_elaboration/__manifest__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2020 Tecnativa - Alexandre D. Díaz | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Web Widget One2Many Product Picker Sale Elaboration", | ||
"summary": "Adds support for sale elaboration in the" | ||
" one2many product picker widget", | ||
"version": "13.0.1.0.0", | ||
"category": "Website", | ||
"author": "Tecnativa, " "Odoo Community Association (OCA)", | ||
"website": "https://www.tecnativa.com", | ||
"license": "AGPL-3", | ||
"depends": ["web_widget_one2many_product_picker", "sale_elaboration"], | ||
"data": ["templates/assets.xml"], | ||
"qweb": ["static/src/xml/one2many_product_picker.xml"], | ||
"installable": True, | ||
"auto_install": False, | ||
} |
3 changes: 3 additions & 0 deletions
3
web_widget_one2many_product_picker_sale_elaboration/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Alexandre D. Díaz |
1 change: 1 addition & 0 deletions
1
web_widget_one2many_product_picker_sale_elaboration/readme/DESCRIPTION.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Adds support for 'sale_elaboration' in the product picker |
Oops, something went wrong.