From 9147b165e16a4e892ba1ef5bcc2cddf9f86fcef6 Mon Sep 17 00:00:00 2001 From: oihane Date: Thu, 18 Sep 2014 10:49:56 +0200 Subject: [PATCH 01/88] --- product_customerinfo/__init__.py | 19 +++ product_customerinfo/__openerp__.py | 41 +++++++ product_customerinfo/i18n/es.po | 57 +++++++++ .../product_supplierinfo_for_customer.pot | 57 +++++++++ product_customerinfo/models/__init__.py | 21 ++++ .../models/product_supplierinfo.py | 36 ++++++ .../models/product_template.py | 32 +++++ product_customerinfo/models/res_partner.py | 34 ++++++ product_customerinfo/views/product_view.xml | 113 ++++++++++++++++++ 9 files changed, 410 insertions(+) create mode 100644 product_customerinfo/__init__.py create mode 100644 product_customerinfo/__openerp__.py create mode 100644 product_customerinfo/i18n/es.po create mode 100644 product_customerinfo/i18n/product_supplierinfo_for_customer.pot create mode 100644 product_customerinfo/models/__init__.py create mode 100644 product_customerinfo/models/product_supplierinfo.py create mode 100644 product_customerinfo/models/product_template.py create mode 100644 product_customerinfo/models/res_partner.py create mode 100644 product_customerinfo/views/product_view.xml diff --git a/product_customerinfo/__init__.py b/product_customerinfo/__init__.py new file mode 100644 index 00000000000..7fc7c09f9b0 --- /dev/null +++ b/product_customerinfo/__init__.py @@ -0,0 +1,19 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +from . import models diff --git a/product_customerinfo/__openerp__.py b/product_customerinfo/__openerp__.py new file mode 100644 index 00000000000..2fc53288647 --- /dev/null +++ b/product_customerinfo/__openerp__.py @@ -0,0 +1,41 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +{ + "name": "Use product supplier info for customers too", + "version": "1.0", + "depends": [ + "base", + "product", + ], + "author": "OdooMRP team", + "contributors": [ + "Oihane Crucelaegui ", + ], + "category": "Sales Management", + "website": "http://www.odoomrp.com", + "summary": "", + "description": """ +This module extends product.supplierinfo object with a combo to allow using +it for sale pricelists + """, + "data": [ + "views/product_view.xml", + ], + "installable": True, +} diff --git a/product_customerinfo/i18n/es.po b/product_customerinfo/i18n/es.po new file mode 100644 index 00000000000..1b8f413639d --- /dev/null +++ b/product_customerinfo/i18n/es.po @@ -0,0 +1,57 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_supplierinfo_for_customer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-09-05 11:46+0000\n" +"PO-Revision-Date: 2014-09-05 11:46+0000\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 +#: selection:product.supplierinfo,type:0 +msgid "Customer" +msgstr "Cliente" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_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 supplier" +msgstr "Información de un proveedor de 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 +#: selection:product.supplierinfo,type:0 +msgid "Supplier" +msgstr "Proveedor" + +#. module: product_supplierinfo_for_customer +#: field:product.supplierinfo,type:0 +msgid "Type" +msgstr "Tipo" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "[('type','=','supplier')]" +msgstr "[('type','=','supplier')]" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "{'default_search_type':'supplier','default_type':'supplier'}" +msgstr "{'default_search_type':'supplier','default_type':'supplier'}" + diff --git a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot new file mode 100644 index 00000000000..a48ab71467d --- /dev/null +++ b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot @@ -0,0 +1,57 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_supplierinfo_for_customer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-09-05 11:46+0000\n" +"PO-Revision-Date: 2014-09-05 11:46+0000\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 +#: selection:product.supplierinfo,type:0 +msgid "Customer" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_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 supplier" +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 +#: selection:product.supplierinfo,type:0 +msgid "Supplier" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: field:product.supplierinfo,type:0 +msgid "Type" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "[('type','=','supplier')]" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "{'default_search_type':'supplier','default_type':'supplier'}" +msgstr "" + diff --git a/product_customerinfo/models/__init__.py b/product_customerinfo/models/__init__.py new file mode 100644 index 00000000000..67021782557 --- /dev/null +++ b/product_customerinfo/models/__init__.py @@ -0,0 +1,21 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +from . import product_supplierinfo +from . import product_template +from . import res_partner diff --git a/product_customerinfo/models/product_supplierinfo.py b/product_customerinfo/models/product_supplierinfo.py new file mode 100644 index 00000000000..8d9f5f6538a --- /dev/null +++ b/product_customerinfo/models/product_supplierinfo.py @@ -0,0 +1,36 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +from openerp import models, fields, api + + +class ProductSupplierinfo(models.Model): + _inherit = 'product.supplierinfo' + + type = fields.Selection([('customer', 'Customer'), + ('supplier', 'Supplier')], string='Type', + default='supplier') + + @api.multi + @api.onchange('type') + def onchange_type(self): + if self.type == 'supplier': + return {'domain': {'name': [('supplier', '=', True)]}} + elif self.type == 'customer': + return {'domain': {'name': [('customer', '=', True)]}} + return {'domain': {'name': []}} diff --git a/product_customerinfo/models/product_template.py b/product_customerinfo/models/product_template.py new file mode 100644 index 00000000000..1c9fd3749d1 --- /dev/null +++ b/product_customerinfo/models/product_template.py @@ -0,0 +1,32 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +from openerp import models, fields + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + customer_ids = fields.One2many(comodel_name='product.supplierinfo', + inverse_name='product_tmpl_id', + string='Customer', + domain=[('type', '=', 'customer')]) + supplier_ids = fields.One2many(comodel_name='product.supplierinfo', + inverse_name='product_tmpl_id', + string='Supplier', + domain=[('type', '=', 'supplier')]) diff --git a/product_customerinfo/models/res_partner.py b/product_customerinfo/models/res_partner.py new file mode 100644 index 00000000000..97d8bb467a8 --- /dev/null +++ b/product_customerinfo/models/res_partner.py @@ -0,0 +1,34 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +from openerp import models, api + + +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_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml new file mode 100644 index 00000000000..ca1f111fac5 --- /dev/null +++ b/product_customerinfo/views/product_view.xml @@ -0,0 +1,113 @@ + + + + + + product.supplierinfo.extended.form + product.supplierinfo + + + + Partner + {'select_type': type} + + + Partner Product Name + + + Partner Product Code + + + Partner Unit of Measure + + + + + + + + + product.supplierinfo.extended.tree + product.supplierinfo + + + + + + + Partner + + + + + + product.template.extended.form + product.template + + + + {'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id} + [('type','=','supplier')] + 1 + + + + + + + + + + + + + + product.supplierinfo.search + product.supplierinfo + + + + + + + + + + + + + + + + + + Information about a product + ir.actions.act_window + product.supplierinfo + tree,form + form + + [] + { + 'search_default_is_customer_filter': 1 + } + + +

+ Click to define a new product.supplierinfo. +

+
+
+ + + +
+
From 737cbddf96b8bb0494f43acdd8e592f2f9fefef5 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 5 Feb 2015 17:30:02 +0100 Subject: [PATCH 02/88] product_supplierinfo_for_customer: Views and documentation --- product_customerinfo/README.rst | 19 +++++ product_customerinfo/__openerp__.py | 7 -- product_customerinfo/i18n/es.po | 71 +++++++++++++++---- .../product_supplierinfo_for_customer.pot | 67 +++++++++++++---- product_customerinfo/views/product_view.xml | 31 ++++---- 5 files changed, 147 insertions(+), 48 deletions(-) create mode 100644 product_customerinfo/README.rst diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst new file mode 100644 index 00000000000..35c4a20fab6 --- /dev/null +++ b/product_customerinfo/README.rst @@ -0,0 +1,19 @@ +Use product supplier info also for customers +============================================ + +This modules allows to use supplier info, available in _Procurements_ tab +from the product, also for customers, allowing to define prices per +customer and product. + +For these prices to be used in sale prices calculations, you will have +to create a pricelist with a rule with option "Based on" is "Supplier prices +on the product form" (although the text is not clear enough). + +Credits +======= + +Contributors +------------ +* Oihane Crucelaegui +* Pedro M. Baeza + diff --git a/product_customerinfo/__openerp__.py b/product_customerinfo/__openerp__.py index 2fc53288647..33cef3643c3 100644 --- a/product_customerinfo/__openerp__.py +++ b/product_customerinfo/__openerp__.py @@ -24,16 +24,9 @@ "product", ], "author": "OdooMRP team", - "contributors": [ - "Oihane Crucelaegui ", - ], "category": "Sales Management", "website": "http://www.odoomrp.com", "summary": "", - "description": """ -This module extends product.supplierinfo object with a combo to allow using -it for sale pricelists - """, "data": [ "views/product_view.xml", ], diff --git a/product_customerinfo/i18n/es.po b/product_customerinfo/i18n/es.po index 1b8f413639d..df5232cbaa4 100644 --- a/product_customerinfo/i18n/es.po +++ b/product_customerinfo/i18n/es.po @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0rc1\n" +"Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-05 11:46+0000\n" -"PO-Revision-Date: 2014-09-05 11:46+0000\n" +"POT-Creation-Date: 2015-02-05 14:08+0000\n" +"PO-Revision-Date: 2015-02-05 14:08+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,7 +16,19 @@ msgstr "" "Plural-Forms: \n" #. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action +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" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view #: selection:product.supplierinfo,type:0 +#: field:product.template,customer_ids:0 msgid "Customer" msgstr "Cliente" @@ -25,33 +37,66 @@ msgstr "Cliente" msgid "Customers" msgstr "Clientes" +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Group By" +msgstr "Agrupar por" + +#. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action +#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu +msgid "Information about a product" +msgstr "Información sobre un producto" + #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo msgid "Information about a product supplier" msgstr "Información de un proveedor de producto" +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Partner" +msgstr "Empresa" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Code" +msgstr "Código de producto para la empresa" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Name" +msgstr "Nombre de producto para la empresa" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Unit of Measure" +msgstr "Unidad de medida de empresa" + #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Product Template" msgstr "Plantilla de producto" #. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view #: selection:product.supplierinfo,type:0 +#: field:product.template,supplier_ids:0 msgid "Supplier" msgstr "Proveedor" #. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Supplierinfo search" +msgstr "Búsqueda de producto-empresa" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view #: field:product.supplierinfo,type:0 msgid "Type" msgstr "Tipo" -#. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "[('type','=','supplier')]" -msgstr "[('type','=','supplier')]" - -#. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "{'default_search_type':'supplier','default_type':'supplier'}" -msgstr "{'default_search_type':'supplier','default_type':'supplier'}" - diff --git a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot index a48ab71467d..32dbe81b428 100644 --- a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot +++ b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0rc1\n" +"Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-05 11:46+0000\n" -"PO-Revision-Date: 2014-09-05 11:46+0000\n" +"POT-Creation-Date: 2015-02-05 14:08+0000\n" +"PO-Revision-Date: 2015-02-05 14:08+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,7 +16,17 @@ msgstr "" "Plural-Forms: \n" #. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action +msgid "

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

\n" +" " +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view #: selection:product.supplierinfo,type:0 +#: field:product.template,customer_ids:0 msgid "Customer" msgstr "" @@ -25,33 +35,66 @@ msgstr "" msgid "Customers" msgstr "" +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Group By" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action +#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu +msgid "Information about a product" +msgstr "" + #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo msgid "Information about a product supplier" msgstr "" +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Partner" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Code" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Name" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Unit of Measure" +msgstr "" + #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Product Template" msgstr "" #. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view #: selection:product.supplierinfo,type:0 +#: field:product.template,supplier_ids:0 msgid "Supplier" msgstr "" #. module: product_supplierinfo_for_customer -#: field:product.supplierinfo,type:0 -msgid "Type" +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Supplierinfo search" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "[('type','=','supplier')]" -msgstr "" - -#. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "{'default_search_type':'supplier','default_type':'supplier'}" +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: field:product.supplierinfo,type:0 +msgid "Type" msgstr "" diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index ca1f111fac5..9024a2babf3 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -21,7 +21,7 @@ Partner Unit of Measure - + @@ -31,9 +31,6 @@ product.supplierinfo - - - Partner @@ -51,15 +48,14 @@ 1 - + - + + context="{'default_search_type':'customer','default_type':'customer','default_product_tmpl_id':id}"> @@ -75,13 +71,16 @@ - - + + - + From ed22fd44050632a44de1a1f18a4fba0eb55b82fa Mon Sep 17 00:00:00 2001 From: oihane Date: Wed, 11 Feb 2015 13:20:42 +0100 Subject: [PATCH 03/88] Related to #638 --- product_customerinfo/views/product_view.xml | 77 ++++++++++++++++----- 1 file changed, 60 insertions(+), 17 deletions(-) diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 9024a2babf3..1482579b694 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -21,7 +21,20 @@ Partner Unit of Measure - + + + + + + + product.supplierinfo.template.form + product.supplierinfo + + primary + + + + @@ -37,6 +50,19 @@ + + product.supplierinfo.template.tree + product.supplierinfo + + primary + + + + + + + + product.template.extended.form product.template @@ -49,13 +75,15 @@ + context="{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" + domain="[('type','=','supplier')]" /> - + + context="{'default_search_type':'customer','default_type':'customer','default_product_tmpl_id':id}"> @@ -68,26 +96,25 @@ - - + + - - + + - + - Information about a product + Information about a product (customer) ir.actions.act_window product.supplierinfo tree,form @@ -105,6 +132,22 @@ + + + form + + + + + + + tree + + + + From 79cba6638e5bbed40c2f021fd81e11c84e73e98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matja=C5=BE=20Mozeti=C4=8D?= Date: Sat, 15 Aug 2015 18:53:19 +0200 Subject: [PATCH 04/88] Slovene translations of odoomrp modules --- product_customerinfo/i18n/sl.po | 104 ++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 product_customerinfo/i18n/sl.po diff --git a/product_customerinfo/i18n/sl.po b/product_customerinfo/i18n/sl.po new file mode 100644 index 00000000000..e0423baa22e --- /dev/null +++ b/product_customerinfo/i18n/sl.po @@ -0,0 +1,104 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_supplierinfo_for_customer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-02-05 14:08+0000\n" +"PO-Revision-Date: 2015-08-15 13:06+0200\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"Language: sl\n" +"X-Generator: Poedit 1.8.4\n" + +#. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action +msgid "" +"

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

\n" +" " +msgstr "" +"

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

\n" +" " + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: selection:product.supplierinfo,type:0 field:product.template,customer_ids:0 +msgid "Customer" +msgstr "Kupec" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "Customers" +msgstr "Kupci" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Group By" +msgstr "Združi po" + +#. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action +#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu +msgid "Information about a product" +msgstr "Podatki o proizvodu" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo +msgid "Information about a product supplier" +msgstr "Podatki o dobavitelju proizvoda" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Partner" +msgstr "Partner" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Code" +msgstr "Partnerjeva koda proizvoda" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Name" +msgstr "Partnerjev naziv proizvoda" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Unit of Measure" +msgstr "Partnerjeva EM" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Product Template" +msgstr "Predloga proizvoda" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: selection:product.supplierinfo,type:0 field:product.template,supplier_ids:0 +msgid "Supplier" +msgstr "Dobavitelj" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Supplierinfo search" +msgstr "Iskanje podatkov o dobavitelju" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: field:product.supplierinfo,type:0 +msgid "Type" +msgstr "Tip" From ace5a2dd401853f64e29cca1cb564b6536befa7e Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 27 Aug 2015 04:00:40 +0200 Subject: [PATCH 05/88] product_supplierinfo_for_customer: Avoid side effects + improve README --- product_customerinfo/README.rst | 37 ++++++++++++++++--- product_customerinfo/__init__.py | 2 +- product_customerinfo/__openerp__.py | 6 ++- product_customerinfo/models/__init__.py | 3 +- .../models/product_pricelist.py | 18 +++++++++ .../models/product_supplierinfo.py | 23 ++++++++++-- .../models/product_template.py | 16 ++++---- product_customerinfo/models/res_partner.py | 2 +- product_customerinfo/views/product_view.xml | 1 + 9 files changed, 85 insertions(+), 23 deletions(-) create mode 100644 product_customerinfo/models/product_pricelist.py diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index 35c4a20fab6..8f1fd69696d 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -1,13 +1,40 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +============================================ Use product supplier info also for customers ============================================ -This modules allows to use supplier info, available in _Procurements_ tab -from the product, also for customers, allowing to define prices per -customer and product. +This modules allows to use supplier info structure, available in +*Procurements* tab of the product form, also for defining customer information, +allowing to define prices per customer and product. + +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" is "Supplier prices -on the product form" (although the text is not clear enough). +to create a pricelist with a rule with option "Based on" with the value +"Supplier prices on the product form" (although the text is not clear enough). + +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. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/188/8.0 + +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 product code / product name specified for the customer will not be + reflected on the sale orders. +* The minimum quantity will not also be applied on sale orders. Credits ======= diff --git a/product_customerinfo/__init__.py b/product_customerinfo/__init__.py index 7fc7c09f9b0..a9609aa0b11 100644 --- a/product_customerinfo/__init__.py +++ b/product_customerinfo/__init__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify diff --git a/product_customerinfo/__openerp__.py b/product_customerinfo/__openerp__.py index 33cef3643c3..b9fc4c5384a 100644 --- a/product_customerinfo/__openerp__.py +++ b/product_customerinfo/__openerp__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify @@ -23,7 +23,9 @@ "base", "product", ], - "author": "OdooMRP team", + "author": "OdooMRP team," + "AvanzOSC," + "Serv. Tecnol. Avanzados - Pedro M. Baeza", "category": "Sales Management", "website": "http://www.odoomrp.com", "summary": "", diff --git a/product_customerinfo/models/__init__.py b/product_customerinfo/models/__init__.py index 67021782557..b60c45a6539 100644 --- a/product_customerinfo/models/__init__.py +++ b/product_customerinfo/models/__init__.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify @@ -19,3 +19,4 @@ from . import product_supplierinfo from . import product_template from . import res_partner +from . import product_pricelist diff --git a/product_customerinfo/models/product_pricelist.py b/product_customerinfo/models/product_pricelist.py new file mode 100644 index 00000000000..49ee7421be6 --- /dev/null +++ b/product_customerinfo/models/product_pricelist.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# (c) 2015 Pedro M. Baeza +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from openerp import models, api + + +class ProductPricelist(models.Model): + _inherit = 'product.pricelist' + + @api.multi + def price_rule_get(self, prod_id, qty, partner=None): + """Pass context if the type of the pricelist is sale for restricting + on the search product.supplierinfo records of type customer.""" + obj = (self.with_context(supplierinfo_type='customer') if + self.type == 'sale' else self) + return super(ProductPricelist, obj).price_rule_get( + prod_id, qty, partner=partner) diff --git a/product_customerinfo/models/product_supplierinfo.py b/product_customerinfo/models/product_supplierinfo.py index 8d9f5f6538a..a957eb839e5 100644 --- a/product_customerinfo/models/product_supplierinfo.py +++ b/product_customerinfo/models/product_supplierinfo.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify @@ -22,9 +22,10 @@ class ProductSupplierinfo(models.Model): _inherit = 'product.supplierinfo' - type = fields.Selection([('customer', 'Customer'), - ('supplier', 'Supplier')], string='Type', - default='supplier') + type = fields.Selection( + selection=[('customer', 'Customer'), + ('supplier', 'Supplier')], string='Type', + default='supplier') @api.multi @api.onchange('type') @@ -34,3 +35,17 @@ def onchange_type(self): elif self.type == 'customer': return {'domain': {'name': [('customer', '=', True)]}} return {'domain': {'name': []}} + + def search(self, cr, uid, args, offset=0, limit=None, order=None, + context=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 context is None: + context = {} + if not any(arg[0] == 'type' for arg in args): + args += [('type', '=', + context.get('supplierinfo_type', 'supplier'))] + return super(ProductSupplierinfo, self).search( + cr, uid, args, offset=offset, limit=limit, order=order, + context=context, count=count) diff --git a/product_customerinfo/models/product_template.py b/product_customerinfo/models/product_template.py index 1c9fd3749d1..8e84ddb61b8 100644 --- a/product_customerinfo/models/product_template.py +++ b/product_customerinfo/models/product_template.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify @@ -22,11 +22,9 @@ class ProductTemplate(models.Model): _inherit = 'product.template' - customer_ids = fields.One2many(comodel_name='product.supplierinfo', - inverse_name='product_tmpl_id', - string='Customer', - domain=[('type', '=', 'customer')]) - supplier_ids = fields.One2many(comodel_name='product.supplierinfo', - inverse_name='product_tmpl_id', - string='Supplier', - domain=[('type', '=', 'supplier')]) + customer_ids = fields.One2many( + comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', + string='Customer', domain=[('type', '=', 'customer')]) + supplier_ids = fields.One2many( + comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', + string='Supplier', domain=[('type', '=', 'supplier')]) diff --git a/product_customerinfo/models/res_partner.py b/product_customerinfo/models/res_partner.py index 97d8bb467a8..6c7e0303075 100644 --- a/product_customerinfo/models/res_partner.py +++ b/product_customerinfo/models/res_partner.py @@ -1,4 +1,4 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 1482579b694..30f841710c1 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -114,6 +114,7 @@ + Information about a product (customer) Information about a product (customer) ir.actions.act_window product.supplierinfo From b10edb3438c80117928a447efe4f839cd4ca8f3a Mon Sep 17 00:00:00 2001 From: oihane Date: Thu, 3 Sep 2015 15:45:54 +0200 Subject: [PATCH 06/88] Create 'customer' type from menu option --- product_customerinfo/views/product_view.xml | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 30f841710c1..f6db3069922 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -21,7 +21,7 @@ Partner Unit of Measure - + @@ -40,7 +40,7 @@ - product.supplierinfo.extended.tree + product.supplierinfo.partner.tree product.supplierinfo @@ -75,15 +75,15 @@ + context="{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" + domain="[('type','=','supplier')]" /> + context="{'default_search_type':'customer','default_type':'customer','default_product_tmpl_id':id}"> @@ -97,33 +97,33 @@ + name="is_customer_filter" /> + name="is_supplier_filter" /> + domain="[]" context="{'group_by':'name'}" /> + context="{'group_by':'product_tmpl_id'}" /> + context="{'group_by':'type'}" /> - Information about a product (customer) Information about a product (customer) ir.actions.act_window product.supplierinfo tree,form form - [] { - 'search_default_is_customer_filter': 1 + 'search_default_is_customer_filter': 1, + 'default_type': 'customer', + 'supplierinfo_type': 'customer', } @@ -134,7 +134,7 @@ + model="ir.actions.act_window.view"> form @@ -142,7 +142,7 @@ + model="ir.actions.act_window.view"> tree @@ -150,7 +150,7 @@ + action="product_supplierinfo_action" /> From 91c204f169a252e1daafd50ffee7ed3aee18732c Mon Sep 17 00:00:00 2001 From: oihane Date: Fri, 4 Sep 2015 12:57:15 +0200 Subject: [PATCH 07/88] Added know issue with computed fields --- product_customerinfo/README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index 8f1fd69696d..dfacd33ea3f 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -35,6 +35,8 @@ Known issues / Roadmap * The product code / product name specified for the customer will not be reflected on the sale orders. * The minimum quantity will not also be applied on sale orders. +* Computed fields in product.supplierinfo object won't properly work for + customer type Credits ======= @@ -43,4 +45,3 @@ Contributors ------------ * Oihane Crucelaegui * Pedro M. Baeza - From 5f42f7d6d06cb82bb773d8949e046d1963271b9c Mon Sep 17 00:00:00 2001 From: alfredoavanzosc Date: Mon, 28 Sep 2015 16:50:37 +0200 Subject: [PATCH 08/88] product_supplierinfo_for_customer: Create "demo" data, and "tests" folder. --- product_customerinfo/__init__.py | 16 +------- product_customerinfo/__openerp__.py | 18 +++++---- product_customerinfo/demo/product_demo.xml | 15 +++++++ product_customerinfo/models/__init__.py | 16 +------- .../models/product_pricelist.py | 6 +-- .../models/product_supplierinfo.py | 16 +------- .../models/product_template.py | 16 +------- product_customerinfo/models/res_partner.py | 16 +------- product_customerinfo/tests/__init__.py | 5 +++ .../test_product_supplierinfo_for_customer.py | 40 +++++++++++++++++++ 10 files changed, 78 insertions(+), 86 deletions(-) create mode 100644 product_customerinfo/demo/product_demo.xml create mode 100644 product_customerinfo/tests/__init__.py create mode 100644 product_customerinfo/tests/test_product_supplierinfo_for_customer.py diff --git a/product_customerinfo/__init__.py b/product_customerinfo/__init__.py index a9609aa0b11..2bbe2de9996 100644 --- a/product_customerinfo/__init__.py +++ b/product_customerinfo/__init__.py @@ -1,19 +1,5 @@ # -*- coding: utf-8 -*- ############################################################################## -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# +# For copyright and license notices, see __openerp__.py file in root directory ############################################################################## - from . import models diff --git a/product_customerinfo/__openerp__.py b/product_customerinfo/__openerp__.py index b9fc4c5384a..e0de40d6284 100644 --- a/product_customerinfo/__openerp__.py +++ b/product_customerinfo/__openerp__.py @@ -15,22 +15,24 @@ # along with this program. If not, see http://www.gnu.org/licenses/. # ############################################################################## - { "name": "Use product supplier info for customers too", - "version": "1.0", - "depends": [ - "base", - "product", - ], + "version": "8.0.1.0.0", "author": "OdooMRP team," "AvanzOSC," "Serv. Tecnol. Avanzados - Pedro M. Baeza", - "category": "Sales Management", "website": "http://www.odoomrp.com", - "summary": "", + "category": "Sales Management", + "license": 'AGPL-3', + "depends": [ + "base", + "product", + ], "data": [ "views/product_view.xml", ], + "demo": [ + "demo/product_demo.xml", + ], "installable": True, } diff --git a/product_customerinfo/demo/product_demo.xml b/product_customerinfo/demo/product_demo.xml new file mode 100644 index 00000000000..d667cc72421 --- /dev/null +++ b/product_customerinfo/demo/product_demo.xml @@ -0,0 +1,15 @@ + + + + + + + 1 + 1 + customer + + + + diff --git a/product_customerinfo/models/__init__.py b/product_customerinfo/models/__init__.py index b60c45a6539..3e4ccebb841 100644 --- a/product_customerinfo/models/__init__.py +++ b/product_customerinfo/models/__init__.py @@ -1,21 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################## -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# +# For copyright and license notices, see __openerp__.py file in root directory ############################################################################## - from . import product_supplierinfo from . import product_template from . import res_partner diff --git a/product_customerinfo/models/product_pricelist.py b/product_customerinfo/models/product_pricelist.py index 49ee7421be6..cac559a0c09 100644 --- a/product_customerinfo/models/product_pricelist.py +++ b/product_customerinfo/models/product_pricelist.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# (c) 2015 Pedro M. Baeza -# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html - +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## from openerp import models, api diff --git a/product_customerinfo/models/product_supplierinfo.py b/product_customerinfo/models/product_supplierinfo.py index a957eb839e5..635c2ec1887 100644 --- a/product_customerinfo/models/product_supplierinfo.py +++ b/product_customerinfo/models/product_supplierinfo.py @@ -1,21 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################## -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# +# For copyright and license notices, see __openerp__.py file in root directory ############################################################################## - from openerp import models, fields, api diff --git a/product_customerinfo/models/product_template.py b/product_customerinfo/models/product_template.py index 8e84ddb61b8..4fa58d94acd 100644 --- a/product_customerinfo/models/product_template.py +++ b/product_customerinfo/models/product_template.py @@ -1,21 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################## -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# +# For copyright and license notices, see __openerp__.py file in root directory ############################################################################## - from openerp import models, fields diff --git a/product_customerinfo/models/res_partner.py b/product_customerinfo/models/res_partner.py index 6c7e0303075..8e41b79cb5d 100644 --- a/product_customerinfo/models/res_partner.py +++ b/product_customerinfo/models/res_partner.py @@ -1,21 +1,7 @@ # -*- coding: utf-8 -*- ############################################################################## -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# +# For copyright and license notices, see __openerp__.py file in root directory ############################################################################## - from openerp import models, api diff --git a/product_customerinfo/tests/__init__.py b/product_customerinfo/tests/__init__.py new file mode 100644 index 00000000000..bc0476c8174 --- /dev/null +++ b/product_customerinfo/tests/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## +from . import test_product_supplierinfo_for_customer diff --git a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py new file mode 100644 index 00000000000..c2723f1e217 --- /dev/null +++ b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in root directory +############################################################################## +import openerp.tests.common as common + + +class TestProductSupplierinfoForCustomer(common.TransactionCase): + + def setUp(self): + super(TestProductSupplierinfoForCustomer, self).setUp() + self.supplierinfo_model = self.env['product.supplierinfo'] + self.pricelist_item_model = self.env['product.pricelist.item'] + self.pricelist_model = self.env['product.pricelist'] + self.customer = self.env.ref('base.res_partner_2') + self.product = self.env.ref('product.product_product_4') + self.pricelist = self.env.ref('product.list0') + self.pricelist_item = self.pricelist_item_model.browse( + self.env.ref('product.item0').id) + self.pricelist_item.write({'base': -2}) + + 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: Supplier not found in Supplierinfo") + price_unit = self.pricelist_model.with_context( + supplierinfo_type='customer').price_rule_get( + self.product.id, 7, 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, 20.0, + "Error: Price not found for product and customer") From 8cd9d33c36ac527f1d99cc337a6ce5df7ea95c78 Mon Sep 17 00:00:00 2001 From: Javier Iniesta Date: Thu, 22 Oct 2015 13:30:50 +0200 Subject: [PATCH 09/88] license target link --- product_customerinfo/README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index dfacd33ea3f..a51a69d4454 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -1,5 +1,6 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg :alt: License: AGPL-3 + :target: http://www.gnu.org/licenses/agpl-3.0.en.html ============================================ Use product supplier info also for customers From 3d20a0590966c5abb444572e3896d9549110f667 Mon Sep 17 00:00:00 2001 From: Javier Iniesta Date: Thu, 22 Oct 2015 13:51:45 +0200 Subject: [PATCH 10/88] OCA as author added --- product_customerinfo/__openerp__.py | 3 +- product_customerinfo/i18n/de.po | 128 ++++++++++++++++++++++++++++ product_customerinfo/i18n/es.po | 53 ++++++++---- product_customerinfo/i18n/fr.po | 123 ++++++++++++++++++++++++++ product_customerinfo/i18n/sl.po | 46 +++++++--- 5 files changed, 326 insertions(+), 27 deletions(-) create mode 100644 product_customerinfo/i18n/de.po create mode 100644 product_customerinfo/i18n/fr.po diff --git a/product_customerinfo/__openerp__.py b/product_customerinfo/__openerp__.py index e0de40d6284..dcf3495737c 100644 --- a/product_customerinfo/__openerp__.py +++ b/product_customerinfo/__openerp__.py @@ -20,7 +20,8 @@ "version": "8.0.1.0.0", "author": "OdooMRP team," "AvanzOSC," - "Serv. Tecnol. Avanzados - Pedro M. Baeza", + "Serv. Tecnol. Avanzados - Pedro M. Baeza," + "Odoo Community Association (OCA)", "website": "http://www.odoomrp.com", "category": "Sales Management", "license": 'AGPL-3', diff --git a/product_customerinfo/i18n/de.po b/product_customerinfo/i18n/de.po new file mode 100644 index 00000000000..49246583ecf --- /dev/null +++ b/product_customerinfo/i18n/de.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 +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action +msgid "" +"

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

\n" +" " +msgstr "" +"

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

\n" +" " + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: selection:product.supplierinfo,type:0 field:product.template,customer_ids:0 +msgid "Customer" +msgstr "Kunde" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "Customers" +msgstr "Kunden" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Group By" +msgstr "Gruppiere nach" + +#. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action +#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu +msgid "Information about a product (customer)" +msgstr "Information zu einem (Kunden-) Produkt" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo +msgid "Information about a product supplier" +msgstr "Information zu Produktlieferant" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Partner" +msgstr "Partner" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Code" +msgstr "Artikelnummer des Partners" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Name" +msgstr "Produktbezeichnung des Partners" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Unit of Measure" +msgstr "Mengeneinheit des Partners" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist +msgid "Pricelist" +msgstr "Preisliste" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Product Template" +msgstr "Produktvorlage" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: selection:product.supplierinfo,type:0 field:product.template,supplier_ids:0 +msgid "Supplier" +msgstr "Lieferant" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Supplierinfo search" +msgstr "Lieferantenauskunft-Suche" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: field:product.supplierinfo,type:0 +msgid "Type" +msgstr "Art" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "[('type','=','supplier')]" +msgstr "[('type','=','supplier')]" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +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}" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "{'select_type': type}" +msgstr "{'select_type': type}" diff --git a/product_customerinfo/i18n/es.po b/product_customerinfo/i18n/es.po index df5232cbaa4..027bca24642 100644 --- a/product_customerinfo/i18n/es.po +++ b/product_customerinfo/i18n/es.po @@ -1,34 +1,38 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_supplierinfo_for_customer -# +# * 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: 2015-02-05 14:08+0000\n" -"PO-Revision-Date: 2015-02-05 14:08+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" +"POT-Creation-Date: 2016-11-03 10:07+0000\n" +"PO-Revision-Date: 2016-11-03 10:07+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_supplierinfo_for_customer #: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action -msgid "

\n" +msgid "" +"

\n" " Click to define a new product.supplierinfo.\n" "

\n" " " -msgstr "

\n" +msgstr "" +"

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

\n" #. module: product_supplierinfo_for_customer #: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 -#: field:product.template,customer_ids:0 +#: selection:product.supplierinfo,type:0 field:product.template,customer_ids:0 msgid "Customer" msgstr "Cliente" @@ -45,8 +49,8 @@ msgstr "Agrupar por" #. module: product_supplierinfo_for_customer #: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action #: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu -msgid "Information about a product" -msgstr "Información sobre un producto" +msgid "Information about a product (customer)" +msgstr "" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo @@ -76,6 +80,11 @@ msgstr "Nombre de producto para la empresa" msgid "Partner Unit of Measure" msgstr "Unidad de medida de empresa" +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist +msgid "Pricelist" +msgstr "" + #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template #: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view @@ -84,8 +93,7 @@ msgstr "Plantilla de producto" #. module: product_supplierinfo_for_customer #: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 -#: field:product.template,supplier_ids:0 +#: selection:product.supplierinfo,type:0 field:product.template,supplier_ids:0 msgid "Supplier" msgstr "Proveedor" @@ -100,3 +108,18 @@ msgstr "Búsqueda de producto-empresa" msgid "Type" msgstr "Tipo" +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "[('type','=','supplier')]" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "" +"{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "{'select_type': type}" +msgstr "" diff --git a/product_customerinfo/i18n/fr.po b/product_customerinfo/i18n/fr.po new file mode 100644 index 00000000000..a0c9aad1161 --- /dev/null +++ b/product_customerinfo/i18n/fr.po @@ -0,0 +1,123 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action +msgid "" +"

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

\n" +" " +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: selection:product.supplierinfo,type:0 field:product.template,customer_ids:0 +msgid "Customer" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "Customers" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Group By" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action +#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu +msgid "Information about a product (customer)" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo +msgid "Information about a product supplier" +msgstr "Information à propos du fournisseur du produit" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Partner" +msgstr "Partenaire" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Code" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Product Name" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Unit of Measure" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist +msgid "Pricelist" +msgstr "Liste de prix" + +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Product Template" +msgstr "Modèle d'article" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: selection:product.supplierinfo,type:0 field:product.template,supplier_ids:0 +msgid "Supplier" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +msgid "Supplierinfo search" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: field:product.supplierinfo,type:0 +msgid "Type" +msgstr "Type" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "[('type','=','supplier')]" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "" +"{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "{'select_type': type}" +msgstr "" diff --git a/product_customerinfo/i18n/sl.po b/product_customerinfo/i18n/sl.po index e0423baa22e..ad5fa16f4dd 100644 --- a/product_customerinfo/i18n/sl.po +++ b/product_customerinfo/i18n/sl.po @@ -1,21 +1,23 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_supplierinfo_for_customer -# +# * 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: 2015-02-05 14:08+0000\n" -"PO-Revision-Date: 2015-08-15 13:06+0200\n" -"Last-Translator: Matjaz Mozetic \n" -"Language-Team: \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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" +"Content-Transfer-Encoding: \n" "Language: sl\n" -"X-Generator: Poedit 1.8.4\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.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action @@ -49,8 +51,8 @@ msgstr "Združi po" #. module: product_supplierinfo_for_customer #: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action #: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu -msgid "Information about a product" -msgstr "Podatki o proizvodu" +msgid "Information about a product (customer)" +msgstr "Podatki o proizvodu (kupec)" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo @@ -80,6 +82,11 @@ msgstr "Partnerjev naziv proizvoda" msgid "Partner Unit of Measure" msgstr "Partnerjeva EM" +#. module: product_supplierinfo_for_customer +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_pricelist +msgid "Pricelist" +msgstr "Cenik" + #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template #: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view @@ -102,3 +109,20 @@ msgstr "Iskanje podatkov o dobavitelju" #: field:product.supplierinfo,type:0 msgid "Type" msgstr "Tip" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +msgid "[('type','=','supplier')]" +msgstr "[('type','=','supplier')]" + +#. module: product_supplierinfo_for_customer +#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +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}" + +#. module: product_supplierinfo_for_customer +#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "{'select_type': type}" +msgstr "{'select_type': type}" From b1541cee0a6351c223940c95e4c1568624e13318 Mon Sep 17 00:00:00 2001 From: Yennifer Santiago Date: Wed, 28 Jun 2017 14:41:57 +0000 Subject: [PATCH 11/88] product_customer_code: New README. [REF] product_supplierinfo_for_customer: Complete README. --- product_customerinfo/README.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index a51a69d4454..0faca127474 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -28,13 +28,16 @@ suppliers. :alt: Try me on Runbot :target: https://runbot.odoo-community.org/runbot/188/8.0 + +The product code / product name specified for the customer can be reflected +on the sale orders using module `product_supplierinfo_for_customer_sale +`_ + 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 product code / product name specified for the customer will not be - reflected on the sale orders. * The minimum quantity will not also be applied on sale orders. * Computed fields in product.supplierinfo object won't properly work for customer type From 657a5534c325d88f582a70c035d8c80fcdca4b08 Mon Sep 17 00:00:00 2001 From: aheficent Date: Mon, 31 Jul 2017 15:21:58 +0200 Subject: [PATCH 12/88] product_supplierinfo_for_customer to v9 --- product_customerinfo/README.rst | 5 +- product_customerinfo/__openerp__.py | 28 ++------ product_customerinfo/demo/product_demo.xml | 3 - product_customerinfo/models/__init__.py | 1 - .../models/product_pricelist.py | 18 ----- .../test_product_supplierinfo_for_customer.py | 69 ++++++++++++++++--- product_customerinfo/views/product_view.xml | 27 ++++---- 7 files changed, 82 insertions(+), 69 deletions(-) delete mode 100644 product_customerinfo/models/product_pricelist.py diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index 0faca127474..a2d9df46b21 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -7,7 +7,7 @@ Use product supplier info also for customers ============================================ This modules allows to use supplier info structure, available in -*Procurements* tab of the product form, also for defining customer information, +*Inventory* tab of the product form, also for defining customer information, allowing to define prices per customer and product. Configuration @@ -26,7 +26,7 @@ suppliers. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/188/8.0 + :target: https://runbot.odoo-community.org/runbot/188/9.0 The product code / product name specified for the customer can be reflected @@ -49,3 +49,4 @@ Contributors ------------ * Oihane Crucelaegui * Pedro M. Baeza +* Aaron Henriquez diff --git a/product_customerinfo/__openerp__.py b/product_customerinfo/__openerp__.py index dcf3495737c..24881a189a5 100644 --- a/product_customerinfo/__openerp__.py +++ b/product_customerinfo/__openerp__.py @@ -1,28 +1,14 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -############################################################################## +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Use product supplier info for customers too", - "version": "8.0.1.0.0", - "author": "OdooMRP team," - "AvanzOSC," - "Serv. Tecnol. Avanzados - Pedro M. Baeza," + "version": "9.0.1.0.0", + "author": "OdooMRP team, " + "AvanzOSC, " + "Tecnativa, " + "Eficent, " "Odoo Community Association (OCA)", - "website": "http://www.odoomrp.com", + "website": "https://github.com/OCA/product-attribute", "category": "Sales Management", "license": 'AGPL-3', "depends": [ diff --git a/product_customerinfo/demo/product_demo.xml b/product_customerinfo/demo/product_demo.xml index d667cc72421..c6a331f13d3 100644 --- a/product_customerinfo/demo/product_demo.xml +++ b/product_customerinfo/demo/product_demo.xml @@ -7,9 +7,6 @@ 1 1 customer - diff --git a/product_customerinfo/models/__init__.py b/product_customerinfo/models/__init__.py index 3e4ccebb841..f4daa63b35a 100644 --- a/product_customerinfo/models/__init__.py +++ b/product_customerinfo/models/__init__.py @@ -5,4 +5,3 @@ from . import product_supplierinfo from . import product_template from . import res_partner -from . import product_pricelist diff --git a/product_customerinfo/models/product_pricelist.py b/product_customerinfo/models/product_pricelist.py deleted file mode 100644 index cac559a0c09..00000000000 --- a/product_customerinfo/models/product_pricelist.py +++ /dev/null @@ -1,18 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## -from openerp import models, api - - -class ProductPricelist(models.Model): - _inherit = 'product.pricelist' - - @api.multi - def price_rule_get(self, prod_id, qty, partner=None): - """Pass context if the type of the pricelist is sale for restricting - on the search product.supplierinfo records of type customer.""" - obj = (self.with_context(supplierinfo_type='customer') if - self.type == 'sale' else self) - return super(ProductPricelist, obj).price_rule_get( - prod_id, qty, partner=partner) diff --git a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py index c2723f1e217..23940de587f 100644 --- a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py +++ b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py @@ -12,12 +12,62 @@ def setUp(self): self.supplierinfo_model = self.env['product.supplierinfo'] self.pricelist_item_model = self.env['product.pricelist.item'] self.pricelist_model = self.env['product.pricelist'] - self.customer = self.env.ref('base.res_partner_2') + self.customer = self._create_customer('customer1') self.product = self.env.ref('product.product_product_4') - self.pricelist = self.env.ref('product.list0') - self.pricelist_item = self.pricelist_item_model.browse( - self.env.ref('product.item0').id) - self.pricelist_item.write({'base': -2}) + self.supplierinfo = self._create_supplierinfo( + 'customer', self.customer, self.product) + self.pricelist = self.env['product.pricelist'].create({ + 'name': 'Test Pricelist', + 'currency_id': self.env.ref('base.USD').id, + }) + self.pricelist_item = self.env['product.pricelist.item'].create({ + 'applied_on': '1_product', + 'base': 'list_price', + 'name': 'Test Pricelist Item', + 'pricelist_id': self.pricelist.id, + 'compute_price': 'fixed', + 'fixed_price': 100.0, + 'product_tmpl_id': self.product.id, + 'sequence': 5, + }) + + def _create_customer(self, name): + """Create a Partner.""" + return self.env['res.partner'].create({ + 'name': name, + 'email': 'example@yourcompany.com', + 'customer': True, + 'phone': 123456, + }) + + def _create_supplierinfo(self, type, partner, product): + return self.env['product.supplierinfo'].create({ + 'name': partner.id, + 'product_id': product.id, + 'product_code': '00001', + 'type': 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({'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)] @@ -28,13 +78,12 @@ def test_product_supplierinfo_for_customer(self): customerinfos = self.supplierinfo_model.with_context( supplierinfo_type='customer').search(cond) self.assertNotEqual(len(customerinfos), 0, - "Error: Supplier not found in Supplierinfo") - price_unit = self.pricelist_model.with_context( - supplierinfo_type='customer').price_rule_get( - self.product.id, 7, partner=self.customer.id) + "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, 20.0, + self.assertEqual(price, 100.0, "Error: Price not found for product and customer") diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index f6db3069922..ddeee2e809e 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -66,7 +66,7 @@ product.template.extended.form product.template - + {'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id} @@ -78,14 +78,12 @@ context="{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" domain="[('type','=','supplier')]" /> - +
- +
@@ -94,20 +92,21 @@ product.supplierinfo - - + + + name="is_customer_filter"/> - + name="is_supplier_filter"/> + + domain="[]" context="{'group_by':'name'}"/> + name="gb_product_template" + context="{'group_by':'product_tmpl_id'}"/> - + From 3e9a11a604ce9017d28e1e100cb7c45f65bb3fd8 Mon Sep 17 00:00:00 2001 From: aheficent Date: Fri, 29 Sep 2017 16:13:53 +0200 Subject: [PATCH 13/88] [MIG] product_supplierinfo_for_customer to v10 --- product_customerinfo/README.rst | 17 ++--- product_customerinfo/__init__.py | 3 - .../{__openerp__.py => __manifest__.py} | 10 +-- product_customerinfo/demo/product_demo.xml | 4 +- product_customerinfo/models/__init__.py | 3 - .../models/product_supplierinfo.py | 20 +++--- .../models/product_template.py | 9 +-- product_customerinfo/models/res_partner.py | 9 +-- product_customerinfo/tests/__init__.py | 3 - .../test_product_supplierinfo_for_customer.py | 9 +-- product_customerinfo/views/product_view.xml | 64 +++++++++++++------ 11 files changed, 81 insertions(+), 70 deletions(-) rename product_customerinfo/{__openerp__.py => __manifest__.py} (77%) diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index a2d9df46b21..601c1edec91 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -1,4 +1,4 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :alt: License: AGPL-3 :target: http://www.gnu.org/licenses/agpl-3.0.en.html @@ -15,7 +15,7 @@ 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 -"Supplier prices on the product form" (although the text is not clear enough). +"Supplier prices on the product form". Usage ===== @@ -26,21 +26,14 @@ suppliers. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/188/9.0 - - -The product code / product name specified for the customer can be reflected -on the sale orders using module `product_supplierinfo_for_customer_sale -`_ + :target: https://runbot.odoo-community.org/runbot/188/10.0 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 not also be applied on sale orders. -* Computed fields in product.supplierinfo object won't properly work for - customer type +* The minimum quantity will neither apply on sale orders. Credits ======= @@ -48,5 +41,5 @@ Credits Contributors ------------ * Oihane Crucelaegui -* Pedro M. Baeza +* Tecnativa - Pedro M. Baeza * Aaron Henriquez diff --git a/product_customerinfo/__init__.py b/product_customerinfo/__init__.py index 2bbe2de9996..a0fdc10fe11 100644 --- a/product_customerinfo/__init__.py +++ b/product_customerinfo/__init__.py @@ -1,5 +1,2 @@ # -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## from . import models diff --git a/product_customerinfo/__openerp__.py b/product_customerinfo/__manifest__.py similarity index 77% rename from product_customerinfo/__openerp__.py rename to product_customerinfo/__manifest__.py index 24881a189a5..f61cd9647dd 100644 --- a/product_customerinfo/__openerp__.py +++ b/product_customerinfo/__manifest__.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015 Tecnativa # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Use product supplier info for customers too", - "version": "9.0.1.0.0", - "author": "OdooMRP team, " - "AvanzOSC, " + "version": "10.0.1.0.0", + "author": "AvanzOSC, " "Tecnativa, " - "Eficent, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/product-attribute", "category": "Sales Management", @@ -14,6 +15,7 @@ "depends": [ "base", "product", + "purchase", ], "data": [ "views/product_view.xml", diff --git a/product_customerinfo/demo/product_demo.xml b/product_customerinfo/demo/product_demo.xml index c6a331f13d3..123cbe06e8a 100644 --- a/product_customerinfo/demo/product_demo.xml +++ b/product_customerinfo/demo/product_demo.xml @@ -1,5 +1,5 @@ - + @@ -9,4 +9,4 @@ customer - + diff --git a/product_customerinfo/models/__init__.py b/product_customerinfo/models/__init__.py index f4daa63b35a..fe99cab361e 100644 --- a/product_customerinfo/models/__init__.py +++ b/product_customerinfo/models/__init__.py @@ -1,7 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## from . import product_supplierinfo from . import product_template from . import res_partner diff --git a/product_customerinfo/models/product_supplierinfo.py b/product_customerinfo/models/product_supplierinfo.py index 635c2ec1887..5c01d9ab558 100644 --- a/product_customerinfo/models/product_supplierinfo.py +++ b/product_customerinfo/models/product_supplierinfo.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## -from openerp import models, fields, api +# 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): @@ -22,16 +23,13 @@ def onchange_type(self): return {'domain': {'name': [('customer', '=', True)]}} return {'domain': {'name': []}} - def search(self, cr, uid, args, offset=0, limit=None, order=None, - context=None, count=False): + @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 context is None: - context = {} if not any(arg[0] == 'type' for arg in args): args += [('type', '=', - context.get('supplierinfo_type', 'supplier'))] + self.env.context.get('supplierinfo_type', 'supplier'))] return super(ProductSupplierinfo, self).search( - cr, uid, args, offset=offset, limit=limit, order=order, - context=context, count=count) + args, offset=offset, limit=limit, order=order, count=count) diff --git a/product_customerinfo/models/product_template.py b/product_customerinfo/models/product_template.py index 4fa58d94acd..360562a9cd3 100644 --- a/product_customerinfo/models/product_template.py +++ b/product_customerinfo/models/product_template.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## -from openerp import models, fields +# 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 ProductTemplate(models.Model): diff --git a/product_customerinfo/models/res_partner.py b/product_customerinfo/models/res_partner.py index 8e41b79cb5d..7ca95f3abe7 100644 --- a/product_customerinfo/models/res_partner.py +++ b/product_customerinfo/models/res_partner.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## -from openerp import models, api +# 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): diff --git a/product_customerinfo/tests/__init__.py b/product_customerinfo/tests/__init__.py index bc0476c8174..02b8a718f29 100644 --- a/product_customerinfo/tests/__init__.py +++ b/product_customerinfo/tests/__init__.py @@ -1,5 +1,2 @@ # -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## from . import test_product_supplierinfo_for_customer diff --git a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py index 23940de587f..41cdf12aacd 100644 --- a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py +++ b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in root directory -############################################################################## -import openerp.tests.common as common +# Copyright 2015 OdooMRP team +# Copyright 2015 AvanzOSC +# Copyright 2015 Tecnativa +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +import odoo.tests.common as common class TestProductSupplierinfoForCustomer(common.TransactionCase): diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index ddeee2e809e..5721a982615 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -3,26 +3,42 @@ + product.supplierinfo.extended.form product.supplierinfo - - - Partner - {'select_type': type} - - - Partner Product Name - - - Partner Product Code - - - Partner Unit of Measure - - - - +
+ + + + + + + + + + + + + + + +
@@ -63,10 +79,10 @@
- + product.template.extended.form product.template - + {'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id} @@ -78,6 +94,14 @@ context="{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" domain="[('type','=','supplier')]" /> + + + + + product.template.extended.form + product.template + +
- From dc982f3d631cb95e15196c0f3a2b303156ec833a Mon Sep 17 00:00:00 2001 From: aheficent Date: Mon, 6 Nov 2017 18:02:06 +0100 Subject: [PATCH 14/88] [IMP] Add back the option to import the prices from supplierinfo to PL --- product_customerinfo/README.rst | 5 +- .../product_supplierinfo_for_customer.pot | 88 +++-- product_customerinfo/models/__init__.py | 2 + product_customerinfo/models/pricelist.py | 24 ++ .../models/product_product.py | 50 +++ .../test_product_supplierinfo_for_customer.py | 22 ++ product_customerinfo/views/product_view.xml | 321 +++++++++--------- 7 files changed, 324 insertions(+), 188 deletions(-) create mode 100644 product_customerinfo/models/pricelist.py create mode 100644 product_customerinfo/models/product_product.py diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index 601c1edec91..a6f4d2f41e2 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -15,7 +15,7 @@ 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 -"Supplier prices on the product form". +"Partner Prices: Take the price from the customer info on the 'product form')". Usage ===== @@ -24,6 +24,9 @@ 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. + .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot :target: https://runbot.odoo-community.org/runbot/188/10.0 diff --git a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot index 32dbe81b428..57e77057e22 100644 --- a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot +++ b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot @@ -4,10 +4,8 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-05 14:08+0000\n" -"PO-Revision-Date: 2015-02-05 14:08+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -17,84 +15,124 @@ msgstr "" #. module: product_supplierinfo_for_customer #: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action -msgid "

\n" -" Click to define a new product.supplierinfo.\n" -"

\n" -" " +msgid "Click to define a new product.supplierinfo." msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: 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_template_customer_ids +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view #: selection:product.supplierinfo,type:0 -#: field:product.template,customer_ids:0 msgid "Customer" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_extended_form_view msgid "Customers" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Group By" msgstr "" #. module: product_supplierinfo_for_customer #: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action #: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu -msgid "Information about a product" +msgid "Information about a product (customer)" msgstr "" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo -msgid "Information about a product supplier" +msgid "Information about a product vendor" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Other Information" msgstr "" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Partner" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Partner Information" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view msgid "Partner Product Code" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view msgid "Partner Product Name" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view msgid "Partner Unit of Measure" msgstr "" +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_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_extended_form_view +msgid "Product" +msgstr "" + #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Product Template" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: 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_template_supplier_ids +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view #: selection:product.supplierinfo,type:0 -#: field:product.template,supplier_ids:0 msgid "Supplier" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Supplierinfo search" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: field:product.supplierinfo,type:0 +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_type +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Type" msgstr "" +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "Validity" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "days" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +msgid "to" +msgstr "" + diff --git a/product_customerinfo/models/__init__.py b/product_customerinfo/models/__init__.py index fe99cab361e..6ab9a3a8829 100644 --- a/product_customerinfo/models/__init__.py +++ b/product_customerinfo/models/__init__.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +from . import pricelist from . import product_supplierinfo +from . import product_product from . import product_template from . import res_partner diff --git a/product_customerinfo/models/pricelist.py b/product_customerinfo/models/pricelist.py new file mode 100644 index 00000000000..c180d689642 --- /dev/null +++ b/product_customerinfo/models/pricelist.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# 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([ + ('list_price', 'Public Price'), + ('standard_price', 'Cost'), + ('pricelist', 'Other Pricelist'), + ('partner', 'Partner Prices on the product form')], + default='list_price', required=True, + help='Base price for computation.\n' + 'Public Price: The base price will be the Sale/public Price.\n' + 'Cost Price : The base price will be the cost price.\n' + 'Other Pricelist : Computation of the base price based on another' + ' Pricelist.' + 'Partner Prices: Take the price from the customer info on the' + ' product form') diff --git a/product_customerinfo/models/product_product.py b/product_customerinfo/models/product_product.py new file mode 100644 index 00000000000..4f5a5cbbbc2 --- /dev/null +++ b/product_customerinfo/models/product_product.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# 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): + for product in self: + if partner_id: + supplierinfo = self.env['product.supplierinfo'].search( + ['|', ('product_tmpl_id', '=', product.product_tmpl_id.id), + ('product_id', '=', product.id), + ('type', '=', 'customer'), + ('name', '=', partner_id)]) + if supplierinfo: + return supplierinfo.price + return 0.0 + + @api.multi + def price_compute( + self, price_type, uom=False, currency=False, company=False): + for product in self: + if price_type == 'partner': + partner = self.env.context.get('partner_id', False) + price = product._get_price_from_supplierinfo(partner) + if not price: + return super(ProductProduct, self).price_compute( + 'list_price', uom, currency, company) + prices = dict.fromkeys(self.ids, 0.0) + 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_customerinfo/tests/test_product_supplierinfo_for_customer.py b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py index 41cdf12aacd..bfe104094d1 100644 --- a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py +++ b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py @@ -14,6 +14,7 @@ def setUp(self): self.pricelist_item_model = self.env['product.pricelist.item'] self.pricelist_model = self.env['product.pricelist'] self.customer = self._create_customer('customer1') + self.unknown = self._create_customer('customer2') self.product = self.env.ref('product.product_product_4') self.supplierinfo = self._create_supplierinfo( 'customer', self.customer, self.product) @@ -21,6 +22,7 @@ def setUp(self): 'name': 'Test Pricelist', 'currency_id': self.env.ref('base.USD').id, }) + self.company = self.env.ref('base.main_company') self.pricelist_item = self.env['product.pricelist.item'].create({ 'applied_on': '1_product', 'base': 'list_price', @@ -88,3 +90,23 @@ def test_product_supplierinfo_for_customer(self): 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_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 5721a982615..5f3ba00d696 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -1,179 +1,176 @@ - - - - - - product.supplierinfo.extended.form - product.supplierinfo - -
- - - - - - - - - - - - - - + + + + product.supplierinfo.extended.form + product.supplierinfo + + + + + + + + + + - - - + + + + + + +
+ +
+
- - product.supplierinfo.template.form - product.supplierinfo - - primary - - - - - + + product.supplierinfo.template.form + product.supplierinfo + + primary + + + + - + + - - product.supplierinfo.partner.tree - product.supplierinfo - - - - Partner - + + product.supplierinfo.partner.tree + product.supplierinfo + + + + Partner - + + - - product.supplierinfo.template.tree - product.supplierinfo - - primary - - - - - + + product.supplierinfo.template.tree + product.supplierinfo + + primary + + + + - + + - - product.template.extended.form - product.template - - - - {'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id} - [('type','=','supplier')] - 1 - - - - + + product.template.extended.form + product.template + + + + {'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id} + [('type','=','supplier')] + 1 - - - - product.template.extended.form - product.template - - -
- - - -
+ + -
+
+
- - product.supplierinfo.search - product.supplierinfo - - - - - - - - - - - - - - - + + product.template.extended.form + product.template + + +
+ + + +
+
+
- - Information about a product (customer) - ir.actions.act_window - product.supplierinfo - tree,form - form - - { - 'search_default_is_customer_filter': 1, - 'default_type': 'customer', - 'supplierinfo_type': 'customer', - } - - -

- Click to define a new product.supplierinfo. -

-
-
+ + product.supplierinfo.search + product.supplierinfo + + + + + + + + + + + + + + + + + + Information about a product (customer) + ir.actions.act_window + product.supplierinfo + tree,form + form + + { + 'search_default_is_customer_filter': 1, + 'default_type': 'customer', + 'supplierinfo_type': 'customer', + } + + +

+ Click to define a new product.supplierinfo. +

+
+
- - - form - - - + + + form + + + - - - tree - - - + + + tree + + + - + -
-
+ From ecebc15caf1a75c2316c9a10b077acc938356f29 Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 9 Jul 2018 16:49:00 +0200 Subject: [PATCH 15/88] [FIX] Move some views to product_supplierinfo_for_customer_sale --- product_customerinfo/__manifest__.py | 2 +- .../product_supplierinfo_for_customer.pot | 26 -------- product_customerinfo/views/product_view.xml | 64 ------------------- 3 files changed, 1 insertion(+), 91 deletions(-) diff --git a/product_customerinfo/__manifest__.py b/product_customerinfo/__manifest__.py index f61cd9647dd..b8de7035987 100644 --- a/product_customerinfo/__manifest__.py +++ b/product_customerinfo/__manifest__.py @@ -5,7 +5,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Use product supplier info for customers too", - "version": "10.0.1.0.0", + "version": "10.0.2.0.0", "author": "AvanzOSC, " "Tecnativa, " "Odoo Community Association (OCA)", diff --git a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot index 57e77057e22..36974fdcc65 100644 --- a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot +++ b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot @@ -13,15 +13,9 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: product_supplierinfo_for_customer -#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action -msgid "Click to define a new product.supplierinfo." -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_template_customer_ids -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view #: selection:product.supplierinfo,type:0 msgid "Customer" msgstr "" @@ -31,17 +25,6 @@ msgstr "" msgid "Customers" msgstr "" -#. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Group By" -msgstr "" - -#. module: product_supplierinfo_for_customer -#: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action -#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu -msgid "Information about a product (customer)" -msgstr "" - #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo msgid "Information about a product vendor" @@ -56,7 +39,6 @@ msgstr "" #: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner #: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view #: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Partner" msgstr "" @@ -98,26 +80,18 @@ msgstr "" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view 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_template_supplier_ids -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view #: selection:product.supplierinfo,type:0 msgid "Supplier" msgstr "" -#. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Supplierinfo search" -msgstr "" - #. module: product_supplierinfo_for_customer #: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_type -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Type" msgstr "" diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 5f3ba00d696..1a003c31584 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -109,68 +109,4 @@
- - product.supplierinfo.search - product.supplierinfo - - - - - - - - - - - - - - - - - - Information about a product (customer) - ir.actions.act_window - product.supplierinfo - tree,form - form - - { - 'search_default_is_customer_filter': 1, - 'default_type': 'customer', - 'supplierinfo_type': 'customer', - } - - -

- Click to define a new product.supplierinfo. -

-
-
- - - - form - - - - - - - tree - - - - - - From aba5dcbb39f2ab7ffdb73e2348cc5a60f34b1ccc Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 16 Jul 2018 16:49:57 +0200 Subject: [PATCH 16/88] [REF] Don't overwrite views and fix view for customers --- product_customerinfo/__manifest__.py | 2 +- .../product_supplierinfo_for_customer.pot | 51 ++++---- product_customerinfo/models/pricelist.py | 15 +-- product_customerinfo/views/product_view.xml | 109 +++++++++--------- 4 files changed, 81 insertions(+), 96 deletions(-) diff --git a/product_customerinfo/__manifest__.py b/product_customerinfo/__manifest__.py index b8de7035987..14b19abd177 100644 --- a/product_customerinfo/__manifest__.py +++ b/product_customerinfo/__manifest__.py @@ -5,7 +5,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Use product supplier info for customers too", - "version": "10.0.2.0.0", + "version": "10.0.3.0.0", "author": "AvanzOSC, " "Tecnativa, " "Odoo Community Association (OCA)", diff --git a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot index 36974fdcc65..fa4e7f2f282 100644 --- a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot +++ b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot @@ -16,54 +16,55 @@ 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_template_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,type:0 msgid "Customer" msgstr "" #. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "Customers" +#: 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.model,name:product_supplierinfo_for_customer.model_product_supplierinfo -msgid "Information about a product vendor" +#: 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_extended_form_view -msgid "Other Information" +#: 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.model,name:product_supplierinfo_for_customer.model_res_partner -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view -msgid "Partner" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_form_view +msgid "Customers" msgstr "" #. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Information" +#: 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_extended_form_view -msgid "Partner Product Code" +#: 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_extended_form_view -msgid "Partner Product Name" +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Partner" msgstr "" #. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Unit of Measure" +#: 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_extended_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view msgid "Price List" msgstr "" @@ -74,7 +75,8 @@ 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_extended_form_view +#: 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 "" @@ -96,17 +98,12 @@ msgid "Type" msgstr "" #. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: 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_extended_form_view -msgid "days" -msgstr "" - -#. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view msgid "to" msgstr "" diff --git a/product_customerinfo/models/pricelist.py b/product_customerinfo/models/pricelist.py index c180d689642..8987abb0688 100644 --- a/product_customerinfo/models/pricelist.py +++ b/product_customerinfo/models/pricelist.py @@ -9,16 +9,5 @@ class ProductPricelistItem(models.Model): _inherit = "product.pricelist.item" - base = fields.Selection([ - ('list_price', 'Public Price'), - ('standard_price', 'Cost'), - ('pricelist', 'Other Pricelist'), - ('partner', 'Partner Prices on the product form')], - default='list_price', required=True, - help='Base price for computation.\n' - 'Public Price: The base price will be the Sale/public Price.\n' - 'Cost Price : The base price will be the cost price.\n' - 'Other Pricelist : Computation of the base price based on another' - ' Pricelist.' - 'Partner Prices: Take the price from the customer info on the' - ' product form') + base = fields.Selection( + selection_add=[('partner', 'Partner Prices on the product form')]) diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 1a003c31584..627e281eb2c 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -1,29 +1,36 @@ - - - product.supplierinfo.extended.form + + product.supplierinfo.form.view product.supplierinfo + + -
+ + + + + + + + product.supplierinfo.customer.form.view + product.supplierinfo + + + - - - - - + + + + - - + + }" + domain="[('type','=','customer')]" + />
From 5194b36d81c4abfd481142d7321a5bc7df1dff7c Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 15 Oct 2018 13:36:27 +0200 Subject: [PATCH 22/88] [IMP] Use variant one2many introduced in v11 like variant_seller_ids --- .../models/product_template.py | 3 +++ product_customerinfo/views/product_view.xml | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/product_customerinfo/models/product_template.py b/product_customerinfo/models/product_template.py index 5bfe24c3b6a..0adad953802 100644 --- a/product_customerinfo/models/product_template.py +++ b/product_customerinfo/models/product_template.py @@ -14,3 +14,6 @@ class ProductTemplate(models.Model): supplier_ids = fields.One2many( comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', string='Supplier', domain=[('type', '=', 'supplier')]) + variant_supplier_ids = fields.One2many( + comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', + string='Supplier', domain=[('type', '=', 'supplier')]) diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index f1ee1e9ecfb..59c4a6982f1 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -81,6 +81,16 @@ + { + 'default_search_type':'supplier', + 'default_type':'supplier', + 'default_product_tmpl_id':id, + 'product_template_invisible_variant': True, + } + [('type','=','supplier')] + 1 + + { 'default_search_type':'supplier', 'default_type':'supplier', @@ -92,6 +102,20 @@ + + + + + 1 1 - customer + customer
diff --git a/product_customerinfo/models/product_product.py b/product_customerinfo/models/product_product.py index 31192b0b408..b83d73d2f10 100644 --- a/product_customerinfo/models/product_product.py +++ b/product_customerinfo/models/product_product.py @@ -16,7 +16,7 @@ def _get_price_from_supplierinfo(self, partner_id): supplierinfo = self.env['product.supplierinfo'].search( ['|', ('product_tmpl_id', '=', self.product_tmpl_id.id), ('product_id', '=', self.id), - ('type', '=', 'customer'), + ('supplierinfo_type', '=', 'customer'), ('name', '=', partner_id)], limit=1) if supplierinfo: return supplierinfo.price diff --git a/product_customerinfo/models/product_supplierinfo.py b/product_customerinfo/models/product_supplierinfo.py index c1356008a1c..4de9ded02ea 100644 --- a/product_customerinfo/models/product_supplierinfo.py +++ b/product_customerinfo/models/product_supplierinfo.py @@ -8,18 +8,18 @@ class ProductSupplierinfo(models.Model): _inherit = 'product.supplierinfo' - type = fields.Selection( + supplierinfo_type = fields.Selection( selection=[ ('customer', 'Customer'), ('supplier', 'Supplier'), - ], string='Type', + ], string='Type', oldname='type', default='supplier') - @api.onchange('type') + @api.onchange('supplierinfo_type') def onchange_type(self): - if self.type == 'supplier': + if self.supplierinfo_type == 'supplier': return {'domain': {'name': [('supplier', '=', True)]}} - elif self.type == 'customer': + elif self.supplierinfo_type == 'customer': return {'domain': {'name': [('customer', '=', True)]}} return {'domain': {'name': []}} @@ -28,8 +28,8 @@ 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] == 'type' for arg in args): - args += [('type', '=', + 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_customerinfo/models/product_template.py b/product_customerinfo/models/product_template.py index 0adad953802..3c81688b4e5 100644 --- a/product_customerinfo/models/product_template.py +++ b/product_customerinfo/models/product_template.py @@ -10,10 +10,10 @@ class ProductTemplate(models.Model): customer_ids = fields.One2many( comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', - string='Customer', domain=[('type', '=', 'customer')]) + string='Customer', domain=[('supplierinfo_type', '=', 'customer')]) supplier_ids = fields.One2many( comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', - string='Supplier', domain=[('type', '=', 'supplier')]) + string='Supplier', domain=[('supplierinfo_type', '=', 'supplier')]) variant_supplier_ids = fields.One2many( comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', - string='Supplier', domain=[('type', '=', 'supplier')]) + string='Supplier', domain=[('supplierinfo_type', '=', 'supplier')]) diff --git a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py index 4ba218854b4..0ed66c351d6 100644 --- a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py +++ b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py @@ -41,12 +41,12 @@ def _create_customer(self, name): 'phone': 123456, }) - def _create_supplierinfo(self, type, partner, product): + def _create_supplierinfo(self, supplierinfo_type, partner, product): return self.env['product.supplierinfo'].create({ 'name': partner.id, 'product_id': product.id, 'product_code': '00001', - 'type': type, + 'supplierinfo_type': supplierinfo_type, 'price': 100.0, }) @@ -64,7 +64,7 @@ def test_onchange_type(self): domain = res.get('domain', False) name_dom = domain.get('name', False) self.assertEqual(name_dom, [('supplier', '=', True)]) - sup_info.write({'type': 'customer'}) + sup_info.write({'supplierinfo_type': 'customer'}) res = sup_info.onchange_type() domain = res.get('domain', False) name_dom = domain.get('name', False) diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 59c4a6982f1..b812f9781e2 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -11,7 +11,7 @@ - +
@@ -49,7 +49,7 @@ - + @@ -82,33 +82,33 @@ { - 'default_search_type':'supplier', - 'default_type':'supplier', + 'default_search_supplierinfo_type':'supplier', + 'default_supplierinfo_type':'supplier', 'default_product_tmpl_id':id, 'product_template_invisible_variant': True, } - [('type','=','supplier')] + [('supplierinfo_type','=','supplier')] 1 { - 'default_search_type':'supplier', - 'default_type':'supplier', + 'default_search_supplierinfo_type':'supplier', + 'default_supplierinfo_type':'supplier', 'default_product_tmpl_id':id, } - [('type','=','supplier')] + [('supplierinfo_type','=','supplier')] 1 @@ -117,11 +117,11 @@ @@ -139,13 +139,13 @@ @@ -156,12 +156,12 @@ Partner Pricelists product.supplierinfo { - 'default_search_type':'supplier', - 'default_type':'supplier', + 'default_search_supplierinfo_type':'supplier', + 'default_supplierinfo_type':'supplier', 'default_product_tmpl_id':id, 'visible_product_tmpl_id':False, } - [('type','=','supplier')] + [('supplierinfo_type','=','supplier')] From b00ade049ba0b539a2f15f0a5f3a9f512bcc5cd9 Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 15 Oct 2018 14:43:31 +0200 Subject: [PATCH 24/88] [IMP] Change to SavepointCase some tests --- product_customerinfo/README.rst | 68 ++- .../product_supplierinfo_for_customer.pot | 20 +- .../static/description/index.html | 451 ++++++++++++++++++ .../test_product_supplierinfo_for_customer.py | 48 +- 4 files changed, 539 insertions(+), 48 deletions(-) create mode 100644 product_customerinfo/static/description/index.html diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index 047cafc1180..2c7f4fdbac3 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -1,15 +1,39 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - ================================== Product Supplierinfo for Customers ================================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%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/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/135/11.0 + :alt: Try me on Runbot + +|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 ============= @@ -27,10 +51,6 @@ suppliers. There's a new option on pricelist items that allows to get the prices from the supplierinfo at the product form. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/188/11.0 - Known issues / Roadmap ====================== @@ -38,33 +58,47 @@ Known issues / Roadmap 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 smashing 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 `_. +* AvanzOSC +* Tecnativa Contributors ------------- +~~~~~~~~~~~~ + * Oihane Crucelaegui * Tecnativa - Pedro M. Baeza * Aaron Henriquez * Miquel Raïch * Tecnativa - 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_customerinfo/i18n/product_supplierinfo_for_customer.pot b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot index 5db6549bb27..c3d0ffe94c5 100644 --- a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot +++ b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -13,12 +13,17 @@ msgstr "" "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_template_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,type:0 +#: selection:product.supplierinfo,supplierinfo_type:0 msgid "Customer" msgstr "" @@ -55,11 +60,6 @@ msgstr "" msgid "Other Information" msgstr "" -#. module: product_supplierinfo_for_customer -#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner -msgid "Partner" -msgstr "" - #. module: product_supplierinfo_for_customer #: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view msgid "Price" @@ -89,13 +89,15 @@ 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 -#: selection:product.supplierinfo,type:0 +#: 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_type +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type msgid "Type" msgstr "" diff --git a/product_customerinfo/static/description/index.html b/product_customerinfo/static/description/index.html new file mode 100644 index 00000000000..aeab64507d6 --- /dev/null +++ b/product_customerinfo/static/description/index.html @@ -0,0 +1,451 @@ + + + + + + +Product Supplierinfo for Customers + + + +
+

Product Supplierinfo for Customers

+ + +

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

+

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 smashing 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_customerinfo/tests/test_product_supplierinfo_for_customer.py b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py index 0ed66c351d6..e716cca0d1b 100644 --- a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py +++ b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py @@ -1,48 +1,52 @@ # 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). -import odoo.tests.common as common +from odoo.tests.common import SavepointCase -class TestProductSupplierinfoForCustomer(common.TransactionCase): +class TestProductSupplierinfoForCustomer(SavepointCase): - def setUp(self): - super(TestProductSupplierinfoForCustomer, self).setUp() - self.supplierinfo_model = self.env['product.supplierinfo'] - self.pricelist_item_model = self.env['product.pricelist.item'] - self.pricelist_model = self.env['product.pricelist'] - self.customer = self._create_customer('customer1') - self.unknown = self._create_customer('customer2') - self.product = self.env.ref('product.product_product_4') - self.supplierinfo = self._create_supplierinfo( - 'customer', self.customer, self.product) - self.pricelist = self.env['product.pricelist'].create({ + @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': self.env.ref('base.USD').id, + 'currency_id': cls.env.ref('base.USD').id, }) - self.company = self.env.ref('base.main_company') - self.pricelist_item = self.env['product.pricelist.item'].create({ + 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': self.pricelist.id, + 'pricelist_id': cls.pricelist.id, 'compute_price': 'fixed', 'fixed_price': 100.0, - 'product_tmpl_id': self.product.id, + 'product_tmpl_id': cls.product.id, }) - def _create_customer(self, name): + @classmethod + def _create_customer(cls, name): """Create a Partner.""" - return self.env['res.partner'].create({ + return cls.env['res.partner'].create({ 'name': name, 'email': 'example@yourcompany.com', 'customer': True, 'phone': 123456, }) - def _create_supplierinfo(self, supplierinfo_type, partner, product): - return self.env['product.supplierinfo'].create({ + @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', From 8aef7aa40f09c312fffa2350f332f4eac1e75271 Mon Sep 17 00:00:00 2001 From: Sergio Teruel Date: Thu, 22 Nov 2018 10:00:41 +0100 Subject: [PATCH 25/88] [11.0][FIX] product_supplierinfo_for_customer: Hide variant suppliers in product template --- product_customerinfo/i18n/de.po | 165 +++++++++++-------- product_customerinfo/i18n/es.po | 140 +++++++++------- product_customerinfo/i18n/fr.po | 113 ++++++------- product_customerinfo/i18n/sl.po | 167 ++++++++++++-------- product_customerinfo/views/product_view.xml | 2 +- 5 files changed, 341 insertions(+), 246 deletions(-) diff --git a/product_customerinfo/i18n/de.po b/product_customerinfo/i18n/de.po index 49246583ecf..624f3fc94c6 100644 --- a/product_customerinfo/i18n/de.po +++ b/product_customerinfo/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_supplierinfo_for_customer -# +# # Translators: # OCA Transbot , 2016 # Rudolf Schnapka , 2017 @@ -13,116 +13,153 @@ msgstr "" "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" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_supplierinfo_for_customer -#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action -msgid "" -"

\n" -" Click to define a new product.supplierinfo.\n" -"

\n" -" " +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" msgstr "" -"

\n" -" Klicken für neue product.supplierinfo Lieferanteninfo.\n" -"

\n" -" " #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 field:product.template,customer_ids:0 +#: 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_template_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 -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "Customers" -msgstr "Kunden" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Group By" -msgstr "Gruppiere nach" +#: 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.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action -#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu -msgid "Information about a product (customer)" -msgstr "Information zu einem (Kunden-) Produkt" +#: 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 -msgid "Information about a product supplier" +#, fuzzy +msgid "Information about a product vendor" msgstr "Information zu Produktlieferant" #. module: product_supplierinfo_for_customer -#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Partner" -msgstr "Partner" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" +msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Product Code" -msgstr "Artikelnummer des Partners" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Product Name" -msgstr "Produktbezeichnung des Partners" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Unit of Measure" -msgstr "Mengeneinheit des Partners" +#: 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_pricelist -msgid "Pricelist" -msgstr "Preisliste" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Product Template" msgstr "Produktvorlage" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 field:product.template,supplier_ids:0 +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Supplierinfo search" -msgstr "Lieferantenauskunft-Suche" - -#. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: field:product.supplierinfo,type:0 +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type msgid "Type" msgstr "Art" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "[('type','=','supplier')]" -msgstr "[('type','=','supplier')]" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" +msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "" -"{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" msgstr "" -"{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" -#. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "{'select_type': type}" -msgstr "{'select_type': type}" +#~ 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_customerinfo/i18n/es.po b/product_customerinfo/i18n/es.po index 027bca24642..9f089db2f9b 100644 --- a/product_customerinfo/i18n/es.po +++ b/product_customerinfo/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_supplierinfo_for_customer -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -12,114 +12,132 @@ msgstr "" "PO-Revision-Date: 2016-11-03 10:07+0000\n" "Last-Translator: OCA Transbot , 2016\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" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_supplierinfo_for_customer -#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action -msgid "" -"

\n" -" Click to define a new product.supplierinfo.\n" -"

\n" -" " +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" msgstr "" -"

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

\n" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 field:product.template,customer_ids:0 +#: 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_template_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 -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "Customers" -msgstr "Clientes" +#: 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 "Código de producto para la empresa" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Group By" -msgstr "Agrupar por" +#: 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 "Nombre de producto para la empresa" #. module: product_supplierinfo_for_customer -#: model:ir.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action -#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu -msgid "Information about a product (customer)" -msgstr "" +#: 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 supplier" +#, fuzzy +msgid "Information about a product vendor" msgstr "Información de un proveedor de producto" #. module: product_supplierinfo_for_customer -#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Partner" -msgstr "Empresa" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" +msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Product Code" -msgstr "Código de producto para la empresa" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_tree_view +msgid "Price" +msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Product Name" -msgstr "Nombre de producto para la empresa" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Price List" +msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Unit of Measure" -msgstr "Unidad de medida de empresa" +#: 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_pricelist -msgid "Pricelist" -msgstr "" +#: 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 "Plantilla de producto" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Product Template" msgstr "Plantilla de producto" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 field:product.template,supplier_ids:0 +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Supplierinfo search" -msgstr "Búsqueda de producto-empresa" - -#. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: field:product.supplierinfo,type:0 +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type msgid "Type" msgstr "Tipo" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "[('type','=','supplier')]" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "" -"{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" msgstr "" -#. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "{'select_type': type}" -msgstr "" +#~ 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_customerinfo/i18n/fr.po b/product_customerinfo/i18n/fr.po index a0c9aad1161..d085395b65b 100644 --- a/product_customerinfo/i18n/fr.po +++ b/product_customerinfo/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_supplierinfo_for_customer -# +# # Translators: # OCA Transbot , 2016 # Christophe CHAUVET , 2017 @@ -13,111 +13,114 @@ msgstr "" "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" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: product_supplierinfo_for_customer -#: model:ir.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action -msgid "" -"

\n" -" Click to define a new product.supplierinfo.\n" -"

\n" -" " +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 field:product.template,customer_ids:0 +#: 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_template_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 -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "Customers" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Group By" +#: 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.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action -#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu -msgid "Information about a product (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.model,name:product_supplierinfo_for_customer.model_product_supplierinfo -msgid "Information about a product supplier" -msgstr "Information à propos du fournisseur du produit" +#: 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_res_partner -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Partner" -msgstr "Partenaire" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Product Code" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Product Name" -msgstr "" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Unit of Measure" -msgstr "" +#: 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 -msgid "Pricelist" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Product Template" msgstr "Modèle d'article" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 field:product.template,supplier_ids:0 +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Supplierinfo search" -msgstr "" - -#. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: field:product.supplierinfo,type:0 +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type msgid "Type" msgstr "Type" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "[('type','=','supplier')]" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "" -"{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" msgstr "" -#. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "{'select_type': type}" -msgstr "" +#~ msgid "Partner" +#~ msgstr "Partenaire" diff --git a/product_customerinfo/i18n/sl.po b/product_customerinfo/i18n/sl.po index ad5fa16f4dd..f0dbb6da55e 100644 --- a/product_customerinfo/i18n/sl.po +++ b/product_customerinfo/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_supplierinfo_for_customer -# +# # Translators: # OCA Transbot , 2016 # Matjaž Mozetič , 2016 @@ -13,116 +13,153 @@ msgstr "" "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" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\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.actions.act_window,help:product_supplierinfo_for_customer.product_supplierinfo_action -msgid "" -"

\n" -" Click to define a new product.supplierinfo.\n" -"

\n" -" " +#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner +msgid "Contact" msgstr "" -"

\n" -" Kliknite za nov product.supplierinfo.\n" -"

\n" -" " #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 field:product.template,customer_ids:0 +#: 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_template_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 -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "Customers" -msgstr "Kupci" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Group By" -msgstr "Združi po" +#: 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.actions.act_window,name:product_supplierinfo_for_customer.product_supplierinfo_action -#: model:ir.ui.menu,name:product_supplierinfo_for_customer.product_supplierinfo_sale_menu -msgid "Information about a product (customer)" -msgstr "Podatki o proizvodu (kupec)" +#: 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 -msgid "Information about a product supplier" +#, fuzzy +msgid "Information about a product vendor" msgstr "Podatki o dobavitelju proizvoda" #. module: product_supplierinfo_for_customer -#: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_tree_view -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Partner" -msgstr "Partner" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Other Information" +msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Product Code" -msgstr "Partnerjeva koda proizvoda" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Product Name" -msgstr "Partnerjev naziv proizvoda" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "Partner Unit of Measure" -msgstr "Partnerjeva EM" +#: 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_pricelist -msgid "Pricelist" -msgstr "Cenik" +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view msgid "Product Template" msgstr "Predloga proizvoda" #. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: selection:product.supplierinfo,type:0 field:product.template,supplier_ids:0 +#: 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 -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -msgid "Supplierinfo search" -msgstr "Iskanje podatkov o dobavitelju" - -#. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_search_view -#: field:product.supplierinfo,type:0 +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type msgid "Type" msgstr "Tip" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "[('type','=','supplier')]" -msgstr "[('type','=','supplier')]" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "Validity" +msgstr "" #. module: product_supplierinfo_for_customer -#: view:product.template:product_supplierinfo_for_customer.product_template_extended_form_view -msgid "" -"{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" +#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +msgid "to" msgstr "" -"{'default_search_type':'supplier','default_type':'supplier','default_product_tmpl_id':id}" -#. module: product_supplierinfo_for_customer -#: view:product.supplierinfo:product_supplierinfo_for_customer.product_supplierinfo_extended_form_view -msgid "{'select_type': type}" -msgstr "{'select_type': type}" +#~ 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_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index b812f9781e2..7a0a96683b6 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -114,7 +114,7 @@
- + , 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_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_res_partner msgid "Contact" -msgstr "" +msgstr "Contacto" #. module: product_supplierinfo_for_customer #: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_product_customer_ids @@ -36,21 +37,19 @@ msgstr "Cliente" #: 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 "" +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 -#, fuzzy 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 -#, fuzzy msgid "Customer Product Name" -msgstr "Nombre de producto para la empresa" +msgstr "Nombre Producto Cliente" #. module: product_supplierinfo_for_customer #: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_template_form_view @@ -59,37 +58,35 @@ msgstr "Clientes" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_supplierinfo -#, fuzzy msgid "Information about a product vendor" -msgstr "Información de un proveedor de producto" +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 "" +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 "" +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 "" +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 "" +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 -#, fuzzy msgid "Product" -msgstr "Plantilla de producto" +msgstr "Producto" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template @@ -113,12 +110,12 @@ 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 "" +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 "" +msgstr "para" #~ msgid "" #~ "

\n" From d87d1e240493faf5e54714308511e3dd923772fd Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 22 Feb 2019 10:05:51 +0100 Subject: [PATCH 27/88] [FIX] product_supplierinfo_for_customer: Mistake on act_window definition That action window is for showing directly product.supplierinfo, so no product template source and no `id` field. The rest of modifications on the act_window are also nonsense. --- product_customerinfo/views/product_view.xml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 7a0a96683b6..183c7ce3ec8 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -153,14 +153,7 @@ - Partner Pricelists - product.supplierinfo - { - 'default_search_supplierinfo_type':'supplier', - 'default_supplierinfo_type':'supplier', - 'default_product_tmpl_id':id, - 'visible_product_tmpl_id':False, - } + {'default_supplierinfo_type':'supplier'} [('supplierinfo_type','=','supplier')] From 4df1612809fc5f8b5520a88565d22b86155e5eb4 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 22 Feb 2019 20:27:51 +0100 Subject: [PATCH 28/88] [FIX] product_supplierinfo_for_customer: visible_product_tmpl_id context key is needed in act_window Or the product template won't be shown there. --- product_customerinfo/views/product_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 183c7ce3ec8..f1bb4a3bc38 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -153,7 +153,7 @@ - {'default_supplierinfo_type':'supplier'} + {'default_supplierinfo_type':'supplier', 'visible_product_tmpl_id': False} [('supplierinfo_type','=','supplier')] From 18ffe138ff8156fd6b6cbbd88ac9a67f6dc67d72 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 3 Apr 2019 18:06:52 +0200 Subject: [PATCH 29/88] [FIX] product_supplierinfo_for_customer: Adapt views to variants handling The same way Odoo does. --- product_customerinfo/i18n/de.po | 2 ++ product_customerinfo/i18n/es.po | 2 ++ product_customerinfo/i18n/fr.po | 2 ++ .../product_supplierinfo_for_customer.pot | 2 ++ product_customerinfo/i18n/sl.po | 2 ++ .../models/product_template.py | 4 +++ product_customerinfo/views/product_view.xml | 27 +++++++++++++------ 7 files changed, 33 insertions(+), 8 deletions(-) diff --git a/product_customerinfo/i18n/de.po b/product_customerinfo/i18n/de.po index 624f3fc94c6..c2c4f4dc317 100644 --- a/product_customerinfo/i18n/de.po +++ b/product_customerinfo/i18n/de.po @@ -26,7 +26,9 @@ 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 diff --git a/product_customerinfo/i18n/es.po b/product_customerinfo/i18n/es.po index 07d5bfce51d..bf57852594b 100644 --- a/product_customerinfo/i18n/es.po +++ b/product_customerinfo/i18n/es.po @@ -26,7 +26,9 @@ 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 diff --git a/product_customerinfo/i18n/fr.po b/product_customerinfo/i18n/fr.po index d085395b65b..a8235b4fb68 100644 --- a/product_customerinfo/i18n/fr.po +++ b/product_customerinfo/i18n/fr.po @@ -26,7 +26,9 @@ 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 diff --git a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot index c3d0ffe94c5..8a98ff6a44c 100644 --- a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot +++ b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot @@ -20,7 +20,9 @@ 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 diff --git a/product_customerinfo/i18n/sl.po b/product_customerinfo/i18n/sl.po index f0dbb6da55e..ecc9d75ef43 100644 --- a/product_customerinfo/i18n/sl.po +++ b/product_customerinfo/i18n/sl.po @@ -27,7 +27,9 @@ 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 diff --git a/product_customerinfo/models/product_template.py b/product_customerinfo/models/product_template.py index 3c81688b4e5..b7107135bcc 100644 --- a/product_customerinfo/models/product_template.py +++ b/product_customerinfo/models/product_template.py @@ -1,6 +1,7 @@ # 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 @@ -11,6 +12,9 @@ class ProductTemplate(models.Model): 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')]) diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index f1bb4a3bc38..0ef703471f0 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -2,6 +2,7 @@ @@ -24,11 +25,12 @@

+ + }" domain="[('customer', '=', True)]"/> @@ -64,13 +66,14 @@ + - + - - + + @@ -135,19 +138,27 @@
-
- + -
+ + + +
From 01e4053c33b0329f81262b803912ff45647b957a Mon Sep 17 00:00:00 2001 From: Renato Lima Date: Tue, 16 Apr 2019 20:33:22 -0300 Subject: [PATCH 30/88] [MIGR] product_supplierinfo_for_customer: Migration to 12.0 --- product_customerinfo/__manifest__.py | 4 ++- .../models/product_product.py | 8 ++++-- .../models/product_supplierinfo.py | 15 ++++++----- .../models/product_template.py | 27 +++++++++++++------ product_customerinfo/readme/ROADMAP.rst | 2 +- .../test_product_supplierinfo_for_customer.py | 15 +++++------ product_customerinfo/views/product_view.xml | 10 +++---- 7 files changed, 50 insertions(+), 31 deletions(-) diff --git a/product_customerinfo/__manifest__.py b/product_customerinfo/__manifest__.py index 9963ae45ba7..bb2c81d298f 100644 --- a/product_customerinfo/__manifest__.py +++ b/product_customerinfo/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Product Supplierinfo for Customers", "summary": "Allows to define prices for customers in the products", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "author": "AvanzOSC, " "Tecnativa, " "Odoo Community Association (OCA)", @@ -22,4 +22,6 @@ "demo": [ "demo/product_demo.xml", ], + 'installable': True, + 'auto_install': False } diff --git a/product_customerinfo/models/product_product.py b/product_customerinfo/models/product_product.py index b83d73d2f10..b317cc073d7 100644 --- a/product_customerinfo/models/product_product.py +++ b/product_customerinfo/models/product_product.py @@ -2,6 +2,8 @@ # Copyright 2015 AvanzOSC # Copyright 2015 Tecnativa # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +import datetime + from odoo import api, models @@ -44,8 +46,10 @@ def price_compute( 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) + date = self.env.context.get('date', + datetime.datetime.now()) + prices[product.id] = product.currency_id._convert( + prices[product.id], currency, company, date) return prices return super(ProductProduct, self).price_compute( price_type, uom, currency, company) diff --git a/product_customerinfo/models/product_supplierinfo.py b/product_customerinfo/models/product_supplierinfo.py index 4de9ded02ea..7d313fffbf3 100644 --- a/product_customerinfo/models/product_supplierinfo.py +++ b/product_customerinfo/models/product_supplierinfo.py @@ -11,12 +11,13 @@ class ProductSupplierinfo(models.Model): supplierinfo_type = fields.Selection( selection=[ ('customer', 'Customer'), - ('supplier', 'Supplier'), - ], string='Type', oldname='type', + ('supplier', 'Supplier')], + string='Type', + oldname='type', default='supplier') @api.onchange('supplierinfo_type') - def onchange_type(self): + def _onchange_type(self): if self.supplierinfo_type == 'supplier': return {'domain': {'name': [('supplier', '=', True)]}} elif self.supplierinfo_type == 'customer': @@ -24,12 +25,14 @@ def onchange_type(self): return {'domain': {'name': []}} @api.model - def search(self, args, offset=0, limit=None, order=None, count=False): + def _search(self, args, offset=0, limit=None, order=None, count=False, + access_rights_uid=None): """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) + return super(ProductSupplierinfo, self)._search( + args, offset=offset, limit=limit, order=order, count=count, + access_rights_uid=access_rights_uid) diff --git a/product_customerinfo/models/product_template.py b/product_customerinfo/models/product_template.py index b7107135bcc..df34051e69f 100644 --- a/product_customerinfo/models/product_template.py +++ b/product_customerinfo/models/product_template.py @@ -10,14 +10,25 @@ 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')]) + 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')]) + comodel_name='product.supplierinfo', + inverse_name='product_tmpl_id', + string='Vairant Customer', + domain=[('supplierinfo_type', '=', 'customer')]) + supplier_ids = fields.One2many( - comodel_name='product.supplierinfo', inverse_name='product_tmpl_id', - string='Supplier', domain=[('supplierinfo_type', '=', 'supplier')]) + 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')]) + comodel_name='product.supplierinfo', + inverse_name='product_tmpl_id', + string='Variant Supplier', + domain=[('supplierinfo_type', '=', 'supplier')]) diff --git a/product_customerinfo/readme/ROADMAP.rst b/product_customerinfo/readme/ROADMAP.rst index 6618df1c689..1a0e593d35a 100644 --- a/product_customerinfo/readme/ROADMAP.rst +++ b/product_customerinfo/readme/ROADMAP.rst @@ -1,3 +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. \ No newline at end of file +* The minimum quantity will neither apply on sale orders. diff --git a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py index e716cca0d1b..b8a767ec44c 100644 --- a/product_customerinfo/tests/test_product_supplierinfo_for_customer.py +++ b/product_customerinfo/tests/test_product_supplierinfo_for_customer.py @@ -31,7 +31,7 @@ def setUpClass(cls): 'pricelist_id': cls.pricelist.id, 'compute_price': 'fixed', 'fixed_price': 100.0, - 'product_tmpl_id': cls.product.id, + 'product_id': cls.product.id, }) @classmethod @@ -64,12 +64,12 @@ def test_default_get(self): def test_onchange_type(self): sup_info = self._create_supplierinfo( 'supplier', self.customer, self.product) - res = sup_info.onchange_type() + 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() + res = sup_info._onchange_type() domain = res.get('domain', False) name_dom = domain.get('name', False) self.assertEqual(name_dom, [('customer', '=', True)]) @@ -84,12 +84,11 @@ def test_product_supplierinfo_for_customer(self): 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), + price, rule_id = self.pricelist.get_product_price_rule( + self.product, 1, partner=self.customer) + self.assertEqual( + rule_id, self.pricelist_item.id, "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") diff --git a/product_customerinfo/views/product_view.xml b/product_customerinfo/views/product_view.xml index 0ef703471f0..d515c1da571 100644 --- a/product_customerinfo/views/product_view.xml +++ b/product_customerinfo/views/product_view.xml @@ -9,7 +9,7 @@ product.supplierinfo.form.view product.supplierinfo - + @@ -40,7 +40,7 @@
- - product.supplierinfo.customer.tree.view - product.supplierinfo - + + product.customerinfo.tree.view + product.customerinfo @@ -78,60 +64,6 @@ - - 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 @@ -142,30 +74,21 @@
- - {'default_supplierinfo_type': 'supplier', 'visible_product_tmpl_id': False} - [('supplierinfo_type','=','supplier')] - - From 7cbf77b2118ccab09460bbd16e5d3a1b997107d4 Mon Sep 17 00:00:00 2001 From: mreficent Date: Tue, 15 Oct 2019 14:21:11 +0200 Subject: [PATCH 32/88] [ADD] Migration scripts --- .../product_supplierinfo_for_customer.pot | 245 +++++++++++++++--- .../migrations/12.0.1.0.0/pre-migration.py | 62 +++++ .../static/description/index.html | 2 +- 3 files changed, 276 insertions(+), 33 deletions(-) create mode 100644 product_customerinfo/migrations/12.0.1.0.0/pre-migration.py diff --git a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot index 21178568a56..3ea62cf1f56 100644 --- a/product_customerinfo/i18n/product_supplierinfo_for_customer.pot +++ b/product_customerinfo/i18n/product_supplierinfo_for_customer.pot @@ -13,103 +13,284 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__sequence +msgid "Assigns the priority to the list of product vendor." +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_pricelist_item__base +msgid "Base price for computation.\n" +"Public Price: The base price will be the Sale/public Price.\n" +"Cost Price : The base price will be the cost price.\n" +"Other Pricelist : Computation of the base price based on another Pricelist." +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_pricelist_item__base +msgid "Based on" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__company_id +msgid "Company" +msgstr "" + #. 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 +#: selection:product.pricelist.item,base:0 +msgid "Cost" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__create_uid +msgid "Created by" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__create_date +msgid "Created on" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__currency_id +msgid "Currency" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__name +#: 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_template__customer_ids +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_form_view +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_tree_view 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 +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_form_view +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_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 +#: model:ir.model,name:product_supplierinfo_for_customer.model_product_customerinfo +msgid "Customer Pricelist" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_form_view +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_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 +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_form_view +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_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 +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__name +msgid "Customer of this product" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model_terms: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" +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__delay +msgid "Delivery Lead Time" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__display_name +msgid "Display Name" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__date_end +msgid "End Date" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__date_end +msgid "End date for this vendor price" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__id +msgid "ID" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__product_id +msgid "If not set, the vendor price will apply to all variants of this product." +msgstr "" + +#. module: product_supplierinfo_for_customer +#: code:addons/product_supplierinfo_for_customer/models/product_customerinfo.py:21 +#, python-format +msgid "Import Template for Customer Pricelists" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo____last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__write_uid +msgid "Last Updated by" msgstr "" #. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__delay +msgid "Lead time in days between the confirmation of the purchase order and the receipt of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning." +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__min_qty +msgid "Minimal Quantity" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_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 +#: selection:product.pricelist.item,base:0 +msgid "Other Pricelist" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: selection:product.pricelist.item,base:0 +msgid "Partner Prices on the product form" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__price +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_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 +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_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" +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 +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_form_view +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_tree_view msgid "Product" msgstr "" #. module: product_supplierinfo_for_customer #: model:ir.model,name:product_supplierinfo_for_customer.model_product_template +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__product_tmpl_id 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" +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__product_id +msgid "Product Variant" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: selection:product.pricelist.item,base:0 +msgid "Public Price" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__sequence +msgid "Sequence" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__date_start +msgid "Start Date" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__date_start +msgid "Start date for this vendor price" msgstr "" #. module: product_supplierinfo_for_customer -#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_supplierinfo_supplierinfo_type -msgid "Type" +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__min_qty +msgid "The minimal quantity to purchase from this vendor, expressed in the vendor Product Unit of Measure if not any, in the default unit of measure of the product otherwise." msgstr "" #. module: product_supplierinfo_for_customer -#: model:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_supplierinfo_customer_form_view +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__price +msgid "The price to purchase a product" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__product_uom +msgid "This comes from the product form." +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__product_code +msgid "This vendor's product code will be used when printing a request for quotation. Keep empty to use the internal one." +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,help:product_supplierinfo_for_customer.field_product_customerinfo__product_name +msgid "This vendor's product name will be used when printing a request for quotation. Keep empty to use the internal one." +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__product_uom +msgid "Unit of Measure" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_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 +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__product_variant_count +msgid "Variant Count" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: 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__variant_customer_ids +msgid "Variant Customer" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__product_code +msgid "Vendor Product Code" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model:ir.model.fields,field_description:product_supplierinfo_for_customer.field_product_customerinfo__product_name +msgid "Vendor Product Name" +msgstr "" + +#. module: product_supplierinfo_for_customer +#: model_terms:ir.ui.view,arch_db:product_supplierinfo_for_customer.product_customerinfo_form_view msgid "to" msgstr "" diff --git a/product_customerinfo/migrations/12.0.1.0.0/pre-migration.py b/product_customerinfo/migrations/12.0.1.0.0/pre-migration.py new file mode 100644 index 00000000000..21d7eaaf6a2 --- /dev/null +++ b/product_customerinfo/migrations/12.0.1.0.0/pre-migration.py @@ -0,0 +1,62 @@ +# Copyright 2019 Eficent +# Copyright 2019 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +def _move_model_in_data(env, ids, old_model, new_model): + renames = [ + ('mail_message', 'model', 'res_id'), + ('mail_followers', 'res_model', 'res_id'), + ('ir_attachment', 'res_model', 'res_id'), + ('mail_activity', 'res_model', 'res_id'), + ('ir_model_data', 'model', 'res_id'), + ] + for rename in renames: + openupgrade.logged_query( + env.cr, """ + UPDATE {A} + SET {B} = '{C}' + WHERE {D} IN {E} AND {F} = '{G}'""".format( + A=rename[0], + B=rename[1], C=new_model, + D=rename[2], E=tuple(ids), F=rename[1], G=old_model, + ), + ) + + +def fill_product_customerinfo(env): + cr = env.cr + openupgrade.logged_query( + cr, """ + CREATE TABLE product_customerinfo + (LIKE product_supplierinfo INCLUDING ALL)""", + ) + openupgrade.logged_query( + cr, """ + INSERT INTO product_customerinfo + SELECT * + FROM product_supplierinfo + WHERE supplierinfo_type = 'customer' + RETURNING id""", + ) + ids = [x[0] for x in cr.fetchall()] + if ids: + _move_model_in_data( + env, ids, 'product.supplierinfo', 'product.customerinfo') + cr.execute("CREATE SEQUENCE IF NOT EXISTS product_customerinfo_id_seq") + cr.execute("SELECT setval('product_customerinfo_id_seq', " + "(SELECT MAX(id) FROM product_customerinfo))") + cr.execute("ALTER TABLE product_customerinfo ALTER id " + "SET DEFAULT NEXTVAL('product_customerinfo_id_seq')") + openupgrade.logged_query( + cr, """ + DELETE + FROM product_supplierinfo + WHERE supplierinfo_type = 'customer'""", + ) + + +@openupgrade.migrate() +def migrate(env, version): + fill_product_customerinfo(env) diff --git a/product_customerinfo/static/description/index.html b/product_customerinfo/static/description/index.html index 4f64f647594..e1d68fab3f1 100644 --- a/product_customerinfo/static/description/index.html +++ b/product_customerinfo/static/description/index.html @@ -3,7 +3,7 @@ - + Product Supplierinfo for Customers -
-

Product Supplierinfo for Customers

+
+ + +Odoo Community Association + +
+

Product Supplierinfo for Customers

-

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

+

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

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

@@ -389,14 +394,14 @@

Product Supplierinfo for Customers

-

Configuration

+

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

+

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.

@@ -404,7 +409,7 @@

Usage

from the supplierinfo at the product form.

-

Known issues / Roadmap

+

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.
  • @@ -412,7 +417,7 @@

    Known issues / Roadmap

-

Bug Tracker

+

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 @@ -420,16 +425,16 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • AvanzOSC
  • Tecnativa
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -462,5 +467,6 @@

Maintainers

+
From 7dffa44372a8e215410a0cbad78b40451449b22f Mon Sep 17 00:00:00 2001 From: bosd Date: Mon, 13 Oct 2025 19:14:05 +0200 Subject: [PATCH 84/88] [IMP] product_customerinfo: Change terms to customer Help texts incorrectly mentioned "vendor" instead of "customer" for fields: - customer_product_name - customer_product_code - quantity (min_qty) - price - validity (date_start/date_end) Popup windows when adding customer info lines showed generic titles like "Create Customer" instead of clearer titles like "Create Customer Info". When creating customer info from a specific product variant, the product variant field was not pre-populated. --- product_customerinfo/README.rst | 18 +++-- product_customerinfo/__manifest__.py | 2 +- product_customerinfo/i18n/ca.po | 57 +++++++++------- product_customerinfo/i18n/de.po | 32 +++++---- product_customerinfo/i18n/es.po | 66 ++++++++++++------- product_customerinfo/i18n/fr.po | 66 ++++++++++++------- product_customerinfo/i18n/it.po | 66 ++++++++++++------- product_customerinfo/i18n/nl.po | 30 ++++----- product_customerinfo/i18n/nl_NL.po | 66 ++++++++++++------- .../i18n/product_customerinfo.pot | 30 ++++----- product_customerinfo/i18n/pt_BR.po | 66 ++++++++++++------- product_customerinfo/i18n/sl.po | 32 +++++---- .../models/product_customerinfo.py | 10 +++ product_customerinfo/readme/DESCRIPTION.md | 11 +++- .../static/description/index.html | 16 +++-- product_customerinfo/views/product_views.xml | 6 +- 16 files changed, 352 insertions(+), 222 deletions(-) diff --git a/product_customerinfo/README.rst b/product_customerinfo/README.rst index a8244fff942..d5635db8fcb 100644 --- a/product_customerinfo/README.rst +++ b/product_customerinfo/README.rst @@ -11,7 +11,7 @@ Product Supplierinfo for Customers !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:7a01a3bac8aef2bd72c38ed73074413a5c54966d5dc2396b209408aac97cffa9 + !! source digest: sha256:aad262a0eaa80bca01b2f21e35b9ce969972ba624af80d62ac787e0a45e75525 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png @@ -32,9 +32,19 @@ Product Supplierinfo for Customers |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows to use supplier info structure, available in -*Purchase* tab of the product form, also for defining customer -information, allowing to define prices per customer and product. +This module allows you to define a customer-specific product data +structure (patterned after the standard supplier/vendor info) on the +product form. + +This structure enables defining customized information for each customer +and product, including: + +:: + + - Custom Price (Price-list price) + - Customer Product Name + - Customer Product Code + - Minimum Order Quantity (MOQ) **Table of contents** diff --git a/product_customerinfo/__manifest__.py b/product_customerinfo/__manifest__.py index 464f06dec03..1b069e6fa5e 100644 --- a/product_customerinfo/__manifest__.py +++ b/product_customerinfo/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Product Supplierinfo for Customers", "summary": "Allows to define prices for customers in the products", - "version": "18.0.1.1.1", + "version": "18.0.1.2.0", "development_status": "Production/Stable", "author": "AvanzOSC, Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/product-attribute", diff --git a/product_customerinfo/i18n/ca.po b/product_customerinfo/i18n/ca.po index f240915a5a8..503e65fa063 100644 --- a/product_customerinfo/i18n/ca.po +++ b/product_customerinfo/i18n/ca.po @@ -109,18 +109,16 @@ msgstr "Nom del producte del client" msgid "Customer of this product" msgstr "Client d’aquest producte" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clients" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -148,8 +146,8 @@ msgstr "Data final" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Data de finalització d’aquest preu de venda" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -222,6 +220,11 @@ msgstr "Preu" msgid "Price List" msgstr "Llista de preu" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -268,29 +271,21 @@ msgstr "Data d'inici" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Data d'inici d'aquest preu de venda" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Llista de preus del proveïdor" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "El preu per comprar un producte" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"La quantitat que s'ha de comprar a aquest proveïdor per beneficiar-se del " -"preu, expressada en la unitat de mesura del producte del proveïdor, si no, a " -"la unitat de mesura per defecte del producte." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -336,6 +331,24 @@ msgstr "Client variant" msgid "to" msgstr "a" +#~ msgid "End date for this vendor price" +#~ msgstr "Data de finalització d’aquest preu de venda" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Data d'inici d'aquest preu de venda" + +#~ msgid "The price to purchase a product" +#~ msgstr "El preu per comprar un producte" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "La quantitat que s'ha de comprar a aquest proveïdor per beneficiar-se del " +#~ "preu, expressada en la unitat de mesura del producte del proveïdor, si " +#~ "no, a la unitat de mesura per defecte del producte." + #~ msgid "Customer Information" #~ msgstr "Informació de client" diff --git a/product_customerinfo/i18n/de.po b/product_customerinfo/i18n/de.po index 720ca4411c6..de2653a091c 100644 --- a/product_customerinfo/i18n/de.po +++ b/product_customerinfo/i18n/de.po @@ -116,18 +116,16 @@ msgstr "Produktbezeichnung des Partners" msgid "Customer of this product" msgstr "Artikelnummer des Partners" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Kunden" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -155,7 +153,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" +msgid "End date for this customer price" msgstr "" #. module: product_customerinfo @@ -226,6 +224,11 @@ msgstr "Preisliste" msgid "Price List" msgstr "Preisliste" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item #, fuzzy @@ -275,7 +278,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" +msgid "Start date for this customer price" msgstr "" #. module: product_customerinfo @@ -284,17 +287,12 @@ msgstr "" msgid "Supplier Pricelist" msgstr "Preisliste" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" #. module: product_customerinfo diff --git a/product_customerinfo/i18n/es.po b/product_customerinfo/i18n/es.po index aae98ac3beb..7855f486a97 100644 --- a/product_customerinfo/i18n/es.po +++ b/product_customerinfo/i18n/es.po @@ -112,20 +112,16 @@ msgstr "Nombre Producto Cliente" msgid "Customer of this product" msgstr "Cliente de este producto" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clientes" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Unidad de medida por defecto utilizada para los pedidos de compra. Debe " -"pertenecer a la misma categoría que la unidad de medida por defecto." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -153,8 +149,8 @@ msgstr "Fecha final" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Fecha final para este precio de proveedor" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -227,6 +223,11 @@ msgstr "Precio" msgid "Price List" msgstr "Tarifa" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -273,29 +274,21 @@ msgstr "Fecha inicial" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Fecha inicial para este precio de proveedor" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Tarifa de proveedor" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "El precio al que se compra un producto" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"Cantidad mínima a comprar de este proveedor, expresada en la unidad de " -"producto del proveedor si existe o, en otro caso, en la unidad de medida por " -"defecto del producto." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -341,6 +334,31 @@ msgstr "Variante de cliente" msgid "to" msgstr "para" +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Unidad de medida por defecto utilizada para los pedidos de compra. Debe " +#~ "pertenecer a la misma categoría que la unidad de medida por defecto." + +#~ msgid "End date for this vendor price" +#~ msgstr "Fecha final para este precio de proveedor" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Fecha inicial para este precio de proveedor" + +#~ msgid "The price to purchase a product" +#~ msgstr "El precio al que se compra un producto" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "Cantidad mínima a comprar de este proveedor, expresada en la unidad de " +#~ "producto del proveedor si existe o, en otro caso, en la unidad de medida " +#~ "por defecto del producto." + #~ msgid "Customer Information" #~ msgstr "Información de Cliente" diff --git a/product_customerinfo/i18n/fr.po b/product_customerinfo/i18n/fr.po index 2986d2b7540..4a49f527ba8 100644 --- a/product_customerinfo/i18n/fr.po +++ b/product_customerinfo/i18n/fr.po @@ -113,20 +113,16 @@ msgstr "Nom du produit client" msgid "Customer of this product" msgstr "Client de ce produit" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clients" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Unité de mesure par défaut utilisée pour les commandes. Elle doit appartenir " -"à la même catégorie que l'unité de mesure par défaut." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -154,8 +150,8 @@ msgstr "Date de fin" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Date de fin pour ce prix fournisseur" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -229,6 +225,11 @@ msgstr "Prix" msgid "Price List" msgstr "Liste de prix" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -275,29 +276,21 @@ msgstr "Date de début" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Date de début pour ce prix fournisseur" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Liste de prix fournisseur" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "Le prix d'achat d'un produit" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"La quantité à acheter à ce vendeur pour bénéficier du prix, exprimée dans " -"l'unité de mesure du produit du vendeur s'il n'y en a pas, dans l'unité de " -"mesure par défaut du produit dans le cas contraire." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -343,6 +336,31 @@ msgstr "Variante Client" msgid "to" msgstr "à" +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Unité de mesure par défaut utilisée pour les commandes. Elle doit " +#~ "appartenir à la même catégorie que l'unité de mesure par défaut." + +#~ msgid "End date for this vendor price" +#~ msgstr "Date de fin pour ce prix fournisseur" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Date de début pour ce prix fournisseur" + +#~ msgid "The price to purchase a product" +#~ msgstr "Le prix d'achat d'un produit" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "La quantité à acheter à ce vendeur pour bénéficier du prix, exprimée dans " +#~ "l'unité de mesure du produit du vendeur s'il n'y en a pas, dans l'unité " +#~ "de mesure par défaut du produit dans le cas contraire." + #~ msgid "Customer Information" #~ msgstr "Informations du client" diff --git a/product_customerinfo/i18n/it.po b/product_customerinfo/i18n/it.po index 47dcaf4c6ca..bc2e9797e35 100644 --- a/product_customerinfo/i18n/it.po +++ b/product_customerinfo/i18n/it.po @@ -114,20 +114,16 @@ msgstr "Nome prodotto cliente" msgid "Customer of this product" msgstr "Cliente di questo prodotto" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clienti" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Unità di misura predefinita utilizzata per ordini di acquisto. Deve essere " -"della stessa categoria dell'unità di misura predefinita." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -155,8 +151,8 @@ msgstr "Data fine" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Data di fine per questo prezzo fornitore" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -229,6 +225,11 @@ msgstr "Prezzo" msgid "Price List" msgstr "Listino prezzi" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -275,29 +276,21 @@ msgstr "Data inizio" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Data di inizio per il prezzo di questo fornitore" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Listino prezzi fornitore" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "Prezzo di acquisto di un prodotto" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"La quantità da acquistare da questo fornitore per beneficiare del prezzo, " -"espresso nell'unità di misura del prodotto del fornitore se non presente, " -"altrimenti nell'unità di misura del prodotto." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -343,6 +336,31 @@ msgstr "Variante cliente" msgid "to" msgstr "a" +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Unità di misura predefinita utilizzata per ordini di acquisto. Deve " +#~ "essere della stessa categoria dell'unità di misura predefinita." + +#~ msgid "End date for this vendor price" +#~ msgstr "Data di fine per questo prezzo fornitore" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Data di inizio per il prezzo di questo fornitore" + +#~ msgid "The price to purchase a product" +#~ msgstr "Prezzo di acquisto di un prodotto" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "La quantità da acquistare da questo fornitore per beneficiare del prezzo, " +#~ "espresso nell'unità di misura del prodotto del fornitore se non presente, " +#~ "altrimenti nell'unità di misura del prodotto." + #~ msgid "Customer Information" #~ msgstr "Informazioni cliente" diff --git a/product_customerinfo/i18n/nl.po b/product_customerinfo/i18n/nl.po index dd4c0f89cc3..6df2fc23e15 100644 --- a/product_customerinfo/i18n/nl.po +++ b/product_customerinfo/i18n/nl.po @@ -108,15 +108,13 @@ msgid "Customer of this product" msgstr "" #. module: product_customerinfo -#: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view -msgid "Customers" +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." msgstr "" #. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." +#: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view +msgid "Customers" msgstr "" #. module: product_customerinfo @@ -146,7 +144,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" +msgid "End date for this customer price" msgstr "" #. module: product_customerinfo @@ -215,6 +213,11 @@ msgstr "" msgid "Price List" msgstr "" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -261,7 +264,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" +msgid "Start date for this customer price" msgstr "" #. module: product_customerinfo @@ -269,17 +272,12 @@ msgstr "" msgid "Supplier Pricelist" msgstr "" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" #. module: product_customerinfo diff --git a/product_customerinfo/i18n/nl_NL.po b/product_customerinfo/i18n/nl_NL.po index 6a2c8dd0b21..8e03e3b5dac 100644 --- a/product_customerinfo/i18n/nl_NL.po +++ b/product_customerinfo/i18n/nl_NL.po @@ -114,20 +114,16 @@ msgstr "Naam van het product van de klant" msgid "Customer of this product" msgstr "Klant van dit product" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Klanten" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Standaard meeteenheid die gebruikt wordt voor aankooporders. Deze moet in " -"dezelfde categorie vallen als de standaard meeteenheid." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -155,8 +151,8 @@ msgstr "Einddatum" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Einddatum voor deze leveranciersprijs" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -229,6 +225,11 @@ msgstr "Prijs" msgid "Price List" msgstr "Prijslijst" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -275,29 +276,21 @@ msgstr "Startdatum" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Startdatum voor deze leveranciersprijs" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Leveranciersprijslijst" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "De prijs om een product aan te schaffen" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"De hoeveelheid om van deze leverancier te kopen om van de prijs te " -"profiteren, uitgedrukt in de meeteenheid van het product van de leverancier, " -"of anders in de standaard meeteenheid van het product." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -342,3 +335,28 @@ msgstr "Variant Klant" #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_form_view msgid "to" msgstr "tot" + +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Standaard meeteenheid die gebruikt wordt voor aankooporders. Deze moet in " +#~ "dezelfde categorie vallen als de standaard meeteenheid." + +#~ msgid "End date for this vendor price" +#~ msgstr "Einddatum voor deze leveranciersprijs" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Startdatum voor deze leveranciersprijs" + +#~ msgid "The price to purchase a product" +#~ msgstr "De prijs om een product aan te schaffen" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "De hoeveelheid om van deze leverancier te kopen om van de prijs te " +#~ "profiteren, uitgedrukt in de meeteenheid van het product van de " +#~ "leverancier, of anders in de standaard meeteenheid van het product." diff --git a/product_customerinfo/i18n/product_customerinfo.pot b/product_customerinfo/i18n/product_customerinfo.pot index 90bdf911f33..a2c975e15af 100644 --- a/product_customerinfo/i18n/product_customerinfo.pot +++ b/product_customerinfo/i18n/product_customerinfo.pot @@ -107,15 +107,13 @@ msgid "Customer of this product" msgstr "" #. module: product_customerinfo -#: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view -msgid "Customers" +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." msgstr "" #. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." +#: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view +msgid "Customers" msgstr "" #. module: product_customerinfo @@ -145,7 +143,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" +msgid "End date for this customer price" msgstr "" #. module: product_customerinfo @@ -214,6 +212,11 @@ msgstr "" msgid "Price List" msgstr "" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -260,7 +263,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" +msgid "Start date for this customer price" msgstr "" #. module: product_customerinfo @@ -268,17 +271,12 @@ msgstr "" msgid "Supplier Pricelist" msgstr "" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise" +" in the default Product Unit of Measure." msgstr "" #. module: product_customerinfo diff --git a/product_customerinfo/i18n/pt_BR.po b/product_customerinfo/i18n/pt_BR.po index 9d5b5ea6c9a..c3f0b8ec2b2 100644 --- a/product_customerinfo/i18n/pt_BR.po +++ b/product_customerinfo/i18n/pt_BR.po @@ -109,20 +109,16 @@ msgstr "Nome Produto no Cliente" msgid "Customer of this product" msgstr "Cliente deste Produto" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Clientes" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" -"Unidade de medida padrão usada para ordens de compra. Ele deve estar na " -"mesma categoria que a unidade de medida padrão." - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -150,8 +146,8 @@ msgstr "Data Final" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" -msgstr "Data final para preço do fornecedor" +msgid "End date for this customer price" +msgstr "" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -224,6 +220,11 @@ msgstr "Preço" msgid "Price List" msgstr "Lista de Preços" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item msgid "Pricelist Rule" @@ -270,29 +271,21 @@ msgstr "Data Inicio" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" -msgstr "Data de início para este preço de fornecedor" +msgid "Start date for this customer price" +msgstr "" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo msgid "Supplier Pricelist" msgstr "Lista Preço Fornecedor" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "O preço para comprar um produto" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" -"A quantidade a comprar deste fornecedor para se beneficiar do preço, " -"expressa na unidade de medida do produto do fornecedor, se não houver, na " -"unidade de medida padrão do produto, caso contrário." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code @@ -338,6 +331,31 @@ msgstr "Variação Cliente" msgid "to" msgstr "para" +#~ msgid "" +#~ "Default unit of measure used for purchase orders. It must be in the same " +#~ "category as the default unit of measure." +#~ msgstr "" +#~ "Unidade de medida padrão usada para ordens de compra. Ele deve estar na " +#~ "mesma categoria que a unidade de medida padrão." + +#~ msgid "End date for this vendor price" +#~ msgstr "Data final para preço do fornecedor" + +#~ msgid "Start date for this vendor price" +#~ msgstr "Data de início para este preço de fornecedor" + +#~ msgid "The price to purchase a product" +#~ msgstr "O preço para comprar um produto" + +#~ msgid "" +#~ "The quantity to purchase from this vendor to benefit from the price, " +#~ "expressed in the vendor Product Unit of Measure if not any, in the " +#~ "default unit of measure of the product otherwise." +#~ msgstr "" +#~ "A quantidade a comprar deste fornecedor para se beneficiar do preço, " +#~ "expressa na unidade de medida do produto do fornecedor, se não houver, na " +#~ "unidade de medida padrão do produto, caso contrário." + #~ msgid "Customer Information" #~ msgstr "Informação do Cliente" diff --git a/product_customerinfo/i18n/sl.po b/product_customerinfo/i18n/sl.po index 1a5a2b46d0d..35198727e6b 100644 --- a/product_customerinfo/i18n/sl.po +++ b/product_customerinfo/i18n/sl.po @@ -117,18 +117,16 @@ msgstr "Partnerjev naziv proizvoda" msgid "Customer of this product" msgstr "Partnerjeva koda proizvoda" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom +msgid "Customer specific unit of measure." +msgstr "" + #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view msgid "Customers" msgstr "Kupci" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom -msgid "" -"Default unit of measure used for purchase orders. It must be in the same " -"category as the default unit of measure." -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,field_description:product_customerinfo.field_product_customerinfo__delay msgid "Delivery Lead Time" @@ -156,7 +154,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end -msgid "End date for this vendor price" +msgid "End date for this customer price" msgstr "" #. module: product_customerinfo @@ -227,6 +225,11 @@ msgstr "Cenik" msgid "Price List" msgstr "Cenik" +#. module: product_customerinfo +#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price +msgid "Price at which the product is sold to this customer." +msgstr "" + #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item #, fuzzy @@ -276,7 +279,7 @@ msgstr "" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start -msgid "Start date for this vendor price" +msgid "Start date for this customer price" msgstr "" #. module: product_customerinfo @@ -285,17 +288,12 @@ msgstr "" msgid "Supplier Pricelist" msgstr "Cenik" -#. module: product_customerinfo -#: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price -msgid "The price to purchase a product" -msgstr "" - #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__min_qty msgid "" -"The quantity to purchase from this vendor to benefit from the price, " -"expressed in the vendor Product Unit of Measure if not any, in the default " -"unit of measure of the product otherwise." +"The minimum quantity to purchase for this customer to benefit from the " +"price. Expressed in the customer's Product Unit of Measure if set, otherwise " +"in the default Product Unit of Measure." msgstr "" #. module: product_customerinfo diff --git a/product_customerinfo/models/product_customerinfo.py b/product_customerinfo/models/product_customerinfo.py index da3df9f98d5..10dc93076e1 100644 --- a/product_customerinfo/models/product_customerinfo.py +++ b/product_customerinfo/models/product_customerinfo.py @@ -12,6 +12,16 @@ class ProductCustomerInfo(models.Model): partner_id = fields.Many2one(string="Customer", help="Customer of this product") product_name = fields.Char(string="Customer Product Name") product_code = fields.Char(string="Customer Product Code") + # Override fields with corrected help texts + min_qty = fields.Float( + help="The minimum quantity to purchase for this customer to benefit from the " + "price. Expressed in the customer's Product Unit of Measure if set, " + "otherwise in the default Product Unit of Measure." + ) + price = fields.Float(help="Price at which the product is sold to this customer.") + date_start = fields.Date(help="Start date for this customer price") + date_end = fields.Date(help="End date for this customer price") + product_uom = fields.Many2one(help="Customer specific unit of measure.") @api.model def get_import_templates(self): diff --git a/product_customerinfo/readme/DESCRIPTION.md b/product_customerinfo/readme/DESCRIPTION.md index 97cac008ac3..8cc025e20a4 100644 --- a/product_customerinfo/readme/DESCRIPTION.md +++ b/product_customerinfo/readme/DESCRIPTION.md @@ -1,3 +1,8 @@ -This module allows to use supplier info structure, available in -*Purchase* tab of the product form, also for defining customer -information, allowing to define prices per customer and product. +This module allows you to define a customer-specific product data structure (patterned after the standard supplier/vendor info) on the product form. + +This structure enables defining customized information for each customer and product, including: + + - Custom Price (Price-list price) + - Customer Product Name + - Customer Product Code + - Minimum Order Quantity (MOQ) diff --git a/product_customerinfo/static/description/index.html b/product_customerinfo/static/description/index.html index 6564e77d23f..02a13030adc 100644 --- a/product_customerinfo/static/description/index.html +++ b/product_customerinfo/static/description/index.html @@ -372,12 +372,20 @@

Product Supplierinfo for Customers

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:7a01a3bac8aef2bd72c38ed73074413a5c54966d5dc2396b209408aac97cffa9 +!! source digest: sha256:aad262a0eaa80bca01b2f21e35b9ce969972ba624af80d62ac787e0a45e75525 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

-

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

+

This module allows you to define a customer-specific product data +structure (patterned after the standard supplier/vendor info) on the +product form.

+

This structure enables defining customized information for each customer +and product, including:

+
+- Custom Price (Price-list price)
+- Customer Product Name
+- Customer Product Code
+- Minimum Order Quantity (MOQ)
+

Table of contents

    diff --git a/product_customerinfo/views/product_views.xml b/product_customerinfo/views/product_views.xml index eae4ccfb464..63d74fe145a 100644 --- a/product_customerinfo/views/product_views.xml +++ b/product_customerinfo/views/product_views.xml @@ -115,6 +115,7 @@ context="{ 'default_product_tmpl_id': context.get('product_tmpl_id',id), 'product_template_invisible_variant': True, + 'form_view_ref': 'product_customerinfo.product_customerinfo_form_view' }" invisible="product_variant_count > 1" readonly="product_variant_count > 1" @@ -124,6 +125,7 @@ nolabel="1" context="{ 'default_product_tmpl_id': context.get('product_tmpl_id',id), + 'form_view_ref': 'product_customerinfo.product_customerinfo_form_view' }" invisible="product_variant_count <= 1" readonly="product_variant_count <= 1" @@ -139,12 +141,12 @@ {'default_product_tmpl_id': product_tmpl_id, 'product_template_invisible_variant': True} + >{'default_product_tmpl_id': product_tmpl_id, 'product_template_invisible_variant': True, 'form_view_ref': 'product_customerinfo.product_customerinfo_form_view'} {'default_product_tmpl_id': product_tmpl_id} + >{'default_product_tmpl_id': product_tmpl_id, 'default_product_id': id, 'form_view_ref': 'product_customerinfo.product_customerinfo_form_view'} From 01bbe1afe0637dfcf30ac2040e3890662e7f9e25 Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 30 Oct 2025 08:45:42 +0000 Subject: [PATCH 85/88] Translated using Weblate (Italian) Currently translated at 100.0% (55 of 55 strings) Translation: product-attribute-18.0/product-attribute-18.0-product_customerinfo Translate-URL: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_customerinfo/it/ --- product_customerinfo/i18n/it.po | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/product_customerinfo/i18n/it.po b/product_customerinfo/i18n/it.po index bc2e9797e35..9914637b367 100644 --- a/product_customerinfo/i18n/it.po +++ b/product_customerinfo/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2024-08-30 14:06+0000\n" +"PO-Revision-Date: 2025-10-30 11:42+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6.2\n" +"X-Generator: Weblate 5.10.4\n" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -117,7 +117,7 @@ msgstr "Cliente di questo prodotto" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_uom msgid "Customer specific unit of measure." -msgstr "" +msgstr "Unità di misura specifica per utente." #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_template_form_view @@ -152,7 +152,7 @@ msgstr "Data fine" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_end msgid "End date for this customer price" -msgstr "" +msgstr "Data fine per questo prezzo cliente" #. module: product_customerinfo #: model_terms:ir.ui.view,arch_db:product_customerinfo.product_customerinfo_search_view @@ -228,7 +228,7 @@ msgstr "Listino prezzi" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__price msgid "Price at which the product is sold to this customer." -msgstr "" +msgstr "Prezzo a cui questo prodotto è venduto a questo cliente." #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_pricelist_item @@ -277,7 +277,7 @@ msgstr "Data inizio" #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__date_start msgid "Start date for this customer price" -msgstr "" +msgstr "Data inizio per questo prezzo cliente" #. module: product_customerinfo #: model:ir.model,name:product_customerinfo.model_product_supplierinfo @@ -291,6 +291,9 @@ msgid "" "price. Expressed in the customer's Product Unit of Measure if set, otherwise " "in the default Product Unit of Measure." msgstr "" +"Quantità minima da acquistare affinché questo cliente possa beneficiare del " +"prezzo. Espressa nell'unità di misura del prodotto del cliente, se " +"impostata, altrimenti nell'unità di misura del prodotto predefinita." #. module: product_customerinfo #: model:ir.model.fields,help:product_customerinfo.field_product_customerinfo__product_code From ebcb985245e8a543edea5b07430f0db3bf3c74a1 Mon Sep 17 00:00:00 2001 From: JordiMForgeFlow Date: Wed, 29 Oct 2025 10:43:28 +0100 Subject: [PATCH 86/88] [IMP] product_customerinfo: allow using discount --- .../models/product_pricelist.py | 21 +++++++++++++++ .../models/product_product.py | 9 ++++--- .../tests/test_product_customerinfo.py | 26 +++++++++++++++++++ product_customerinfo/views/product_views.xml | 2 ++ 4 files changed, 55 insertions(+), 3 deletions(-) diff --git a/product_customerinfo/models/product_pricelist.py b/product_customerinfo/models/product_pricelist.py index fe733ef34d0..f0b0369b7f2 100644 --- a/product_customerinfo/models/product_pricelist.py +++ b/product_customerinfo/models/product_pricelist.py @@ -12,3 +12,24 @@ class ProductPricelistItem(models.Model): selection_add=[("partner", "Partner Prices on the product form")], ondelete={"partner": "set default"}, ) + + def _compute_price(self, product, quantity, uom, date, currency=None): + return super()._compute_price( + product.with_context(include_customerinfo_discount=True), + quantity, + uom, + date, + currency, + ) + + def _show_discount(self): + # Show discount when pricelist item is based on customerinfo price + res = super()._show_discount() + if ( + self + and self._is_discount_feature_enabled() + and self.compute_price == "formula" + and self.base == "partner" + ): + return True + return res diff --git a/product_customerinfo/models/product_product.py b/product_customerinfo/models/product_product.py index b028a316bd2..0026b076ac0 100644 --- a/product_customerinfo/models/product_product.py +++ b/product_customerinfo/models/product_product.py @@ -43,9 +43,12 @@ def _get_price_from_customerinfo(self, partner_id): return 0.0 partner = self.env["res.partner"].browse(partner_id) customerinfo = self._select_customerinfo(partner=partner) - if customerinfo: - return customerinfo.price - return 0.0 + if not customerinfo: + return 0.0 + price = customerinfo.price + if self._context.get("include_customerinfo_discount") and price: + price = price - (price * (customerinfo.discount / 100)) + return price def _price_compute( self, price_type, uom=False, currency=False, company=None, date=False diff --git a/product_customerinfo/tests/test_product_customerinfo.py b/product_customerinfo/tests/test_product_customerinfo.py index 04b6e2def6c..8fd71038390 100644 --- a/product_customerinfo/tests/test_product_customerinfo.py +++ b/product_customerinfo/tests/test_product_customerinfo.py @@ -4,6 +4,8 @@ # Copyright 2018 ForgeFlow # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields + from odoo.addons.base.tests.common import BaseCommon @@ -100,6 +102,30 @@ def test_product_supplierinfo_price(self): res[self.product.id], 750.0, "Error: price does not match list price" ) + def test_product_supplierinfo_discount(self): + self.customerinfo.write({"discount": 10.0}) + self.pricelist_item.write({"base": "partner", "compute_price": "formula"}) + price = self.pricelist_item._compute_price( + self.product.with_context(partner_id=self.customer.id), + 1, + self.product.uom_id, + fields.Datetime.now(), + self.company.currency_id, + ) + base_price = self.pricelist_item._compute_base_price( + self.product.with_context(partner_id=self.customer.id), + 1, + self.product.uom_id, + fields.Datetime.now(), + self.company.currency_id, + ) + self.assertEqual( + base_price, 100.0, "Error: Wrong base price for product and customer" + ) + self.assertEqual( + price, 90.0, "Error: Discount not applied for product and customer" + ) + def test_variant_supplierinfo_price(self): """ This test check the price for a customer with a product with variants. diff --git a/product_customerinfo/views/product_views.xml b/product_customerinfo/views/product_views.xml index 63d74fe145a..f79c50269ca 100644 --- a/product_customerinfo/views/product_views.xml +++ b/product_customerinfo/views/product_views.xml @@ -51,6 +51,7 @@ groups="base.group_multi_currency" />
+