diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..62276b0d58f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# Configuration for known file extensions +[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[.eslintrc,*.{json,yml,yaml,rst,md}] +indent_size = 2 + +# Do not configure editor for libs and autogenerated content +[*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst] +charset = unset +end_of_line = unset +indent_size = unset +indent_style = unset +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.travis.yml b/.travis.yml index 7634c860303..1fa3f15ad9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,25 +9,19 @@ python: - "3.5" addons: + postgresql: "9.6" apt: packages: - expect-dev # provides unbuffer utility - - python-lxml # because pip installation is slow - - python-simplejson - - python-serial - - python-yaml env: global: - - VERSION="11.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" - - TRANSIFEX_USER='transbot@odoo-community.org' - - secure: nzJrUI6abQi27D2bzd5wswlEoF5LzLqUyUpb/ZKv9+ylgZcPTmqYr1jFTbh68kVSSpepoL5JrjnWHDlh2qDEyB2Iak00mkGGdydxxVl6EJbkZP2kElrN3OGPTa6pImsNGf3lRoZqhE5nXRfWHcxIYCtX/F6GimPZdTJx9hvyyQQ= + - VERSION="11.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0" matrix: - LINT_CHECK="1" - - TRANSIFEX="1" - TESTS="1" ODOO_REPO="OCA/OCB" - - TESTS="1" ODOO_REPO="odoo/odoo" + - TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1" install: diff --git a/product_brand/README.rst b/product_brand/README.rst index 9b163f19240..f6bcea793e5 100644 --- a/product_brand/README.rst +++ b/product_brand/README.rst @@ -2,10 +2,13 @@ Product Brand Manager ===================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:71e5609297caf312ecd7c21160a4649242ef0b1253e7222260aa2a1e48d6984f + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Product Brand Manager .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_brand :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/135/11.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=11.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows odoo users to easily manage product brands. @@ -68,7 +71,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/product_brand/__manifest__.py b/product_brand/__manifest__.py index 57e28f79a77..e16c064168b 100644 --- a/product_brand/__manifest__.py +++ b/product_brand/__manifest__.py @@ -8,7 +8,7 @@ { 'name': 'Product Brand Manager', - 'version': '11.0.1.1.0', + 'version': '11.0.1.3.0', 'category': 'Product', 'summary': "Product Brand Manager", 'author': 'NetAndCo, Akretion, Prisnet Telecommunications SA, ' diff --git a/product_brand/i18n/de.po b/product_brand/i18n/de.po index 9b4fae1bf81..92885badd92 100644 --- a/product_brand/i18n/de.po +++ b/product_brand/i18n/de.po @@ -21,9 +21,13 @@ msgstr "" #. module: product_brand #: model:ir.actions.act_window,name:product_brand.action_product_brand +#: model:ir.model.fields,field_description:product_brand.field_account_invoice_report_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_template_product_brand_id +#: model:ir.model.fields,field_description:product_brand.field_sale_report_product_brand_id #: model:ir.ui.view,arch_db:product_brand.product_template_form_brand_add +#: model:ir.ui.view,arch_db:product_brand.view_account_invoice_report_search +#: model:ir.ui.view,arch_db:product_brand.view_order_product_search #: model:ir.ui.view,arch_db:product_brand.view_product_template_search_brand msgid "Brand" msgstr "Marke" @@ -66,6 +70,11 @@ msgstr "Anzeigename" msgid "ID" msgstr "ID" +#. module: product_brand +#: model:ir.model,name:product_brand.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand___last_update msgid "Last Modified on" @@ -118,6 +127,11 @@ msgstr "Produktvorlage" msgid "Products" msgstr "Produkte" +#. module: product_brand +#: model:ir.model,name:product_brand.model_sale_report +msgid "Sales Orders Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,help:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,help:product_brand.field_product_template_product_brand_id diff --git a/product_brand/i18n/es.po b/product_brand/i18n/es.po index b56bf789012..35f79fca1d9 100644 --- a/product_brand/i18n/es.po +++ b/product_brand/i18n/es.po @@ -9,20 +9,25 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-07-29 02:55+0000\n" -"PO-Revision-Date: 2017-07-29 02:55+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"PO-Revision-Date: 2019-02-08 09:18+0000\n" +"Last-Translator: Pedro M. Baeza \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_brand #: model:ir.actions.act_window,name:product_brand.action_product_brand +#: model:ir.model.fields,field_description:product_brand.field_account_invoice_report_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_template_product_brand_id +#: model:ir.model.fields,field_description:product_brand.field_sale_report_product_brand_id #: model:ir.ui.view,arch_db:product_brand.product_template_form_brand_add +#: model:ir.ui.view,arch_db:product_brand.view_account_invoice_report_search +#: model:ir.ui.view,arch_db:product_brand.view_order_product_search #: model:ir.ui.view,arch_db:product_brand.view_product_template_search_brand msgid "Brand" msgstr "Marca" @@ -65,6 +70,11 @@ msgstr "Nombre mostrado" msgid "ID" msgstr "ID" +#. module: product_brand +#: model:ir.model,name:product_brand.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "Estadísticas de factura" + #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand___last_update msgid "Last Modified on" @@ -117,6 +127,11 @@ msgstr "Plantilla de producto" msgid "Products" msgstr "Productos" +#. module: product_brand +#: model:ir.model,name:product_brand.model_sale_report +msgid "Sales Orders Statistics" +msgstr "Estadísticas de pedidos de venta" + #. module: product_brand #: model:ir.model.fields,help:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,help:product_brand.field_product_template_product_brand_id diff --git a/product_brand/i18n/fr.po b/product_brand/i18n/fr.po index 3751cd75923..5fc6cc6934d 100644 --- a/product_brand/i18n/fr.po +++ b/product_brand/i18n/fr.po @@ -21,9 +21,13 @@ msgstr "" #. module: product_brand #: model:ir.actions.act_window,name:product_brand.action_product_brand +#: model:ir.model.fields,field_description:product_brand.field_account_invoice_report_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_template_product_brand_id +#: model:ir.model.fields,field_description:product_brand.field_sale_report_product_brand_id #: model:ir.ui.view,arch_db:product_brand.product_template_form_brand_add +#: model:ir.ui.view,arch_db:product_brand.view_account_invoice_report_search +#: model:ir.ui.view,arch_db:product_brand.view_order_product_search #: model:ir.ui.view,arch_db:product_brand.view_product_template_search_brand msgid "Brand" msgstr "Marque" @@ -66,6 +70,11 @@ msgstr "Nom affiché" msgid "ID" msgstr "ID" +#. module: product_brand +#: model:ir.model,name:product_brand.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand___last_update msgid "Last Modified on" @@ -118,6 +127,11 @@ msgstr "Modèle de produit" msgid "Products" msgstr "Produits" +#. module: product_brand +#: model:ir.model,name:product_brand.model_sale_report +msgid "Sales Orders Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,help:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,help:product_brand.field_product_template_product_brand_id diff --git a/product_brand/i18n/fr_FR.po b/product_brand/i18n/fr_FR.po index 78ddab9e3ce..ed35bf056d8 100644 --- a/product_brand/i18n/fr_FR.po +++ b/product_brand/i18n/fr_FR.po @@ -21,9 +21,13 @@ msgstr "" #. module: product_brand #: model:ir.actions.act_window,name:product_brand.action_product_brand +#: model:ir.model.fields,field_description:product_brand.field_account_invoice_report_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_template_product_brand_id +#: model:ir.model.fields,field_description:product_brand.field_sale_report_product_brand_id #: model:ir.ui.view,arch_db:product_brand.product_template_form_brand_add +#: model:ir.ui.view,arch_db:product_brand.view_account_invoice_report_search +#: model:ir.ui.view,arch_db:product_brand.view_order_product_search #: model:ir.ui.view,arch_db:product_brand.view_product_template_search_brand msgid "Brand" msgstr "Marque" @@ -66,6 +70,11 @@ msgstr "" msgid "ID" msgstr "" +#. module: product_brand +#: model:ir.model,name:product_brand.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand___last_update msgid "Last Modified on" @@ -118,6 +127,11 @@ msgstr "" msgid "Products" msgstr "" +#. module: product_brand +#: model:ir.model,name:product_brand.model_sale_report +msgid "Sales Orders Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,help:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,help:product_brand.field_product_template_product_brand_id diff --git a/product_brand/i18n/hr.po b/product_brand/i18n/hr.po index 4905a915a6a..769e0ae022a 100644 --- a/product_brand/i18n/hr.po +++ b/product_brand/i18n/hr.po @@ -22,9 +22,13 @@ msgstr "" #. module: product_brand #: model:ir.actions.act_window,name:product_brand.action_product_brand +#: model:ir.model.fields,field_description:product_brand.field_account_invoice_report_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_template_product_brand_id +#: model:ir.model.fields,field_description:product_brand.field_sale_report_product_brand_id #: model:ir.ui.view,arch_db:product_brand.product_template_form_brand_add +#: model:ir.ui.view,arch_db:product_brand.view_account_invoice_report_search +#: model:ir.ui.view,arch_db:product_brand.view_order_product_search #: model:ir.ui.view,arch_db:product_brand.view_product_template_search_brand msgid "Brand" msgstr "Brand" @@ -67,6 +71,11 @@ msgstr "Naziv" msgid "ID" msgstr "ID" +#. module: product_brand +#: model:ir.model,name:product_brand.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand___last_update msgid "Last Modified on" @@ -119,6 +128,11 @@ msgstr "Predložak proizvoda" msgid "Products" msgstr "Proizvodi" +#. module: product_brand +#: model:ir.model,name:product_brand.model_sale_report +msgid "Sales Orders Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,help:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,help:product_brand.field_product_template_product_brand_id diff --git a/product_brand/i18n/it.po b/product_brand/i18n/it.po index 2134e970f2c..eeff62d9bbd 100644 --- a/product_brand/i18n/it.po +++ b/product_brand/i18n/it.po @@ -9,20 +9,25 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-07-29 02:55+0000\n" -"PO-Revision-Date: 2017-07-29 02:55+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"PO-Revision-Date: 2024-02-12 10:34+0000\n" +"Last-Translator: mymage \n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" #. module: product_brand #: model:ir.actions.act_window,name:product_brand.action_product_brand +#: model:ir.model.fields,field_description:product_brand.field_account_invoice_report_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_template_product_brand_id +#: model:ir.model.fields,field_description:product_brand.field_sale_report_product_brand_id #: model:ir.ui.view,arch_db:product_brand.product_template_form_brand_add +#: model:ir.ui.view,arch_db:product_brand.view_account_invoice_report_search +#: model:ir.ui.view,arch_db:product_brand.view_order_product_search #: model:ir.ui.view,arch_db:product_brand.view_product_template_search_brand msgid "Brand" msgstr "Marca" @@ -65,20 +70,25 @@ msgstr "Nome visualizzato" msgid "ID" msgstr "" +#. module: product_brand +#: model:ir.model,name:product_brand.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand___last_update msgid "Last Modified on" -msgstr "Ultima Modifica il" +msgstr "Ultima modifica il" #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand_write_uid msgid "Last Updated by" -msgstr "Ultimo Aggiornamento di" +msgstr "Ultimo aggiornamento di" #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand_write_date msgid "Last Updated on" -msgstr "Ultimo Aggiornamento il" +msgstr "Ultimo aggiornamento il" #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand_logo @@ -104,7 +114,7 @@ msgstr "Marca del prodotto" #. module: product_brand #: model:ir.ui.menu,name:product_brand.menu_product_brand msgid "Product Brands" -msgstr "Marchi del prodotto" +msgstr "Marche del prodotto" #. module: product_brand #: model:ir.model,name:product_brand.model_product_template @@ -117,6 +127,11 @@ msgstr "" msgid "Products" msgstr "Prodotti" +#. module: product_brand +#: model:ir.model,name:product_brand.model_sale_report +msgid "Sales Orders Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,help:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,help:product_brand.field_product_template_product_brand_id diff --git a/product_brand/i18n/nl_NL.po b/product_brand/i18n/nl_NL.po index f3d6a0bb844..cfe5d463d19 100644 --- a/product_brand/i18n/nl_NL.po +++ b/product_brand/i18n/nl_NL.po @@ -21,9 +21,13 @@ msgstr "" #. module: product_brand #: model:ir.actions.act_window,name:product_brand.action_product_brand +#: model:ir.model.fields,field_description:product_brand.field_account_invoice_report_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_template_product_brand_id +#: model:ir.model.fields,field_description:product_brand.field_sale_report_product_brand_id #: model:ir.ui.view,arch_db:product_brand.product_template_form_brand_add +#: model:ir.ui.view,arch_db:product_brand.view_account_invoice_report_search +#: model:ir.ui.view,arch_db:product_brand.view_order_product_search #: model:ir.ui.view,arch_db:product_brand.view_product_template_search_brand msgid "Brand" msgstr "Merk" @@ -66,6 +70,11 @@ msgstr "Weergavenaam" msgid "ID" msgstr "ID" +#. module: product_brand +#: model:ir.model,name:product_brand.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand___last_update msgid "Last Modified on" @@ -118,6 +127,11 @@ msgstr "Productsjabloon" msgid "Products" msgstr "Producten" +#. module: product_brand +#: model:ir.model,name:product_brand.model_sale_report +msgid "Sales Orders Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,help:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,help:product_brand.field_product_template_product_brand_id diff --git a/product_brand/i18n/sl.po b/product_brand/i18n/sl.po index 37b22ab823a..ea0e4ed9395 100644 --- a/product_brand/i18n/sl.po +++ b/product_brand/i18n/sl.po @@ -21,9 +21,13 @@ msgstr "" #. module: product_brand #: model:ir.actions.act_window,name:product_brand.action_product_brand +#: model:ir.model.fields,field_description:product_brand.field_account_invoice_report_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,field_description:product_brand.field_product_template_product_brand_id +#: model:ir.model.fields,field_description:product_brand.field_sale_report_product_brand_id #: model:ir.ui.view,arch_db:product_brand.product_template_form_brand_add +#: model:ir.ui.view,arch_db:product_brand.view_account_invoice_report_search +#: model:ir.ui.view,arch_db:product_brand.view_order_product_search #: model:ir.ui.view,arch_db:product_brand.view_product_template_search_brand msgid "Brand" msgstr "" @@ -66,6 +70,11 @@ msgstr "Prikazni naziv" msgid "ID" msgstr "ID" +#. module: product_brand +#: model:ir.model,name:product_brand.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,field_description:product_brand.field_product_brand___last_update msgid "Last Modified on" @@ -118,6 +127,11 @@ msgstr "Predloga proizvoda" msgid "Products" msgstr "" +#. module: product_brand +#: model:ir.model,name:product_brand.model_sale_report +msgid "Sales Orders Statistics" +msgstr "" + #. module: product_brand #: model:ir.model.fields,help:product_brand.field_product_product_product_brand_id #: model:ir.model.fields,help:product_brand.field_product_template_product_brand_id diff --git a/product_brand/models/__init__.py b/product_brand/models/__init__.py index 6d309e42ac3..773e247bc87 100644 --- a/product_brand/models/__init__.py +++ b/product_brand/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2009 NetAndCo (). # © 2011 Akretion Benoît Guillot # © 2014 prisnet.ch Seraphine Lantible diff --git a/product_brand/models/product_brand.py b/product_brand/models/product_brand.py index 6fddc98701d..26b369ed954 100644 --- a/product_brand/models/product_brand.py +++ b/product_brand/models/product_brand.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2009 NetAndCo (). # © 2011 Akretion Benoît Guillot # © 2014 prisnet.ch Seraphine Lantible @@ -29,12 +28,12 @@ class ProductBrand(models.Model): ) products_count = fields.Integer( string='Number of products', - compute='_get_products_count', + compute='_compute_products_count', ) @api.multi @api.depends('product_ids') - def _get_products_count(self): + def _compute_products_count(self): for brand in self: brand.products_count = len(brand.product_ids) @@ -45,5 +44,6 @@ class ProductTemplate(models.Model): product_brand_id = fields.Many2one( 'product.brand', string='Brand', + ondelete='restrict', help='Select a brand for this product' ) diff --git a/product_brand/reports/account_invoice_report.py b/product_brand/reports/account_invoice_report.py index 01e5c410182..46889fcc016 100644 --- a/product_brand/reports/account_invoice_report.py +++ b/product_brand/reports/account_invoice_report.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2018 Tecnativa - David Vidal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) diff --git a/product_brand/static/description/index.html b/product_brand/static/description/index.html index 58d2000c547..a65256f435a 100644 --- a/product_brand/static/description/index.html +++ b/product_brand/static/description/index.html @@ -1,20 +1,20 @@ - + - + Product Brand Manager + + +
+

Product Cost Security

+ + +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

Adds a security group for product cost price field. +Only users with this group can view this field.

+

Table of contents

+ +
+

Configuration

+

To use this module you need to:

+
    +
  1. Go to a Setting > Users and Companies > Users.
  2. +
  3. Select a user and add “Access to product costs” group.
  4. +
+
+
+

Usage

+

To use this module you need to:

+
    +
  1. Go to product form view logged with this user and you will see the +standard_price field.
  2. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_cost_security/views/product_views.xml b/product_cost_security/views/product_views.xml new file mode 100755 index 00000000000..4f84878533a --- /dev/null +++ b/product_cost_security/views/product_views.xml @@ -0,0 +1,24 @@ + + + + + + product.template + + + + + + + + + + + diff --git a/product_dimension/README.rst b/product_dimension/README.rst new file mode 100644 index 00000000000..82ccc737fc9 --- /dev/null +++ b/product_dimension/README.rst @@ -0,0 +1,67 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +================= +Product Dimension +================= + +This module extends the functionality of product to support +dimensions (length, width and height). Find the volume +automatically when you change one of these dimensions. + +This module was previously hosted on https://github.com/ingadhoc/odoo-addons +and before that on https://launchpad.net/~ingenieria-adhoc. + + +Usage +===== + +To use this module, you need to: + +#. Go to product view and enter dimensions. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/135/11.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Juan Jose Scarafia +* Leonardo Pistone +* Denis Leemann +* Kumar Aberer + +Do not contact contributors directly about support or help with technical issues. + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. \ No newline at end of file diff --git a/product_dimension/__init__.py b/product_dimension/__init__.py new file mode 100644 index 00000000000..31660d6a965 --- /dev/null +++ b/product_dimension/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/product_dimension/__manifest__.py b/product_dimension/__manifest__.py new file mode 100644 index 00000000000..cc4db482cac --- /dev/null +++ b/product_dimension/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2018 brain-tec AG (http://www.braintec-group.com) +# Copyright 2015-2016 Camptocamp SA +# Copyright 2015 ADHOC SA (http://www.adhoc.com.ar) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + 'name': 'Product Dimension', + 'version': '11.0.1.0.0', + 'category': 'Product', + 'author': 'brain-tec AG, ADHOC SA, Camptocamp SA, ' + 'Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'depends': ['product'], + 'data': ['views/product_view.xml'], + 'installable': True, + 'images': [ + 'static/description/icon.png', + ], +} diff --git a/product_dimension/i18n/ca.po b/product_dimension/i18n/ca.po new file mode 100644 index 00000000000..4659cd7ebf7 --- /dev/null +++ b/product_dimension/i18n/ca.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: product-attribute (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-22 01:40+0000\n" +"PO-Revision-Date: 2016-10-20 06:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Catalan (http://www.transifex.com/oca/OCA-product-" +"attribute-9-0/language/ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "" + +#. module: product_dimension +#: model:ir.ui.view,arch_db:product_dimension.product_normal_form_view +#: model:ir.ui.view,arch_db:product_dimension.product_template_only_form_view +msgid "Dimensions" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "Producte" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "" diff --git a/product_dimension/i18n/de.po b/product_dimension/i18n/de.po new file mode 100644 index 00000000000..e82cc5f73eb --- /dev/null +++ b/product_dimension/i18n/de.po @@ -0,0 +1,63 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-15 10:11+0000\n" +"PO-Revision-Date: 2018-03-15 10:11+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "Einheit d. Abmessungen" + +#. module: product_dimension +#: model:ir.ui.view,arch_db:product_dimension.product_normal_form_view +#: model:ir.ui.view,arch_db:product_dimension.product_template_only_form_view +msgid "Dimensions" +msgstr "Abmessungen" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "Höhe" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "Länge" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "Produkt" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "Produktvorlage" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "Einheit für Länge, Höhe, Breite" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "Breite" diff --git a/product_dimension/i18n/es.po b/product_dimension/i18n/es.po new file mode 100644 index 00000000000..8a7a4323ec5 --- /dev/null +++ b/product_dimension/i18n/es.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: product-attribute (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-02 03:39+0000\n" +"PO-Revision-Date: 2016-10-20 06:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-product-" +"attribute-9-0/language/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "" + +#. module: product_dimension +#: model:ir.ui.view,arch_db:product_dimension.product_normal_form_view +#: model:ir.ui.view,arch_db:product_dimension.product_template_only_form_view +msgid "Dimensions" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "Producto" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "" diff --git a/product_dimension/i18n/fr.po b/product_dimension/i18n/fr.po new file mode 100644 index 00000000000..01090998c94 --- /dev/null +++ b/product_dimension/i18n/fr.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +# Translators: +# leemannd , 2016 +# leemannd , 2016 +msgid "" +msgstr "" +"Project-Id-Version: product-attribute (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-03 15:37+0000\n" +"PO-Revision-Date: 2017-11-03 15:37+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: French (http://www.transifex.com/oca/OCA-product-" +"attribute-9-0/language/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "UdM Dimensionnel" + +#. module: product_dimension +#: model:ir.ui.view,arch_db:product_dimension.product_normal_form_view +#: model:ir.ui.view,arch_db:product_dimension.product_template_only_form_view +#, fuzzy +msgid "Dimensions" +msgstr "UdM Dimensionnel" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "Hauteur" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "Longueur" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "Produit" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "Modèle de produit" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "UdM pour longueur, hauteur, largeur" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "Largeur" diff --git a/product_dimension/i18n/fr_FR.po b/product_dimension/i18n/fr_FR.po new file mode 100644 index 00000000000..477aad11a5d --- /dev/null +++ b/product_dimension/i18n/fr_FR.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: product-attribute (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-22 01:40+0000\n" +"PO-Revision-Date: 2016-10-20 06:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (France) (http://www.transifex.com/oca/OCA-product-" +"attribute-9-0/language/fr_FR/)\n" +"Language: fr_FR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "" + +#. module: product_dimension +#: model:ir.ui.view,arch_db:product_dimension.product_normal_form_view +#: model:ir.ui.view,arch_db:product_dimension.product_template_only_form_view +msgid "Dimensions" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "" + +#~ msgid "Brand" +#~ msgstr "Marque" diff --git a/product_dimension/i18n/product_dimension.pot b/product_dimension/i18n/product_dimension.pot new file mode 100644 index 00000000000..1c7f787fffe --- /dev/null +++ b/product_dimension/i18n/product_dimension.pot @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "" + +#. module: product_dimension +#: model:ir.ui.view,arch_db:product_dimension.product_normal_form_view +#: model:ir.ui.view,arch_db:product_dimension.product_template_only_form_view +msgid "Dimensions" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "" + diff --git a/product_dimension/models/__init__.py b/product_dimension/models/__init__.py new file mode 100644 index 00000000000..ff8911a71f9 --- /dev/null +++ b/product_dimension/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import product diff --git a/product_dimension/models/product.py b/product_dimension/models/product.py new file mode 100644 index 00000000000..bc0dac2c52e --- /dev/null +++ b/product_dimension/models/product.py @@ -0,0 +1,67 @@ +# Copyright 2015 ADHOC SA (http://www.adhoc.com.ar) +# Copyright 2015-2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from odoo import models, fields, api + + +class Product(models.Model): + _inherit = 'product.product' + + @api.onchange('length', 'height', 'width', 'dimensional_uom_id') + def onchange_calculate_volume(self): + self.volume = self.env['product.template']._calc_volume( + self.length, self.height, self.width, self.dimensional_uom_id) + + @api.model + def _get_dimension_uom_domain(self): + return [ + ('category_id', '=', self.env.ref('product.uom_categ_length').id) + ] + + length = fields.Float() + height = fields.Float() + width = fields.Float() + dimensional_uom_id = fields.Many2one( + 'product.uom', + 'Dimensional UoM', + domain=lambda self: self._get_dimension_uom_domain(), + help='UoM for length, height, width') + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + @api.model + def _calc_volume(self, length, height, width, uom_id): + volume = 0 + if length and height and width and uom_id: + length_m = self.convert_to_meters(length, uom_id) + height_m = self.convert_to_meters(height, uom_id) + width_m = self.convert_to_meters(width, uom_id) + volume = length_m * height_m * width_m + + return volume + + @api.onchange('length', 'height', 'width', 'dimensional_uom_id') + def onchange_calculate_volume(self): + self.volume = self._calc_volume( + self.length, self.height, self.width, self.dimensional_uom_id) + + def convert_to_meters(self, measure, dimensional_uom): + uom_meters = self.env.ref('product.product_uom_meter') + + return dimensional_uom._compute_quantity( + qty=measure, + to_unit=uom_meters, + round=False, + ) + + length = fields.Float(related='product_variant_ids.length') + height = fields.Float(related='product_variant_ids.height') + width = fields.Float(related='product_variant_ids.width') + dimensional_uom_id = fields.Many2one( + 'product.uom', + 'Dimensional UoM', related='product_variant_ids.dimensional_uom_id', + help='UoM for length, height, width') diff --git a/product_dimension/static/description/icon.png b/product_dimension/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_dimension/static/description/icon.png differ diff --git a/product_dimension/tests/__init__.py b/product_dimension/tests/__init__.py new file mode 100644 index 00000000000..eb22b2fcef5 --- /dev/null +++ b/product_dimension/tests/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import test_compute_volume diff --git a/product_dimension/tests/test_compute_volume.py b/product_dimension/tests/test_compute_volume.py new file mode 100644 index 00000000000..7da18b997d3 --- /dev/null +++ b/product_dimension/tests/test_compute_volume.py @@ -0,0 +1,67 @@ +# Copyright 2015 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo.tests.common import TransactionCase + + +class TestComputeVolumeOnProduct(TransactionCase): + + def test_it_computes_volume_in_cm(self): + self.product.length = 10. + self.product.height = 200. + self.product.width = 100. + self.product.dimensional_uom_id = self.uom_cm + self.product.onchange_calculate_volume() + self.assertAlmostEqual( + 0.2, + self.product.volume + ) + + def test_it_computes_volume_in_meters(self): + self.product.length = 6. + self.product.height = 2. + self.product.width = 10. + self.product.dimensional_uom_id = self.uom_m + self.product.onchange_calculate_volume() + self.assertAlmostEqual( + 120, + self.product.volume + ) + + def setUp(self): + super(TestComputeVolumeOnProduct, self).setUp() + + self.product = self.env['product.product'].new() + self.uom_m = self.env['product.uom'].search([('name', '=', 'm')]) + self.uom_cm = self.env['product.uom'].search([('name', '=', 'cm')]) + + +class TestComputeVolumeOnTemplate(TransactionCase): + + def test_it_computes_volume_in_cm(self): + self.template.length = 10. + self.template.height = 200. + self.template.width = 100. + self.template.dimensional_uom_id = self.uom_cm + self.template.onchange_calculate_volume() + self.assertAlmostEqual( + 0.2, + self.template.volume + ) + + def test_it_computes_volume_in_meters(self): + self.template.length = 6. + self.template.height = 2. + self.template.width = 10. + self.template.dimensional_uom_id = self.uom_m + self.template.onchange_calculate_volume() + self.assertAlmostEqual( + 120, + self.template.volume + ) + + def setUp(self): + super(TestComputeVolumeOnTemplate, self).setUp() + + self.template = self.env['product.template'].new() + self.uom_m = self.env['product.uom'].search([('name', '=', 'm')]) + self.uom_cm = self.env['product.uom'].search([('name', '=', 'cm')]) diff --git a/product_dimension/views/product_view.xml b/product_dimension/views/product_view.xml new file mode 100755 index 00000000000..3f17e7ff100 --- /dev/null +++ b/product_dimension/views/product_view.xml @@ -0,0 +1,36 @@ + + + + + product_normal_form_view + product.product + + + + + + + + + + + + + + + product_template_form_view + product.template + + + + + + + + + + + + + + diff --git a/product_end_of_life/models/res_config_settings.py b/product_end_of_life/models/res_config_settings.py index 59e212b1a07..8e5a2aa9945 100644 --- a/product_end_of_life/models/res_config_settings.py +++ b/product_end_of_life/models/res_config_settings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) diff --git a/product_end_of_life/tests/test_product_eol.py b/product_end_of_life/tests/test_product_eol.py index ddc7d2a44dc..0fe4291ffc2 100644 --- a/product_end_of_life/tests/test_product_eol.py +++ b/product_end_of_life/tests/test_product_eol.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) diff --git a/product_end_of_life/views/res_config_settings_view.xml b/product_end_of_life/views/res_config_settings_view.xml index 80f03dad747..7b347cab4d4 100644 --- a/product_end_of_life/views/res_config_settings_view.xml +++ b/product_end_of_life/views/res_config_settings_view.xml @@ -1,33 +1,33 @@ - - res.config.settings.view.form.inherit.product_end_of_life - res.config.settings - - - -

Product End of Life

-
-
-
-
-
-
-
-
-
-
\ No newline at end of file + + res.config.settings.view.form.inherit.product_end_of_life + res.config.settings + + + +

Product End of Life

+
+
+
+
+
+
+
+
+
+ diff --git a/product_firmware_version/i18n/es.po b/product_firmware_version/i18n/es.po index e6f7aa48407..5dbffdf21fb 100644 --- a/product_firmware_version/i18n/es.po +++ b/product_firmware_version/i18n/es.po @@ -9,20 +9,21 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-02-27 03:40+0000\n" -"PO-Revision-Date: 2018-02-27 03:40+0000\n" -"Last-Translator: OCA Transbot , 2018\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_firmware_version #: model:ir.model.fields,field_description:product_firmware_version.field_product_product_firmware_version #: model:ir.model.fields,field_description:product_firmware_version.field_product_template_firmware_version msgid "Firmware Version" -msgstr "" +msgstr "Versión del Firmware" #. module: product_firmware_version #: model:ir.model,name:product_firmware_version.model_product_template diff --git a/product_manufacturer/i18n/gl.po b/product_manufacturer/i18n/gl.po index d12c73a9550..a5f7acc4ba0 100644 --- a/product_manufacturer/i18n/gl.po +++ b/product_manufacturer/i18n/gl.po @@ -9,32 +9,33 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-05-05 02:43+0000\n" -"PO-Revision-Date: 2017-05-05 02:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_manufacturer #: model:ir.model.fields,field_description:product_manufacturer.field_product_product_manufacturer_pref #: model:ir.model.fields,field_description:product_manufacturer.field_product_template_manufacturer_pref msgid "Manuf. Product Code" -msgstr "" +msgstr "Código de producto do fabricante" #. module: product_manufacturer #: model:ir.model.fields,field_description:product_manufacturer.field_product_product_manufacturer_pname #: model:ir.model.fields,field_description:product_manufacturer.field_product_template_manufacturer_pname msgid "Manuf. Product Name" -msgstr "" +msgstr "Nome de producto do fabricante" #. module: product_manufacturer #: model:ir.model.fields,field_description:product_manufacturer.field_product_product_manufacturer_purl #: model:ir.model.fields,field_description:product_manufacturer.field_product_template_manufacturer_purl msgid "Manuf. Product URL" -msgstr "" +msgstr "URL de producto do fabricante" #. module: product_manufacturer #: model:ir.model.fields,field_description:product_manufacturer.field_product_product_manufacturer @@ -46,4 +47,4 @@ msgstr "Fabricante" #. module: product_manufacturer #: model:ir.model,name:product_manufacturer.model_product_template msgid "Product Template" -msgstr "" +msgstr "Modelo de producto" diff --git a/product_multi_category/__init__.py b/product_multi_category/__init__.py index ba6ae9b7539..1e1a70572ac 100644 --- a/product_multi_category/__init__.py +++ b/product_multi_category/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2009 Akretion,Guewen Baconnier,Camptocamp,Avanzosc,Sharoon Thomas,Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/product_multi_category/__manifest__.py b/product_multi_category/__manifest__.py index cd8ca34cb2b..c721280c74a 100644 --- a/product_multi_category/__manifest__.py +++ b/product_multi_category/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2009 Akretion,Guewen Baconnier,Camptocamp,Avanzosc,Sharoon Thomas,Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/product_multi_category/i18n/es.po b/product_multi_category/i18n/es.po index 0a81d1c2378..6987d6e96f5 100644 --- a/product_multi_category/i18n/es.po +++ b/product_multi_category/i18n/es.po @@ -9,20 +9,21 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-05-05 02:44+0000\n" -"PO-Revision-Date: 2017-05-05 02:44+0000\n" -"Last-Translator: Pedro M. Baeza , 2017\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_multi_category #: model:ir.model.fields,field_description:product_multi_category.field_product_product_categ_ids #: model:ir.model.fields,field_description:product_multi_category.field_product_template_categ_ids msgid "Extra categories" -msgstr "" +msgstr "Categorías Extra" #. module: product_multi_category #: model:ir.model,name:product_multi_category.model_product_template diff --git a/product_multi_category/models/__init__.py b/product_multi_category/models/__init__.py index a3c5e2f5ce2..13a07887463 100644 --- a/product_multi_category/models/__init__.py +++ b/product_multi_category/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2009 Akretion,Guewen Baconnier,Camptocamp,Avanzosc,Sharoon Thomas,Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/product_multi_category/models/product.py b/product_multi_category/models/product.py index 14b7010baaf..3b697e225b5 100644 --- a/product_multi_category/models/product.py +++ b/product_multi_category/models/product.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2009 Akretion,Guewen Baconnier,Camptocamp,Avanzosc,Sharoon Thomas,Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/product_multi_price/README.rst b/product_multi_price/README.rst new file mode 100644 index 00000000000..222f4328259 --- /dev/null +++ b/product_multi_price/README.rst @@ -0,0 +1,121 @@ +=================== +Product Multi Price +=================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:e1c5ba1f9164a3b53cac0934327d17675a478051a17fde54e29142584456c792 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/11.0/product_multi_price + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_multi_price + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=11.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to set multiple prices to products and base pricelist +rules on them. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure multiple prices you need to set multi prices field names first. +To do so, you need admin permissions. Then go to: + +#. *Settings > Technical > Database Structure > Price Field Names* +#. Create the multi price fields you need. + +If you have multiple companies, you can assign independent field sets for each +one. + +Note: 'Show multi prices' access group must be checked to be able to +add multiple prices in the product form view. + +Usage +===== + +To use this module, you need to: + +#. Go to the product page. +#. In the general tab, there's a list called *Other Prices*. +#. You can add one for every price name available. + +To base pricelist rules on that fields, in the pricelist: + +#. Add a rule and choose *formula* as the computing method. +#. In the *Based on* dropdown list, select *Other Price*. +#. A new list appear: *Other Price Name*. Pick the one you need. +#. Configure the formula. +#. Now the rule is based on that price for the products that have it + configured. Otherwise, it will return 0. + +Known issues / Roadmap +====================== + +* Add mechanisms that allow to set multiprices values from external flows. For + example: having AVCO, FIFO and Standard prices computed simultaneously in + this table. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_ + + * David Vidal + * Pedro M. Baeza + * Ernesto Tejeda + +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/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_multi_price/__init__.py b/product_multi_price/__init__.py new file mode 100644 index 00000000000..cc6b6354ad8 --- /dev/null +++ b/product_multi_price/__init__.py @@ -0,0 +1,2 @@ +from . import models +from .hooks import post_init_hook diff --git a/product_multi_price/__manifest__.py b/product_multi_price/__manifest__.py new file mode 100644 index 00000000000..5b0f2bb9d03 --- /dev/null +++ b/product_multi_price/__manifest__.py @@ -0,0 +1,27 @@ +# Copyright 2020 Tecnativa - David Vidal +# Copyright 2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Product Multi Price", + "version": "11.0.2.0.0", + 'author': 'Tecnativa,' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/product-attribute', + "category": "Product Management", + "license": "AGPL-3", + "depends": [ + "product", + ], + "data": [ + "security/ir.model.access.csv", + "security/multi_price_security.xml", + "views/multi_price_views.xml", + "views/product_pricelist_views.xml", + "views/product_views.xml", + ], + 'demo': [ + "demo/multi_price_demo_data.xml", + ], + "post_init_hook": "post_init_hook", + "installable": True, +} diff --git a/product_multi_price/demo/multi_price_demo_data.xml b/product_multi_price/demo/multi_price_demo_data.xml new file mode 100644 index 00000000000..d2f2955c39f --- /dev/null +++ b/product_multi_price/demo/multi_price_demo_data.xml @@ -0,0 +1,10 @@ + + + + + + price_1 + + + + diff --git a/product_multi_price/hooks.py b/product_multi_price/hooks.py new file mode 100644 index 00000000000..6c519a3d57f --- /dev/null +++ b/product_multi_price/hooks.py @@ -0,0 +1,13 @@ +# Copyright 2020 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, SUPERUSER_ID + + +def post_init_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) + group_id = env.ref('product_multi_price.group_show_multi_prices').id + default_user = env.ref('base.default_user') + user = env['res.users'].with_context(active_test=False).search( + [("share", "=", False)]) + (user - default_user).write({'groups_id': [(4, group_id, None)]}) diff --git a/product_multi_price/i18n/es.po b/product_multi_price/i18n/es.po new file mode 100644 index 00000000000..92cb8b70e9d --- /dev/null +++ b/product_multi_price/i18n/es.po @@ -0,0 +1,156 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_multi_price +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-04-09 08:52+0000\n" +"PO-Revision-Date: 2020-04-09 10:54+0200\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"X-Generator: Poedit 2.0.6\n" + +#. module: product_multi_price +#: sql_constraint:product.multi.price:0 +msgid "A field name cannot be assigned to a product twice for the same company" +msgstr "No puede haber un nombre de campo repetido en la misma compañía" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_company_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_company_id +msgid "Company" +msgstr "Compañía" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_id +msgid "ID" +msgstr "ID (identificación)" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price___last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name___last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_uid +msgid "Last Updated by" +msgstr "Última actualización de" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name +msgid "Name" +msgstr "Nombre" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item_multi_price_name +msgid "Other Price Name" +msgstr "Nombre del otro precio" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids +msgid "Other Prices" +msgstr "Otros precios" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_price +msgid "Price" +msgstr "Precio" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_name +msgid "Price Field Name" +msgstr "Nombre de Campo de Precio" + +#. module: product_multi_price +#: model:ir.actions.act_window,name:product_multi_price.action_multi_price_name_config +#: model:ir.ui.menu,name:product_multi_price.multi_price_name_menu +msgid "Price Field Names" +msgstr "Nombres de Campo de Precio" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist +msgid "Pricelist" +msgstr "Tarifa" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist_item +msgid "Pricelist item" +msgstr "Elemento de Tarifa" + +#. module: product_multi_price +#: sql_constraint:product.multi.price.name:0 +msgid "Prices Names must be unique per company" +msgstr "Los Nombres de Precio deben ser únicos para cada compañía" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_product +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_product_id +msgid "Product" +msgstr "Producto" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view +msgid "Product Multi Price" +msgstr "Multi Precio de Producto" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view +msgid "Product Multi Price Field Name" +msgstr "Nombre de Campo de Multi Precio de Producto" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_multi_price +#: model:res.groups,name:product_multi_price.group_show_multi_prices +#, fuzzy +msgid "Show multi prices" +msgstr "Multi Precio" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price +msgid "product.multi.price" +msgstr "product.multi.price" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price_name +msgid "product.multi.price.name" +msgstr "product.multi.price.name" diff --git a/product_multi_price/i18n/product_multi_price.pot b/product_multi_price/i18n/product_multi_price.pot new file mode 100644 index 00000000000..55bc7554f8c --- /dev/null +++ b/product_multi_price/i18n/product_multi_price.pot @@ -0,0 +1,152 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_multi_price +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_multi_price +#: sql_constraint:product.multi.price:0 +msgid "A field name cannot be assigned to a product twice for the same company" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_company_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_company_id +msgid "Company" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_uid +msgid "Created by" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_create_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_create_date +msgid "Created on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_display_name +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_display_name +msgid "Display Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_id +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_id +msgid "ID" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price___last_update +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_uid +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_write_date +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name +msgid "Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_pricelist_item_multi_price_name +msgid "Other Price Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_product_price_ids +#: model:ir.model.fields,field_description:product_multi_price.field_product_template_price_ids +msgid "Other Prices" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_price +msgid "Price" +msgstr "" + +#. module: product_multi_price +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_name_name +msgid "Price Field Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.actions.act_window,name:product_multi_price.action_multi_price_name_config +#: model:ir.ui.menu,name:product_multi_price.multi_price_name_menu +msgid "Price Field Names" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist +msgid "Pricelist" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_pricelist_item +msgid "Pricelist item" +msgstr "" + +#. module: product_multi_price +#: sql_constraint:product.multi.price.name:0 +msgid "Prices Names must be unique per company" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_product +#: model:ir.model.fields,field_description:product_multi_price.field_product_multi_price_product_id +msgid "Product" +msgstr "" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_form_view +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_tree_view +msgid "Product Multi Price" +msgstr "" + +#. module: product_multi_price +#: model:ir.ui.view,arch_db:product_multi_price.product_multi_price_name_tree_view +msgid "Product Multi Price Field Name" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_multi_price +#: model:res.groups,name:product_multi_price.group_show_multi_prices +msgid "Show multi prices" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price +msgid "product.multi.price" +msgstr "" + +#. module: product_multi_price +#: model:ir.model,name:product_multi_price.model_product_multi_price_name +msgid "product.multi.price.name" +msgstr "" + diff --git a/product_multi_price/migrations/11.0.2.0.0/post-migration.py b/product_multi_price/migrations/11.0.2.0.0/post-migration.py new file mode 100644 index 00000000000..edf4a0f25ed --- /dev/null +++ b/product_multi_price/migrations/11.0.2.0.0/post-migration.py @@ -0,0 +1,7 @@ +# Copyright 2020 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl +from odoo.addons.product_multi_price.hooks import post_init_hook + + +def migrate(cr, version): + post_init_hook(cr, False) diff --git a/product_multi_price/models/__init__.py b/product_multi_price/models/__init__.py new file mode 100644 index 00000000000..b0fa0aa6da9 --- /dev/null +++ b/product_multi_price/models/__init__.py @@ -0,0 +1,4 @@ +from . import product_multi_price +from . import product_pricelist +from . import product_product +from . import product_template diff --git a/product_multi_price/models/product_multi_price.py b/product_multi_price/models/product_multi_price.py new file mode 100644 index 00000000000..40ab532b1ad --- /dev/null +++ b/product_multi_price/models/product_multi_price.py @@ -0,0 +1,58 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models +from odoo.addons import decimal_precision as dp + + +class ProductMultiPrice(models.Model): + _name = 'product.multi.price' + + name = fields.Many2one( + comodel_name='product.multi.price.name', + required=True, + translate=True, + ) + product_id = fields.Many2one( + comodel_name='product.product', + required=True, + ondelete='cascade', + ) + price = fields.Float( + digits=dp.get_precision('Product Price'), + ) + company_id = fields.Many2one( + comodel_name='res.company', + related='name.company_id', + store=True, + readonly=True, + ) + + _sql_constraints = [ + ('multi_price_uniq', 'unique(name, product_id, company_id)', + 'A field name cannot be assigned to a product twice for the same ' + 'company'), + ] + + +class ProductMultiPriceName(models.Model): + _name = 'product.multi.price.name' + + @api.model + def _get_company(self): + return self._context.get('company_id', self.env.user.company_id.id) + + name = fields.Char( + required=True, + string='Price Field Name', + ondelete='restrict' + ) + company_id = fields.Many2one( + comodel_name='res.company', + required=True, + default=lambda self: self._get_company() + ) + + _sql_constraints = [ + ('multi_price_name_uniq', 'unique(name, company_id)', + 'Prices Names must be unique per company'), + ] diff --git a/product_multi_price/models/product_pricelist.py b/product_multi_price/models/product_pricelist.py new file mode 100644 index 00000000000..67b71dd869c --- /dev/null +++ b/product_multi_price/models/product_pricelist.py @@ -0,0 +1,37 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class ProductPricelist(models.Model): + _inherit = 'product.pricelist' + + def _compute_price_rule(self, products_qty_partner, date=False, + uom_id=False): + """Recompute price after calling the atomic super method for + getting proper prices when based on multi price. + """ + rule_obj = self.env['product.pricelist.item'] + result = super()._compute_price_rule( + products_qty_partner, date, uom_id) + # Make sure all rule records are fetched at once and put in cache + rule_obj.browse(x[1] for x in result.values()).mapped('price_discount') + for product, qty, _partner in products_qty_partner: + rule = rule_obj.browse(result[product.id][1]) + if rule.compute_price == 'formula' and rule.base == 'multi_price': + result[product.id] = ( + product._get_multiprice_pricelist_price(rule), + rule.id) + return result + + +class ProductPricelistItem(models.Model): + _inherit = 'product.pricelist.item' + + base = fields.Selection( + selection_add=[('multi_price', 'Other Price')], + ) + multi_price_name = fields.Many2one( + comodel_name='product.multi.price.name', + string="Other Price Name", + ) diff --git a/product_multi_price/models/product_product.py b/product_multi_price/models/product_product.py new file mode 100644 index 00000000000..6dff9b728fd --- /dev/null +++ b/product_multi_price/models/product_product.py @@ -0,0 +1,58 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import models, fields, tools + + +class ProductProduct(models.Model): + _inherit = "product.product" + + price_ids = fields.One2many( + comodel_name='product.multi.price', + inverse_name='product_id', + string="Other Prices", + ) + + def _get_multiprice_pricelist_price(self, rule): + """Method for getting the price from multi price.""" + self.ensure_one() + company = rule.company_id or self.env.user.company_id + price = self.env['product.multi.price'].sudo().search([ + ('company_id', '=', company.id), + ('name', '=', rule.multi_price_name.id), + ('product_id', '=', self.id), + ]).price or 0 + if price: + # We have to replicate this logic in this method as pricelist + # method are atomic and we can't hack inside. + # Verbatim copy of part of product.pricelist._compute_price_rule. + qty_uom_id = self._context.get('uom') or self.uom_id.id + price_uom = self.env['product.uom'].browse([qty_uom_id]) + convert_to_price_uom = ( + lambda price: self.uom_id._compute_price( + price, price_uom)) + price_limit = price + price = (price - (price * (rule.price_discount / 100))) or 0.0 + if rule.price_round: + price = tools.float_round( + price, precision_rounding=rule.price_round) + if rule.price_surcharge: + price_surcharge = convert_to_price_uom(rule.price_surcharge) + price += price_surcharge + if rule.price_min_margin: + price_min_margin = convert_to_price_uom(rule.price_min_margin) + price = max(price, price_limit + price_min_margin) + if rule.price_max_margin: + price_max_margin = convert_to_price_uom(rule.price_max_margin) + price = min(price, price_limit + price_max_margin) + return price + + def price_compute(self, price_type, uom=False, currency=False, + company=False): + """Return temporary prices when computation is done for multi price for + avoiding error on super method. We will later fill these with the + correct values. + """ + if price_type == 'multi_price': + return dict.fromkeys(self.ids, 1.0) + return super().price_compute( + price_type, uom=uom, currency=currency, company=company) diff --git a/product_multi_price/models/product_template.py b/product_multi_price/models/product_template.py new file mode 100644 index 00000000000..996fac1a4da --- /dev/null +++ b/product_multi_price/models/product_template.py @@ -0,0 +1,52 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + price_ids = fields.One2many( + comodel_name='product.multi.price', + compute='_compute_price_ids', + inverse='_inverse_price_ids', + string="Other Prices", + ) + + @api.depends('product_variant_ids', + 'product_variant_ids.price_ids') + def _compute_price_ids(self): + for p in self: + if len(p.product_variant_ids) == 1: + p.price_ids = p.product_variant_ids.price_ids + + def _inverse_price_ids(self): + for p in self: + if len(p.product_variant_ids) == 1: + p.product_variant_ids.price_ids = p.price_ids + + def _get_multiprice_pricelist_price(self, rule): + if len(self.product_variant_ids) == 1: + return ( + self.product_variant_ids._get_multiprice_pricelist_price(rule)) + return 0 + + @api.model + def create(self, vals): + product = super().create(vals) + if vals.get('price_ids'): + product.write({ + 'price_ids': vals.get('price_ids'), + }) + return product + + def price_compute(self, price_type, uom=False, currency=False, + company=False): + """Return temporary prices when computation is done for multi price for + avoiding error on super method. We will later fill these with the + correct values. + """ + if price_type == 'multi_price': + return dict.fromkeys(self.ids, 1.0) + return super().price_compute( + price_type, uom=uom, currency=currency, company=company) diff --git a/product_multi_price/readme/CONFIGURE.rst b/product_multi_price/readme/CONFIGURE.rst new file mode 100644 index 00000000000..b61299a3901 --- /dev/null +++ b/product_multi_price/readme/CONFIGURE.rst @@ -0,0 +1,11 @@ +To configure multiple prices you need to set multi prices field names first. +To do so, you need admin permissions. Then go to: + +#. *Settings > Technical > Database Structure > Price Field Names* +#. Create the multi price fields you need. + +If you have multiple companies, you can assign independent field sets for each +one. + +Note: 'Show multi prices' access group must be checked to be able to +add multiple prices in the product form view. diff --git a/product_multi_price/readme/CONTRIBUTORS.rst b/product_multi_price/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..9eb6d6c6984 --- /dev/null +++ b/product_multi_price/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +* `Tecnativa `_ + + * David Vidal + * Pedro M. Baeza + * Ernesto Tejeda diff --git a/product_multi_price/readme/DESCRIPTION.rst b/product_multi_price/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..c76055a6eb9 --- /dev/null +++ b/product_multi_price/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows to set multiple prices to products and base pricelist +rules on them. diff --git a/product_multi_price/readme/ROADMAP.rst b/product_multi_price/readme/ROADMAP.rst new file mode 100644 index 00000000000..620354d64ab --- /dev/null +++ b/product_multi_price/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* Add mechanisms that allow to set multiprices values from external flows. For + example: having AVCO, FIFO and Standard prices computed simultaneously in + this table. diff --git a/product_multi_price/readme/USAGE.rst b/product_multi_price/readme/USAGE.rst new file mode 100644 index 00000000000..409ae850807 --- /dev/null +++ b/product_multi_price/readme/USAGE.rst @@ -0,0 +1,14 @@ +To use this module, you need to: + +#. Go to the product page. +#. In the general tab, there's a list called *Other Prices*. +#. You can add one for every price name available. + +To base pricelist rules on that fields, in the pricelist: + +#. Add a rule and choose *formula* as the computing method. +#. In the *Based on* dropdown list, select *Other Price*. +#. A new list appear: *Other Price Name*. Pick the one you need. +#. Configure the formula. +#. Now the rule is based on that price for the products that have it + configured. Otherwise, it will return 0. diff --git a/product_multi_price/security/ir.model.access.csv b/product_multi_price/security/ir.model.access.csv new file mode 100644 index 00000000000..c15ad02ac20 --- /dev/null +++ b/product_multi_price/security/ir.model.access.csv @@ -0,0 +1,4 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"multi price","product.multi.price","model_product_multi_price","base.group_user",1,1,1,1 +"multi price name read","product.multi.price.name","model_product_multi_price_name","base.group_user",1,0,0,0 +"multi price name admin","product.multi.price.name","model_product_multi_price_name","base.group_system",1,1,1,1 diff --git a/product_multi_price/security/multi_price_security.xml b/product_multi_price/security/multi_price_security.xml new file mode 100644 index 00000000000..dd7c04826ce --- /dev/null +++ b/product_multi_price/security/multi_price_security.xml @@ -0,0 +1,23 @@ + + + + + Show multi prices + + + + + + Multiple Price multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + Multiple Price Field Name multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + diff --git a/product_multi_price/static/description/icon.png b/product_multi_price/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_multi_price/static/description/icon.png differ diff --git a/product_multi_price/static/description/index.html b/product_multi_price/static/description/index.html new file mode 100644 index 00000000000..86dcf73e661 --- /dev/null +++ b/product_multi_price/static/description/index.html @@ -0,0 +1,469 @@ + + + + + + +Product Multi Price + + + +
+

Product Multi Price

+ + +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

This module allows to set multiple prices to products and base pricelist +rules on them.

+

Table of contents

+ +
+

Configuration

+

To configure multiple prices you need to set multi prices field names first. +To do so, you need admin permissions. Then go to:

+
    +
  1. Settings > Technical > Database Structure > Price Field Names
  2. +
  3. Create the multi price fields you need.
  4. +
+

If you have multiple companies, you can assign independent field sets for each +one.

+

Note: ‘Show multi prices’ access group must be checked to be able to +add multiple prices in the product form view.

+
+
+

Usage

+

To use this module, you need to:

+
    +
  1. Go to the product page.
  2. +
  3. In the general tab, there’s a list called Other Prices.
  4. +
  5. You can add one for every price name available.
  6. +
+

To base pricelist rules on that fields, in the pricelist:

+
    +
  1. Add a rule and choose formula as the computing method.
  2. +
  3. In the Based on dropdown list, select Other Price.
  4. +
  5. A new list appear: Other Price Name. Pick the one you need.
  6. +
  7. Configure the formula.
  8. +
  9. Now the rule is based on that price for the products that have it +configured. Otherwise, it will return 0.
  10. +
+
+
+

Known issues / Roadmap

+
    +
  • Add mechanisms that allow to set multiprices values from external flows. For +example: having AVCO, FIFO and Standard prices computed simultaneously in +this table.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa
      +
    • David Vidal
    • +
    • Pedro M. Baeza
    • +
    • Ernesto Tejeda
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_multi_price/tests/__init__.py b/product_multi_price/tests/__init__.py new file mode 100644 index 00000000000..03b7c618dfc --- /dev/null +++ b/product_multi_price/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_multi_price diff --git a/product_multi_price/tests/test_product_multi_price.py b/product_multi_price/tests/test_product_multi_price.py new file mode 100644 index 00000000000..0ad1c4411f6 --- /dev/null +++ b/product_multi_price/tests/test_product_multi_price.py @@ -0,0 +1,91 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo.tests.common import SavepointCase + + +class TestProductMultiPrice(SavepointCase): + + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.price_name_obj = cls.env['product.multi.price.name'] + cls.price_field_1 = cls.price_name_obj.create({'name': 'test_field_1'}) + cls.price_field_2 = cls.price_name_obj.create({'name': 'test_field_2'}) + prod_tmpl_obj = cls.env['product.template'] + product_obj = cls.env['product.product'] + cls.prod_1 = prod_tmpl_obj.create({ + 'name': 'Test Product Template', + 'price_ids': [ + (0, 0, { + 'name': cls.price_field_1.id, + 'price': 5.5, + }), + (0, 0, { + 'name': cls.price_field_2.id, + 'price': 20.0, + }), + ], + }) + cls.prod_att_1 = cls.env['product.attribute'].create({'name': 'Color'}) + cls.prod_attr1_v1 = cls.env['product.attribute.value'].create({ + 'name': 'red', 'attribute_id': cls.prod_att_1.id}) + cls.prod_attr1_v2 = cls.env['product.attribute.value'].create({ + 'name': 'blue', 'attribute_id': cls.prod_att_1.id}) + cls.prod_2 = prod_tmpl_obj.create({ + 'name': 'Test Product 2 With Variants', + 'attribute_line_ids': [(0, 0, { + 'attribute_id': cls.prod_att_1.id, + })] + }) + cls.prod_prod_2_1 = product_obj.create({ + 'product_tmpl_id': cls.prod_2.id, + 'attribute_value_ids': [(6, 0, [cls.prod_attr1_v1.id])], + 'price_ids': [ + (0, 0, { + 'name': cls.price_field_1.id, + 'price': 6.6, + }), + (0, 0, { + 'name': cls.price_field_2.id, + 'price': 7.7, + }), + ], + }) + cls.prod_prod_2_2 = product_obj.create({ + 'product_tmpl_id': cls.prod_2.id, + 'attribute_value_ids': [(6, 0, [cls.prod_attr1_v2.id])], + 'price_ids': [ + (0, 0, { + 'name': cls.price_field_1.id, + 'price': 8.8, + }), + (0, 0, { + 'name': cls.price_field_2.id, + 'price': 9.9, + }), + ], + }) + cls.pricelist = cls.env['product.pricelist'].create({ + 'name': 'Test pricelist', + 'item_ids': [ + (0, 0, { + 'compute_price': 'formula', + 'base': 'multi_price', + 'multi_price_name': cls.price_field_1.id, + 'price_discount': 10, + 'applied_on': '3_global', + }), + ], + }) + + def test_product_multi_price_pricelist(self): + """Pricelists based on multi prices for templates or variants""" + price = self.prod_1.with_context( + pricelist=self.pricelist.id).price + self.assertAlmostEqual(price, 4.95) + price = self.prod_prod_2_1.with_context( + pricelist=self.pricelist.id).price + self.assertAlmostEqual(price, 5.94) + price = self.prod_prod_2_2.with_context( + pricelist=self.pricelist.id).price + self.assertAlmostEqual(price, 7.92) diff --git a/product_multi_price/views/multi_price_views.xml b/product_multi_price/views/multi_price_views.xml new file mode 100644 index 00000000000..e49ba0dd642 --- /dev/null +++ b/product_multi_price/views/multi_price_views.xml @@ -0,0 +1,63 @@ + + + + product.multi.price + + + + + + + + + + + + product.multi.price + +
+ + + + + + + + +
+
+
+ + + product.multi.price + primary + + + + + + bottom + + + + + + product.multi.price.name + + + + + + + + + + Price Field Names + product.multi.price.name + form + {} + + + + +
diff --git a/product_multi_price/views/product_pricelist_views.xml b/product_multi_price/views/product_pricelist_views.xml new file mode 100644 index 00000000000..e262ae80f9b --- /dev/null +++ b/product_multi_price/views/product_pricelist_views.xml @@ -0,0 +1,14 @@ + + + + + product.pricelist.item + + + + + + + + + diff --git a/product_multi_price/views/product_views.xml b/product_multi_price/views/product_views.xml new file mode 100644 index 00000000000..22c045731a6 --- /dev/null +++ b/product_multi_price/views/product_views.xml @@ -0,0 +1,33 @@ + + + + + product.template + + + + + + + + + + + product.product + + + + + + + + + + diff --git a/product_packaging_type/README.rst b/product_packaging_type/README.rst new file mode 100644 index 00000000000..9b526c6add8 --- /dev/null +++ b/product_packaging_type/README.rst @@ -0,0 +1,86 @@ +====================== +Product Packaging Type +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:e44d95f2ec69e9c0b5de189f6bda3d04872f6d6c2c1f86ff8016bd9bc8f5e677 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/12.0/product_packaging_type + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_packaging_type + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=12.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows odoo users to declare packaging types + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To create a new packaging type: + +#. Go to *Inventory > Configuration > Products > Product Packaging Type*. +#. You can create/edit/delete packaging types + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* `Camptocamp `_ + + * Damien Crier + +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/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_packaging_type/__init__.py b/product_packaging_type/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/product_packaging_type/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_packaging_type/__manifest__.py b/product_packaging_type/__manifest__.py new file mode 100644 index 00000000000..7d9ac15c2b5 --- /dev/null +++ b/product_packaging_type/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2019-2020 Camptocamp (). +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +{ + "name": "Product Packaging Type", + "version": "11.0.1.0.0", + "development_status": "Beta", + "category": "Product", + "summary": "Product Packaging Type", + "author": "Camptocamp, " "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/product-attribute", + "license": "LGPL-3", + "depends": ["product", "stock"], + "data": [ + "data/product_packaging_type.xml", + "security/ir.model.access.csv", + "views/product_packaging_type_view.xml", + "views/product_packaging_view.xml", + ], + "installable": True, + "auto_install": False, +} diff --git a/product_packaging_type/data/product_packaging_type.xml b/product_packaging_type/data/product_packaging_type.xml new file mode 100644 index 00000000000..055bbe3640a --- /dev/null +++ b/product_packaging_type/data/product_packaging_type.xml @@ -0,0 +1,9 @@ + + + + Default Type + DEFAULT + 1 + + + diff --git a/product_packaging_type/i18n/ca.po b/product_packaging_type/i18n/ca.po new file mode 100644 index 00000000000..a000fc7e5e1 --- /dev/null +++ b/product_packaging_type/i18n/ca.po @@ -0,0 +1,144 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_packaging_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-02-15 17:45+0000\n" +"Last-Translator: claudiagn \n" +"Language-Team: none\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__active +msgid "Active" +msgstr "Actiu" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__code +msgid "Code" +msgstr "Codi" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__create_uid +msgid "Created by" +msgstr "Creat per" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__create_date +msgid "Created on" +msgstr "Creat el" + +#. module: product_packaging_type +#: model:product.packaging.type,name:product_packaging_type.product_packaging_type_default +msgid "Default Type" +msgstr "Tipus per defecte" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__display_name +msgid "Display Name" +msgstr "Nom visible" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__type_has_gtin +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__has_gtin +msgid "Has Gtin" +msgstr "Has Gtin" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__id +msgid "ID" +msgstr "ID" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__is_default +msgid "Is Default" +msgstr "És per defecte" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type____last_update +msgid "Last Modified on" +msgstr "Última modificació en" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__write_uid +msgid "Last Updated by" +msgstr "última actualització per" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__write_date +msgid "Last Updated on" +msgstr "Última actualització el" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__name +msgid "Name" +msgstr "Nom" + +#. module: product_packaging_type +#: code:addons/product_packaging_type/models/product_packaging_type.py:28 +#, python-format +msgid "Only one product packaging type can be set as \"Is Default\"." +msgstr "" +"Només es pot establir un tipus d'embalatge de producte com a \"És per defecte" +"\"." + +#. module: product_packaging_type +#: model_terms:ir.ui.view,arch_db:product_packaging_type.product_packaging_tree_view_inherit +msgid "Packaging" +msgstr "Empaquetat" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__packaging_type_id +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_form +msgid "Packaging Type" +msgstr "Tipus d'empaquetat" + +#. module: product_packaging_type +#: model:ir.model,name:product_packaging_type.model_product_packaging +msgid "Product Packaging" +msgstr "Empaquetat de producte" + +#. module: product_packaging_type +#: model:ir.actions.act_window,name:product_packaging_type.act_open_product_packaging_type_view +#: model:ir.ui.menu,name:product_packaging_type.menu_product_packaging_type +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_form +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_search +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_tree +msgid "Product Packaging Type" +msgstr "Tipus d'empaquetat de producte" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__qty_per_type +msgid "Qty per package type" +msgstr "Quantitat per tipus de empaquetat" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__sequence +msgid "Sequence" +msgstr "Seqüència" + +#. module: product_packaging_type +#: code:addons/product_packaging_type/models/product_packaging_type.py:26 +#, python-format +msgid "There must be one product packaging type set as \"Is Default\"." +msgstr "" +"Hi ha d'haver un tipus d'embalatge de producte definit com a \"És per defecte" +"\"." + +#. module: product_packaging_type +#: model:ir.model,name:product_packaging_type.model_product_packaging_type +msgid "Type management for product.packaging" +msgstr "Gestió de tipus per product.packaging" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__type_sequence +msgid "Type sequence" +msgstr "Seqüència de tipus" diff --git a/product_packaging_type/i18n/es.po b/product_packaging_type/i18n/es.po new file mode 100644 index 00000000000..d9e6c0b4730 --- /dev/null +++ b/product_packaging_type/i18n/es.po @@ -0,0 +1,136 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_packaging_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-01-13 06:39+0000\n" +"PO-Revision-Date: 2026-01-13 06:39+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_active +msgid "Active" +msgstr "Activo" + +#. module: product_packaging_type +#: model:product.packaging.type,name:product_packaging_type.product_packaging_type_default +msgid "Caja pequeña" +msgstr "Caja pequeña" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_code +msgid "Code" +msgstr "Código" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_create_date +msgid "Created on" +msgstr "Creado el" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_has_gtin +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_has_gtin_5005 +msgid "Has Gtin" +msgstr "Tiene GTIN" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_id +msgid "ID" +msgstr "ID" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_is_default +msgid "Is Default" +msgstr "Es predeterminado" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type___last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_name +msgid "Name" +msgstr "Nombre" + +#. module: product_packaging_type +#: code:addons/product_packaging_type/models/product_packaging_type.py:28 +#, python-format +msgid "Only one product packaging type can be set as \"Is Default\"." +msgstr "Solo se puede establecer un tipo de empaque como \"Predeterminado\"." + +#. module: product_packaging_type +#: model:ir.model,name:product_packaging_type.model_product_packaging +#: model:ir.ui.view,arch_db:product_packaging_type.product_packaging_tree_view_inherit +msgid "Packaging" +msgstr "Empaque" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_packaging_type_id +#: model:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_form +msgid "Packaging Type" +msgstr "Tipo de empaque" + +#. module: product_packaging_type +#: model:ir.actions.act_window,name:product_packaging_type.act_open_product_packaging_type_view +#: model:ir.ui.menu,name:product_packaging_type.menu_product_packaging_type +#: model:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_form +#: model:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_search +#: model:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_tree +msgid "Product Packaging Type" +msgstr "Tipo de empaque de producto" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_qty_per_type +msgid "Qty per package type" +msgstr "Ctd. por tipo de empaque" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_sequence +msgid "Sequence" +msgstr "Secuencia" + +#. module: product_packaging_type +#: code:addons/product_packaging_type/models/product_packaging_type.py:26 +#, python-format +msgid "There must be one product packaging type set as \"Is Default\"." +msgstr "Debe haber un tipo de empaque de producto configurado como \"Predeterminado\"." + +#. module: product_packaging_type +#: model:ir.model,name:product_packaging_type.model_product_packaging_type +msgid "Type management for product.packaging" +msgstr "Gestión de tipos para empaque de producto" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type_sequence_5006 +msgid "Type sequence" +msgstr "Secuencia de tipo" diff --git a/product_packaging_type/i18n/it.po b/product_packaging_type/i18n/it.po new file mode 100644 index 00000000000..c94af6681d7 --- /dev/null +++ b/product_packaging_type/i18n/it.po @@ -0,0 +1,143 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_packaging_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-11-09 09:36+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__active +msgid "Active" +msgstr "Attivo" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__code +msgid "Code" +msgstr "Codice" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: product_packaging_type +#: model:product.packaging.type,name:product_packaging_type.product_packaging_type_default +msgid "Default Type" +msgstr "Tipo predefinito" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__type_has_gtin +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__has_gtin +msgid "Has Gtin" +msgstr "Ha GTIN" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__id +msgid "ID" +msgstr "ID" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__is_default +msgid "Is Default" +msgstr "È predefinito" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__name +msgid "Name" +msgstr "Nome" + +#. module: product_packaging_type +#: code:addons/product_packaging_type/models/product_packaging_type.py:28 +#, python-format +msgid "Only one product packaging type can be set as \"Is Default\"." +msgstr "" +"Solo un tipo imballaggio prodotto può essere impostato come \"È predefinito\"" +"." + +#. module: product_packaging_type +#: model_terms:ir.ui.view,arch_db:product_packaging_type.product_packaging_tree_view_inherit +msgid "Packaging" +msgstr "Imballaggio" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__packaging_type_id +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_form +msgid "Packaging Type" +msgstr "Tipo imballaggio" + +#. module: product_packaging_type +#: model:ir.model,name:product_packaging_type.model_product_packaging +msgid "Product Packaging" +msgstr "Imballaggio prodotto" + +#. module: product_packaging_type +#: model:ir.actions.act_window,name:product_packaging_type.act_open_product_packaging_type_view +#: model:ir.ui.menu,name:product_packaging_type.menu_product_packaging_type +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_form +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_search +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_tree +msgid "Product Packaging Type" +msgstr "Tipo imballaggio prodotto" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__qty_per_type +msgid "Qty per package type" +msgstr "Q.tà per tipo imballaggio" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__sequence +msgid "Sequence" +msgstr "Sequenza" + +#. module: product_packaging_type +#: code:addons/product_packaging_type/models/product_packaging_type.py:26 +#, python-format +msgid "There must be one product packaging type set as \"Is Default\"." +msgstr "" +"Deve esserci un tipo imballaggio prodotto impostato come \"È predefinito\"." + +#. module: product_packaging_type +#: model:ir.model,name:product_packaging_type.model_product_packaging_type +msgid "Type management for product.packaging" +msgstr "Gestione tipo per product.packaging" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__type_sequence +msgid "Type sequence" +msgstr "Sequenza tipo" diff --git a/product_packaging_type/i18n/product_packaging_type.pot b/product_packaging_type/i18n/product_packaging_type.pot new file mode 100644 index 00000000000..9128a784bfa --- /dev/null +++ b/product_packaging_type/i18n/product_packaging_type.pot @@ -0,0 +1,138 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_packaging_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__active +msgid "Active" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__code +msgid "Code" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__create_uid +msgid "Created by" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__create_date +msgid "Created on" +msgstr "" + +#. module: product_packaging_type +#: model:product.packaging.type,name:product_packaging_type.product_packaging_type_default +msgid "Default Type" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__display_name +msgid "Display Name" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__type_has_gtin +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__has_gtin +msgid "Has Gtin" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__id +msgid "ID" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__is_default +msgid "Is Default" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__name +msgid "Name" +msgstr "" + +#. module: product_packaging_type +#: code:addons/product_packaging_type/models/product_packaging_type.py:28 +#, python-format +msgid "Only one product packaging type can be set as \"Is Default\"." +msgstr "" + +#. module: product_packaging_type +#: model_terms:ir.ui.view,arch_db:product_packaging_type.product_packaging_tree_view_inherit +msgid "Packaging" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__packaging_type_id +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_form +msgid "Packaging Type" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model,name:product_packaging_type.model_product_packaging +msgid "Product Packaging" +msgstr "" + +#. module: product_packaging_type +#: model:ir.actions.act_window,name:product_packaging_type.act_open_product_packaging_type_view +#: model:ir.ui.menu,name:product_packaging_type.menu_product_packaging_type +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_form +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_search +#: model_terms:ir.ui.view,arch_db:product_packaging_type.view_product_packaging_type_tree +msgid "Product Packaging Type" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__qty_per_type +msgid "Qty per package type" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging_type__sequence +msgid "Sequence" +msgstr "" + +#. module: product_packaging_type +#: code:addons/product_packaging_type/models/product_packaging_type.py:26 +#, python-format +msgid "There must be one product packaging type set as \"Is Default\"." +msgstr "" + +#. module: product_packaging_type +#: model:ir.model,name:product_packaging_type.model_product_packaging_type +msgid "Type management for product.packaging" +msgstr "" + +#. module: product_packaging_type +#: model:ir.model.fields,field_description:product_packaging_type.field_product_packaging__type_sequence +msgid "Type sequence" +msgstr "" + diff --git a/product_packaging_type/models/__init__.py b/product_packaging_type/models/__init__.py new file mode 100644 index 00000000000..643870a78df --- /dev/null +++ b/product_packaging_type/models/__init__.py @@ -0,0 +1 @@ +from . import product_packaging_type diff --git a/product_packaging_type/models/product_packaging_type.py b/product_packaging_type/models/product_packaging_type.py new file mode 100644 index 00000000000..f188e8a0d12 --- /dev/null +++ b/product_packaging_type/models/product_packaging_type.py @@ -0,0 +1,115 @@ +# Copyright 2019-2020 Camptocamp (). +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) +from collections import OrderedDict + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class ProductPackagingType(models.Model): + _name = "product.packaging.type" + _description = "Type management for product.packaging" + _order = "sequence, code" + + name = fields.Char(required=True, translate=True) + code = fields.Char(required=True) + sequence = fields.Integer(required=True) + has_gtin = fields.Boolean() + active = fields.Boolean(default=True) + is_default = fields.Boolean() + + @api.constrains("is_default") + def _check_is_default(self): + msg = False + default_count = self.search_count([("is_default", "=", True)]) + if default_count == 0: + msg = _('There must be one product packaging type set as "Is Default".') + elif default_count > 1: + msg = _('Only one product packaging type can be set as "Is Default".') + if msg: + raise ValidationError(msg) + + @api.multi + def name_get(self): + result = [] + for record in self: + result.append((record.id, "{} ({})".format(record.name, record.code))) + return result + + +class ProductPackaging(models.Model): + _inherit = "product.packaging" + _order = "product_id, type_sequence" + + def default_packaging_type_id(self): + return self.env["product.packaging.type"].search( + [("is_default", "=", True)], limit=1 + ) + + packaging_type_id = fields.Many2one( + "product.packaging.type", + required=True, + ondelete="restrict", + default=lambda p: p.default_packaging_type_id(), + ) + type_has_gtin = fields.Boolean(related="packaging_type_id.has_gtin", readonly=True) + type_sequence = fields.Integer( + string="Type sequence", + related="packaging_type_id.sequence", + readonly=True, + store=True, + ) + qty_per_type = fields.Html( + compute="_compute_qty_per_type", string="Qty per package type" + ) + + @api.multi + @api.depends( + "product_id", + "product_id.packaging_ids", + "packaging_type_id", + "packaging_type_id.code", + ) + def _compute_qty_per_type(self): + for packaging in self: + product = packaging.product_id + if not product: + packaging.qty_per_type = "" + continue + + smaller_product_packagings = product.packaging_ids.filtered( + lambda p: p.id != packaging.id and packaging.qty > p.qty > 0.0 + ) + res = OrderedDict() + for p_pack in smaller_product_packagings.sorted(lambda p: p.qty): + res[p_pack.packaging_type_id.code] = p_pack.qty + packaging.qty_per_type = packaging._format_qty_per_type(res) + + def _format_qty_per_type(self, qty_per_type_dict): + self.ensure_one() + res = [] + for code, qty in qty_per_type_dict.items(): + new_qty = self.qty / qty + if not new_qty.is_integer(): + new_qty_int = int(new_qty) + new_qty_decimals = new_qty - new_qty_int + new_qty = '{}{}'.format( + new_qty_int, str(new_qty_decimals).lstrip("0") + ) + res.append("{} {}".format(new_qty, code)) + return "; ".join(res) + + @api.onchange("packaging_type_id") + def _onchange_name(self): + if self.packaging_type_id: + self.name = self.packaging_type_id.name + + @api.multi + def name_get(self): + result = [] + for record in self: + if record.product_id and record.packaging_type_id: + result.append((record.id, record.packaging_type_id.display_name)) + else: + result.append((record.id, record.name)) + return result diff --git a/product_packaging_type/readme/CONTRIBUTORS.rst b/product_packaging_type/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..c1e6469a369 --- /dev/null +++ b/product_packaging_type/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `Camptocamp `_ + + * Damien Crier diff --git a/product_packaging_type/readme/DESCRIPTION.rst b/product_packaging_type/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..ef1a4cf03a4 --- /dev/null +++ b/product_packaging_type/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module allows odoo users to declare packaging types diff --git a/product_packaging_type/readme/USAGE.rst b/product_packaging_type/readme/USAGE.rst new file mode 100644 index 00000000000..b5ddd49719e --- /dev/null +++ b/product_packaging_type/readme/USAGE.rst @@ -0,0 +1,4 @@ +To create a new packaging type: + +#. Go to *Inventory > Configuration > Products > Product Packaging Type*. +#. You can create/edit/delete packaging types diff --git a/product_packaging_type/security/ir.model.access.csv b/product_packaging_type/security/ir.model.access.csv new file mode 100644 index 00000000000..a14a5760432 --- /dev/null +++ b/product_packaging_type/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +access_product_packaging_type_user,product.packaging.type.user,model_product_packaging_type,base.group_user,1,0,0,0 +access_product_packaging_type_manager,product.packaging.type.manager,model_product_packaging_type,product.group_stock_packaging,1,1,1,1 diff --git a/product_packaging_type/static/description/icon.png b/product_packaging_type/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_packaging_type/static/description/icon.png differ diff --git a/product_packaging_type/static/description/index.html b/product_packaging_type/static/description/index.html new file mode 100644 index 00000000000..e1e66f6011e --- /dev/null +++ b/product_packaging_type/static/description/index.html @@ -0,0 +1,433 @@ + + + + + + +Product Packaging Type + + + +
+

Product Packaging Type

+ + +

Beta License: LGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

This module allows odoo users to declare packaging types

+

Table of contents

+ +
+

Usage

+

To create a new packaging type:

+
    +
  1. Go to Inventory > Configuration > Products > Product Packaging Type.
  2. +
  3. You can create/edit/delete packaging types
  4. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+ +
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_packaging_type/views/product_packaging_type_view.xml b/product_packaging_type/views/product_packaging_type_view.xml new file mode 100644 index 00000000000..e7c5244d811 --- /dev/null +++ b/product_packaging_type/views/product_packaging_type_view.xml @@ -0,0 +1,68 @@ + + + + product.packaging.type.tree + product.packaging.type + + + + + + + + + + + + + product.packaging.type.form + product.packaging.type + + +
+ + +
+
+
+ + product.packaging.type.search + product.packaging.type + + + + + + + + + + Product Packaging Type + ir.actions.act_window + product.packaging.type + tree,form + form + + + +
diff --git a/product_packaging_type/views/product_packaging_view.xml b/product_packaging_type/views/product_packaging_view.xml new file mode 100644 index 00000000000..039f4c3d75b --- /dev/null +++ b/product_packaging_type/views/product_packaging_view.xml @@ -0,0 +1,42 @@ + + + + product.packaging.form + product.packaging + + + + + + + + + {'required': [('type_has_gtin', '=', True)]} + + + 1 + + + + + + + + product.packaging.tree.view.inherit + product.packaging + + + + + + + 1 + + + + + + + diff --git a/product_pricelist_direct_print/README.rst b/product_pricelist_direct_print/README.rst new file mode 100644 index 00000000000..fc8edcb205f --- /dev/null +++ b/product_pricelist_direct_print/README.rst @@ -0,0 +1,110 @@ +============================== +Product Pricelist Direct Print +============================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:187c1c78e5acd2212262a3335f288716ff5f02d6f685e87e315014f4b06d25bd + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/11.0/product_pricelist_direct_print + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_pricelist_direct_print + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=11.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Print price list from menu option, product templates, products variants or +price lists + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure this module, you need to: + +#. Go to *Apps* and install *Sales Management* +#. Go to *Sales > Configuration > Settings* +#. Scroll to *Pricing* +#. Set *Multiple Sales Prices per Product* on an either + *Multiple prices per product* or *Prices computed from formulas* + +Usage +===== + +To use this module, you have several options: + +#. Go to *Sales > Catalog > Print Price List* + +#. Go to *Sales > Catalog > Products* + * Select products in list view + * Press *Print > Price List* + +#. Go to *Sales > Catalog > Product Variants* + * Select products in list view + * Press *Print > Price List* + +#. Go to *Sales > Orders > Customers** + * Select customers in list view + * Press *Action > Send customer pricelist by EMail* + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_: + + * Carlos Dauden + * David Vidal + +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/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_pricelist_direct_print/__init__.py b/product_pricelist_direct_print/__init__.py new file mode 100644 index 00000000000..5cb1c49143f --- /dev/null +++ b/product_pricelist_direct_print/__init__.py @@ -0,0 +1 @@ +from . import wizards diff --git a/product_pricelist_direct_print/__manifest__.py b/product_pricelist_direct_print/__manifest__.py new file mode 100644 index 00000000000..06feeadbb7b --- /dev/null +++ b/product_pricelist_direct_print/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2017 Carlos Dauden +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Product Pricelist Direct Print", + "summary": "Print price list from menu option, product templates, " + "products variants or price lists", + "version": "11.0.1.2.1", + "category": "Product", + "website": "https://www.github.com/OCA/product-attribute", + "author": "Tecnativa, " + "Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": [ + "sale", + ], + "data": [ + "views/report_product_pricelist.xml", + "wizards/product_pricelist_print_view.xml", + "data/mail_template_data.xml", + ], +} diff --git a/product_pricelist_direct_print/data/mail_template_data.xml b/product_pricelist_direct_print/data/mail_template_data.xml new file mode 100644 index 00000000000..f458d209e5d --- /dev/null +++ b/product_pricelist_direct_print/data/mail_template_data.xml @@ -0,0 +1,31 @@ + + + + + Pricelist - Send by Email + ${(object.write_uid.email and '"%s" <%s>' % (object.write_uid.name, object.write_uid.email) or '')|safe} + ${object.pricelist_id.company_id.name or object.write_uid.company_id.name} Pricelist (Ref ${object.pricelist_id.name or 'n/a' }) + ${object.partner_id and object.partner_id.id or ''} + + + + ${object.pricelist_id.name} + ${object.partner_id and object.partner_id.lang or object.write_uid.partner_id.lang} + Dear ${object.partner_id and object.partner_id.name or 'customer'},

+

+The attached file is a PDF document containg the +${object.pricelist_id.name} pricelist. +

+

You can reply to this email if you have any questions.

+

Thank you,

+ +

+% if object.write_uid and object.write_uid.signature: + ${object.write_uid.signature | safe} +% endif +

+]]>
+
+ +
diff --git a/product_pricelist_direct_print/i18n/es.po b/product_pricelist_direct_print/i18n/es.po new file mode 100644 index 00000000000..4758e5260f4 --- /dev/null +++ b/product_pricelist_direct_print/i18n/es.po @@ -0,0 +1,273 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-02-26 10:27+0100\n" +"PO-Revision-Date: 2019-02-26 10:29+0100\n" +"Last-Translator: Carlos Dauden \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.7.1\n" + +#. module: product_pricelist_direct_print +#: model:mail.template,body_html:product_pricelist_direct_print.email_template_edi_pricelist +msgid "" +"\n" +"

Dear ${object.partner_id and object.partner_id.name or 'customer'},

\n" +"

\n" +"The attached file is a PDF document containg the\n" +"${object.pricelist_id.name} pricelist.\n" +"

\n" +"

You can reply to this email if you have any questions.

\n" +"

Thank you,

\n" +"\n" +"

\n" +"% if object.write_uid and object.write_uid.signature:\n" +" ${object.write_uid.signature | safe}\n" +"% endif\n" +"

\n" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:mail.template,subject:product_pricelist_direct_print.email_template_edi_pricelist +msgid "" +"${object.pricelist_id.company_id.name or object.write_uid.company_id.name} " +"Pricelist (Ref ${object.pricelist_id.name or 'n/a' })" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:mail.template,report_name:product_pricelist_direct_print.email_template_edi_pricelist +msgid "${object.pricelist_id.name}" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Special Pricelist" +msgstr "Tarifa especial" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Cost Price" +msgstr "Precio coste" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Currency:
" +msgstr "Moneda:
" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Date:
" +msgstr "Fecha:
" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Description" +msgstr "Descripción" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "List Price" +msgstr "Precio tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List Name:
" +msgstr "Nombre tarifa:
" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Sale Price" +msgstr "Precio ficha" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Cancel" +msgstr "Cancelar" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_categ_ids +msgid "Categories" +msgstr "Categorías" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id +msgid "Customer" +msgstr "Cliente" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Customers" +msgstr "Clientes" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_date +msgid "Date" +msgstr "Fecha" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Filter Options" +msgstr "Opciones de filtrado" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_hide_pricelist_name +msgid "Hide Pricelist Name" +msgstr "Ocultar nombre tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_id +msgid "ID" +msgstr "ID (identificación)" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_last_ordered_products +msgid "" +"If you enter an X number here, then, for each selected customer, the last X " +"ordered products will be obtained for the report." +msgstr "" + +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Internal Reference" +msgstr "Referencia interna" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +msgid "Keep empty for all products" +msgstr "Dejar vacío para mostrar todos los productos" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print___last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_last_ordered_products +msgid "Last Ordered Products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_uid +msgid "Last Updated by" +msgstr "Última actualización de" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Name" +msgstr "Nombre" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field +msgid "Order" +msgstr "Orden" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_count +msgid "Partner Count" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_item_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_template_pricelist_print +msgid "Price List" +msgstr "Tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_pricelist_id +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Pricelist" +msgstr "Tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Print" +msgstr "Imprimir" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_pricelist_print +#: model:ir.ui.menu,name:product_pricelist_direct_print.menu_product_pricelist_print +msgid "Print Price List" +msgstr "Imprimir tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.actions.report,name:product_pricelist_direct_print.action_report_product_pricelist +msgid "Product Price List" +msgstr "Tarifa de productos" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Products" +msgstr "Productos" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Send by email" +msgstr "Enviar por correo" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print +msgid "Send customer pricelist by EMail" +msgstr "Enviar tarifa de cliente por correo" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_standard_price +msgid "Show Cost Price" +msgstr "Mostrar precio de coste" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_sale_price +msgid "Show Sale Price" +msgstr "Mostrar precio ficha" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_variants +msgid "Show Variants" +msgstr "Mostrar variantes" + +#. module: product_pricelist_direct_print +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:126 +#, python-format +msgid "You must set price list or any customer or any show price option." +msgstr "Debe seleccionar una tarifa o alguna opción mostrar precio." + +#. module: product_pricelist_direct_print +#: model:ir.model,name:product_pricelist_direct_print.model_product_pricelist_print +msgid "product.pricelist.print" +msgstr "" diff --git a/product_pricelist_direct_print/i18n/fr.po b/product_pricelist_direct_print/i18n/fr.po new file mode 100644 index 00000000000..81e5eefbe52 --- /dev/null +++ b/product_pricelist_direct_print/i18n/fr.po @@ -0,0 +1,272 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print +# +# Translators: +# leemannd , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-09 03:40+0000\n" +"PO-Revision-Date: 2017-03-09 03:40+0000\n" +"Last-Translator: leemannd , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_pricelist_direct_print +#: model:mail.template,body_html:product_pricelist_direct_print.email_template_edi_pricelist +msgid "" +"\n" +"

Dear ${object.partner_id and object.partner_id.name or 'customer'},

\n" +"

\n" +"The attached file is a PDF document containg the\n" +"${object.pricelist_id.name} pricelist.\n" +"

\n" +"

You can reply to this email if you have any questions.

\n" +"

Thank you,

\n" +"\n" +"

\n" +"% if object.write_uid and object.write_uid.signature:\n" +" ${object.write_uid.signature | safe}\n" +"% endif\n" +"

\n" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:mail.template,subject:product_pricelist_direct_print.email_template_edi_pricelist +msgid "" +"${object.pricelist_id.company_id.name or object.write_uid.company_id.name} " +"Pricelist (Ref ${object.pricelist_id.name or 'n/a' })" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:mail.template,report_name:product_pricelist_direct_print.email_template_edi_pricelist +msgid "${object.pricelist_id.name}" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Special Pricelist" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Currency:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Date:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Description" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "List Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List Name:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Cancel" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_categ_ids +msgid "Categories" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_date +msgid "Created on" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id +msgid "Customer" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Customers" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_date +msgid "Date" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name +msgid "Display Name" +msgstr "Nom d'affichage" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Filter Options" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_hide_pricelist_name +msgid "Hide Pricelist Name" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_id +msgid "ID" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_last_ordered_products +msgid "" +"If you enter an X number here, then, for each selected customer, the last X " +"ordered products will be obtained for the report." +msgstr "" + +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Internal Reference" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +msgid "Keep empty for all products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print___last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_last_ordered_products +msgid "Last Ordered Products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_uid +msgid "Last Updated by" +msgstr "Dernière modification par" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Name" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field +msgid "Order" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_count +msgid "Partner Count" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_item_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_template_pricelist_print +msgid "Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_pricelist_id +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Pricelist" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Print" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_pricelist_print +#: model:ir.ui.menu,name:product_pricelist_direct_print.menu_product_pricelist_print +msgid "Print Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.report,name:product_pricelist_direct_print.action_report_product_pricelist +msgid "Product Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Products" +msgstr "Produits" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Send by email" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print +msgid "Send customer pricelist by EMail" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_standard_price +msgid "Show Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_sale_price +msgid "Show Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_variants +msgid "Show Variants" +msgstr "" + +#. module: product_pricelist_direct_print +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:126 +#, python-format +msgid "You must set price list or any customer or any show price option." +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model,name:product_pricelist_direct_print.model_product_pricelist_print +msgid "product.pricelist.print" +msgstr "" diff --git a/product_pricelist_direct_print/i18n/product_pricelist_direct_print.pot b/product_pricelist_direct_print/i18n/product_pricelist_direct_print.pot new file mode 100644 index 00000000000..3528c798226 --- /dev/null +++ b/product_pricelist_direct_print/i18n/product_pricelist_direct_print.pot @@ -0,0 +1,264 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_pricelist_direct_print +#: model:mail.template,body_html:product_pricelist_direct_print.email_template_edi_pricelist +msgid "\n" +"

Dear ${object.partner_id and object.partner_id.name or 'customer'},

\n" +"

\n" +"The attached file is a PDF document containg the\n" +"${object.pricelist_id.name} pricelist.\n" +"

\n" +"

You can reply to this email if you have any questions.

\n" +"

Thank you,

\n" +"\n" +"

\n" +"% if object.write_uid and object.write_uid.signature:\n" +" ${object.write_uid.signature | safe}\n" +"% endif\n" +"

\n" +"" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:mail.template,subject:product_pricelist_direct_print.email_template_edi_pricelist +msgid "${object.pricelist_id.company_id.name or object.write_uid.company_id.name} Pricelist (Ref ${object.pricelist_id.name or 'n/a' })" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:mail.template,report_name:product_pricelist_direct_print.email_template_edi_pricelist +msgid "${object.pricelist_id.name}" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Special Pricelist" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Currency:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Date:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Description" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "List Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List Name:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Cancel" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_categ_ids +msgid "Categories" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_uid +msgid "Created by" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_date +msgid "Created on" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id +msgid "Customer" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Customers" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_date +msgid "Date" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name +msgid "Display Name" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Filter Options" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_hide_pricelist_name +msgid "Hide Pricelist Name" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_id +msgid "ID" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_last_ordered_products +msgid "If you enter an X number here, then, for each selected customer, the last X ordered products will be obtained for the report." +msgstr "" + +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Internal Reference" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +msgid "Keep empty for all products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_last_ordered_products +msgid "Last Ordered Products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Name" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field +msgid "Order" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_count +msgid "Partner Count" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_item_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_template_pricelist_print +msgid "Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_pricelist_id +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Pricelist" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Print" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_pricelist_print +#: model:ir.ui.menu,name:product_pricelist_direct_print.menu_product_pricelist_print +msgid "Print Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.report,name:product_pricelist_direct_print.action_report_product_pricelist +msgid "Product Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Send by email" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print +msgid "Send customer pricelist by EMail" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_standard_price +msgid "Show Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_sale_price +msgid "Show Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_variants +msgid "Show Variants" +msgstr "" + +#. module: product_pricelist_direct_print +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:126 +#, python-format +msgid "You must set price list or any customer or any show price option." +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model,name:product_pricelist_direct_print.model_product_pricelist_print +msgid "product.pricelist.print" +msgstr "" + diff --git a/product_pricelist_direct_print/readme/CONFIGURE.rst b/product_pricelist_direct_print/readme/CONFIGURE.rst new file mode 100644 index 00000000000..4ea78d11a04 --- /dev/null +++ b/product_pricelist_direct_print/readme/CONFIGURE.rst @@ -0,0 +1,7 @@ +To configure this module, you need to: + +#. Go to *Apps* and install *Sales Management* +#. Go to *Sales > Configuration > Settings* +#. Scroll to *Pricing* +#. Set *Multiple Sales Prices per Product* on an either + *Multiple prices per product* or *Prices computed from formulas* diff --git a/product_pricelist_direct_print/readme/CONTRIBUTORS.rst b/product_pricelist_direct_print/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..4ca7694cc75 --- /dev/null +++ b/product_pricelist_direct_print/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Carlos Dauden + * David Vidal diff --git a/product_pricelist_direct_print/readme/DESCRIPTION.rst b/product_pricelist_direct_print/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..48e18bfe13a --- /dev/null +++ b/product_pricelist_direct_print/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Print price list from menu option, product templates, products variants or +price lists diff --git a/product_pricelist_direct_print/readme/USAGE.rst b/product_pricelist_direct_print/readme/USAGE.rst new file mode 100644 index 00000000000..9ff30edab39 --- /dev/null +++ b/product_pricelist_direct_print/readme/USAGE.rst @@ -0,0 +1,15 @@ +To use this module, you have several options: + +#. Go to *Sales > Catalog > Print Price List* + +#. Go to *Sales > Catalog > Products* + * Select products in list view + * Press *Print > Price List* + +#. Go to *Sales > Catalog > Product Variants* + * Select products in list view + * Press *Print > Price List* + +#. Go to *Sales > Orders > Customers** + * Select customers in list view + * Press *Action > Send customer pricelist by EMail* diff --git a/product_pricelist_direct_print/static/description/icon.png b/product_pricelist_direct_print/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_pricelist_direct_print/static/description/icon.png differ diff --git a/product_pricelist_direct_print/static/description/index.html b/product_pricelist_direct_print/static/description/index.html new file mode 100644 index 00000000000..a0bfea1818c --- /dev/null +++ b/product_pricelist_direct_print/static/description/index.html @@ -0,0 +1,473 @@ + + + + + + +Product Pricelist Direct Print + + + +
+

Product Pricelist Direct Print

+ + +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

Print price list from menu option, product templates, products variants or +price lists

+

Table of contents

+ +
+

Configuration

+

To configure this module, you need to:

+
    +
  1. Go to Apps and install Sales Management
  2. +
  3. Go to Sales > Configuration > Settings
  4. +
  5. Scroll to Pricing
  6. +
  7. Set Multiple Sales Prices per Product on an either +Multiple prices per product or Prices computed from formulas
  8. +
+
+
+

Usage

+

To use this module, you have several options:

+
    +
  1. Go to Sales > Catalog > Print Price List
  2. +
  3. +
    Go to Sales > Catalog > Products
    +
      +
    • Select products in list view
    • +
    • Press Print > Price List
    • +
    +
    +
    +
  4. +
  5. +
    Go to Sales > Catalog > Product Variants
    +
      +
    • Select products in list view
    • +
    • Press Print > Price List
    • +
    +
    +
    +
  6. +
  7. +
    Go to Sales > Orders > Customers*
    +
      +
    • Select customers in list view
    • +
    • Press Action > Send customer pricelist by EMail
    • +
    +
    +
    +
  8. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_pricelist_direct_print/tests/__init__.py b/product_pricelist_direct_print/tests/__init__.py new file mode 100644 index 00000000000..aabc3f507a8 --- /dev/null +++ b/product_pricelist_direct_print/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_pricelist_direct_print diff --git a/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py b/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py new file mode 100644 index 00000000000..b9075df9385 --- /dev/null +++ b/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py @@ -0,0 +1,73 @@ +# Copyright 2017 Carlos Dauden +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import SavepointCase +from odoo.exceptions import ValidationError + + +class TestProductPricelistDirectPrint(SavepointCase): + + @classmethod + def setUpClass(cls): + super(TestProductPricelistDirectPrint, cls).setUpClass() + cls.pricelist = cls.env.ref('product.list0') + cls.category = cls.env['product.category'].create({ + 'name': 'Test category', + 'type': 'normal', + }) + cls.product = cls.env['product.product'].create({ + 'name': 'Product for test', + 'categ_id': cls.category.id, + 'default_code': 'TESTPROD01', + }) + cls.partner = cls.env['res.partner'].create({ + 'name': 'Partner for test', + 'property_product_pricelist': cls.pricelist.id, + 'email': 'test@test.com', + }) + cls.wiz_obj = cls.env['product.pricelist.print'] + + def test_defaults(self): + wiz = self.wiz_obj.new() + res = wiz.with_context( + active_model='product.pricelist', + active_id=self.pricelist.id, + ).default_get([]) + self.assertEqual(res['pricelist_id'], self.pricelist.id) + res = wiz.with_context( + active_model='res.partner', + active_id=self.partner.id, + active_ids=[self.partner.id], + ).default_get([]) + self.assertEqual( + res['pricelist_id'], self.partner.property_product_pricelist.id) + res = wiz.with_context( + active_model='product.template', + active_ids=self.product.product_tmpl_id.ids, + ).default_get([]) + self.assertEqual( + res['product_tmpl_ids'][0][2], self.product.product_tmpl_id.ids) + res = wiz.with_context( + active_model='product.product', + active_ids=self.product.ids, + ).default_get([]) + self.assertEqual( + res['product_ids'][0][2], self.product.ids) + self.assertTrue(res['show_variants']) + with self.assertRaises(ValidationError): + wiz.print_report() + wiz.show_sale_price = True + res = wiz.print_report() + self.assertIn('report_name', res) + + def test_action_pricelist_send_multiple_partner(self): + partner_2 = self.env['res.partner'].create({ + 'name': 'Partner for test 2', + 'property_product_pricelist': self.pricelist.id, + 'email': 'test2@test.com', + }) + wiz = self.wiz_obj.with_context( + active_model='res.partner', + active_ids=[self.partner.id, partner_2.id], + ).create({}) + wiz.action_pricelist_send() diff --git a/product_pricelist_direct_print/views/report_product_pricelist.xml b/product_pricelist_direct_print/views/report_product_pricelist.xml new file mode 100644 index 00000000000..fca5dddc670 --- /dev/null +++ b/product_pricelist_direct_print/views/report_product_pricelist.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + diff --git a/product_pricelist_direct_print/wizards/__init__.py b/product_pricelist_direct_print/wizards/__init__.py new file mode 100644 index 00000000000..dfc9a481f01 --- /dev/null +++ b/product_pricelist_direct_print/wizards/__init__.py @@ -0,0 +1 @@ +from . import product_pricelist_print diff --git a/product_pricelist_direct_print/wizards/product_pricelist_print.py b/product_pricelist_direct_print/wizards/product_pricelist_print.py new file mode 100644 index 00000000000..0f1efca0b83 --- /dev/null +++ b/product_pricelist_direct_print/wizards/product_pricelist_print.py @@ -0,0 +1,218 @@ +# Copyright 2017 Tecnativa - Carlos Dauden +# Copyright 2018 Tecnativa - David Vidal +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class ProductPricelistPrint(models.TransientModel): + _name = 'product.pricelist.print' + + pricelist_id = fields.Many2one( + comodel_name='product.pricelist', + string='Pricelist', + ) + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Customer', + ) + partner_ids = fields.Many2many( + comodel_name='res.partner', + string='Customers', + ) + categ_ids = fields.Many2many( + comodel_name='product.category', + string='Categories', + ) + show_variants = fields.Boolean() + product_tmpl_ids = fields.Many2many( + comodel_name='product.template', + string='Products', + help='Keep empty for all products', + ) + product_ids = fields.Many2many( + comodel_name='product.product', + string='Products', + help='Keep empty for all products', + ) + show_standard_price = fields.Boolean(string='Show Cost Price') + show_sale_price = fields.Boolean(string='Show Sale Price') + hide_pricelist_name = fields.Boolean(string='Hide Pricelist Name') + order_field = fields.Selection([ + ('name', 'Name'), + ('default_code', 'Internal Reference'), + ], string='Order') + partner_count = fields.Integer( + compute='_compute_partner_count' + ) + date = fields.Date() + last_ordered_products = fields.Integer( + help="If you enter an X number here, then, for each selected customer," + " the last X ordered products will be obtained for the report." + ) + + @api.multi + @api.depends('partner_ids') + def _compute_partner_count(self): + for record in self: + self.partner_count = len(record.partner_ids) + + @api.onchange('partner_ids') + def _onchange_partner_ids(self): + if not self.partner_count: + self.last_ordered_products = False + + @api.model + def default_get(self, fields): + res = super(ProductPricelistPrint, self).default_get(fields) + if self.env.context.get('active_model') == 'product.template': + res['product_tmpl_ids'] = [ + (6, 0, self.env.context.get('active_ids', []))] + elif self.env.context.get('active_model') == 'product.product': + res['show_variants'] = True + res['product_ids'] = [ + (6, 0, self.env.context.get('active_ids', []))] + elif self.env.context.get('active_model') == 'product.pricelist': + res['pricelist_id'] = self.env.context.get('active_id', False) + elif self.env.context.get('active_model') == 'res.partner': + active_ids = self.env.context.get('active_ids', []) + res['partner_ids'] = [(6, 0, active_ids)] + if len(active_ids) == 1: + partner = self.env['res.partner'].browse(active_ids[0]) + res['pricelist_id'] = partner.property_product_pricelist.id + elif self.env.context.get('active_model') == 'product.pricelist.item': + active_ids = self.env.context.get('active_ids', []) + items = self.env['product.pricelist.item'].browse(active_ids) + # Set pricelist if all the items belong to the same one + if len(items.mapped('pricelist_id')) == 1: + res['pricelist_id'] = items[0].pricelist_id.id + product_items = items.filtered( + lambda x: x.applied_on == '0_product_variant') + template_items = items.filtered( + lambda x: x.applied_on == '1_product') + category_items = items.filtered( + lambda x: x.applied_on == '2_product_category') + # Convert al pricelist items to their affected variants + if product_items: + res['show_variants'] = True + product_ids = product_items.mapped('product_id') + product_ids |= template_items.mapped( + 'product_tmpl_id.product_variant_ids') + product_ids |= product_ids.search([ + ('sale_ok', '=', True), + ('categ_id', 'in', category_items.mapped('categ_id').ids) + ]) + res['product_ids'] = [(6, 0, product_ids.ids)] + # Convert al pricelist items to their affected templates + if template_items and not product_items: + product_tmpl_ids = template_items.mapped('product_tmpl_id') + product_tmpl_ids |= product_tmpl_ids.search([ + ('sale_ok', '=', True), + ('categ_id', 'in', category_items.mapped('categ_id').ids) + ]) + res['product_tmpl_ids'] = [ + (6, 0, product_tmpl_ids.ids)] + # Only category items, we just set the categories + if category_items and not product_items and not template_items: + res['categ_ids'] = [ + (6, 0, category_items.mapped('categ_id').ids)] + return res + + @api.multi + def print_report(self): + if not(self.pricelist_id or self.partner_count + or self.show_standard_price or self.show_sale_price): + raise ValidationError(_( + 'You must set price list or any customer ' + 'or any show price option.')) + return self.env.ref( + 'product_pricelist_direct_print.' + 'action_report_product_pricelist').report_action(self) + + @api.multi + def action_pricelist_send(self): + self.ensure_one() + if self.partner_count > 1: + self.send_batch() + else: + if self.partner_count == 1: + partner = self.partner_ids[0] + self.write({ + 'partner_id': partner.id, + 'pricelist_id': partner.property_product_pricelist.id, + }) + return self.message_composer_action() + + @api.multi + def message_composer_action(self): + self.ensure_one() + + template_id = self.env.ref( + 'product_pricelist_direct_print.email_template_edi_pricelist').id + compose_form_id = self.env.ref( + 'mail.email_compose_message_wizard_form').id + ctx = { + 'default_composition_mode': 'comment', + 'default_res_id': self.id, + 'default_model': 'product.pricelist.print', + 'default_use_template': bool(template_id), + 'default_template_id': template_id, + } + return { + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'mail.compose.message', + 'view_id': compose_form_id, + 'target': 'new', + 'context': ctx, + } + + @api.multi + def send_batch(self): + self.ensure_one() + for partner in self.partner_ids.filtered(lambda x: not x.parent_id): + self.write({ + 'partner_id': partner.id, + 'pricelist_id': partner.property_product_pricelist.id, + }) + self.force_pricelist_send() + + @api.multi + def force_pricelist_send(self): + template_id = self.env.ref( + 'product_pricelist_direct_print.email_template_edi_pricelist').id + composer = self.env['mail.compose.message'].with_context({ + 'default_composition_mode': 'mass_mail', + 'default_notify': True, + 'default_res_id': self.id, + 'default_model': 'product.pricelist.print', + 'default_template_id': template_id, + 'active_ids': self.ids, + }).create({}) + values = composer.onchange_template_id( + template_id, 'mass_mail', 'product.pricelist.print', + self.id)['value'] + composer.write(values) + composer.send_mail() + + @api.multi + def get_last_ordered_products_to_print(self): + self.ensure_one() + partner = self.partner_id + if not partner and self.partner_count == 1: + partner = self.partner_ids[0] + orders = partner.sale_order_ids.filtered( + lambda r: r.state not in ['draft', 'sent', 'cancel']) + orders = orders.sorted(key=lambda r: r.confirmation_date, reverse=True) + products = orders.mapped('order_line').mapped('product_id') + return products[:self.last_ordered_products] + + @api.multi + def get_pricelist_to_print(self): + self.ensure_one() + pricelist = self.pricelist_id + if not pricelist and self.partner_count == 1: + pricelist = self.partner_ids[0].property_product_pricelist + return pricelist diff --git a/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml b/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml new file mode 100644 index 00000000000..3fc5c379dae --- /dev/null +++ b/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml @@ -0,0 +1,114 @@ + + + + + + Product pricelist print + product.pricelist.print + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + +
diff --git a/product_pricelist_supplierinfo/README.rst b/product_pricelist_supplierinfo/README.rst new file mode 100644 index 00000000000..ec54fa24059 --- /dev/null +++ b/product_pricelist_supplierinfo/README.rst @@ -0,0 +1,135 @@ +======================================== +Supplier info prices in sales pricelists +======================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:309a749762674dfdaad5be07c2fb99efbd67dcc1c516623a4c17e8d4fe86f447 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/11.0/product_pricelist_supplierinfo + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_pricelist_supplierinfo + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=11.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to create a sales pricelist based on product +supplierinfo prices. If you want, you can bypass minimum quantity in pricelist +item. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +Although this module doesn't depend technically on **Sales Management**, you +must install it for configuring and seeing the effects of it. + +Configuration +============= + +To configure pricelists with the new feature of this module, you need to: + +#. Go to *Sales > Configuration > Settings* and check + "Multiple Sales Prices per Product" option and + "Prices computed from formulas" after that. You must have correct + permissions and you must install **Sales Management** app (sale) to see + these settings. +#. Create or edit a Sales Pricelist at *Sales > Catalog > Pricelists*. +#. Add or edit a pricelist item and check "Formula" option in + "Price Computation" section. +#. You will see the new option "Prices based on supplier info". +#. If you want to bypass the "Min.Quantity" field of the supplier info and + always select the lowest quantity price, check the option + "Ignore Supplier Info Min. Quantity". + +Usage +===== + +For adding supplier info: + +#. Go to *Sales > Catalog > Products* +#. Open or create a product. +#. Go to "Purchase" page. +#. On "Vendors" section, add the supplier and prices. +#. You can drag and drop for reordering these lines. + +Check the remark in known issues about the supplier info line selection. + +For checking pricelists in action, you can (with `sale` module installed): + +#. Go to *Sales > Orders > Quotations* +#. Create or edit a quotation. +#. Add a line. +#. Select a product with the criteria to match the pricelist from supplier + info. +#. See the proper price appears in the line. + +Known issues / Roadmap +====================== + +* First line that matches by minimum quantity criteria, independently from the + supplier, will be the one that provides the price for the pricelist. +* There's no mechanism for selecting the supplier from possible sources like + sales orders. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_: + + * Vicent Cubells + * 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/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_pricelist_supplierinfo/__init__.py b/product_pricelist_supplierinfo/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/product_pricelist_supplierinfo/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_pricelist_supplierinfo/__manifest__.py b/product_pricelist_supplierinfo/__manifest__.py new file mode 100644 index 00000000000..21cd9efa515 --- /dev/null +++ b/product_pricelist_supplierinfo/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2018 Tecnativa - Vicent Cubells +# Copyright 2018 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Supplier info prices in sales pricelists", + "summary": "Allows to create priceslists based on supplier info", + "version": "11.0.1.1.0", + "category": "Sales", + "website": "https://github.com/OCA/product-attribute", + "author": "Tecnativa," + " Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": [ + "product", + ], + "data": [ + "views/product_pricelist_item_views.xml", + ], + "installable": True, +} diff --git a/product_pricelist_supplierinfo/i18n/es.po b/product_pricelist_supplierinfo/i18n/es.po new file mode 100644 index 00000000000..f4f00bb8d25 --- /dev/null +++ b/product_pricelist_supplierinfo/i18n/es.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_supplierinfo +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-10-31 17:35+0000\n" +"PO-Revision-Date: 2018-10-31 17:35+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_pricelist_supplierinfo +#: model:ir.ui.view,arch_db:product_pricelist_supplierinfo.product_pricelist_supplier_item_form_view +msgid "" +"Supplier " +"price - " +msgstr "" +"Precio de " +"proveedor - " + +#. module: product_pricelist_supplierinfo +#: model:ir.model.fields,field_description:product_pricelist_supplierinfo.field_product_pricelist_item_no_supplierinfo_min_quantity +msgid "Ignore Supplier Info Min. Quantity" +msgstr "Ignorar cantidad mínima de la info de proveedor" + +#. module: product_pricelist_supplierinfo +#: model:ir.model,name:product_pricelist_supplierinfo.model_product_pricelist +msgid "Pricelist" +msgstr "Lista de precios" + +#. module: product_pricelist_supplierinfo +#: model:ir.model,name:product_pricelist_supplierinfo.model_product_pricelist_item +msgid "Pricelist item" +msgstr "Item de Lista de precios" + +#. module: product_pricelist_supplierinfo +#: model:ir.model,name:product_pricelist_supplierinfo.model_product_product +msgid "Product" +msgstr "Producto" + +#. module: product_pricelist_supplierinfo +#: model:ir.model,name:product_pricelist_supplierinfo.model_product_template +#, fuzzy +msgid "Product Template" +msgstr "Producto" diff --git a/product_pricelist_supplierinfo/i18n/product_pricelist_supplierinfo.pot b/product_pricelist_supplierinfo/i18n/product_pricelist_supplierinfo.pot new file mode 100644 index 00000000000..a151f8bdcf5 --- /dev/null +++ b/product_pricelist_supplierinfo/i18n/product_pricelist_supplierinfo.pot @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_supplierinfo +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_pricelist_supplierinfo +#: model:ir.ui.view,arch_db:product_pricelist_supplierinfo.product_pricelist_supplier_item_form_view +msgid "Supplier price - " +msgstr "" + +#. module: product_pricelist_supplierinfo +#: model:ir.model.fields,field_description:product_pricelist_supplierinfo.field_product_pricelist_item_no_supplierinfo_min_quantity +msgid "Ignore Supplier Info Min. Quantity" +msgstr "" + +#. module: product_pricelist_supplierinfo +#: model:ir.model,name:product_pricelist_supplierinfo.model_product_pricelist +msgid "Pricelist" +msgstr "" + +#. module: product_pricelist_supplierinfo +#: model:ir.model,name:product_pricelist_supplierinfo.model_product_pricelist_item +msgid "Pricelist item" +msgstr "" + +#. module: product_pricelist_supplierinfo +#: model:ir.model,name:product_pricelist_supplierinfo.model_product_product +msgid "Product" +msgstr "" + +#. module: product_pricelist_supplierinfo +#: model:ir.model,name:product_pricelist_supplierinfo.model_product_template +msgid "Product Template" +msgstr "" + diff --git a/product_pricelist_supplierinfo/models/__init__.py b/product_pricelist_supplierinfo/models/__init__.py new file mode 100644 index 00000000000..95c136107fd --- /dev/null +++ b/product_pricelist_supplierinfo/models/__init__.py @@ -0,0 +1,3 @@ +from . import product_pricelist +from . import product_product +from . import product_template diff --git a/product_pricelist_supplierinfo/models/product_pricelist.py b/product_pricelist_supplierinfo/models/product_pricelist.py new file mode 100644 index 00000000000..a5f5c8b1769 --- /dev/null +++ b/product_pricelist_supplierinfo/models/product_pricelist.py @@ -0,0 +1,46 @@ +# Copyright 2018 Tecnativa - Vicent Cubells +# Copyright 2018 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models + + +class ProductPricelist(models.Model): + _inherit = 'product.pricelist' + + @api.multi + def _compute_price_rule(self, products_qty_partner, date=False, + uom_id=False): + """Recompute price after calling the atomic super method for + getting proper prices when based on supplier info. + """ + rule_obj = self.env['product.pricelist.item'] + result = super(ProductPricelist, self)._compute_price_rule( + products_qty_partner, date, uom_id) + # Make sure all rule records are fetched at once at put in cache + rule_obj.browse(x[1] for x in result.values()).mapped('price_discount') + for product, qty, _partner in products_qty_partner: + rule = rule_obj.browse(result[product.id][1]) + if rule.compute_price == 'formula' and rule.base == 'supplierinfo': + context = self.env.context + result[product.id] = ( + product._get_supplierinfo_pricelist_price( + rule, + date=date or context.get('date', fields.Date.today()), + quantity=qty, + ), rule.id, + ) + return result + + +class ProductPricelistItem(models.Model): + _inherit = 'product.pricelist.item' + + base = fields.Selection( + selection_add=[ + ('supplierinfo', 'Prices based on supplier info'), + ], + ) + no_supplierinfo_min_quantity = fields.Boolean( + string='Ignore Supplier Info Min. Quantity', + ) diff --git a/product_pricelist_supplierinfo/models/product_product.py b/product_pricelist_supplierinfo/models/product_product.py new file mode 100644 index 00000000000..fde34992ac3 --- /dev/null +++ b/product_pricelist_supplierinfo/models/product_product.py @@ -0,0 +1,24 @@ +# Copyright 2019 Tecnativa - Carlos Dauden +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class ProductProduct(models.Model): + _inherit = 'product.product' + + def _get_supplierinfo_pricelist_price( + self, rule, date=None, quantity=None): + return self.product_tmpl_id._get_supplierinfo_pricelist_price( + rule, date=date, quantity=quantity, product_id=self.id) + + def price_compute(self, price_type, uom=False, currency=False, + company=False): + """Return dummy not falsy prices when computation is done from supplier + info for avoiding error on super method. We will later fill these with + correct values. + """ + if price_type == 'supplierinfo': + return dict.fromkeys(self.ids, 1.0) + return super().price_compute( + price_type, uom=uom, currency=currency, company=company) diff --git a/product_pricelist_supplierinfo/models/product_template.py b/product_pricelist_supplierinfo/models/product_template.py new file mode 100644 index 00000000000..c5120c9b668 --- /dev/null +++ b/product_pricelist_supplierinfo/models/product_template.py @@ -0,0 +1,82 @@ +# Copyright 2019 Tecnativa - Carlos Dauden +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import models, tools + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + def _get_supplierinfo_pricelist_price( + self, rule, date=None, quantity=None, product_id=None): + """Method for getting the price from supplier info.""" + self.ensure_one() + if product_id: + domain = [ + '|', + ('product_id', '=', product_id), + ('product_tmpl_id', '=', self.id), + ] + else: + domain = [ + ('product_tmpl_id', '=', self.id), + ] + if not rule.no_supplierinfo_min_quantity and quantity: + domain += [ + '|', + ('min_qty', '=', False), + ('min_qty', '<=', quantity), + ] + if date: + domain += [ + '|', + ('date_start', '=', False), + ('date_start', '<=', date), + '|', + ('date_end', '=', False), + ('date_end', '>=', date), + ] + # We use a different default order because we are interested in getting + # the price for lowest minimum quantity if no_supplierinfo_min_quantity + supplierinfos = self.env['product.supplierinfo'].search( + domain, order='min_qty,sequence,price', + ) + if rule.no_supplierinfo_min_quantity: + price = supplierinfos[:1].price + else: + price = supplierinfos[-1:].price + if price: + # We have to replicate this logic in this method as pricelist + # method are atomic and we can't hack inside. + # Verbatim copy of part of product.pricelist._compute_price_rule. + qty_uom_id = self._context.get('uom') or self.uom_id.id + price_uom = self.env['product.uom'].browse([qty_uom_id]) + convert_to_price_uom = ( + lambda price: self.uom_id._compute_price( + price, price_uom)) + price_limit = price + price = (price - (price * (rule.price_discount / 100))) or 0.0 + if rule.price_round: + price = tools.float_round( + price, precision_rounding=rule.price_round) + if rule.price_surcharge: + price_surcharge = convert_to_price_uom(rule.price_surcharge) + price += price_surcharge + if rule.price_min_margin: + price_min_margin = convert_to_price_uom(rule.price_min_margin) + price = max(price, price_limit + price_min_margin) + if rule.price_max_margin: + price_max_margin = convert_to_price_uom(rule.price_max_margin) + price = min(price, price_limit + price_max_margin) + return price + + def price_compute(self, price_type, uom=False, currency=False, + company=False): + """Return dummy not falsy prices when computation is done from supplier + info for avoiding error on super method. We will later fill these with + correct values. + """ + if price_type == 'supplierinfo': + return dict.fromkeys(self.ids, 1.0) + return super().price_compute( + price_type, uom=uom, currency=currency, company=company) diff --git a/product_pricelist_supplierinfo/readme/CONFIGURE.rst b/product_pricelist_supplierinfo/readme/CONFIGURE.rst new file mode 100644 index 00000000000..61b870c79d0 --- /dev/null +++ b/product_pricelist_supplierinfo/readme/CONFIGURE.rst @@ -0,0 +1,14 @@ +To configure pricelists with the new feature of this module, you need to: + +#. Go to *Sales > Configuration > Settings* and check + "Multiple Sales Prices per Product" option and + "Prices computed from formulas" after that. You must have correct + permissions and you must install **Sales Management** app (sale) to see + these settings. +#. Create or edit a Sales Pricelist at *Sales > Catalog > Pricelists*. +#. Add or edit a pricelist item and check "Formula" option in + "Price Computation" section. +#. You will see the new option "Prices based on supplier info". +#. If you want to bypass the "Min.Quantity" field of the supplier info and + always select the lowest quantity price, check the option + "Ignore Supplier Info Min. Quantity". diff --git a/product_pricelist_supplierinfo/readme/CONTRIBUTORS.rst b/product_pricelist_supplierinfo/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..8f893b71dc0 --- /dev/null +++ b/product_pricelist_supplierinfo/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Vicent Cubells + * Pedro M. Baeza diff --git a/product_pricelist_supplierinfo/readme/DESCRIPTION.rst b/product_pricelist_supplierinfo/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..7881283a0c3 --- /dev/null +++ b/product_pricelist_supplierinfo/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module allows you to create a sales pricelist based on product +supplierinfo prices. If you want, you can bypass minimum quantity in pricelist +item. diff --git a/product_pricelist_supplierinfo/readme/INSTALL.rst b/product_pricelist_supplierinfo/readme/INSTALL.rst new file mode 100644 index 00000000000..6e98804bdeb --- /dev/null +++ b/product_pricelist_supplierinfo/readme/INSTALL.rst @@ -0,0 +1,2 @@ +Although this module doesn't depend technically on **Sales Management**, you +must install it for configuring and seeing the effects of it. diff --git a/product_pricelist_supplierinfo/readme/ROADMAP.rst b/product_pricelist_supplierinfo/readme/ROADMAP.rst new file mode 100644 index 00000000000..a3d583eed88 --- /dev/null +++ b/product_pricelist_supplierinfo/readme/ROADMAP.rst @@ -0,0 +1,4 @@ +* First line that matches by minimum quantity criteria, independently from the + supplier, will be the one that provides the price for the pricelist. +* There's no mechanism for selecting the supplier from possible sources like + sales orders. diff --git a/product_pricelist_supplierinfo/readme/USAGE.rst b/product_pricelist_supplierinfo/readme/USAGE.rst new file mode 100644 index 00000000000..56738e097c4 --- /dev/null +++ b/product_pricelist_supplierinfo/readme/USAGE.rst @@ -0,0 +1,18 @@ +For adding supplier info: + +#. Go to *Sales > Catalog > Products* +#. Open or create a product. +#. Go to "Purchase" page. +#. On "Vendors" section, add the supplier and prices. +#. You can drag and drop for reordering these lines. + +Check the remark in known issues about the supplier info line selection. + +For checking pricelists in action, you can (with `sale` module installed): + +#. Go to *Sales > Orders > Quotations* +#. Create or edit a quotation. +#. Add a line. +#. Select a product with the criteria to match the pricelist from supplier + info. +#. See the proper price appears in the line. diff --git a/product_pricelist_supplierinfo/static/description/icon.png b/product_pricelist_supplierinfo/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_pricelist_supplierinfo/static/description/icon.png differ diff --git a/product_pricelist_supplierinfo/static/description/index.html b/product_pricelist_supplierinfo/static/description/index.html new file mode 100644 index 00000000000..6eef606fce8 --- /dev/null +++ b/product_pricelist_supplierinfo/static/description/index.html @@ -0,0 +1,484 @@ + + + + + + +Supplier info prices in sales pricelists + + + +
+

Supplier info prices in sales pricelists

+ + +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

This module allows you to create a sales pricelist based on product +supplierinfo prices. If you want, you can bypass minimum quantity in pricelist +item.

+

Table of contents

+ +
+

Installation

+

Although this module doesn’t depend technically on Sales Management, you +must install it for configuring and seeing the effects of it.

+
+
+

Configuration

+

To configure pricelists with the new feature of this module, you need to:

+
    +
  1. Go to Sales > Configuration > Settings and check +“Multiple Sales Prices per Product” option and +“Prices computed from formulas” after that. You must have correct +permissions and you must install Sales Management app (sale) to see +these settings.
  2. +
  3. Create or edit a Sales Pricelist at Sales > Catalog > Pricelists.
  4. +
  5. Add or edit a pricelist item and check “Formula” option in +“Price Computation” section.
  6. +
  7. You will see the new option “Prices based on supplier info”.
  8. +
  9. If you want to bypass the “Min.Quantity” field of the supplier info and +always select the lowest quantity price, check the option +“Ignore Supplier Info Min. Quantity”.
  10. +
+
+
+

Usage

+

For adding supplier info:

+
    +
  1. Go to Sales > Catalog > Products
  2. +
  3. Open or create a product.
  4. +
  5. Go to “Purchase” page.
  6. +
  7. On “Vendors” section, add the supplier and prices.
  8. +
  9. You can drag and drop for reordering these lines.
  10. +
+

Check the remark in known issues about the supplier info line selection.

+

For checking pricelists in action, you can (with sale module installed):

+
    +
  1. Go to Sales > Orders > Quotations
  2. +
  3. Create or edit a quotation.
  4. +
  5. Add a line.
  6. +
  7. Select a product with the criteria to match the pricelist from supplier +info.
  8. +
  9. See the proper price appears in the line.
  10. +
+
+
+

Known issues / Roadmap

+
    +
  • First line that matches by minimum quantity criteria, independently from the +supplier, will be the one that provides the price for the pricelist.
  • +
  • There’s no mechanism for selecting the supplier from possible sources like +sales orders.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_pricelist_supplierinfo/tests/__init__.py b/product_pricelist_supplierinfo/tests/__init__.py new file mode 100644 index 00000000000..0ff6e5eba5e --- /dev/null +++ b/product_pricelist_supplierinfo/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_supplierinfo diff --git a/product_pricelist_supplierinfo/tests/test_product_supplierinfo.py b/product_pricelist_supplierinfo/tests/test_product_supplierinfo.py new file mode 100644 index 00000000000..ab68d73d07f --- /dev/null +++ b/product_pricelist_supplierinfo/tests/test_product_supplierinfo.py @@ -0,0 +1,114 @@ +# Copyright 2018 Tecnativa - Vicent Cubells +# Copyright 2018 Tecnativa - Pedro M. Baeza +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo.tests import common + + +class TestProductSupplierinfo(common.SavepointCase): + @classmethod + def setUpClass(cls): + super(TestProductSupplierinfo, cls).setUpClass() + cls.partner = cls.env['res.partner'].create({ + 'name': 'Partner Test', + }) + cls.supplier1 = cls.env['res.partner'].create({ + 'name': 'Supplier #1', + }) + cls.supplier2 = cls.env['res.partner'].create({ + 'name': 'Supplier #2', + }) + cls.product = cls.env['product.product'].create({ + 'name': 'Product Test', + 'seller_ids': [ + (0, 0, { + 'name': cls.supplier1.id, + 'min_qty': 5, + 'price': 50, + }), + (0, 0, { + 'name': cls.supplier2.id, + 'min_qty': 1, + 'price': 10, + }), + ], + }) + cls.pricelist = cls.env['product.pricelist'].create({ + 'name': 'Supplierinfo Pricelist', + 'discount_policy': 'without_discount', + 'item_ids': [ + (0, 0, { + 'compute_price': 'formula', + 'base': 'supplierinfo', + 'price_discount': 0, + 'min_quantity': 1.0, + }), + ], + }) + + def test_pricelist_based_on_product_category(self): + self.pricelist.item_ids[0].write({ + 'price_discount': 50, + 'applied_on': '2_product_category', + 'categ_id': self.env.ref('product.product_category_all').id, + }) + self.assertAlmostEqual( + self.pricelist.get_product_price(self.product, 1, False), 5.0, + ) + + def test_pricelist_based_on_product(self): + self.pricelist.item_ids[0].write({ + 'applied_on': '1_product', + 'product_tmpl_id': self.product.product_tmpl_id.id, + }) + self.assertAlmostEqual( + self.pricelist.get_product_price(self.product, 1, False), 10.0, + ) + self.assertAlmostEqual( + self.product.product_tmpl_id.with_context( + pricelist=self.pricelist.id).price, 10.0, + ) + + def test_pricelist_based_on_product_variant(self): + self.pricelist.item_ids[0].write({ + 'price_discount': -25, + 'applied_on': '0_product_variant', + 'product_id': self.product.id, + }) + self.assertAlmostEqual( + self.pricelist.get_product_price(self.product, 1, False), 12.5, + ) + self.assertAlmostEqual( + self.product.with_context(pricelist=self.pricelist.id).price, 12.5, + ) + + def test_pricelist_min_quantity(self): + self.assertAlmostEqual( + self.pricelist.get_product_price(self.product, 1, False), 10, + ) + self.assertAlmostEqual( + self.pricelist.get_product_price(self.product, 5, False), 50, + ) + self.assertAlmostEqual( + self.pricelist.get_product_price(self.product, 10, False), 50, + ) + self.pricelist.item_ids[0].no_supplierinfo_min_quantity = True + self.assertAlmostEqual( + self.pricelist.get_product_price(self.product, 5, False), 10, + ) + + def test_pricelist_dates(self): + """ Test pricelist and supplierinfo dates """ + self.product.seller_ids.filtered( + lambda x: x.min_qty == 5 + ).date_start = '2018-12-31' + self.assertAlmostEqual( + self.pricelist.get_product_price( + self.product, 5, False, date='2018-10-01', + ), 10, + ) + self.assertAlmostEqual( + self.pricelist.get_product_price( + self.product, 5, False, date='2019-01-01', + ), 50, + ) diff --git a/product_pricelist_supplierinfo/views/product_pricelist_item_views.xml b/product_pricelist_supplierinfo/views/product_pricelist_item_views.xml new file mode 100644 index 00000000000..2eef46fd679 --- /dev/null +++ b/product_pricelist_supplierinfo/views/product_pricelist_item_views.xml @@ -0,0 +1,18 @@ + + + + + product.pricelist.item.form + product.pricelist.item + + + + Supplier price - + + + + + + + + diff --git a/product_priority/i18n/es.po b/product_priority/i18n/es.po index 27859da9b72..8145b385198 100644 --- a/product_priority/i18n/es.po +++ b/product_priority/i18n/es.po @@ -9,20 +9,21 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-02-27 03:40+0000\n" -"PO-Revision-Date: 2018-02-27 03:40+0000\n" -"Last-Translator: OCA Transbot , 2018\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_priority #: model:ir.model.fields,field_description:product_priority.field_product_product_priority #: model:ir.model.fields,field_description:product_priority.field_product_template_priority msgid "Priority" -msgstr "" +msgstr "Prioridad" #. module: product_priority #: model:ir.model,name:product_priority.model_product_template diff --git a/product_restricted_type/README.rst b/product_restricted_type/README.rst new file mode 100644 index 00000000000..b6e12e875f1 --- /dev/null +++ b/product_restricted_type/README.rst @@ -0,0 +1,86 @@ +======================= +Product Restricted Type +======================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:3a5b0f76bcad8ce639d9a1fe8defe65d12557713ec0a7539e44f279e120b55d8 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/11.0/product_restricted_type + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_restricted_type + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=11.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds 'restricted_product_type' to product_category model. +With this optional selection field 'restricted_product_type' should +have the same values as in the product.template, 'type' field. + +A constrain is also established in the product so that when the 'type' +defined in the product does not match with the 'restricted_product_type' +defined in the product category it raises a Validation Error. + +Also, in the product category one would not be able to change the field +'restricted_product_type' if the category has been assigned at least to +one product that already has this category, but has a different 'type' value. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Eficent + +Contributors +~~~~~~~~~~~~ + +* Adria Gil Sorribes + +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/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_restricted_type/__init__.py b/product_restricted_type/__init__.py new file mode 100644 index 00000000000..8a3fd4c08ee --- /dev/null +++ b/product_restricted_type/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models +from . import tests diff --git a/product_restricted_type/__manifest__.py b/product_restricted_type/__manifest__.py new file mode 100644 index 00000000000..e281765d7af --- /dev/null +++ b/product_restricted_type/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Product Restricted Type', + 'version': '11.0.1.0.0', + 'author': "Eficent," + "Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/product-attribute', + 'license': 'AGPL-3', + 'category': 'Product', + 'depends': [ + 'product', + ], + 'data': [ + 'views/product_views.xml', + ], + 'auto_install': False, + 'installable': True, +} diff --git a/product_restricted_type/i18n/product_restricted_type.pot b/product_restricted_type/i18n/product_restricted_type.pot new file mode 100644 index 00000000000..c2151cd142a --- /dev/null +++ b/product_restricted_type/i18n/product_restricted_type.pot @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_restricted_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_restricted_type +#: code:addons/product_restricted_type/models/product.py:27 +#, python-format +msgid "A product (or multiple products) in the category have different type than the selected restricted product type" +msgstr "" + +#. module: product_restricted_type +#: model:ir.model,name:product_restricted_type.model_product_category +msgid "Product Category" +msgstr "" + +#. module: product_restricted_type +#: model:ir.model,name:product_restricted_type.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_restricted_type +#: model:ir.model.fields,field_description:product_restricted_type.field_product_category_restricted_product_type +msgid "Restricted Product Type" +msgstr "" + +#. module: product_restricted_type +#: code:addons/product_restricted_type/models/product_template.py:28 +#, python-format +msgid "The product type must be equal to the restricted product type defined in the product category" +msgstr "" + diff --git a/product_restricted_type/models/__init__.py b/product_restricted_type/models/__init__.py new file mode 100644 index 00000000000..8d6754c5d1f --- /dev/null +++ b/product_restricted_type/models/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import product_template +from . import product diff --git a/product_restricted_type/models/product.py b/product_restricted_type/models/product.py new file mode 100644 index 00000000000..7638bd04efb --- /dev/null +++ b/product_restricted_type/models/product.py @@ -0,0 +1,30 @@ +# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class ProductCategory(models.Model): + _inherit = 'product.category' + + restricted_product_type = fields.Selection( + string="Restricted Product Type", + selection=lambda self: self.env['product.template']._fields[ + 'type'].selection, + ) + + @api.constrains("restricted_product_type") + def _check_restricted_product_type(self): + """Check if any product in the category has different type""" + for categ in self: + if categ.restricted_product_type: + products = self.env['product.template'].search( + [('categ_id', '=', categ.id), + ('type', '!=', categ.restricted_product_type)], + limit=1, + ) + if products: + raise ValidationError(_( + 'A product (or multiple products) in the category ' + 'have different type than the selected restricted ' + 'product type')) diff --git a/product_restricted_type/models/product_template.py b/product_restricted_type/models/product_template.py new file mode 100644 index 00000000000..1c30c623ebe --- /dev/null +++ b/product_restricted_type/models/product_template.py @@ -0,0 +1,30 @@ +# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, models, _ +from odoo.exceptions import ValidationError + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + @api.onchange('categ_id') + def _onchange_categ_id(self): + if self.categ_id and self.categ_id.restricted_product_type: + self.type = self.categ_id.restricted_product_type + + @api.onchange('type') + def _onchange_type(self): + if self.type: + return {'domain': {'categ_id': [ + ('restricted_product_type', 'in', [self.type, False])]}} + else: + return {'domain': {'categ_id': []}} + + @api.constrains("type") + def _check_product_type(self): + for product in self: + if product.categ_id.restricted_product_type and product.type != \ + product.categ_id.restricted_product_type: + raise ValidationError(_( + 'The product type must be equal to the restricted ' + 'product type defined in the product category')) diff --git a/product_restricted_type/readme/CONTRIBUTORS.rst b/product_restricted_type/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..afabf1edef4 --- /dev/null +++ b/product_restricted_type/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Adria Gil Sorribes diff --git a/product_restricted_type/readme/DESCRIPTION.rst b/product_restricted_type/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..229f2a6aa65 --- /dev/null +++ b/product_restricted_type/readme/DESCRIPTION.rst @@ -0,0 +1,11 @@ +This module adds 'restricted_product_type' to product_category model. +With this optional selection field 'restricted_product_type' should +have the same values as in the product.template, 'type' field. + +A constrain is also established in the product so that when the 'type' +defined in the product does not match with the 'restricted_product_type' +defined in the product category it raises a Validation Error. + +Also, in the product category one would not be able to change the field +'restricted_product_type' if the category has been assigned at least to +one product that already has this category, but has a different 'type' value. diff --git a/product_restricted_type/readme/USAGE.rst b/product_restricted_type/readme/USAGE.rst new file mode 100644 index 00000000000..e69de29bb2d diff --git a/product_restricted_type/static/description/icon.png b/product_restricted_type/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_restricted_type/static/description/icon.png differ diff --git a/product_restricted_type/static/description/index.html b/product_restricted_type/static/description/index.html new file mode 100644 index 00000000000..36f0e6010cd --- /dev/null +++ b/product_restricted_type/static/description/index.html @@ -0,0 +1,429 @@ + + + + + + +Product Restricted Type + + + +
+

Product Restricted Type

+ + +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

This module adds ‘restricted_product_type’ to product_category model. +With this optional selection field ‘restricted_product_type’ should +have the same values as in the product.template, ‘type’ field.

+

A constrain is also established in the product so that when the ‘type’ +defined in the product does not match with the ‘restricted_product_type’ +defined in the product category it raises a Validation Error.

+

Also, in the product category one would not be able to change the field +‘restricted_product_type’ if the category has been assigned at least to +one product that already has this category, but has a different ‘type’ value.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Eficent
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_restricted_type/tests/__init__.py b/product_restricted_type/tests/__init__.py new file mode 100644 index 00000000000..8267071abd1 --- /dev/null +++ b/product_restricted_type/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_product_restricted_type diff --git a/product_restricted_type/tests/test_product_restricted_type.py b/product_restricted_type/tests/test_product_restricted_type.py new file mode 100644 index 00000000000..7e3a2e502a1 --- /dev/null +++ b/product_restricted_type/tests/test_product_restricted_type.py @@ -0,0 +1,56 @@ +# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase +from odoo.exceptions import ValidationError + + +class TestProductRestrictedType(TransactionCase): + + def setUp(self): + super(TestProductRestrictedType, self).setUp() + self.product_product = self.env['product.product'] + self.product_category = self.env['product.category'] + + self.product_types = self.env['product.template']._fields[ + 'type'].selection + + self.categ_test = self.product_category.create({ + 'name': 'Test Category 1', + 'restricted_product_type': self.product_types[0][0], + }) + self.categ_test2 = self.product_category.create({ + 'name': 'Test Category 2', + }) + self.product_test = self.product_product.create({ + 'name': "Test Product 1", + 'type': self.product_types[0][0], + 'categ_id': self.categ_test.id, + }) + self.product_product.create({ + 'name': "Test Product 2", + 'type': self.product_types[1][0], + 'categ_id': self.categ_test2.id, + }) + + def test_product_different_type(self): + """User tries to change product type to a different type than + company restricted product type""" + with self.assertRaises(ValidationError): + self.product_test.write({ + 'type': self.product_types[1][0], + }) + with self.assertRaises(ValidationError): + self.product_product.create({ + 'name': "Test Product 3", + 'type': self.product_types[1][0], + 'categ_id': self.categ_test.id, + }) + + def test_category_different_type(self): + """User tries to change category restricted type but there are + products with already defined (different) type""" + with self.assertRaises(ValidationError): + self.categ_test.write({ + 'restricted_product_type': self.product_types[1][0], + }) diff --git a/product_restricted_type/views/product_views.xml b/product_restricted_type/views/product_views.xml new file mode 100644 index 00000000000..d9782f18a68 --- /dev/null +++ b/product_restricted_type/views/product_views.xml @@ -0,0 +1,13 @@ + + + + product.category.form + product.category + + + + + + + + diff --git a/product_secondary_unit/README.rst b/product_secondary_unit/README.rst new file mode 100644 index 00000000000..43124e6f270 --- /dev/null +++ b/product_secondary_unit/README.rst @@ -0,0 +1,87 @@ +====================== +Product Secondary Unit +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:381af181e1ebc4cc0931fa1171ce813e654b3088756fbaf3fcb2bc837a243eed + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/11.0/product_secondary_unit + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_secondary_unit + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=11.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of product module to allow define +other units with their conversion factor. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module you need to: + +#. Go to a *Product > General Information tab*. +#. Create any record in "Secondary unit of measure". +#. Set the conversion factor. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Carlos Dauden +* Sergio Teruel + +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/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_secondary_unit/__init__.py b/product_secondary_unit/__init__.py new file mode 100644 index 00000000000..3275ac2adf3 --- /dev/null +++ b/product_secondary_unit/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import models diff --git a/product_secondary_unit/__manifest__.py b/product_secondary_unit/__manifest__.py new file mode 100644 index 00000000000..42379da46f2 --- /dev/null +++ b/product_secondary_unit/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + 'name': 'Product Secondary Unit', + 'summary': 'Set a secondary unit per product', + 'version': '11.0.1.0.2', + 'development_status': 'Beta', + 'category': 'Product', + 'website': 'https://github.com/OCA/product-attribute', + 'author': 'Tecnativa, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': [ + 'product', + ], + 'data': [ + 'security/ir.model.access.csv', + 'security/security.xml', + 'views/product_views.xml', + ], +} diff --git a/product_secondary_unit/i18n/es.po b/product_secondary_unit/i18n/es.po new file mode 100644 index 00000000000..c2b634123f2 --- /dev/null +++ b/product_secondary_unit/i18n/es.po @@ -0,0 +1,116 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_secondary_unit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-04-15 07:56+0000\n" +"PO-Revision-Date: 2019-04-15 09:57+0200\n" +"Last-Translator: Marta Vázquez Rodríguez \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Poedit 2.0.6\n" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_code +msgid "Code" +msgstr "Código" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_secondary_unit +#: model:ir.model.fields,help:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,help:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,help:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Default Secondary Unit of Measure." +msgstr "Segunda unidad de medida por defecto." + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_display_name +msgid "Display Name" +msgstr "Mostrar nombre" + +#. module: product_secondary_unit +#: model:res.groups,name:product_secondary_unit.group_secondary_unit +msgid "Display secondary units" +msgstr "Mostrar unidades secundarias" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_id +msgid "ID" +msgstr "ID (Identificador)" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit___last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_uid +msgid "Last Updated by" +msgstr "Última actualización de" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_name +msgid "Name" +msgstr "Nombre" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_template +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_product_tmpl_id +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_factor +msgid "Secondary Unit Factor" +msgstr "Factor segunda unidad" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Secondary Unit of Measure" +msgstr "Segunda unidad de medida" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_secondary_unit +msgid "product.secondary.unit" +msgstr "'product.secondary.unit'" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary Unit" +msgstr "Unidad Secundaria" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary unit of measure" +msgstr "Segunda unidad de medida" + +#~ msgid "Default unit sale" +#~ msgstr "Unidad de venta por defecto" + +#, fuzzy +#~| msgid "Default unit sale" +#~ msgid "Default unit purchase" +#~ msgstr "Unidad de venta por defecto" diff --git a/product_secondary_unit/i18n/fr.po b/product_secondary_unit/i18n/fr.po new file mode 100644 index 00000000000..b6dcb5d2110 --- /dev/null +++ b/product_secondary_unit/i18n/fr.po @@ -0,0 +1,112 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_secondary_unit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-04-15 07:56+0000\n" +"PO-Revision-Date: 2018-11-06 11:25+0000\n" +"Last-Translator: William Olhasque \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.2.2\n" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_code +msgid "Code" +msgstr "Code" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_date +msgid "Created on" +msgstr "Créé le" + +#. module: product_secondary_unit +#: model:ir.model.fields,help:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,help:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,help:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Default Secondary Unit of Measure." +msgstr "Unité de mesure secondaire par défaut." + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_secondary_unit +#: model:res.groups,name:product_secondary_unit.group_secondary_unit +#, fuzzy +msgid "Display secondary units" +msgstr "Unité secondaire" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_id +msgid "ID" +msgstr "ID" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit___last_update +msgid "Last Modified on" +msgstr "Dernière Modification le" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_name +msgid "Name" +msgstr "Nom" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_template +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_product_tmpl_id +msgid "Product Template" +msgstr "Modèle de produit" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_factor +msgid "Secondary Unit Factor" +msgstr "Facteur de l'unité secondaire" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Secondary Unit of Measure" +msgstr "Unité de mesure secondaire" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_secondary_unit +msgid "product.secondary.unit" +msgstr "product.secondary.unit" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary Unit" +msgstr "Unité secondaire" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary unit of measure" +msgstr "Unité de mesure secondaire" + +#~ msgid "Default unit sale" +#~ msgstr "Unité de vente par défaut" diff --git a/product_secondary_unit/i18n/it.po b/product_secondary_unit/i18n/it.po new file mode 100644 index 00000000000..480eb0453f1 --- /dev/null +++ b/product_secondary_unit/i18n/it.po @@ -0,0 +1,107 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_secondary_unit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-03 13:48+0000\n" +"Last-Translator: Francesco Foresti \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_code +msgid "Code" +msgstr "Codice" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_date +msgid "Created on" +msgstr "Creato il" + +#. module: product_secondary_unit +#: model:ir.model.fields,help:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,help:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,help:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Default Secondary Unit of Measure." +msgstr "Unità di misura secondaria predefinita." + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: product_secondary_unit +#: model:res.groups,name:product_secondary_unit.group_secondary_unit +msgid "Display secondary units" +msgstr "Mostra unità secondarie" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_id +msgid "ID" +msgstr "ID" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit___last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_name +msgid "Name" +msgstr "Nome" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_template +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_product_tmpl_id +msgid "Product Template" +msgstr "Modello prodotto" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_factor +msgid "Secondary Unit Factor" +msgstr "Fattore unità secondaria" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Secondary Unit of Measure" +msgstr "Unità di misura secondaria" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_secondary_unit +msgid "product.secondary.unit" +msgstr "product.secondary.unit" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary Unit" +msgstr "Unità secondaria" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary unit of measure" +msgstr "unità di misura secondaria" diff --git a/product_secondary_unit/i18n/product_secondary_unit.pot b/product_secondary_unit/i18n/product_secondary_unit.pot new file mode 100644 index 00000000000..ad28630b2d8 --- /dev/null +++ b/product_secondary_unit/i18n/product_secondary_unit.pot @@ -0,0 +1,105 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_secondary_unit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_code +msgid "Code" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid +msgid "Created by" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_date +msgid "Created on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,help:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,help:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,help:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Default Secondary Unit of Measure." +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_display_name +msgid "Display Name" +msgstr "" + +#. module: product_secondary_unit +#: model:res.groups,name:product_secondary_unit.group_secondary_unit +msgid "Display secondary units" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_id +msgid "ID" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_name +msgid "Name" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_template +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_product_tmpl_id +msgid "Product Template" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_factor +msgid "Secondary Unit Factor" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Secondary Unit of Measure" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_secondary_unit +msgid "product.secondary.unit" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary Unit" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary unit of measure" +msgstr "" + diff --git a/product_secondary_unit/migrations/11.0.1.0.2/post-migration.py b/product_secondary_unit/migrations/11.0.1.0.2/post-migration.py new file mode 100644 index 00000000000..34c0331e824 --- /dev/null +++ b/product_secondary_unit/migrations/11.0.1.0.2/post-migration.py @@ -0,0 +1,13 @@ +# Copyright 2019 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl +from openupgradelib import openupgrade + + +@openupgrade.migrate(use_env=True) +def migrate(env, version): + group_secondary_unit = env.ref( + 'product_secondary_unit.group_secondary_unit') + users = env['res.users'].with_context(active_test=False).search([]) + users.write({ + 'groups_id': [(4, group_secondary_unit.id)] + }) diff --git a/product_secondary_unit/models/__init__.py b/product_secondary_unit/models/__init__.py new file mode 100644 index 00000000000..4775c1b3fcc --- /dev/null +++ b/product_secondary_unit/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import product_second_unit +from . import product_template diff --git a/product_secondary_unit/models/product_second_unit.py b/product_secondary_unit/models/product_second_unit.py new file mode 100644 index 00000000000..2d7ffc35382 --- /dev/null +++ b/product_secondary_unit/models/product_second_unit.py @@ -0,0 +1,50 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + + +class ProductSecondaryUnit(models.Model): + _name = 'product.secondary.unit' + + name = fields.Char( + required=True, + translate=True, + ) + code = fields.Char() + product_tmpl_id = fields.Many2one( + comodel_name='product.template', + string='Product Template', + required=True, + ) + uom_id = fields.Many2one( + comodel_name='product.uom', + string='Secondary Unit of Measure', + required=True, + help="Default Secondary Unit of Measure.", + ) + factor = fields.Float( + string='Secondary Unit Factor', + default=1.0, + digits=0, + required=True, + ) + + @api.multi + def name_get(self): + result = [] + for unit in self: + result.append((unit.id, "{unit_name}-{factor}".format( + unit_name=unit.name, + factor=unit.factor)) + ) + return result + + @api.model + def name_search(self, name='', args=None, operator='ilike', limit=100): + if args is None: + args = [] + units = self.search([('code', '=', name)] + args, limit=1) + if not units: + return super(ProductSecondaryUnit, self).name_search( + name=name, args=args, operator=operator, limit=limit) + return units.name_get() diff --git a/product_secondary_unit/models/product_template.py b/product_secondary_unit/models/product_template.py new file mode 100644 index 00000000000..b729a648a27 --- /dev/null +++ b/product_secondary_unit/models/product_template.py @@ -0,0 +1,14 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + secondary_uom_ids = fields.One2many( + comodel_name='product.secondary.unit', + inverse_name='product_tmpl_id', + string='Secondary Unit of Measure', + help='Default Secondary Unit of Measure.', + ) diff --git a/product_secondary_unit/readme/CONTRIBUTORS.rst b/product_secondary_unit/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..b919cb776aa --- /dev/null +++ b/product_secondary_unit/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Carlos Dauden +* Sergio Teruel diff --git a/product_secondary_unit/readme/DESCRIPTION.rst b/product_secondary_unit/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..006bd6d63a2 --- /dev/null +++ b/product_secondary_unit/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the functionality of product module to allow define +other units with their conversion factor. diff --git a/product_secondary_unit/readme/USAGE.rst b/product_secondary_unit/readme/USAGE.rst new file mode 100644 index 00000000000..3f837c39383 --- /dev/null +++ b/product_secondary_unit/readme/USAGE.rst @@ -0,0 +1,5 @@ +To use this module you need to: + +#. Go to a *Product > General Information tab*. +#. Create any record in "Secondary unit of measure". +#. Set the conversion factor. diff --git a/product_secondary_unit/security/ir.model.access.csv b/product_secondary_unit/security/ir.model.access.csv new file mode 100644 index 00000000000..5ca549da6e5 --- /dev/null +++ b/product_secondary_unit/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_secondary_unit_user,access_product_second_unit_user,model_product_secondary_unit,base.group_user,1,1,1,1 diff --git a/product_secondary_unit/security/security.xml b/product_secondary_unit/security/security.xml new file mode 100644 index 00000000000..315dff2533c --- /dev/null +++ b/product_secondary_unit/security/security.xml @@ -0,0 +1,13 @@ + + + + + + Display secondary units + + + + diff --git a/product_secondary_unit/static/description/icon.png b/product_secondary_unit/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_secondary_unit/static/description/icon.png differ diff --git a/product_secondary_unit/static/description/index.html b/product_secondary_unit/static/description/index.html new file mode 100644 index 00000000000..a0341ae33c8 --- /dev/null +++ b/product_secondary_unit/static/description/index.html @@ -0,0 +1,433 @@ + + + + + + +Product Secondary Unit + + + +
+

Product Secondary Unit

+ + +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

This module extends the functionality of product module to allow define +other units with their conversion factor.

+

Table of contents

+ +
+

Usage

+

To use this module you need to:

+
    +
  1. Go to a Product > General Information tab.
  2. +
  3. Create any record in “Secondary unit of measure”.
  4. +
  5. Set the conversion factor.
  6. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_secondary_unit/tests/__init__.py b/product_secondary_unit/tests/__init__.py new file mode 100644 index 00000000000..62bc6773d19 --- /dev/null +++ b/product_secondary_unit/tests/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import test_product_second_unit diff --git a/product_secondary_unit/tests/test_product_second_unit.py b/product_secondary_unit/tests/test_product_second_unit.py new file mode 100644 index 00000000000..f05b1bb936e --- /dev/null +++ b/product_secondary_unit/tests/test_product_second_unit.py @@ -0,0 +1,49 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo.tests import SavepointCase + + +class TestProductSecondaryUnit(SavepointCase): + at_install = False + post_install = True + + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.product_uom_kg = cls.env.ref('product.product_uom_kgm') + cls.product_uom_unit = cls.env.ref('product.product_uom_unit') + cls.product = cls.env['product.template'].create({ + 'name': 'test', + 'uom_id': cls.product_uom_kg.id, + 'uom_po_id': cls.product_uom_kg.id, + 'secondary_uom_ids': [ + (0, 0, { + 'code': 'A', + 'name': 'unit-700', + 'uom_id': cls.product_uom_unit.id, + 'factor': 0.7, + }), + (0, 0, { + 'code': 'B', + 'name': 'unit-900', + 'uom_id': cls.product_uom_unit.id, + 'factor': 0.9, + }), + ], + }) + cls.secondary_unit = cls.env['product.secondary.unit'].search([ + ('product_tmpl_id', '=', cls.product.id), + ], limit=1) + + def test_product_secondary_unit_name(self): + self.assertEqual(self.secondary_unit.name_get()[0][1], 'unit-700-0.7') + + def test_product_secondary_unit_search(self): + args = [('product_tmpl_id.product_variant_ids', 'in', + self.product.product_variant_ids.ids)] + name_get = self.env['product.secondary.unit'].name_search( + name='A', args=args) + self.assertEqual(len(name_get), 1) + name_get = self.env['product.secondary.unit'].name_search( + name='X', args=args) + self.assertEqual(len(name_get), 0) diff --git a/product_secondary_unit/views/product_views.xml b/product_secondary_unit/views/product_views.xml new file mode 100755 index 00000000000..b4017281b5b --- /dev/null +++ b/product_secondary_unit/views/product_views.xml @@ -0,0 +1,27 @@ + + + + + + Product template Secondary Unit + product.template + + + + + + + + + + + + + + + + + + + diff --git a/product_sequence/README.rst b/product_sequence/README.rst index 255663a7d24..03b4a3e5226 100644 --- a/product_sequence/README.rst +++ b/product_sequence/README.rst @@ -1,27 +1,49 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - ================ Product Sequence ================ +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:a755f2196eedcac146a86bde2cd872a4047ddc9eddb16171a17c68762a0b32f0 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/11.0/product_sequence + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_sequence + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=11.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + This module allows to associate a sequence to the product reference. -The reference (default code) is unique (SQL constraint) and required. +The reference (default code) is required. You can optionally specify different sequences for different product categories. +**Table of contents** + +.. contents:: + :local: + Installation ============ -Prior to installing this module, if you have any existing products you should -ensure they already have a unique reference (or no reference) set. Products -with a default_code of '/' or empty will automatically be assigned a code of -"!!mig!!" followed by the system id for that product. - -Otherwise the setting of the unique constraint will fail and the module will -fail to install. +Products with a default_code of '/' or empty will automatically be assigned a +code of "!!mig!!" followed by the system id for that product. Usage ===== @@ -34,45 +56,58 @@ To specify a different sequence for a product category proceed as follows: or create a menuitem manually). #. Fill the *Prefix for Product Internal Reference* as desired. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/135/11.0 + +Changelog +========= + +11.0.1.0.1 (2019-02-07) +~~~~~~~~~~~~~~~~~~~~~~~ + +* Remove sql constraint from product.product. +* If you need this constraint you can install product_code_unique module which + add this restriction. Bug Tracker =========== -Bugs are tracked on `GitHub 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. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Zikzakmedia SL +* Sodexis Contributors ------------- +~~~~~~~~~~~~ * Angel Moya * Graeme Gellatly * Sodexis * Lois Rilo +* Sergio Teruel -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_sequence/__manifest__.py b/product_sequence/__manifest__.py index 685a77ce90f..2963c29f0cb 100644 --- a/product_sequence/__manifest__.py +++ b/product_sequence/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2004 Tiny SPRL # Copyright 2016 Sodexis # Copyright 2018 Eficent Business and IT Consulting Services S.L. @@ -7,8 +6,10 @@ { 'name': 'Product Sequence', - 'version': '11.0.1.0.0', - 'author': "Zikzakmedia SL,Sodexis,Odoo Community Association (OCA)", + 'version': '11.0.1.0.1', + 'author': "Zikzakmedia SL," + "Sodexis," + "Odoo Community Association (OCA)", 'website': 'https://github.com/OCA/product-attribute', 'license': 'AGPL-3', 'category': 'Product', diff --git a/product_sequence/i18n/ar.po b/product_sequence/i18n/ar.po index 8432ea904cc..ec7c37ffdd6 100644 --- a/product_sequence/i18n/ar.po +++ b/product_sequence/i18n/ar.po @@ -20,7 +20,7 @@ msgstr "" "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/bg.po b/product_sequence/i18n/bg.po index cf35edb694b..689cf552e84 100644 --- a/product_sequence/i18n/bg.po +++ b/product_sequence/i18n/bg.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/bs.po b/product_sequence/i18n/bs.po index d848f1da5c1..81db0fe987c 100644 --- a/product_sequence/i18n/bs.po +++ b/product_sequence/i18n/bs.po @@ -20,7 +20,7 @@ msgstr "" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/ca.po b/product_sequence/i18n/ca.po index b770d0d4899..37459408099 100644 --- a/product_sequence/i18n/ca.po +++ b/product_sequence/i18n/ca.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -53,11 +53,6 @@ msgstr "Producte" msgid "Product Sequence" msgstr "Producte" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/cs.po b/product_sequence/i18n/cs.po index 3e530942fa2..85e9159b650 100644 --- a/product_sequence/i18n/cs.po +++ b/product_sequence/i18n/cs.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/da.po b/product_sequence/i18n/da.po index 1ae39b26dd6..6edc8be31ed 100644 --- a/product_sequence/i18n/da.po +++ b/product_sequence/i18n/da.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/de.po b/product_sequence/i18n/de.po index 48805197149..54689133bf6 100644 --- a/product_sequence/i18n/de.po +++ b/product_sequence/i18n/de.po @@ -9,17 +9,18 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-05-05 02:44+0000\n" -"PO-Revision-Date: 2017-05-05 02:44+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"PO-Revision-Date: 2020-02-20 19:13+0000\n" +"Last-Translator: Ben Brich \n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "-kopie" @@ -27,7 +28,7 @@ msgstr "-kopie" #. module: product_sequence #: model:ir.model.fields,field_description:product_sequence.field_product_category_code_prefix msgid "Prefix for Product Internal Reference" -msgstr "" +msgstr "Präfix interen Referenz Produkt" #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_code_prefix @@ -35,6 +36,9 @@ msgid "" "Prefix used to generate the internal reference for products created with " "this category. If blank the default sequence will be used." msgstr "" +"Präfix der bei der Erstellung von Produkten in dieser Produktkategorie " +"verwendet wird. Wenn kein Präfix definiert ist, wird die Standardsequenz " +"verwendet." #. module: product_sequence #: model:ir.model,name:product_sequence.model_product_product @@ -43,20 +47,13 @@ msgstr "Produkt" #. module: product_sequence #: model:ir.model,name:product_sequence.model_product_category -#, fuzzy msgid "Product Category" -msgstr "Produkt" +msgstr "Produktkategorie" #. module: product_sequence #: model:ir.model.fields,field_description:product_sequence.field_product_category_sequence_id -#, fuzzy msgid "Product Sequence" -msgstr "Produkt" - -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "Die Referenz muss eindeutig sein" +msgstr "Produktsequenz" #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id @@ -64,3 +61,8 @@ msgid "" "This field contains the information related to the numbering of the journal " "entries of this journal." msgstr "" +"Dieses Feld enthält die Informationen in Bezug auf die Nummerierung der " +"Journaleinträge dieses Journals." + +#~ msgid "The reference must be unique" +#~ msgstr "Die Referenz muss eindeutig sein" diff --git a/product_sequence/i18n/el.po b/product_sequence/i18n/el.po index 056e7473e5a..fae7c10d14b 100644 --- a/product_sequence/i18n/el.po +++ b/product_sequence/i18n/el.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/es.po b/product_sequence/i18n/es.po index b0cfd8b43d7..836fdcd0a63 100644 --- a/product_sequence/i18n/es.po +++ b/product_sequence/i18n/es.po @@ -9,17 +9,18 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-05-05 02:44+0000\n" -"PO-Revision-Date: 2017-05-05 02:44+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "-copia" @@ -27,7 +28,7 @@ msgstr "-copia" #. module: product_sequence #: model:ir.model.fields,field_description:product_sequence.field_product_category_code_prefix msgid "Prefix for Product Internal Reference" -msgstr "" +msgstr "Prefijo para la referencia interna del producto" #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_code_prefix @@ -35,6 +36,8 @@ msgid "" "Prefix used to generate the internal reference for products created with " "this category. If blank the default sequence will be used." msgstr "" +"Prefijo usado para generar la referencia interna para los productos creados " +"con esta categoría. Si está en blanco se utilizará la secuencia por defecto." #. module: product_sequence #: model:ir.model,name:product_sequence.model_product_product @@ -43,20 +46,13 @@ msgstr "Producto" #. module: product_sequence #: model:ir.model,name:product_sequence.model_product_category -#, fuzzy msgid "Product Category" -msgstr "Producto" +msgstr "Categoría del producto" #. module: product_sequence #: model:ir.model.fields,field_description:product_sequence.field_product_category_sequence_id -#, fuzzy msgid "Product Sequence" -msgstr "Producto" - -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "La referencia debe ser única" +msgstr "Secuencia del producto" #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id @@ -64,3 +60,8 @@ msgid "" "This field contains the information related to the numbering of the journal " "entries of this journal." msgstr "" +"Este campo contiene la información relativa a la numeración de las entradas " +"de este diario." + +#~ msgid "The reference must be unique" +#~ msgstr "La referencia debe ser única" diff --git a/product_sequence/i18n/es_AR.po b/product_sequence/i18n/es_AR.po index 81e21268588..a2e01de019f 100644 --- a/product_sequence/i18n/es_AR.po +++ b/product_sequence/i18n/es_AR.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/es_CR.po b/product_sequence/i18n/es_CR.po index 49f1206ef1d..dcae0614d38 100644 --- a/product_sequence/i18n/es_CR.po +++ b/product_sequence/i18n/es_CR.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/es_EC.po b/product_sequence/i18n/es_EC.po index 097bb9b23cc..ce79969d03a 100644 --- a/product_sequence/i18n/es_EC.po +++ b/product_sequence/i18n/es_EC.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/es_MX.po b/product_sequence/i18n/es_MX.po index f214dba37d3..289a3c241b8 100644 --- a/product_sequence/i18n/es_MX.po +++ b/product_sequence/i18n/es_MX.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/es_VE.po b/product_sequence/i18n/es_VE.po index 28885a0a47f..b5193a54e89 100644 --- a/product_sequence/i18n/es_VE.po +++ b/product_sequence/i18n/es_VE.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/et.po b/product_sequence/i18n/et.po index b9692a61f52..f0fbb59287e 100644 --- a/product_sequence/i18n/et.po +++ b/product_sequence/i18n/et.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/fi.po b/product_sequence/i18n/fi.po index 91ae0e66b34..98a63a4911c 100644 --- a/product_sequence/i18n/fi.po +++ b/product_sequence/i18n/fi.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/fr.po b/product_sequence/i18n/fr.po index ea02cc12410..0bea9891653 100644 --- a/product_sequence/i18n/fr.po +++ b/product_sequence/i18n/fr.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -53,11 +53,6 @@ msgstr "Article" msgid "Product Sequence" msgstr "Article" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/gl.po b/product_sequence/i18n/gl.po index 2d095fe4ecf..6a954953564 100644 --- a/product_sequence/i18n/gl.po +++ b/product_sequence/i18n/gl.po @@ -9,25 +9,26 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-01 20:03+0000\n" -"PO-Revision-Date: 2016-11-01 20:03+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" -msgstr "" +msgstr "-copia" #. module: product_sequence #: model:ir.model.fields,field_description:product_sequence.field_product_category_code_prefix msgid "Prefix for Product Internal Reference" -msgstr "" +msgstr "Prefixo para a referencia interna de producto" #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_code_prefix @@ -35,26 +36,23 @@ msgid "" "Prefix used to generate the internal reference for products created with " "this category. If blank the default sequence will be used." msgstr "" +"Prefixo utilizado para xerar a referencia interna para os productos creados " +"con esta categoría. Se está en blanco utilizarase a secuencia predeterminada." #. module: product_sequence #: model:ir.model,name:product_sequence.model_product_product msgid "Product" -msgstr "" +msgstr "Producto" #. module: product_sequence #: model:ir.model,name:product_sequence.model_product_category msgid "Product Category" -msgstr "" +msgstr "Categoría de producto" #. module: product_sequence #: model:ir.model.fields,field_description:product_sequence.field_product_category_sequence_id msgid "Product Sequence" -msgstr "" - -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" +msgstr "Secuencia de producto" #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id @@ -62,6 +60,11 @@ msgid "" "This field contains the information related to the numbering of the journal " "entries of this journal." msgstr "" +"Este campo contén a información relativa á numeración das entradas deste " +"diario." + +#~ msgid "The reference must be unique" +#~ msgstr "A referencia debe ser única" #~ msgid "Manufacturer" #~ msgstr "Fabricante" diff --git a/product_sequence/i18n/hr.po b/product_sequence/i18n/hr.po index 2bc33be2794..f35aab25a6e 100644 --- a/product_sequence/i18n/hr.po +++ b/product_sequence/i18n/hr.po @@ -20,7 +20,7 @@ msgstr "" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "-kopija" @@ -54,14 +54,12 @@ msgstr "Proizvod" msgid "Product Sequence" msgstr "Proizvod" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "Referenca mora biti jedinstvena" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" "This field contains the information related to the numbering of the journal " "entries of this journal." msgstr "" + +#~ msgid "The reference must be unique" +#~ msgstr "Referenca mora biti jedinstvena" diff --git a/product_sequence/i18n/hu.po b/product_sequence/i18n/hu.po index 4f34957fcc0..19b34a3e18f 100644 --- a/product_sequence/i18n/hu.po +++ b/product_sequence/i18n/hu.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/it.po b/product_sequence/i18n/it.po index 85a54c7a69f..41ef2ad0ffc 100644 --- a/product_sequence/i18n/it.po +++ b/product_sequence/i18n/it.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -53,11 +53,6 @@ msgstr "Prodotto" msgid "Product Sequence" msgstr "Prodotto" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/ja.po b/product_sequence/i18n/ja.po index 63c7a3da2aa..151ed2dc7ab 100644 --- a/product_sequence/i18n/ja.po +++ b/product_sequence/i18n/ja.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/lt.po b/product_sequence/i18n/lt.po index e9846407595..a2697feb1e0 100644 --- a/product_sequence/i18n/lt.po +++ b/product_sequence/i18n/lt.po @@ -20,7 +20,7 @@ msgstr "" "%100<10 || n%100>=20) ? 1 : 2);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/mk.po b/product_sequence/i18n/mk.po index 664d2fee5bd..4d61dae3991 100644 --- a/product_sequence/i18n/mk.po +++ b/product_sequence/i18n/mk.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/mn.po b/product_sequence/i18n/mn.po index e9348baa88f..58201506634 100644 --- a/product_sequence/i18n/mn.po +++ b/product_sequence/i18n/mn.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/nb.po b/product_sequence/i18n/nb.po index b457f3638b7..237827789f5 100644 --- a/product_sequence/i18n/nb.po +++ b/product_sequence/i18n/nb.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/nl.po b/product_sequence/i18n/nl.po index 1ec90993523..bc9435f180b 100644 --- a/product_sequence/i18n/nl.po +++ b/product_sequence/i18n/nl.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/pl.po b/product_sequence/i18n/pl.po index c668fda9f7b..96cea8f6bb2 100644 --- a/product_sequence/i18n/pl.po +++ b/product_sequence/i18n/pl.po @@ -20,7 +20,7 @@ msgstr "" "|| n%100>=20) ? 1 : 2);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/product_sequence.pot b/product_sequence/i18n/product_sequence.pot index 31349a98e7f..948ad7a0c82 100644 --- a/product_sequence/i18n/product_sequence.pot +++ b/product_sequence/i18n/product_sequence.pot @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -44,11 +44,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "This field contains the information related to the numbering of the journal entries of this journal." diff --git a/product_sequence/i18n/pt.po b/product_sequence/i18n/pt.po index c4d8a6e97e5..1e91d0b456d 100644 --- a/product_sequence/i18n/pt.po +++ b/product_sequence/i18n/pt.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/pt_BR.po b/product_sequence/i18n/pt_BR.po index eb7cd854d9a..6e689a969cc 100644 --- a/product_sequence/i18n/pt_BR.po +++ b/product_sequence/i18n/pt_BR.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/ro.po b/product_sequence/i18n/ro.po index c8da2676252..34cba09ac8c 100644 --- a/product_sequence/i18n/ro.po +++ b/product_sequence/i18n/ro.po @@ -20,7 +20,7 @@ msgstr "" "2:1));\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/ru.po b/product_sequence/i18n/ru.po index 133390f944d..c08f75117bb 100644 --- a/product_sequence/i18n/ru.po +++ b/product_sequence/i18n/ru.po @@ -21,7 +21,7 @@ msgstr "" "%100>=11 && n%100<=14)? 2 : 3);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -53,11 +53,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/sl.po b/product_sequence/i18n/sl.po index bfc271c98e4..93d30f277e1 100644 --- a/product_sequence/i18n/sl.po +++ b/product_sequence/i18n/sl.po @@ -20,7 +20,7 @@ msgstr "" "%100==4 ? 2 : 3);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -54,11 +54,6 @@ msgstr "Proizvod" msgid "Product Sequence" msgstr "Proizvod" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/sr.po b/product_sequence/i18n/sr.po index 3e6f5ec026f..97017ece2b1 100644 --- a/product_sequence/i18n/sr.po +++ b/product_sequence/i18n/sr.po @@ -20,7 +20,7 @@ msgstr "" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/sv.po b/product_sequence/i18n/sv.po index 66aafd2a970..55a838d6f35 100644 --- a/product_sequence/i18n/sv.po +++ b/product_sequence/i18n/sv.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/tr.po b/product_sequence/i18n/tr.po index f1419bb6829..c9a5d028050 100644 --- a/product_sequence/i18n/tr.po +++ b/product_sequence/i18n/tr.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -51,11 +51,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/i18n/zh_CN.po b/product_sequence/i18n/zh_CN.po index fed659ba225..e0e18b28bb3 100644 --- a/product_sequence/i18n/zh_CN.po +++ b/product_sequence/i18n/zh_CN.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" #. module: product_sequence -#: code:addons/product_sequence/models/product_product.py:74 +#: code:addons/product_sequence/models/product_product.py:68 #, python-format msgid "-copy" msgstr "" @@ -52,11 +52,6 @@ msgstr "" msgid "Product Sequence" msgstr "" -#. module: product_sequence -#: sql_constraint:product.product:0 -msgid "The reference must be unique" -msgstr "" - #. module: product_sequence #: model:ir.model.fields,help:product_sequence.field_product_category_sequence_id msgid "" diff --git a/product_sequence/models/product_product.py b/product_sequence/models/product_product.py index 9a5b4894c3b..c5ef21ecced 100644 --- a/product_sequence/models/product_product.py +++ b/product_sequence/models/product_product.py @@ -18,12 +18,6 @@ class ProductProduct(models.Model): "to be proposed." ) - _sql_constraints = [ - ('uniq_default_code', - 'unique(default_code)', - 'The reference must be unique'), - ] - @api.model def create(self, vals): if 'default_code' not in vals or vals['default_code'] == '/': diff --git a/product_sequence/readme/CONTRIBUTORS.rst b/product_sequence/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..9e31d26a3b9 --- /dev/null +++ b/product_sequence/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +* Angel Moya +* Graeme Gellatly +* Sodexis +* Lois Rilo +* Sergio Teruel diff --git a/product_sequence/readme/DESCRIPTION.rst b/product_sequence/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..90075468a96 --- /dev/null +++ b/product_sequence/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +This module allows to associate a sequence to the product reference. +The reference (default code) is required. + +You can optionally specify different sequences for different product +categories. diff --git a/product_sequence/readme/HISTORY.rst b/product_sequence/readme/HISTORY.rst new file mode 100644 index 00000000000..7de00b2c9fa --- /dev/null +++ b/product_sequence/readme/HISTORY.rst @@ -0,0 +1,6 @@ +11.0.1.0.1 (2019-02-07) +~~~~~~~~~~~~~~~~~~~~~~~ + +* Remove sql constraint from product.product. +* If you need this constraint you can install product_code_unique module which + add this restriction. diff --git a/product_sequence/readme/INSTALL.rst b/product_sequence/readme/INSTALL.rst new file mode 100644 index 00000000000..fc21c181a15 --- /dev/null +++ b/product_sequence/readme/INSTALL.rst @@ -0,0 +1,2 @@ +Products with a default_code of '/' or empty will automatically be assigned a +code of "!!mig!!" followed by the system id for that product. diff --git a/product_sequence/readme/USAGE.rst b/product_sequence/readme/USAGE.rst new file mode 100644 index 00000000000..c1f11017a83 --- /dev/null +++ b/product_sequence/readme/USAGE.rst @@ -0,0 +1,8 @@ +To specify a different sequence for a product category proceed as follows: + +#. Go to the a Product Category form view. + (**note:** you will need to install Inventory app to be able to access to + the form view, *Inventory > Configuration > Products > Products Categories*; + or create a menuitem manually). +#. Fill the *Prefix for Product Internal Reference* as desired. + diff --git a/product_sequence/static/description/index.html b/product_sequence/static/description/index.html new file mode 100644 index 00000000000..585f30f7746 --- /dev/null +++ b/product_sequence/static/description/index.html @@ -0,0 +1,462 @@ + + + + + + +Product Sequence + + + +
+

Product Sequence

+ + +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

This module allows to associate a sequence to the product reference. +The reference (default code) is required.

+

You can optionally specify different sequences for different product +categories.

+

Table of contents

+ +
+

Installation

+

Products with a default_code of ‘/’ or empty will automatically be assigned a +code of “!!mig!!” followed by the system id for that product.

+
+
+

Usage

+

To specify a different sequence for a product category proceed as follows:

+
    +
  1. Go to the a Product Category form view. +(note: you will need to install Inventory app to be able to access to +the form view, Inventory > Configuration > Products > Products Categories; +or create a menuitem manually).
  2. +
  3. Fill the Prefix for Product Internal Reference as desired.
  4. +
+
+
+

Changelog

+
+

11.0.1.0.1 (2019-02-07)

+
    +
  • Remove sql constraint from product.product.
  • +
  • If you need this constraint you can install product_code_unique module which +add this restriction.
  • +
+
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Zikzakmedia SL
  • +
  • Sodexis
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_sequence/tests/test_product_sequence.py b/product_sequence/tests/test_product_sequence.py index ff9ba1e90c0..b2d5889de1d 100644 --- a/product_sequence/tests/test_product_sequence.py +++ b/product_sequence/tests/test_product_sequence.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -41,8 +40,8 @@ def test_pre_init_hook(self): default_code='PROD03' )) self.cr.execute( - "update product_product set default_code='/' where id=%s" - % (product_3.id,)) + "update product_product set default_code='/' where id=%s", + (product_3.id,)) product_3.invalidate_cache() self.assertEqual(product_3.default_code, '/') pre_init_hook(self.cr) diff --git a/product_state/__manifest__.py b/product_state/__manifest__.py index 94af6e9ad3a..b7d0a4dfc80 100644 --- a/product_state/__manifest__.py +++ b/product_state/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { 'name': "Product State", - 'description': """ + 'summary': """ Module introducing a state field on product template""", 'author': 'ACSONE SA/NV, Odoo Community Association (OCA)', 'website': "https://github.com/OCA/product-attribute", @@ -15,5 +15,4 @@ 'data': [ 'views/product_views.xml', ], - 'application': True, } diff --git a/product_state/static/description/icon.png b/product_state/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_state/static/description/icon.png differ diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst new file mode 100644 index 00000000000..9b67b30843f --- /dev/null +++ b/product_supplierinfo_for_customer/README.rst @@ -0,0 +1,107 @@ +================================== +Product Supplierinfo for Customers +================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:2ec2d1af1d038b0924f85e034d92a1528a269bdeff42c11fc89905d867279b11 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fproduct--attribute-lightgray.png?logo=github + :target: https://github.com/OCA/product-attribute/tree/11.0/product_supplierinfo_for_customer + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_supplierinfo_for_customer + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=11.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This modules allows to use supplier info structure, available in +*Inventory* tab of the product form, also for defining customer information, +allowing to define prices per customer and product. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +For these prices to be used in sale prices calculations, you will have +to create a pricelist with a rule with option "Based on" with the value +"Partner Prices: Take the price from the customer info on the 'product form')". + +Usage +===== + +There's a new section on *Sales* tab of the product form called "Customers", +where you can define records for customers with the same structure of the +suppliers. + +There's a new option on pricelist items that allows to get the prices from the +supplierinfo at the product form. + +Known issues / Roadmap +====================== + +* Product prices through this method are only guaranteed on the standard sale + order workflow. Other custom flows maybe don't reflect the price. +* The minimum quantity will neither apply on sale orders. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* AvanzOSC +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Oihane Crucelaegui +* Tecnativa - Pedro M. Baeza +* Aaron Henriquez +* Miquel Raïch +* Tecnativa - Sergio Teruel + +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/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_supplierinfo_for_customer/__init__.py b/product_supplierinfo_for_customer/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/product_supplierinfo_for_customer/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_supplierinfo_for_customer/__manifest__.py b/product_supplierinfo_for_customer/__manifest__.py new file mode 100644 index 00000000000..9963ae45ba7 --- /dev/null +++ b/product_supplierinfo_for_customer/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015-18 Tecnativa +# Copyright 2017-18 Eficent +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Product Supplierinfo for Customers", + "summary": "Allows to define prices for customers in the products", + "version": "11.0.1.0.0", + "author": "AvanzOSC, " + "Tecnativa, " + "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/product-attribute", + "category": "Sales Management", + "license": 'AGPL-3', + "depends": [ + "purchase", + ], + "data": [ + "views/product_view.xml", + ], + "demo": [ + "demo/product_demo.xml", + ], +} diff --git a/product_supplierinfo_for_customer/demo/product_demo.xml b/product_supplierinfo_for_customer/demo/product_demo.xml new file mode 100644 index 00000000000..b8d0ba215d1 --- /dev/null +++ b/product_supplierinfo_for_customer/demo/product_demo.xml @@ -0,0 +1,14 @@ + + + + + + + + 1 + 1 + customer + + + diff --git a/product_supplierinfo_for_customer/i18n/de.po b/product_supplierinfo_for_customer/i18n/de.po new file mode 100644 index 00000000000..c2c4f4dc317 --- /dev/null +++ b/product_supplierinfo_for_customer/i18n/de.po @@ -0,0 +1,167 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_supplierinfo_for_customer +# +# Translators: +# OCA Transbot , 2016 +# Rudolf Schnapka , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-21 02:49+0000\n" +"PO-Revision-Date: 2017-04-21 02:49+0000\n" +"Last-Translator: Rudolf Schnapka , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_customer_ids +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Customer" +msgstr "Kunde" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Customer Product Code" +msgstr "Artikelnummer des Partners" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Customer Product Name" +msgstr "Produktbezeichnung des Partners" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_form_view +msgid "Customers" +msgstr "Kunden" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo +#, fuzzy +msgid "Information about a product vendor" +msgstr "Information zu Produktlieferant" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Price" +msgstr "Preisliste" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#, fuzzy +msgid "Price List" +msgstr "Preisliste" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist_item +#, fuzzy +msgid "Pricelist item" +msgstr "Preisliste" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_product +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Product" +msgstr "Produktvorlage" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +msgid "Product Template" +msgstr "Produktvorlage" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_supplier_ids +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Supplier" +msgstr "Lieferant" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type +msgid "Type" +msgstr "Art" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" +msgstr "" + +#~ msgid "" +#~ "

\n" +#~ " Click to define a new product.supplierinfo.\n" +#~ "

\n" +#~ " " +#~ msgstr "" +#~ "

\n" +#~ " Klicken für neue product.supplierinfo " +#~ "Lieferanteninfo.\n" +#~ "

\n" +#~ " " + +#~ msgid "Group By" +#~ msgstr "Gruppiere nach" + +#~ msgid "Information about a product (customer)" +#~ msgstr "Information zu einem (Kunden-) Produkt" + +#~ msgid "Partner" +#~ msgstr "Partner" + +#~ msgid "Partner Unit of Measure" +#~ msgstr "Mengeneinheit des Partners" + +#~ msgid "Supplierinfo search" +#~ msgstr "Lieferantenauskunft-Suche" + +#~ msgid "[('type','=','supplier')]" +#~ msgstr "[('type','=','supplier')]" + +#~ msgid "" +#~ "{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':" +#~ "id}" +#~ msgstr "" +#~ "{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':" +#~ "id}" + +#~ msgid "{'select_type': type}" +#~ msgstr "{'select_type': type}" diff --git a/product_supplierinfo_for_customer/i18n/es.po b/product_supplierinfo_for_customer/i18n/es.po new file mode 100644 index 00000000000..bf57852594b --- /dev/null +++ b/product_supplierinfo_for_customer/i18n/es.po @@ -0,0 +1,142 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_supplierinfo_for_customer +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-03 10:07+0000\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" +msgstr "Contacto" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_customer_ids +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Customer" +msgstr "Cliente" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Information" +msgstr "Información de Cliente" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Product Code" +msgstr "Código de producto para la empresa" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Product Name" +msgstr "Nombre Producto Cliente" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_form_view +msgid "Customers" +msgstr "Clientes" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo +msgid "Information about a product vendor" +msgstr "Información sobre proveedor" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" +msgstr "Otra información" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Price" +msgstr "Precio" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Price List" +msgstr "Lista de Precios" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist_item +msgid "Pricelist item" +msgstr "Item Tarifa" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_product +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Product" +msgstr "Producto" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_supplier_ids +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Supplier" +msgstr "Proveedor" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type +msgid "Type" +msgstr "Tipo" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" +msgstr "Validez" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" +msgstr "para" + +#~ msgid "" +#~ "

\n" +#~ " Click to define a new product.supplierinfo.\n" +#~ "

\n" +#~ " " +#~ msgstr "" +#~ "

\n" +#~ "Pulse para definir una nueva definición de producto-empresa.\n" +#~ "

\n" + +#~ msgid "Group By" +#~ msgstr "Agrupar por" + +#~ msgid "Partner" +#~ msgstr "Empresa" + +#~ msgid "Partner Unit of Measure" +#~ msgstr "Unidad de medida de empresa" + +#~ msgid "Supplierinfo search" +#~ msgstr "Búsqueda de producto-empresa" diff --git a/product_supplierinfo_for_customer/i18n/fr.po b/product_supplierinfo_for_customer/i18n/fr.po new file mode 100644 index 00000000000..a8235b4fb68 --- /dev/null +++ b/product_supplierinfo_for_customer/i18n/fr.po @@ -0,0 +1,128 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_supplierinfo_for_customer +# +# Translators: +# OCA Transbot , 2016 +# Christophe CHAUVET , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-21 02:49+0000\n" +"PO-Revision-Date: 2017-04-21 02:49+0000\n" +"Last-Translator: Christophe CHAUVET , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_customer_ids +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Customer" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Product Code" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Product Name" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_form_view +msgid "Customers" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo +#, fuzzy +msgid "Information about a product vendor" +msgstr "Information à propos du fournisseur du produit" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Price" +msgstr "Liste de prix" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#, fuzzy +msgid "Price List" +msgstr "Liste de prix" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist_item +#, fuzzy +msgid "Pricelist item" +msgstr "Liste de prix" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_product +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Product" +msgstr "Modèle d'article" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +msgid "Product Template" +msgstr "Modèle d'article" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_supplier_ids +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Supplier" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type +msgid "Type" +msgstr "Type" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" +msgstr "" + +#~ msgid "Partner" +#~ msgstr "Partenaire" diff --git a/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot b/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot new file mode 100644 index 00000000000..8a98ff6a44c --- /dev/null +++ b/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot @@ -0,0 +1,115 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_supplierinfo_for_customer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_customer_ids +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Customer" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Product Code" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Product Name" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_form_view +msgid "Customers" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo +msgid "Information about a product vendor" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Price" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Price List" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist_item +msgid "Pricelist item" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_product +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Product" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_supplier_ids +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Supplier" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type +msgid "Type" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" +msgstr "" + diff --git a/product_supplierinfo_for_customer/i18n/sl.po b/product_supplierinfo_for_customer/i18n/sl.po new file mode 100644 index 00000000000..ecc9d75ef43 --- /dev/null +++ b/product_supplierinfo_for_customer/i18n/sl.po @@ -0,0 +1,167 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_supplierinfo_for_customer +# +# Translators: +# OCA Transbot , 2016 +# Matjaž Mozetič , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-03 10:07+0000\n" +"PO-Revision-Date: 2016-11-03 10:07+0000\n" +"Last-Translator: Matjaž Mozetič , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_customer_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_customer_ids +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Customer" +msgstr "Kupec" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Customer Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Customer Product Code" +msgstr "Partnerjeva koda proizvoda" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Customer Product Name" +msgstr "Partnerjev naziv proizvoda" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_form_view +msgid "Customers" +msgstr "Kupci" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo +#, fuzzy +msgid "Information about a product vendor" +msgstr "Podatki o dobavitelju proizvoda" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Price" +msgstr "Cenik" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#, fuzzy +msgid "Price List" +msgstr "Cenik" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist_item +#, fuzzy +msgid "Pricelist item" +msgstr "Cenik" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_product +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +#, fuzzy +msgid "Product" +msgstr "Predloga proizvoda" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +msgid "Product Template" +msgstr "Predloga proizvoda" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_variant_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_supplier_ids +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_template_variant_supplier_ids +#: selection:product.supplierinfo,supplierinfo_type:0 +msgid "Supplier" +msgstr "Dobavitelj" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type +msgid "Type" +msgstr "Tip" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" +msgstr "" + +#~ msgid "" +#~ "

\n" +#~ " Click to define a new product.supplierinfo.\n" +#~ "

\n" +#~ " " +#~ msgstr "" +#~ "

\n" +#~ " Kliknite za nov product.supplierinfo.\n" +#~ "

\n" +#~ " " + +#~ msgid "Group By" +#~ msgstr "Združi po" + +#~ msgid "Information about a product (customer)" +#~ msgstr "Podatki o proizvodu (kupec)" + +#~ msgid "Partner" +#~ msgstr "Partner" + +#~ msgid "Partner Unit of Measure" +#~ msgstr "Partnerjeva EM" + +#~ msgid "Supplierinfo search" +#~ msgstr "Iskanje podatkov o dobavitelju" + +#~ msgid "[('type','=','supplier')]" +#~ msgstr "[('type','=','supplier')]" + +#~ msgid "" +#~ "{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':" +#~ "id}" +#~ msgstr "" +#~ "{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':" +#~ "id}" + +#~ msgid "{'select_type': type}" +#~ msgstr "{'select_type': type}" diff --git a/product_supplierinfo_for_customer/models/__init__.py b/product_supplierinfo_for_customer/models/__init__.py new file mode 100644 index 00000000000..c745356ae30 --- /dev/null +++ b/product_supplierinfo_for_customer/models/__init__.py @@ -0,0 +1,5 @@ +from . import pricelist +from . import product_supplierinfo +from . import product_product +from . import product_template +from . import res_partner diff --git a/product_supplierinfo_for_customer/models/pricelist.py b/product_supplierinfo_for_customer/models/pricelist.py new file mode 100644 index 00000000000..e67eeb47ab9 --- /dev/null +++ b/product_supplierinfo_for_customer/models/pricelist.py @@ -0,0 +1,12 @@ +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015 Tecnativa +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ProductPricelistItem(models.Model): + _inherit = "product.pricelist.item" + + base = fields.Selection( + selection_add=[('partner', 'Partner Prices on the product form')]) diff --git a/product_supplierinfo_for_customer/models/product_product.py b/product_supplierinfo_for_customer/models/product_product.py new file mode 100644 index 00000000000..b83d73d2f10 --- /dev/null +++ b/product_supplierinfo_for_customer/models/product_product.py @@ -0,0 +1,51 @@ +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015 Tecnativa +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import api, models + + +class ProductProduct(models.Model): + _inherit = 'product.product' + + @api.multi + def _get_price_from_supplierinfo(self, partner_id): + self.ensure_one() + if not partner_id: + return 0.0 + supplierinfo = self.env['product.supplierinfo'].search( + ['|', ('product_tmpl_id', '=', self.product_tmpl_id.id), + ('product_id', '=', self.id), + ('supplierinfo_type', '=', 'customer'), + ('name', '=', partner_id)], limit=1) + if supplierinfo: + return supplierinfo.price + return 0.0 + + @api.multi + def price_compute( + self, price_type, uom=False, currency=False, company=False): + if price_type == 'partner': + partner = self.env.context.get('partner_id', False) or \ + self.env.context.get('partner', False) + prices = super(ProductProduct, self).price_compute( + 'list_price', uom, currency, company) + for product in self: + price = product._get_price_from_supplierinfo(partner) + if not price: + continue + prices[product.id] = price + if not uom and self._context.get('uom'): + uom = self.env['product.uom'].browse(self._context['uom']) + if not currency and self._context.get('currency'): + currency = self.env['res.currency'].browse( + self._context['currency']) + if uom: + prices[product.id] = product.uom_id._compute_price( + prices[product.id], uom) + if currency: + prices[product.id] = product.currency_id.compute( + prices[product.id], currency) + return prices + return super(ProductProduct, self).price_compute( + price_type, uom, currency, company) diff --git a/product_supplierinfo_for_customer/models/product_supplierinfo.py b/product_supplierinfo_for_customer/models/product_supplierinfo.py new file mode 100644 index 00000000000..4de9ded02ea --- /dev/null +++ b/product_supplierinfo_for_customer/models/product_supplierinfo.py @@ -0,0 +1,35 @@ +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015 Tecnativa +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import api, fields, models + + +class ProductSupplierinfo(models.Model): + _inherit = 'product.supplierinfo' + + supplierinfo_type = fields.Selection( + selection=[ + ('customer', 'Customer'), + ('supplier', 'Supplier'), + ], string='Type', oldname='type', + default='supplier') + + @api.onchange('supplierinfo_type') + def onchange_type(self): + if self.supplierinfo_type == 'supplier': + return {'domain': {'name': [('supplier', '=', True)]}} + elif self.supplierinfo_type == 'customer': + return {'domain': {'name': [('customer', '=', True)]}} + return {'domain': {'name': []}} + + @api.model + def search(self, args, offset=0, limit=None, order=None, count=False): + """Add search argument for field type if the context says so. This + should be in old API because context argument is not the last one. + """ + if not any(arg[0] == 'supplierinfo_type' for arg in args): + args += [('supplierinfo_type', '=', + self.env.context.get('supplierinfo_type', 'supplier'))] + return super(ProductSupplierinfo, self).search( + args, offset=offset, limit=limit, order=order, count=count) diff --git a/product_supplierinfo_for_customer/models/product_template.py b/product_supplierinfo_for_customer/models/product_template.py new file mode 100644 index 00000000000..b7107135bcc --- /dev/null +++ b/product_supplierinfo_for_customer/models/product_template.py @@ -0,0 +1,23 @@ +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015 Tecnativa +# Copyright 2019 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + customer_ids = fields.One2many( + comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', + string='Customer', domain=[('supplierinfo_type', '=', 'customer')]) + variant_customer_ids = fields.One2many( + comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', + string='Customer', domain=[('supplierinfo_type', '=', 'customer')]) + supplier_ids = fields.One2many( + comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', + string='Supplier', domain=[('supplierinfo_type', '=', 'supplier')]) + variant_supplier_ids = fields.One2many( + comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', + string='Supplier', domain=[('supplierinfo_type', '=', 'supplier')]) diff --git a/product_supplierinfo_for_customer/models/res_partner.py b/product_supplierinfo_for_customer/models/res_partner.py new file mode 100644 index 00000000000..fe67de91aec --- /dev/null +++ b/product_supplierinfo_for_customer/models/res_partner.py @@ -0,0 +1,20 @@ +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015 Tecnativa +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import api, models + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + @api.model + def default_get(self, fields): + res = super(ResPartner, self).default_get(fields) + select_type = self.env.context.get('select_type', False) + if select_type: + res.update({ + 'customer': select_type == 'customer', + 'supplier': select_type == 'supplier', + }) + return res diff --git a/product_supplierinfo_for_customer/readme/CONFIGURE.rst b/product_supplierinfo_for_customer/readme/CONFIGURE.rst new file mode 100644 index 00000000000..a0a894b3f24 --- /dev/null +++ b/product_supplierinfo_for_customer/readme/CONFIGURE.rst @@ -0,0 +1,3 @@ +For these prices to be used in sale prices calculations, you will have +to create a pricelist with a rule with option "Based on" with the value +"Partner Prices: Take the price from the customer info on the 'product form')". diff --git a/product_supplierinfo_for_customer/readme/CONTRIBUTORS.rst b/product_supplierinfo_for_customer/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..c2db690212e --- /dev/null +++ b/product_supplierinfo_for_customer/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +* Oihane Crucelaegui +* Tecnativa - Pedro M. Baeza +* Aaron Henriquez +* Miquel Raïch +* Tecnativa - Sergio Teruel diff --git a/product_supplierinfo_for_customer/readme/DESCRIPTION.rst b/product_supplierinfo_for_customer/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..ca3017216c2 --- /dev/null +++ b/product_supplierinfo_for_customer/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This modules allows to use supplier info structure, available in +*Inventory* tab of the product form, also for defining customer information, +allowing to define prices per customer and product. diff --git a/product_supplierinfo_for_customer/readme/ROADMAP.rst b/product_supplierinfo_for_customer/readme/ROADMAP.rst new file mode 100644 index 00000000000..1a0e593d35a --- /dev/null +++ b/product_supplierinfo_for_customer/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* Product prices through this method are only guaranteed on the standard sale + order workflow. Other custom flows maybe don't reflect the price. +* The minimum quantity will neither apply on sale orders. diff --git a/product_supplierinfo_for_customer/readme/USAGE.rst b/product_supplierinfo_for_customer/readme/USAGE.rst new file mode 100644 index 00000000000..a727ca8e286 --- /dev/null +++ b/product_supplierinfo_for_customer/readme/USAGE.rst @@ -0,0 +1,6 @@ +There's a new section on *Sales* tab of the product form called "Customers", +where you can define records for customers with the same structure of the +suppliers. + +There's a new option on pricelist items that allows to get the prices from the +supplierinfo at the product form. diff --git a/product_supplierinfo_for_customer/static/description/icon.png b/product_supplierinfo_for_customer/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_supplierinfo_for_customer/static/description/icon.png differ diff --git a/product_supplierinfo_for_customer/static/description/index.html b/product_supplierinfo_for_customer/static/description/index.html new file mode 100644 index 00000000000..74582724d61 --- /dev/null +++ b/product_supplierinfo_for_customer/static/description/index.html @@ -0,0 +1,453 @@ + + + + + + +Product Supplierinfo for Customers + + + +
+

Product Supplierinfo for Customers

+ + +

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

+

This modules allows to use supplier info structure, available in +Inventory tab of the product form, also for defining customer information, +allowing to define prices per customer and product.

+

Table of contents

+ +
+

Configuration

+

For these prices to be used in sale prices calculations, you will have +to create a pricelist with a rule with option “Based on” with the value +“Partner Prices: Take the price from the customer info on the ‘product form’)”.

+
+
+

Usage

+

There’s a new section on Sales tab of the product form called “Customers”, +where you can define records for customers with the same structure of the +suppliers.

+

There’s a new option on pricelist items that allows to get the prices from the +supplierinfo at the product form.

+
+
+

Known issues / Roadmap

+
    +
  • Product prices through this method are only guaranteed on the standard sale +order workflow. Other custom flows maybe don’t reflect the price.
  • +
  • The minimum quantity will neither apply on sale orders.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • AvanzOSC
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/product-attribute project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/product_supplierinfo_for_customer/tests/__init__.py b/product_supplierinfo_for_customer/tests/__init__.py new file mode 100644 index 00000000000..94998a7bfb9 --- /dev/null +++ b/product_supplierinfo_for_customer/tests/__init__.py @@ -0,0 +1 @@ +from . import test_product_supplierinfo_for_customer diff --git a/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py b/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py new file mode 100644 index 00000000000..e716cca0d1b --- /dev/null +++ b/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py @@ -0,0 +1,114 @@ +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015 Tecnativa +# Copyright 2018 Eficent +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo.tests.common import SavepointCase + + +class TestProductSupplierinfoForCustomer(SavepointCase): + + @classmethod + def setUpClass(cls): + super(TestProductSupplierinfoForCustomer, cls).setUpClass() + cls.supplierinfo_model = cls.env['product.supplierinfo'] + cls.pricelist_item_model = cls.env['product.pricelist.item'] + cls.pricelist_model = cls.env['product.pricelist'] + cls.customer = cls._create_customer('customer1') + cls.unknown = cls._create_customer('customer2') + cls.product = cls.env.ref('product.product_product_4') + cls.supplierinfo = cls._create_supplierinfo( + 'customer', cls.customer, cls.product) + cls.pricelist = cls.env['product.pricelist'].create({ + 'name': 'Test Pricelist', + 'currency_id': cls.env.ref('base.USD').id, + }) + cls.company = cls.env.ref('base.main_company') + cls.pricelist_item = cls.env['product.pricelist.item'].create({ + 'applied_on': '1_product', + 'base': 'list_price', + 'name': 'Test Pricelist Item', + 'pricelist_id': cls.pricelist.id, + 'compute_price': 'fixed', + 'fixed_price': 100.0, + 'product_tmpl_id': cls.product.id, + }) + + @classmethod + def _create_customer(cls, name): + """Create a Partner.""" + return cls.env['res.partner'].create({ + 'name': name, + 'email': 'example@yourcompany.com', + 'customer': True, + 'phone': 123456, + }) + + @classmethod + def _create_supplierinfo(cls, supplierinfo_type, partner, product): + return cls.env['product.supplierinfo'].create({ + 'name': partner.id, + 'product_id': product.id, + 'product_code': '00001', + 'supplierinfo_type': supplierinfo_type, + 'price': 100.0, + }) + + def test_default_get(self): + """ checking values returned by default_get() """ + fields = ['name'] + values = self.customer.with_context( + select_type=True).default_get(fields) + self.assertEqual(values['customer'], False, "Incorrect default") + + def test_onchange_type(self): + sup_info = self._create_supplierinfo( + 'supplier', self.customer, self.product) + res = sup_info.onchange_type() + domain = res.get('domain', False) + name_dom = domain.get('name', False) + self.assertEqual(name_dom, [('supplier', '=', True)]) + sup_info.write({'supplierinfo_type': 'customer'}) + res = sup_info.onchange_type() + domain = res.get('domain', False) + name_dom = domain.get('name', False) + self.assertEqual(name_dom, [('customer', '=', True)]) + + def test_product_supplierinfo_for_customer(self): + cond = [('name', '=', self.customer.id)] + supplierinfos = self.supplierinfo_model.search(cond) + self.assertEqual(len(supplierinfos), 0, + "Error: Supplier found in Supplierinfo") + cond = [('name', '=', self.customer.id)] + customerinfos = self.supplierinfo_model.with_context( + supplierinfo_type='customer').search(cond) + self.assertNotEqual(len(customerinfos), 0, + "Error: Customer not found in Supplierinfo") + price_unit = self.pricelist_model.price_rule_get( + self.product.id, 1, partner=self.customer.id) + self.assertTrue( + price_unit.get(self.pricelist.id, False), + "Error: Price unit not found for customer") + price = price_unit.get(self.pricelist.id, False)[0] + self.assertEqual(price, 100.0, + "Error: Price not found for product and customer") + + def test_product_supplierinfo_price(self): + price = self.product._get_price_from_supplierinfo( + partner_id=self.customer.id) + self.assertEqual(price, 100.0, + "Error: Price not found for product and customer") + res = self.product.with_context( + partner_id=self.customer.id).price_compute( + 'partner', self.product.uom_id, self.company.currency_id, + self.company) + self.assertEqual( + res[self.product.id], 100.0, + "Error: Wrong price for product and customer") + res = self.product.with_context( + partner_id=self.unknown.id).price_compute( + 'partner', self.product.uom_id, self.company.currency_id, + self.company) + self.assertEqual( + res[self.product.id], 750.0, + "Error: price does not match list price") diff --git a/product_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml new file mode 100644 index 00000000000..0ef703471f0 --- /dev/null +++ b/product_supplierinfo_for_customer/views/product_view.xml @@ -0,0 +1,171 @@ + + + + + product.supplierinfo.form.view + product.supplierinfo + + + + + + + + + + + product.supplierinfo.customer.form.view + product.supplierinfo + + +
+ + + + + + + + + + + + + + + + +
+
+
+ + + product.supplierinfo.customer.tree.view + product.supplierinfo + + + + + + + + + + + + + + + + + + + product.template.supplier.form.inherit + product.template + + + + { + 'default_search_supplierinfo_type':'supplier', + 'default_supplierinfo_type':'supplier', + 'default_product_tmpl_id':id, + 'product_template_invisible_variant': True, + } + [('supplierinfo_type','=','supplier')] + 1 + + + { + 'default_search_supplierinfo_type':'supplier', + 'default_supplierinfo_type':'supplier', + 'default_product_tmpl_id':id, + } + [('supplierinfo_type','=','supplier')] + 1 + + + + + + + + + + + + + + + + product.template.common.form + product.template + + +
+ + + + + + +
+
+
+ + + {'default_supplierinfo_type':'supplier', 'visible_product_tmpl_id': False} + [('supplierinfo_type','=','supplier')] + + +
diff --git a/product_supplierinfo_revision/README.rst b/product_supplierinfo_revision/README.rst index 2c7ce3b599f..95d78e43db0 100644 --- a/product_supplierinfo_revision/README.rst +++ b/product_supplierinfo_revision/README.rst @@ -6,8 +6,15 @@ Product Supplierinfo Revision ============================= -This module allows create revisions of supplier info prices. +This module allows to create revisions of supplier info prices. +Configuration +============= + +#. Install Purchase module. +#. Check *Purchase > Settings > Vendor Price* : "Allow using and importing + vendor pricelists", this will create the *Purchases > Purchase > + Supplier Pricelist* menu. Usage ===== @@ -23,8 +30,9 @@ To use this module: #. By clicking on Apply button, a new supplier pricelist will be created with a price increased accordingly to the percent entered. Old supplier pricelist will have a date end from which pricelist will be out of date. -#. You can check supplier pricelists as well as variation percent in the - product form, by clicking on *Purchase* tab. +#. Once the Inventory Management (*stock*) module is installed, you can check + supplier pricelists as well as variation percent in the product form, by + clicking on *Inventory* tab. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot diff --git a/product_supplierinfo_revision/__manifest__.py b/product_supplierinfo_revision/__manifest__.py index ce1b95200da..d2da8ccce53 100644 --- a/product_supplierinfo_revision/__manifest__.py +++ b/product_supplierinfo_revision/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Product Supplierinfo Revision", - "version": "11.0.1.0.0", + "version": "11.0.1.0.1", "category": "Product", "website": "http://www.tecnativa.com", "author": "Tecnativa, " diff --git a/product_supplierinfo_revision/i18n/es.po b/product_supplierinfo_revision/i18n/es.po index 2bfa9718c6e..c4a6084c106 100644 --- a/product_supplierinfo_revision/i18n/es.po +++ b/product_supplierinfo_revision/i18n/es.po @@ -9,19 +9,20 @@ msgstr "" "Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-11-03 15:37+0000\n" -"PO-Revision-Date: 2017-11-03 15:37+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_supplierinfo_revision #: model:ir.ui.view,arch_db:product_supplierinfo_revision.supplierinfo_duplicate_wizard_view msgid "Apply" -msgstr "" +msgstr "Aplicar" #. module: product_supplierinfo_revision #: model:ir.ui.view,arch_db:product_supplierinfo_revision.supplierinfo_duplicate_wizard_view @@ -41,12 +42,12 @@ msgstr "Creado en" #. module: product_supplierinfo_revision #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_duplicate_wizard_date_end msgid "Date End" -msgstr "" +msgstr "Fecha fin" #. module: product_supplierinfo_revision #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_duplicate_wizard_date_start msgid "Date Start" -msgstr "" +msgstr "Fecha inicio" #. module: product_supplierinfo_revision #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_duplicate_wizard_display_name @@ -56,7 +57,7 @@ msgstr "Nombre mostrado" #. module: product_supplierinfo_revision #: model:ir.actions.act_window,name:product_supplierinfo_revision.supplierinfo_duplicate_wizard_action msgid "Duplicate Supplier Info" -msgstr "" +msgstr "Duplicar Información Proveedor" #. module: product_supplierinfo_revision #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_duplicate_wizard_id @@ -66,7 +67,7 @@ msgstr "ID (identificación)" #. module: product_supplierinfo_revision #: model:ir.model,name:product_supplierinfo_revision.model_product_supplierinfo msgid "Information about a product vendor" -msgstr "" +msgstr "Información sobre proveedor" #. module: product_supplierinfo_revision #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_duplicate_wizard___last_update @@ -86,17 +87,17 @@ msgstr "Última actualización en" #. module: product_supplierinfo_revision #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_previous_info_id msgid "Previous info" -msgstr "" +msgstr "Información previa" #. module: product_supplierinfo_revision #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_previous_price msgid "Price" -msgstr "" +msgstr "Precio" #. module: product_supplierinfo_revision #: model:ir.model.fields,help:product_supplierinfo_revision.field_product_supplierinfo_previous_info_id msgid "Relation with previous info when duplicate line" -msgstr "" +msgstr "Relación con la información previa cuando se duplica la línea" #. module: product_supplierinfo_revision #: model:ir.ui.view,arch_db:product_supplierinfo_revision.supplierinfo_duplicate_wizard_view @@ -107,24 +108,29 @@ msgid "" "
\n" "
" msgstr "" +"Estable nueva fecha y porcentaje de variación para duplicar.\n" +" Este proceso establece la fecha de inicio anterior " +"como fecha de finalización de registro de origen.\n" +"
\n" +"
" #. module: product_supplierinfo_revision #: model:ir.model.fields,help:product_supplierinfo_revision.field_product_supplierinfo_previous_price msgid "The price to purchase a product" -msgstr "" +msgstr "Precio para comprar el producto" #. module: product_supplierinfo_revision #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_duplicate_wizard_variation_percent #: model:ir.model.fields,field_description:product_supplierinfo_revision.field_product_supplierinfo_variation_percent msgid "Variation %" -msgstr "" +msgstr "Variación %" #. module: product_supplierinfo_revision #: model:ir.ui.view,arch_db:product_supplierinfo_revision.supplierinfo_duplicate_wizard_view msgid "or" -msgstr "" +msgstr "o" #. module: product_supplierinfo_revision #: model:ir.model,name:product_supplierinfo_revision.model_product_supplierinfo_duplicate_wizard msgid "product.supplierinfo.duplicate.wizard" -msgstr "" +msgstr "'product.supplierinfo.duplicate.wizard'" diff --git a/product_supplierinfo_revision/models/product_supplierinfo.py b/product_supplierinfo_revision/models/product_supplierinfo.py index d55125f8df6..6527f4c54f9 100644 --- a/product_supplierinfo_revision/models/product_supplierinfo.py +++ b/product_supplierinfo_revision/models/product_supplierinfo.py @@ -13,7 +13,10 @@ class ProductSupplierinfo(models.Model): string='Previous info', help='Relation with previous info when duplicate line', ) - previous_price = fields.Float(related='previous_info_id.price') + previous_price = fields.Float( + related='previous_info_id.price', + readonly=True, + ) variation_percent = fields.Float( compute='_compute_variation_percent', store=True, diff --git a/product_supplierinfo_revision/tests/test_product_supplierinfo_revision.py b/product_supplierinfo_revision/tests/test_product_supplierinfo_revision.py index 079e9525eb4..60bb47f1b12 100644 --- a/product_supplierinfo_revision/tests/test_product_supplierinfo_revision.py +++ b/product_supplierinfo_revision/tests/test_product_supplierinfo_revision.py @@ -33,7 +33,7 @@ def test_product_supplierinfo_revision(self): }) result = wizard.with_context( active_ids=self.supplierinfo.ids).action_apply() - self.assertEqual(result['name'], 'Vendor Pricelists') + self.assertEqual(result['res_model'], 'product.supplierinfo') new_supplierinfo = self.env['product.supplierinfo'].browse( result['domain'][0][2][0] ) diff --git a/product_template_tags/README.rst b/product_template_tags/README.rst new file mode 100644 index 00000000000..9f7c681373e --- /dev/null +++ b/product_template_tags/README.rst @@ -0,0 +1,62 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +===================== +Product Template Tags +===================== + +This addon allows to add tags on products. + +Configuration +============= + +* Go on the product form view. +* Create and edit tags using the form view + +Usage +===== + +* On the product view, you can add and create tags. +* Tags will be shown in the kanban view. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/135/10.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Benjamin Willig +* Numigi (tm) and all its contributors (https://bit.ly/numigiens) + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/product_template_tags/__init__.py b/product_template_tags/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/product_template_tags/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_template_tags/__manifest__.py b/product_template_tags/__manifest__.py new file mode 100644 index 00000000000..a3da376428e --- /dev/null +++ b/product_template_tags/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Product Template Tags', + 'summary': """ + This addon allow to add tags on products""", + 'version': '11.0.1.0.0', + 'license': 'AGPL-3', + 'author': 'ACSONE SA/NV, Odoo Community Association (OCA), Numigi', + 'website': 'https://www.acsone.eu', + 'depends': [ + 'product', + ], + 'data': [ + 'security/product_template_rule.xml', + 'security/product_template_tag.xml', + 'views/product_template.xml', + 'views/product_template_tag.xml', + ], +} diff --git a/product_template_tags/i18n/de.po b/product_template_tags/i18n/de.po new file mode 100644 index 00000000000..309cb7a95c2 --- /dev/null +++ b/product_template_tags/i18n/de.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Niki Waibel, 2018 +# Rudolf Schnapka , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-29 08:49+0000\n" +"PO-Revision-Date: 2018-01-29 08:49+0000\n" +"Last-Translator: Rudolf Schnapka , 2018\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Angelegt durch" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Angelegt am" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Anzeigebezeichnung" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Zuletzt verändert am" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert durch" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "Bezeichnung" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Produktvorlage" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Produkte" diff --git a/product_template_tags/i18n/es.po b/product_template_tags/i18n/es.po new file mode 100644 index 00000000000..a8d0aa72861 --- /dev/null +++ b/product_template_tags/i18n/es.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Pedro M. Baeza , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 02:14+0000\n" +"PO-Revision-Date: 2020-08-06 12:59+0000\n" +"Last-Translator: Nacho Morales \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "# de Productos" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "Color" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "Compañía" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Nombre para mostrar" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Última modificación" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Última actualización" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Última actualización" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "Nombre" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "Etiqueta de producto" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "Etiquetas de producto" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Plantilla producto" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "Etiqueta de plantilla de producto" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Productos" diff --git a/product_template_tags/i18n/fr.po b/product_template_tags/i18n/fr.po new file mode 100644 index 00000000000..2b736f614eb --- /dev/null +++ b/product_template_tags/i18n/fr.po @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-27 03:49+0000\n" +"PO-Revision-Date: 2018-01-27 03:49+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Créé le" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Dernière Modification le" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "Nom" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Modèle de produit" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "" diff --git a/product_template_tags/i18n/hr.po b/product_template_tags/i18n/hr.po new file mode 100644 index 00000000000..ec4185db5a4 --- /dev/null +++ b/product_template_tags/i18n/hr.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Bole , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-29 08:49+0000\n" +"PO-Revision-Date: 2018-01-29 08:49+0000\n" +"Last-Translator: Bole , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "# proizvoda" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "Index boje" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "Tvrtka" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Kreirao" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Kreirano" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Naziv" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Zadnje ažurirano" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Zadnji ažurirao" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Zadnje ažurirano" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "naziv" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "Oznaka proizvoda" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "Oznake proizvoda" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Predložak proizvoda" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "Oznaka predloška proizvoda" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Proizvodi" diff --git a/product_template_tags/i18n/it.po b/product_template_tags/i18n/it.po new file mode 100644 index 00000000000..e361fe2d752 --- /dev/null +++ b/product_template_tags/i18n/it.po @@ -0,0 +1,104 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Giuliano Lotta , 2018 +# Paolo Valier , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 02:14+0000\n" +"PO-Revision-Date: 2023-11-03 13:36+0000\n" +"Last-Translator: mymage \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Creato il" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Prodotti" diff --git a/product_template_tags/i18n/nl_NL.po b/product_template_tags/i18n/nl_NL.po new file mode 100644 index 00000000000..9c2fc694353 --- /dev/null +++ b/product_template_tags/i18n/nl_NL.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Peter Hageman , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 02:14+0000\n" +"PO-Revision-Date: 2018-01-03 02:14+0000\n" +"Last-Translator: Peter Hageman , 2018\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Aangemaakt door" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Aangemaakt op" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Weergavenaam" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Laatst aangepast door" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Laatst aangepast op" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Productsjabloon" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Producten" diff --git a/product_template_tags/i18n/product_template_tags.pot b/product_template_tags/i18n/product_template_tags.pot new file mode 100644 index 00000000000..12f10219cb0 --- /dev/null +++ b/product_template_tags/i18n/product_template_tags.pot @@ -0,0 +1,98 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "" + diff --git a/product_template_tags/i18n/sl.po b/product_template_tags/i18n/sl.po new file mode 100644 index 00000000000..2158de3d904 --- /dev/null +++ b/product_template_tags/i18n/sl.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-27 03:49+0000\n" +"PO-Revision-Date: 2018-01-27 03:49+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Ustvaril" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Ustvarjeno" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Prikazni naziv" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Zadnja sprememba" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Zadnji posodobil" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Zadnja posodobitev" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "Naziv" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Predloga proizvoda" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "" diff --git a/product_template_tags/models/__init__.py b/product_template_tags/models/__init__.py new file mode 100644 index 00000000000..4b28608ef18 --- /dev/null +++ b/product_template_tags/models/__init__.py @@ -0,0 +1,2 @@ +from . import product_template +from . import product_template_tag diff --git a/product_template_tags/models/product_template.py b/product_template_tags/models/product_template.py new file mode 100644 index 00000000000..f801d88deb3 --- /dev/null +++ b/product_template_tags/models/product_template.py @@ -0,0 +1,14 @@ +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + + _inherit = 'product.template' + + tag_ids = fields.Many2many( + comodel_name='product.template.tag', string="Product Tags", + relation='product_template_product_tag_rel', + column1='product_tmpl_id', column2='tag_id') diff --git a/product_template_tags/models/product_template_tag.py b/product_template_tags/models/product_template_tag.py new file mode 100644 index 00000000000..51e02212290 --- /dev/null +++ b/product_template_tags/models/product_template_tag.py @@ -0,0 +1,32 @@ +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class ProductTemplateTag(models.Model): + + _name = 'product.template.tag' + _description = 'Product Tag' + + name = fields.Char(string="Name", required=True, translate=True) + color = fields.Integer(string="Color Index") + product_tmpl_ids = fields.Many2many( + comodel_name='product.template', string="Products", + relation='product_template_product_tag_rel', + column1='tag_id', column2='product_tmpl_id') + products_count = fields.Integer( + string="# of Products", compute='_compute_products_count', store=True) + company_id = fields.Many2one( + comodel_name='res.company', string="Company", + default=lambda self: self._default_company()) + + @api.model + def _default_company(self): + return self.env['res.users']._get_company() + + @api.multi + @api.depends('product_tmpl_ids') + def _compute_products_count(self): + for rec in self: + rec.products_count = len(rec.product_tmpl_ids) diff --git a/product_template_tags/security/product_template_rule.xml b/product_template_tags/security/product_template_rule.xml new file mode 100644 index 00000000000..6fbdabfad14 --- /dev/null +++ b/product_template_tags/security/product_template_rule.xml @@ -0,0 +1,17 @@ + + + + + + + product.template.tag company (in product_template_tags) + + + + + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + + + diff --git a/product_template_tags/security/product_template_tag.xml b/product_template_tags/security/product_template_tag.xml new file mode 100644 index 00000000000..bb21504b64d --- /dev/null +++ b/product_template_tags/security/product_template_tag.xml @@ -0,0 +1,17 @@ + + + + + + + product.template.tag access user (in product_template_tags) + + + + + + + + + diff --git a/product_template_tags/static/description/icon.png b/product_template_tags/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/product_template_tags/static/description/icon.png differ diff --git a/product_template_tags/views/product_template.xml b/product_template_tags/views/product_template.xml new file mode 100644 index 00000000000..33e67a174a1 --- /dev/null +++ b/product_template_tags/views/product_template.xml @@ -0,0 +1,53 @@ + + + + + + + product.template.form (in product_template_tags) + product.template + + + + + + + + + + + + + + product.template.kanban (in product_template_tags) + product.template + + + + +
+ + + +
+
+ +
+
+ + + product.template.search (in product_template_tags) + product.template + + + + + + + + + + +
diff --git a/product_template_tags/views/product_template_tag.xml b/product_template_tags/views/product_template_tag.xml new file mode 100644 index 00000000000..c1ac8c289e3 --- /dev/null +++ b/product_template_tags/views/product_template_tag.xml @@ -0,0 +1,73 @@ + + + + + + + product.template.tag.form (in product_template_tags) + product.template.tag + +
+
+ +
+ +
+ + + + + +
+ + + + + + product.template.tag.search (in product_template_tags) + product.template.tag + + + + + + + + + + + + + product.template.tag.tree (in product_template_tags) + product.template.tag + + + + + + + + + + + Product Template Tag + product.template.tag + tree,form + form + + + + Product Tags + + + + + + diff --git a/product_weight/i18n/es.po b/product_weight/i18n/es.po index 05fad96aca6..26f1ace294f 100644 --- a/product_weight/i18n/es.po +++ b/product_weight/i18n/es.po @@ -11,19 +11,20 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-01-29 08:49+0000\n" -"PO-Revision-Date: 2018-01-29 08:49+0000\n" -"Last-Translator: enjolras , 2018\n" +"PO-Revision-Date: 2019-02-08 13:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: product_weight #: model:ir.model.fields,field_description:product_weight.field_product_weight_update_bom_id msgid "BoM" -msgstr "" +msgstr "BOM" #. module: product_weight #: model:ir.actions.act_window,name:product_weight.action_multi_product_weight @@ -33,7 +34,7 @@ msgstr "Calcular pesos de los productos" #. module: product_weight #: model:ir.actions.act_window,name:product_weight.action_multi_template_weight msgid "Calculate Template Weights" -msgstr "" +msgstr "Calcular pesos plantilla" #. module: product_weight #: model:ir.ui.view,arch_db:product_weight.view_product_weight_update diff --git a/product_weight/i18n/it.po b/product_weight/i18n/it.po index b693c284541..f6303c93bc5 100644 --- a/product_weight/i18n/it.po +++ b/product_weight/i18n/it.po @@ -10,14 +10,15 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-05-23 02:40+0000\n" -"PO-Revision-Date: 2017-05-23 02:40+0000\n" -"Last-Translator: Paolo Valier , 2017\n" +"PO-Revision-Date: 2023-11-02 17:36+0000\n" +"Last-Translator: Francesco Foresti \n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" #. module: product_weight #: model:ir.model.fields,field_description:product_weight.field_product_weight_update_bom_id @@ -63,17 +64,17 @@ msgstr "" #. module: product_weight #: model:ir.model.fields,field_description:product_weight.field_product_weight_update___last_update msgid "Last Modified on" -msgstr "Ultima Modifica il" +msgstr "Ultima modifica il" #. module: product_weight #: model:ir.model.fields,field_description:product_weight.field_product_weight_update_write_uid msgid "Last Updated by" -msgstr "Ultimo Aggiornamento di" +msgstr "Ultimo aggiornamento di" #. module: product_weight #: model:ir.model.fields,field_description:product_weight.field_product_weight_update_write_date msgid "Last Updated on" -msgstr "Ultimo Aggiornamento il" +msgstr "Ultimo aggiornamento il" #. module: product_weight #: model:ir.model.fields,field_description:product_weight.field_product_weight_update_product_id diff --git a/product_weight/views/product_view.xml b/product_weight/views/product_view.xml index 5f1fe31dd99..a0427e6d9c8 100644 --- a/product_weight/views/product_view.xml +++ b/product_weight/views/product_view.xml @@ -5,9 +5,9 @@ product.template - -