From bdcb83da1c2b358a80a7236e9e180104ed0679ef Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Mon, 3 Aug 2015 12:06:55 +0200 Subject: [PATCH 001/210] rename product_dimensions -> product_dimension osv -> orm test computation of volume in same UOM add test with conversion from cm refactor, new API, generic UOM computation fix wording in readme do not use camelcase for Models put dimensions in their own group Otherwise they are shown as weights. fill in placeholders in README README is actually rst, not md use a new-api onchange, update tests, refactor Also, spell "height" correctly. --- product_dimension/README.rst | 46 ++++++++++++++++ product_dimension/__init__.py | 8 +++ product_dimension/__openerp__.py | 25 +++++++++ product_dimension/product.py | 52 +++++++++++++++++++ product_dimension/product_view.xml | 22 ++++++++ product_dimension/tests/__init__.py | 1 + .../tests/test_compute_volume.py | 48 +++++++++++++++++ 7 files changed, 202 insertions(+) create mode 100644 product_dimension/README.rst create mode 100755 product_dimension/__init__.py create mode 100755 product_dimension/__openerp__.py create mode 100755 product_dimension/product.py create mode 100755 product_dimension/product_view.xml create mode 100644 product_dimension/tests/__init__.py create mode 100644 product_dimension/tests/test_compute_volume.py diff --git a/product_dimension/README.rst b/product_dimension/README.rst new file mode 100644 index 00000000000..bddcf345932 --- /dev/null +++ b/product_dimension/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Product Dimension +================= +Add dimensions (length, width and height) to products. Find the volume +automatically when you change one of these dimensions. + +This module was previously hosted on github.com/ingadhoc/odoo-addons and +before that on https://launchpad.net/~ingenieria-adhoc. + +For further information, please visit: + +* https://www.odoo.com/forum/help-1 + +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 +`here `_. + + +Credits +======= + +Contributors +------------ +* Juan Jose Scarafia +* Leonardo Pistone + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/product_dimension/__init__.py b/product_dimension/__init__.py new file mode 100755 index 00000000000..a61a1c37491 --- /dev/null +++ b/product_dimension/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +############################################################################## +# For copyright and license notices, see __openerp__.py file in module root +# directory +############################################################################## + + +from . import product diff --git a/product_dimension/__openerp__.py b/product_dimension/__openerp__.py new file mode 100755 index 00000000000..17170983977 --- /dev/null +++ b/product_dimension/__openerp__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 Camptocamp SA +# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) +# +# 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 Affero 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 . +{ + 'name': 'Product Dimension', + 'version': '2.0', + 'category': 'Product', + 'author': 'ADHOC SA,Camptocamp,Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'depends': ['product'], + 'data': ['product_view.xml'], +} diff --git a/product_dimension/product.py b/product_dimension/product.py new file mode 100755 index 00000000000..c89e57de070 --- /dev/null +++ b/product_dimension/product.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) +# Copyright 2015 Camptocamp SA +# +# 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 Affero 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 . + + +from openerp import models, fields +from openerp import api + + +class Product(models.Model): + _inherit = 'product.product' + + @api.onchange('length', 'height', 'width', 'dimensional_uom_id') + def onchange_calculate_volume(self): + if (not self.length or not self.height or not self.width + or not self.dimensional_uom_id): + return False + + length_m = self.convert_to_meters(self.length, self.dimensional_uom_id) + height_m = self.convert_to_meters(self.height, self.dimensional_uom_id) + width_m = self.convert_to_meters(self.width, self.dimensional_uom_id) + self.volume = length_m * height_m * width_m + + def convert_to_meters(self, measure, dimensional_uom): + uom_meters = self.env['product.uom'].search([('name', '=', 'm')]) + + return self.env['product.uom']._compute_qty_obj( + from_unit=dimensional_uom, + qty=measure, + to_unit=uom_meters) + + length = fields.Float() + height = fields.Float(oldname='high') + width = fields.Float() + dimensional_uom_id = fields.Many2one( + 'product.uom', + 'Dimensional UoM', + domain="[('category_id.name', '=', 'Length / Distance')]", + help='UoM for length, height, width') diff --git a/product_dimension/product_view.xml b/product_dimension/product_view.xml new file mode 100755 index 00000000000..65fc6e5e04f --- /dev/null +++ b/product_dimension/product_view.xml @@ -0,0 +1,22 @@ + + + + + + product_normal_form_view + product.product + + + + + + + + + + + + + + + diff --git a/product_dimension/tests/__init__.py b/product_dimension/tests/__init__.py new file mode 100644 index 00000000000..d06df039ccc --- /dev/null +++ b/product_dimension/tests/__init__.py @@ -0,0 +1 @@ +from . import test_compute_volume diff --git a/product_dimension/tests/test_compute_volume.py b/product_dimension/tests/test_compute_volume.py new file mode 100644 index 00000000000..5bddc254930 --- /dev/null +++ b/product_dimension/tests/test_compute_volume.py @@ -0,0 +1,48 @@ +# Author: Leonardo Pistone +# Copyright 2015 Camptocamp SA +# +# 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 Affero 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 . +from openerp.tests.common import TransactionCase + + +class TestComputeVolume(TransactionCase): + + def test_it_computes_volume_in_cm(self): + self.product.length = 10. + self.product.height = 200. + self.product.width = 100. + self.product.dimensional_uom_id = self.uom_cm + self.product.onchange_calculate_volume() + self.assertAlmostEqual( + 0.2, + self.product.volume + ) + + def test_it_computes_volume_in_meters(self): + self.product.length = 6. + self.product.height = 2. + self.product.width = 10. + self.product.dimensional_uom_id = self.uom_m + self.product.onchange_calculate_volume() + self.assertAlmostEqual( + 120, + self.product.volume + ) + + def setUp(self): + super(TestComputeVolume, self).setUp() + + self.product = self.env['product.product'].new() + self.uom_m = self.env['product.uom'].search([('name', '=', 'm')]) + self.uom_cm = self.env['product.uom'].search([('name', '=', 'cm')]) From 8c9a80a188944620512cd81c3a8e63cd6f179a4d Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Tue, 18 Aug 2015 11:05:43 +0200 Subject: [PATCH 002/210] Add missing default oca icons --- product_dimension/static/description/icon.png | Bin 0 -> 9455 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 product_dimension/static/description/icon.png diff --git a/product_dimension/static/description/icon.png b/product_dimension/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;R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V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From e02315e114f0c631b374c4898d456197ab8b143b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 9 Oct 2015 10:01:56 +0200 Subject: [PATCH 003/210] [UPD] prefix versions with 8.0 --- product_dimension/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_dimension/__openerp__.py b/product_dimension/__openerp__.py index 17170983977..efd39d409b2 100755 --- a/product_dimension/__openerp__.py +++ b/product_dimension/__openerp__.py @@ -16,7 +16,7 @@ # along with this program. If not, see . { 'name': 'Product Dimension', - 'version': '2.0', + 'version': '8.0.2.0.0', 'category': 'Product', 'author': 'ADHOC SA,Camptocamp,Odoo Community Association (OCA)', 'license': 'AGPL-3', From d9c2e08157c4cc3319c6e66c2c319e61fea75626 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 14 Oct 2015 03:31:08 +0200 Subject: [PATCH 004/210] [MIG] Make modules uninstallable --- product_dimension/__openerp__.py | 1 + 1 file changed, 1 insertion(+) mode change 100755 => 100644 product_dimension/__openerp__.py diff --git a/product_dimension/__openerp__.py b/product_dimension/__openerp__.py old mode 100755 new mode 100644 index efd39d409b2..d123bcac1d6 --- a/product_dimension/__openerp__.py +++ b/product_dimension/__openerp__.py @@ -22,4 +22,5 @@ 'license': 'AGPL-3', 'depends': ['product'], 'data': ['product_view.xml'], + 'installable': False, } From 798ca3feadeed68414a4f11d945cd6719d07a3f9 Mon Sep 17 00:00:00 2001 From: Hugo Santos Date: Tue, 5 Jan 2016 17:56:06 +0100 Subject: [PATCH 005/210] [FIX] product_dimension: Now domain on dimensional_uom_id is working also with other languages than english --- product_dimension/product.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/product_dimension/product.py b/product_dimension/product.py index c89e57de070..e666d019079 100755 --- a/product_dimension/product.py +++ b/product_dimension/product.py @@ -42,11 +42,17 @@ def convert_to_meters(self, measure, dimensional_uom): qty=measure, to_unit=uom_meters) + @api.model + def _get_dimension_uom_domain(self): + return [ + ('category_id', '=', self.env.ref('product.uom_categ_length').id) + ] + length = fields.Float() height = fields.Float(oldname='high') width = fields.Float() dimensional_uom_id = fields.Many2one( 'product.uom', 'Dimensional UoM', - domain="[('category_id.name', '=', 'Length / Distance')]", + domain=_get_dimension_uom_domain, help='UoM for length, height, width') From 53b2f18bd67e1617140228946c41eee2f47e831c Mon Sep 17 00:00:00 2001 From: David Beal Date: Wed, 13 Jan 2016 17:08:36 +0100 Subject: [PATCH 006/210] =?UTF-8?q?[FIX]=C2=A0flake=208=20error=20on=20mod?= =?UTF-8?q?ules=20product=5Fdimension,=20product=5Fgtin,=20product=5Fsuppl?= =?UTF-8?q?ierinfo=5Ftree=5Fprice=5Finfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- product_dimension/product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product_dimension/product.py b/product_dimension/product.py index e666d019079..c467467e02c 100755 --- a/product_dimension/product.py +++ b/product_dimension/product.py @@ -25,8 +25,8 @@ class Product(models.Model): @api.onchange('length', 'height', 'width', 'dimensional_uom_id') def onchange_calculate_volume(self): - if (not self.length or not self.height or not self.width - or not self.dimensional_uom_id): + if (not self.length or not self.height or not self.width or + not self.dimensional_uom_id): return False length_m = self.convert_to_meters(self.length, self.dimensional_uom_id) From 2ccb43fd12a0f15a29e0d86ce096a3cdc29007da Mon Sep 17 00:00:00 2001 From: Juan Jose Scarafia Date: Tue, 26 Jan 2016 11:34:59 -0300 Subject: [PATCH 007/210] ADD test case with product template REF remove executable permission ADD missing tag images Conflicts: product_dimension/__openerp__.py --- product_dimension/__init__.py | 0 product_dimension/__openerp__.py | 3 +- product_dimension/product.py | 0 .../tests/test_compute_volume.py | 36 +++++++++++++++++-- 4 files changed, 36 insertions(+), 3 deletions(-) mode change 100755 => 100644 product_dimension/__init__.py mode change 100755 => 100644 product_dimension/product.py diff --git a/product_dimension/__init__.py b/product_dimension/__init__.py old mode 100755 new mode 100644 diff --git a/product_dimension/__openerp__.py b/product_dimension/__openerp__.py index d123bcac1d6..bc349fb19c9 100644 --- a/product_dimension/__openerp__.py +++ b/product_dimension/__openerp__.py @@ -22,5 +22,6 @@ 'license': 'AGPL-3', 'depends': ['product'], 'data': ['product_view.xml'], - 'installable': False, + 'installable': True, + 'images': [], } diff --git a/product_dimension/product.py b/product_dimension/product.py old mode 100755 new mode 100644 diff --git a/product_dimension/tests/test_compute_volume.py b/product_dimension/tests/test_compute_volume.py index 5bddc254930..2d72f721032 100644 --- a/product_dimension/tests/test_compute_volume.py +++ b/product_dimension/tests/test_compute_volume.py @@ -16,7 +16,7 @@ from openerp.tests.common import TransactionCase -class TestComputeVolume(TransactionCase): +class TestComputeVolumeOnProduct(TransactionCase): def test_it_computes_volume_in_cm(self): self.product.length = 10. @@ -41,8 +41,40 @@ def test_it_computes_volume_in_meters(self): ) def setUp(self): - super(TestComputeVolume, self).setUp() + super(TestComputeVolumeOnProduct, self).setUp() self.product = self.env['product.product'].new() self.uom_m = self.env['product.uom'].search([('name', '=', 'm')]) self.uom_cm = self.env['product.uom'].search([('name', '=', 'cm')]) + + +class TestComputeVolumeOnTemplate(TransactionCase): + + def test_it_computes_volume_in_cm(self): + self.template.length = 10. + self.template.height = 200. + self.template.width = 100. + self.template.dimensional_uom_id = self.uom_cm + self.template.onchange_calculate_volume() + self.assertAlmostEqual( + 0.2, + self.template.volume + ) + + def test_it_computes_volume_in_meters(self): + self.template.length = 6. + self.template.height = 2. + self.template.width = 10. + self.template.dimensional_uom_id = self.uom_m + self.template.onchange_calculate_volume() + self.assertAlmostEqual( + 120, + self.template.volume + ) + + def setUp(self): + super(TestComputeVolumeOnTemplate, self).setUp() + + self.template = self.env['product.template'].new() + self.uom_m = self.env['product.uom'].search([('name', '=', 'm')]) + self.uom_cm = self.env['product.uom'].search([('name', '=', 'cm')]) From 2d26bfbfc51d7670840c4b16802c63a8a1bd302d Mon Sep 17 00:00:00 2001 From: Nicolas Mac Rouillon Date: Fri, 11 Sep 2015 10:48:42 -0300 Subject: [PATCH 008/210] [ADD] Dimensions fields in product.template FIX remove oldname in field height ADD onchange calculate volume on product template --- product_dimension/product.py | 32 ++++++++++++++++++++++++++++++ product_dimension/product_view.xml | 17 ++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/product_dimension/product.py b/product_dimension/product.py index c467467e02c..af38e3861d4 100644 --- a/product_dimension/product.py +++ b/product_dimension/product.py @@ -56,3 +56,35 @@ def _get_dimension_uom_domain(self): 'Dimensional UoM', domain=_get_dimension_uom_domain, help='UoM for length, height, width') + + +class Product_template(models.Model): + + _inherit = 'product.template' + + @api.onchange('length', 'height', 'width', 'dimensional_uom_id') + def onchange_calculate_volume(self): + if (not self.length or not self.height or not self.width + or not self.dimensional_uom_id): + return False + + length_m = self.convert_to_meters(self.length, self.dimensional_uom_id) + height_m = self.convert_to_meters(self.height, self.dimensional_uom_id) + width_m = self.convert_to_meters(self.width, self.dimensional_uom_id) + self.volume = length_m * height_m * width_m + + def convert_to_meters(self, measure, dimensional_uom): + uom_meters = self.env['product.uom'].search([('name', '=', 'm')]) + + return self.env['product.uom']._compute_qty_obj( + from_unit=dimensional_uom, + qty=measure, + to_unit=uom_meters) + + length = fields.Float(related='product_variant_ids.length') + height = fields.Float(related='product_variant_ids.height') + width = fields.Float(related='product_variant_ids.width') + dimensional_uom_id = fields.Many2one( + 'product.uom', + 'Dimensional UoM', related='product_variant_ids.dimensional_uom_id', + help='UoM for length, height, width') diff --git a/product_dimension/product_view.xml b/product_dimension/product_view.xml index 65fc6e5e04f..e77476c4753 100755 --- a/product_dimension/product_view.xml +++ b/product_dimension/product_view.xml @@ -18,5 +18,22 @@ + + product_template_form_view + product.template + + + + + + + + + + + + + + From 5a6e569271f8a95b1df45cbf17072eb50acca4bd Mon Sep 17 00:00:00 2001 From: Denis Leemann Date: Thu, 26 May 2016 14:24:42 +0200 Subject: [PATCH 009/210] Module structure, views & license headers [MIG] Make modules uninstallable [MIG] Rename manifest files --- product_dimension/README.rst | 1 + product_dimension/__init__.py | 9 +++---- product_dimension/__manifest__.py | 15 +++++++++++ product_dimension/__openerp__.py | 27 ------------------- product_dimension/models/__init__.py | 5 ++++ product_dimension/{ => models}/product.py | 26 +++++------------- product_dimension/tests/__init__.py | 3 +++ .../{ => views}/product_view.xml | 19 ++++++------- 8 files changed, 42 insertions(+), 63 deletions(-) create mode 100644 product_dimension/__manifest__.py delete mode 100644 product_dimension/__openerp__.py create mode 100644 product_dimension/models/__init__.py rename product_dimension/{ => models}/product.py (73%) rename product_dimension/{ => views}/product_view.xml (81%) diff --git a/product_dimension/README.rst b/product_dimension/README.rst index bddcf345932..1b09ea125a3 100644 --- a/product_dimension/README.rst +++ b/product_dimension/README.rst @@ -29,6 +29,7 @@ Contributors ------------ * Juan Jose Scarafia * Leonardo Pistone +* Denis Leemann Maintainer ---------- diff --git a/product_dimension/__init__.py b/product_dimension/__init__.py index a61a1c37491..04b5297074e 100644 --- a/product_dimension/__init__.py +++ b/product_dimension/__init__.py @@ -1,8 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## -# For copyright and license notices, see __openerp__.py file in module root -# directory -############################################################################## +# © 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from . import product +from . import models diff --git a/product_dimension/__manifest__.py b/product_dimension/__manifest__.py new file mode 100644 index 00000000000..dfc25952cc1 --- /dev/null +++ b/product_dimension/__manifest__.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# © 2015-2016 Camptocamp SA +# © 2015 ADHOC SA (http://www.adhoc.com.ar) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + 'name': 'Product Dimension', + 'version': '9.0.1.0.0', + 'category': 'Product', + 'author': 'ADHOC SA, Camptocamp, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'depends': ['product'], + 'data': ['views/product_view.xml'], + 'installable': False, + 'images': [], +} diff --git a/product_dimension/__openerp__.py b/product_dimension/__openerp__.py deleted file mode 100644 index bc349fb19c9..00000000000 --- a/product_dimension/__openerp__.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2015 Camptocamp SA -# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) -# -# 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 Affero 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 . -{ - 'name': 'Product Dimension', - 'version': '8.0.2.0.0', - 'category': 'Product', - 'author': 'ADHOC SA,Camptocamp,Odoo Community Association (OCA)', - 'license': 'AGPL-3', - 'depends': ['product'], - 'data': ['product_view.xml'], - 'installable': True, - 'images': [], -} diff --git a/product_dimension/models/__init__.py b/product_dimension/models/__init__.py new file mode 100644 index 00000000000..2c167800e1c --- /dev/null +++ b/product_dimension/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2016 Denis Leemann +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import product diff --git a/product_dimension/product.py b/product_dimension/models/product.py similarity index 73% rename from product_dimension/product.py rename to product_dimension/models/product.py index af38e3861d4..829a901a1c6 100644 --- a/product_dimension/product.py +++ b/product_dimension/models/product.py @@ -1,19 +1,7 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) -# Copyright 2015 Camptocamp SA -# -# 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 Affero 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 . +# © 2015 ADHOC SA (http://www.adhoc.com.ar) +# © 2015-2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import models, fields @@ -49,7 +37,7 @@ def _get_dimension_uom_domain(self): ] length = fields.Float() - height = fields.Float(oldname='high') + height = fields.Float() width = fields.Float() dimensional_uom_id = fields.Many2one( 'product.uom', @@ -58,14 +46,14 @@ def _get_dimension_uom_domain(self): help='UoM for length, height, width') -class Product_template(models.Model): +class ProductTemplate(models.Model): _inherit = 'product.template' @api.onchange('length', 'height', 'width', 'dimensional_uom_id') def onchange_calculate_volume(self): - if (not self.length or not self.height or not self.width - or not self.dimensional_uom_id): + if (not self.length or not self.height or not self.width or + not self.dimensional_uom_id): return False length_m = self.convert_to_meters(self.length, self.dimensional_uom_id) diff --git a/product_dimension/tests/__init__.py b/product_dimension/tests/__init__.py index d06df039ccc..3f6e1365dd6 100644 --- a/product_dimension/tests/__init__.py +++ b/product_dimension/tests/__init__.py @@ -1 +1,4 @@ +# -*- coding: utf-8 -*- +# © 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import test_compute_volume diff --git a/product_dimension/product_view.xml b/product_dimension/views/product_view.xml similarity index 81% rename from product_dimension/product_view.xml rename to product_dimension/views/product_view.xml index e77476c4753..790dea5c682 100755 --- a/product_dimension/product_view.xml +++ b/product_dimension/views/product_view.xml @@ -1,20 +1,19 @@ - - + product_normal_form_view product.product - - + + - + @@ -23,17 +22,15 @@ product.template - - + + - + - - - + From 5ee96afda6d8f99ccce530d86d7c6e5ca67a685c Mon Sep 17 00:00:00 2001 From: Kumar Aberer Date: Mon, 12 Mar 2018 12:37:41 +0100 Subject: [PATCH 010/210] [MIG] product_dimension: Migration to 11.0 --- product_dimension/__manifest__.py | 10 ++++++---- product_dimension/models/product.py | 7 ++----- product_dimension/views/product_view.xml | 8 ++++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/product_dimension/__manifest__.py b/product_dimension/__manifest__.py index dfc25952cc1..0ef5327fc00 100644 --- a/product_dimension/__manifest__.py +++ b/product_dimension/__manifest__.py @@ -1,15 +1,17 @@ # -*- coding: utf-8 -*- +# © 2018 brain-tec AG (http://www.braintec-group.com) # © 2015-2016 Camptocamp SA # © 2015 ADHOC SA (http://www.adhoc.com.ar) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Product Dimension', - 'version': '9.0.1.0.0', + 'version': '11.0.1.0.0', 'category': 'Product', - 'author': 'ADHOC SA, Camptocamp, Odoo Community Association (OCA)', + 'author': 'brain-tec AG, ADHOC SA, Camptocamp, ' + 'Odoo Community Association (OCA)', 'license': 'AGPL-3', - 'depends': ['product'], + 'depends': ['product', 'stock'], 'data': ['views/product_view.xml'], - 'installable': False, + 'installable': True, 'images': [], } diff --git a/product_dimension/models/product.py b/product_dimension/models/product.py index 829a901a1c6..e294d924471 100644 --- a/product_dimension/models/product.py +++ b/product_dimension/models/product.py @@ -25,8 +25,7 @@ def onchange_calculate_volume(self): def convert_to_meters(self, measure, dimensional_uom): uom_meters = self.env['product.uom'].search([('name', '=', 'm')]) - return self.env['product.uom']._compute_qty_obj( - from_unit=dimensional_uom, + return dimensional_uom._compute_quantity( qty=measure, to_unit=uom_meters) @@ -47,7 +46,6 @@ def _get_dimension_uom_domain(self): class ProductTemplate(models.Model): - _inherit = 'product.template' @api.onchange('length', 'height', 'width', 'dimensional_uom_id') @@ -64,8 +62,7 @@ def onchange_calculate_volume(self): def convert_to_meters(self, measure, dimensional_uom): uom_meters = self.env['product.uom'].search([('name', '=', 'm')]) - return self.env['product.uom']._compute_qty_obj( - from_unit=dimensional_uom, + return dimensional_uom._compute_quantity( qty=measure, to_unit=uom_meters) diff --git a/product_dimension/views/product_view.xml b/product_dimension/views/product_view.xml index 790dea5c682..acacb792792 100755 --- a/product_dimension/views/product_view.xml +++ b/product_dimension/views/product_view.xml @@ -6,8 +6,8 @@ product.product - - + + @@ -22,8 +22,8 @@ product.template - - + + From b1b49f8b2e27756870f81845a422be0c1a55c63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Todorovich?= Date: Mon, 12 Mar 2018 13:14:47 -0300 Subject: [PATCH 011/210] [9.0][product_dimension][FIX] Fix volume being incorrectly calculated due to rounding issues (#284)2 --- product_dimension/models/product.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/product_dimension/models/product.py b/product_dimension/models/product.py index e294d924471..299331d4e0b 100644 --- a/product_dimension/models/product.py +++ b/product_dimension/models/product.py @@ -27,7 +27,9 @@ def convert_to_meters(self, measure, dimensional_uom): return dimensional_uom._compute_quantity( qty=measure, - to_unit=uom_meters) + to_unit=uom_meters, + round=False, + ) @api.model def _get_dimension_uom_domain(self): @@ -64,7 +66,9 @@ def convert_to_meters(self, measure, dimensional_uom): return dimensional_uom._compute_quantity( qty=measure, - to_unit=uom_meters) + to_unit=uom_meters, + round=False, + ) length = fields.Float(related='product_variant_ids.length') height = fields.Float(related='product_variant_ids.height') From a9d4eaa36b481a094981e58150939f93bb9b98a2 Mon Sep 17 00:00:00 2001 From: Kumar Aberer Date: Thu, 15 Mar 2018 11:14:57 +0100 Subject: [PATCH 012/210] [MIG]: Adding suggested changes --- product_dimension/README.rst | 5 +- product_dimension/__init__.py | 4 +- product_dimension/__manifest__.py | 9 ++- product_dimension/i18n/de.po | 63 +++++++++++++++++++ product_dimension/models/__init__.py | 4 +- product_dimension/models/product.py | 17 +++-- product_dimension/tests/__init__.py | 4 +- .../tests/test_compute_volume.py | 19 +----- product_dimension/views/product_view.xml | 8 +-- 9 files changed, 88 insertions(+), 45 deletions(-) create mode 100644 product_dimension/i18n/de.po diff --git a/product_dimension/README.rst b/product_dimension/README.rst index 1b09ea125a3..f1e08df7d98 100644 --- a/product_dimension/README.rst +++ b/product_dimension/README.rst @@ -6,7 +6,7 @@ Product Dimension Add dimensions (length, width and height) to products. Find the volume automatically when you change one of these dimensions. -This module was previously hosted on github.com/ingadhoc/odoo-addons and +This module was previously hosted on https://github.com/ingadhoc/odoo-addons and before that on https://launchpad.net/~ingenieria-adhoc. For further information, please visit: @@ -30,6 +30,7 @@ Contributors * Juan Jose Scarafia * Leonardo Pistone * Denis Leemann +* Kumar Aberer Maintainer ---------- @@ -44,4 +45,4 @@ 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 http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/product_dimension/__init__.py b/product_dimension/__init__.py index 04b5297074e..31660d6a965 100644 --- a/product_dimension/__init__.py +++ b/product_dimension/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# © 2016 Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import models diff --git a/product_dimension/__manifest__.py b/product_dimension/__manifest__.py index 0ef5327fc00..6add66c3df3 100644 --- a/product_dimension/__manifest__.py +++ b/product_dimension/__manifest__.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- -# © 2018 brain-tec AG (http://www.braintec-group.com) -# © 2015-2016 Camptocamp SA -# © 2015 ADHOC SA (http://www.adhoc.com.ar) +# Copyright 2018 brain-tec AG (http://www.braintec-group.com) +# Copyright 2015-2016 Camptocamp SA +# Copyright 2015 ADHOC SA (http://www.adhoc.com.ar) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Product Dimension', @@ -10,7 +9,7 @@ 'author': 'brain-tec AG, ADHOC SA, Camptocamp, ' 'Odoo Community Association (OCA)', 'license': 'AGPL-3', - 'depends': ['product', 'stock'], + 'depends': ['product'], 'data': ['views/product_view.xml'], 'installable': True, 'images': [], diff --git a/product_dimension/i18n/de.po b/product_dimension/i18n/de.po new file mode 100644 index 00000000000..40f13529477 --- /dev/null +++ b/product_dimension/i18n/de.po @@ -0,0 +1,63 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-15 10:11+0000\n" +"PO-Revision-Date: 2018-03-15 10:11+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "Einheit d. Abmessungen" + +#. module: product_dimension +#: model:ir.ui.view,arch_db:product_dimension.product_normal_form_view +#: model:ir.ui.view,arch_db:product_dimension.product_template_only_form_view +msgid "Dimensions" +msgstr "Abmessungen" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "Höhe" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "Länge" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "Produkt" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "Produktvorlage" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "Einheit für Länge, Höhe, Breite" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "Breite" + diff --git a/product_dimension/models/__init__.py b/product_dimension/models/__init__.py index 2c167800e1c..ff8911a71f9 100644 --- a/product_dimension/models/__init__.py +++ b/product_dimension/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# © 2016 Denis Leemann -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import product diff --git a/product_dimension/models/product.py b/product_dimension/models/product.py index 299331d4e0b..de64e39050e 100644 --- a/product_dimension/models/product.py +++ b/product_dimension/models/product.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- -# © 2015 ADHOC SA (http://www.adhoc.com.ar) -# © 2015-2016 Camptocamp SA +# Copyright 2015 ADHOC SA (http://www.adhoc.com.ar) +# Copyright 2015-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp import models, fields -from openerp import api +from odoo import models, fields +from odoo import api class Product(models.Model): @@ -23,13 +22,13 @@ def onchange_calculate_volume(self): self.volume = length_m * height_m * width_m def convert_to_meters(self, measure, dimensional_uom): - uom_meters = self.env['product.uom'].search([('name', '=', 'm')]) + uom_meters = self.env.ref('product.product_uom_meter') return dimensional_uom._compute_quantity( qty=measure, to_unit=uom_meters, round=False, - ) + ) @api.model def _get_dimension_uom_domain(self): @@ -62,13 +61,13 @@ def onchange_calculate_volume(self): self.volume = length_m * height_m * width_m def convert_to_meters(self, measure, dimensional_uom): - uom_meters = self.env['product.uom'].search([('name', '=', 'm')]) + uom_meters = self.env.ref('product.product_uom_meter') return dimensional_uom._compute_quantity( qty=measure, to_unit=uom_meters, round=False, - ) + ) length = fields.Float(related='product_variant_ids.length') height = fields.Float(related='product_variant_ids.height') diff --git a/product_dimension/tests/__init__.py b/product_dimension/tests/__init__.py index 3f6e1365dd6..eb22b2fcef5 100644 --- a/product_dimension/tests/__init__.py +++ b/product_dimension/tests/__init__.py @@ -1,4 +1,2 @@ -# -*- coding: utf-8 -*- -# © 2016 Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import test_compute_volume diff --git a/product_dimension/tests/test_compute_volume.py b/product_dimension/tests/test_compute_volume.py index 2d72f721032..7da18b997d3 100644 --- a/product_dimension/tests/test_compute_volume.py +++ b/product_dimension/tests/test_compute_volume.py @@ -1,19 +1,6 @@ -# Author: Leonardo Pistone -# Copyright 2015 Camptocamp SA -# -# 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 Affero 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 . -from openerp.tests.common import TransactionCase +# Copyright 2015 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo.tests.common import TransactionCase class TestComputeVolumeOnProduct(TransactionCase): diff --git a/product_dimension/views/product_view.xml b/product_dimension/views/product_view.xml index acacb792792..3f17e7ff100 100755 --- a/product_dimension/views/product_view.xml +++ b/product_dimension/views/product_view.xml @@ -4,9 +4,9 @@ product_normal_form_view product.product - + - + @@ -20,9 +20,9 @@ product_template_form_view product.template - + - + From 3b37c0f9ad8cbc0eedc555f04d02a2c8f85dd163 Mon Sep 17 00:00:00 2001 From: Kumar Aberer Date: Fri, 20 Apr 2018 13:57:58 -0500 Subject: [PATCH 013/210] [MIG] product_dimension: Adding missing po files and improvemnets --- product_dimension/__manifest__.py | 6 ++- product_dimension/i18n/ca.po | 68 +++++++++++++++++++++++++++++ product_dimension/i18n/es.po | 68 +++++++++++++++++++++++++++++ product_dimension/i18n/fr.po | 60 +++++++++++++++++++++++++ product_dimension/i18n/fr_FR.po | 68 +++++++++++++++++++++++++++++ product_dimension/models/product.py | 39 +++++++++-------- 6 files changed, 289 insertions(+), 20 deletions(-) create mode 100644 product_dimension/i18n/ca.po create mode 100644 product_dimension/i18n/es.po create mode 100644 product_dimension/i18n/fr.po create mode 100644 product_dimension/i18n/fr_FR.po diff --git a/product_dimension/__manifest__.py b/product_dimension/__manifest__.py index 6add66c3df3..cc4db482cac 100644 --- a/product_dimension/__manifest__.py +++ b/product_dimension/__manifest__.py @@ -6,11 +6,13 @@ 'name': 'Product Dimension', 'version': '11.0.1.0.0', 'category': 'Product', - 'author': 'brain-tec AG, ADHOC SA, Camptocamp, ' + 'author': 'brain-tec AG, ADHOC SA, Camptocamp SA, ' 'Odoo Community Association (OCA)', 'license': 'AGPL-3', 'depends': ['product'], 'data': ['views/product_view.xml'], 'installable': True, - 'images': [], + 'images': [ + 'static/description/icon.png', + ], } diff --git a/product_dimension/i18n/ca.po b/product_dimension/i18n/ca.po new file mode 100644 index 00000000000..5ab38ac48c9 --- /dev/null +++ b/product_dimension/i18n/ca.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: product-attribute (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-22 01:40+0000\n" +"PO-Revision-Date: 2016-10-20 06:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Catalan (http://www.transifex.com/oca/OCA-product-attribute-9-0/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_product_brand_id +msgid "Brand" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "Producte" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_product_brand_id +msgid "Select a brand for this product" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "" \ No newline at end of file diff --git a/product_dimension/i18n/es.po b/product_dimension/i18n/es.po new file mode 100644 index 00000000000..842246ce53f --- /dev/null +++ b/product_dimension/i18n/es.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: product-attribute (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-02 03:39+0000\n" +"PO-Revision-Date: 2016-10-20 06:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-product-attribute-9-0/language/es/)\n" +"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_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_product_brand_id +msgid "Brand" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "Producto" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_product_brand_id +msgid "Select a brand for this product" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "" \ No newline at end of file diff --git a/product_dimension/i18n/fr.po b/product_dimension/i18n/fr.po new file mode 100644 index 00000000000..3758bdf0f1c --- /dev/null +++ b/product_dimension/i18n/fr.po @@ -0,0 +1,60 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +# Translators: +# leemannd , 2016 +# leemannd , 2016 +msgid "" +msgstr "" +"Project-Id-Version: product-attribute (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-03 15:37+0000\n" +"PO-Revision-Date: 2017-11-03 15:37+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: French (http://www.transifex.com/oca/OCA-product-attribute-9-0/language/fr/)\n" +"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_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "UdM Dimensionnel" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "Hauteur" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "Longueur" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "Produit" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "Modèle de produit" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "UdM pour longueur, hauteur, largeur" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "Largeur" \ No newline at end of file diff --git a/product_dimension/i18n/fr_FR.po b/product_dimension/i18n/fr_FR.po new file mode 100644 index 00000000000..b8e9de2f2f5 --- /dev/null +++ b/product_dimension/i18n/fr_FR.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_dimension +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: product-attribute (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-22 01:40+0000\n" +"PO-Revision-Date: 2016-10-20 06:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (France) (http://www.transifex.com/oca/OCA-product-attribute-9-0/language/fr_FR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr_FR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_product_brand_id +msgid "Brand" +msgstr "Marque" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,field_description:product_dimension.field_product_template_dimensional_uom_id +msgid "Dimensional UoM" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_height +#: model:ir.model.fields,field_description:product_dimension.field_product_template_height +msgid "Height" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_length +#: model:ir.model.fields,field_description:product_dimension.field_product_template_length +msgid "Length" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_product +msgid "Product" +msgstr "" + +#. module: product_dimension +#: model:ir.model,name:product_dimension.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_product_brand_id +msgid "Select a brand for this product" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,help:product_dimension.field_product_product_dimensional_uom_id +#: model:ir.model.fields,help:product_dimension.field_product_template_dimensional_uom_id +msgid "UoM for length, height, width" +msgstr "" + +#. module: product_dimension +#: model:ir.model.fields,field_description:product_dimension.field_product_product_width +#: model:ir.model.fields,field_description:product_dimension.field_product_template_width +msgid "Width" +msgstr "" \ No newline at end of file diff --git a/product_dimension/models/product.py b/product_dimension/models/product.py index de64e39050e..613fe1aa296 100644 --- a/product_dimension/models/product.py +++ b/product_dimension/models/product.py @@ -3,8 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, fields -from odoo import api +from odoo import models, fields, api class Product(models.Model): @@ -12,14 +11,16 @@ class Product(models.Model): @api.onchange('length', 'height', 'width', 'dimensional_uom_id') def onchange_calculate_volume(self): - if (not self.length or not self.height or not self.width or - not self.dimensional_uom_id): - return False - - length_m = self.convert_to_meters(self.length, self.dimensional_uom_id) - height_m = self.convert_to_meters(self.height, self.dimensional_uom_id) - width_m = self.convert_to_meters(self.width, self.dimensional_uom_id) - self.volume = length_m * height_m * width_m + if self.length and self.height and self.width and \ + self.dimensional_uom_id: + length_m = self.convert_to_meters( + self.length, self.dimensional_uom_id) + height_m = self.convert_to_meters( + self.height, self.dimensional_uom_id) + width_m = self.convert_to_meters( + self.width, self.dimensional_uom_id) + self.volume = length_m * height_m * width_m + return False def convert_to_meters(self, measure, dimensional_uom): uom_meters = self.env.ref('product.product_uom_meter') @@ -51,14 +52,16 @@ class ProductTemplate(models.Model): @api.onchange('length', 'height', 'width', 'dimensional_uom_id') def onchange_calculate_volume(self): - if (not self.length or not self.height or not self.width or - not self.dimensional_uom_id): - return False - - length_m = self.convert_to_meters(self.length, self.dimensional_uom_id) - height_m = self.convert_to_meters(self.height, self.dimensional_uom_id) - width_m = self.convert_to_meters(self.width, self.dimensional_uom_id) - self.volume = length_m * height_m * width_m + if self.length and self.height and self.width and \ + self.dimensional_uom_id: + length_m = self.convert_to_meters( + self.length, self.dimensional_uom_id) + height_m = self.convert_to_meters( + self.height, self.dimensional_uom_id) + width_m = self.convert_to_meters( + self.width, self.dimensional_uom_id) + self.volume = length_m * height_m * width_m + return False def convert_to_meters(self, measure, dimensional_uom): uom_meters = self.env.ref('product.product_uom_meter') From 3bd7cb987d67318f6685416e85cf0736f49bdf9a Mon Sep 17 00:00:00 2001 From: Kumar Aberer Date: Tue, 1 May 2018 09:32:19 -0500 Subject: [PATCH 014/210] [MIG] product_dimension: Adding lambda to domain function, Update readme --- product_dimension/README.rst | 56 +++++++++++++++++++++-------- product_dimension/models/product.py | 2 +- 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/product_dimension/README.rst b/product_dimension/README.rst index f1e08df7d98..78ce5bc89ae 100644 --- a/product_dimension/README.rst +++ b/product_dimension/README.rst @@ -1,37 +1,65 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 +============== Product Dimension -================= -Add dimensions (length, width and height) to products. Find the volume +============== + +This module extends the functionality of product to support +dimensions (length, width and height). Find the volume automatically when you change one of these dimensions. -This module was previously hosted on https://github.com/ingadhoc/odoo-addons and -before that on https://launchpad.net/~ingenieria-adhoc. +This module was previously hosted on https://github.com/ingadhoc/odoo-addons +and before that on https://launchpad.net/~ingenieria-adhoc. + +Installation +============ + +#. No external library is used. + +Configuration +============= + +#. No configuration is required. + +Usage +===== -For further information, please visit: +To use this module, you need to: -* https://www.odoo.com/forum/help-1 +#. Go to product view and enter dimensions. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/135/11.0 Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. - +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. Credits ======= +Images +------ + +* Odoo Community Association: `Icon `_. + Contributors ------------ + * Juan Jose Scarafia * Leonardo Pistone * Denis Leemann * Kumar Aberer +Do not contact contributors directly about support or help with technical issues. + Maintainer ---------- @@ -45,4 +73,4 @@ 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. +To contribute to this module, please visit https://odoo-community.org. \ No newline at end of file diff --git a/product_dimension/models/product.py b/product_dimension/models/product.py index 613fe1aa296..ec80ef29060 100644 --- a/product_dimension/models/product.py +++ b/product_dimension/models/product.py @@ -43,7 +43,7 @@ def _get_dimension_uom_domain(self): dimensional_uom_id = fields.Many2one( 'product.uom', 'Dimensional UoM', - domain=_get_dimension_uom_domain, + domain=lambda self: self._get_dimension_uom_domain(), help='UoM for length, height, width') From 23fc47bcf0c01315db5c1bda8ea7fcd16a9e03ec Mon Sep 17 00:00:00 2001 From: Kumar Aberer Date: Wed, 2 May 2018 17:14:13 -0500 Subject: [PATCH 015/210] [IMP] product_dimension: Code cleanup/improvements during migration to 11.0 --- product_dimension/README.rst | 4 +-- product_dimension/models/product.py | 52 +++++++++++++---------------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/product_dimension/README.rst b/product_dimension/README.rst index 78ce5bc89ae..7b06b6f34e8 100644 --- a/product_dimension/README.rst +++ b/product_dimension/README.rst @@ -2,9 +2,9 @@ :target: https://www.gnu.org/licenses/agpl :alt: License: AGPL-3 -============== +================= Product Dimension -============== +================= This module extends the functionality of product to support dimensions (length, width and height). Find the volume diff --git a/product_dimension/models/product.py b/product_dimension/models/product.py index ec80ef29060..22fd01d2106 100644 --- a/product_dimension/models/product.py +++ b/product_dimension/models/product.py @@ -11,25 +11,12 @@ class Product(models.Model): @api.onchange('length', 'height', 'width', 'dimensional_uom_id') def onchange_calculate_volume(self): - if self.length and self.height and self.width and \ - self.dimensional_uom_id: - length_m = self.convert_to_meters( - self.length, self.dimensional_uom_id) - height_m = self.convert_to_meters( - self.height, self.dimensional_uom_id) - width_m = self.convert_to_meters( - self.width, self.dimensional_uom_id) - self.volume = length_m * height_m * width_m - return False - - def convert_to_meters(self, measure, dimensional_uom): - uom_meters = self.env.ref('product.product_uom_meter') - - return dimensional_uom._compute_quantity( - qty=measure, - to_unit=uom_meters, - round=False, - ) + volume = self.env['product.template']._calc_volume( + self.length, self.height, self.width, self.dimensional_uom_id) + if isinstance(volume, bool): + return False + else: + self.volume = volume @api.model def _get_dimension_uom_domain(self): @@ -50,18 +37,25 @@ def _get_dimension_uom_domain(self): class ProductTemplate(models.Model): _inherit = 'product.template' + @api.model + def _calc_volume(self, length, height, width, uom_id): + volume = False + if length and height and width and uom_id: + length_m = self.convert_to_meters(length, uom_id) + height_m = self.convert_to_meters(height, uom_id) + width_m = self.convert_to_meters(width, uom_id) + volume = length_m * height_m * width_m + + return volume + @api.onchange('length', 'height', 'width', 'dimensional_uom_id') def onchange_calculate_volume(self): - if self.length and self.height and self.width and \ - self.dimensional_uom_id: - length_m = self.convert_to_meters( - self.length, self.dimensional_uom_id) - height_m = self.convert_to_meters( - self.height, self.dimensional_uom_id) - width_m = self.convert_to_meters( - self.width, self.dimensional_uom_id) - self.volume = length_m * height_m * width_m - return False + volume = self._calc_volume( + self.length, self.height, self.width, self.dimensional_uom_id) + if isinstance(volume, bool): + return False + else: + self.volume = volume def convert_to_meters(self, measure, dimensional_uom): uom_meters = self.env.ref('product.product_uom_meter') From 558c766684752de588a280cd81270aeccd7a7651 Mon Sep 17 00:00:00 2001 From: Kumar Aberer Date: Thu, 3 May 2018 09:25:36 -0500 Subject: [PATCH 016/210] [IMP] product_dimension: Reset volume when parameters not valid --- product_dimension/README.rst | 9 --------- product_dimension/models/product.py | 14 +++----------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/product_dimension/README.rst b/product_dimension/README.rst index 7b06b6f34e8..82ccc737fc9 100644 --- a/product_dimension/README.rst +++ b/product_dimension/README.rst @@ -13,15 +13,6 @@ automatically when you change one of these dimensions. This module was previously hosted on https://github.com/ingadhoc/odoo-addons and before that on https://launchpad.net/~ingenieria-adhoc. -Installation -============ - -#. No external library is used. - -Configuration -============= - -#. No configuration is required. Usage ===== diff --git a/product_dimension/models/product.py b/product_dimension/models/product.py index 22fd01d2106..bc0dac2c52e 100644 --- a/product_dimension/models/product.py +++ b/product_dimension/models/product.py @@ -11,12 +11,8 @@ class Product(models.Model): @api.onchange('length', 'height', 'width', 'dimensional_uom_id') def onchange_calculate_volume(self): - volume = self.env['product.template']._calc_volume( + self.volume = self.env['product.template']._calc_volume( self.length, self.height, self.width, self.dimensional_uom_id) - if isinstance(volume, bool): - return False - else: - self.volume = volume @api.model def _get_dimension_uom_domain(self): @@ -39,7 +35,7 @@ class ProductTemplate(models.Model): @api.model def _calc_volume(self, length, height, width, uom_id): - volume = False + volume = 0 if length and height and width and uom_id: length_m = self.convert_to_meters(length, uom_id) height_m = self.convert_to_meters(height, uom_id) @@ -50,12 +46,8 @@ def _calc_volume(self, length, height, width, uom_id): @api.onchange('length', 'height', 'width', 'dimensional_uom_id') def onchange_calculate_volume(self): - volume = self._calc_volume( + self.volume = self._calc_volume( self.length, self.height, self.width, self.dimensional_uom_id) - if isinstance(volume, bool): - return False - else: - self.volume = volume def convert_to_meters(self, measure, dimensional_uom): uom_meters = self.env.ref('product.product_uom_meter') From fd911b085efa7550be9f662e4e3e8190fbfe8dd3 Mon Sep 17 00:00:00 2001 From: Jordi Riera Date: Fri, 6 Jul 2018 11:21:18 -0400 Subject: [PATCH 017/210] add product_template_tags --- product_template_tags/README.rst | 62 +++++++++++ product_template_tags/__init__.py | 1 + product_template_tags/__manifest__.py | 22 ++++ product_template_tags/i18n/de.po | 103 ++++++++++++++++++ product_template_tags/i18n/es.po | 102 +++++++++++++++++ product_template_tags/i18n/fr.po | 102 +++++++++++++++++ product_template_tags/i18n/hr.po | 103 ++++++++++++++++++ product_template_tags/i18n/it.po | 103 ++++++++++++++++++ product_template_tags/i18n/nl_NL.po | 103 ++++++++++++++++++ .../i18n/product_template_tags.pot | 98 +++++++++++++++++ product_template_tags/i18n/sl.po | 103 ++++++++++++++++++ product_template_tags/models/__init__.py | 2 + .../models/product_template.py | 15 +++ .../models/product_template_tag.py | 33 ++++++ .../security/product_template_rule.xml | 17 +++ .../security/product_template_tag.xml | 17 +++ .../static/description/icon.png | Bin 0 -> 9455 bytes .../views/product_template.xml | 54 +++++++++ .../views/product_template_tag.xml | 73 +++++++++++++ 19 files changed, 1113 insertions(+) create mode 100644 product_template_tags/README.rst create mode 100644 product_template_tags/__init__.py create mode 100644 product_template_tags/__manifest__.py create mode 100644 product_template_tags/i18n/de.po create mode 100644 product_template_tags/i18n/es.po create mode 100644 product_template_tags/i18n/fr.po create mode 100644 product_template_tags/i18n/hr.po create mode 100644 product_template_tags/i18n/it.po create mode 100644 product_template_tags/i18n/nl_NL.po create mode 100644 product_template_tags/i18n/product_template_tags.pot create mode 100644 product_template_tags/i18n/sl.po create mode 100644 product_template_tags/models/__init__.py create mode 100644 product_template_tags/models/product_template.py create mode 100644 product_template_tags/models/product_template_tag.py create mode 100644 product_template_tags/security/product_template_rule.xml create mode 100644 product_template_tags/security/product_template_tag.xml create mode 100644 product_template_tags/static/description/icon.png create mode 100644 product_template_tags/views/product_template.xml create mode 100644 product_template_tags/views/product_template_tag.xml diff --git a/product_template_tags/README.rst b/product_template_tags/README.rst new file mode 100644 index 00000000000..9f7c681373e --- /dev/null +++ b/product_template_tags/README.rst @@ -0,0 +1,62 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +===================== +Product Template Tags +===================== + +This addon allows to add tags on products. + +Configuration +============= + +* Go on the product form view. +* Create and edit tags using the form view + +Usage +===== + +* On the product view, you can add and create tags. +* Tags will be shown in the kanban view. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/135/10.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Benjamin Willig +* Numigi (tm) and all its contributors (https://bit.ly/numigiens) + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/product_template_tags/__init__.py b/product_template_tags/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/product_template_tags/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_template_tags/__manifest__.py b/product_template_tags/__manifest__.py new file mode 100644 index 00000000000..df854a29c77 --- /dev/null +++ b/product_template_tags/__manifest__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Product Template Tags', + 'summary': """ + This addon allow to add tags on products""", + 'version': '11.0.1.0.0', + 'license': 'AGPL-3', + 'author': 'ACSONE SA/NV, Odoo Community Association (OCA), Numigi', + 'website': 'https://www.acsone.eu', + 'depends': [ + 'product', + ], + 'data': [ + 'security/product_template_rule.xml', + 'security/product_template_tag.xml', + 'views/product_template.xml', + 'views/product_template_tag.xml', + ], +} diff --git a/product_template_tags/i18n/de.po b/product_template_tags/i18n/de.po new file mode 100644 index 00000000000..309cb7a95c2 --- /dev/null +++ b/product_template_tags/i18n/de.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Niki Waibel, 2018 +# Rudolf Schnapka , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-29 08:49+0000\n" +"PO-Revision-Date: 2018-01-29 08:49+0000\n" +"Last-Translator: Rudolf Schnapka , 2018\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Angelegt durch" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Angelegt am" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Anzeigebezeichnung" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Zuletzt verändert am" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert durch" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "Bezeichnung" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Produktvorlage" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Produkte" diff --git a/product_template_tags/i18n/es.po b/product_template_tags/i18n/es.po new file mode 100644 index 00000000000..f353da97169 --- /dev/null +++ b/product_template_tags/i18n/es.po @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Pedro M. Baeza , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 02:14+0000\n" +"PO-Revision-Date: 2018-01-03 02:14+0000\n" +"Last-Translator: Pedro M. Baeza , 2018\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" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Creado el" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Última modificación el" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Productos" diff --git a/product_template_tags/i18n/fr.po b/product_template_tags/i18n/fr.po new file mode 100644 index 00000000000..2b736f614eb --- /dev/null +++ b/product_template_tags/i18n/fr.po @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-27 03:49+0000\n" +"PO-Revision-Date: 2018-01-27 03:49+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Créé le" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Dernière Modification le" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "Nom" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Modèle de produit" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "" diff --git a/product_template_tags/i18n/hr.po b/product_template_tags/i18n/hr.po new file mode 100644 index 00000000000..ec4185db5a4 --- /dev/null +++ b/product_template_tags/i18n/hr.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Bole , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-29 08:49+0000\n" +"PO-Revision-Date: 2018-01-29 08:49+0000\n" +"Last-Translator: Bole , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "# proizvoda" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "Index boje" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "Tvrtka" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Kreirao" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Kreirano" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Naziv" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Zadnje ažurirano" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Zadnji ažurirao" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Zadnje ažurirano" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "naziv" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "Oznaka proizvoda" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "Oznake proizvoda" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Predložak proizvoda" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "Oznaka predloška proizvoda" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Proizvodi" diff --git a/product_template_tags/i18n/it.po b/product_template_tags/i18n/it.po new file mode 100644 index 00000000000..b3422464be8 --- /dev/null +++ b/product_template_tags/i18n/it.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Giuliano Lotta , 2018 +# Paolo Valier , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 02:14+0000\n" +"PO-Revision-Date: 2018-01-03 02:14+0000\n" +"Last-Translator: Paolo Valier , 2018\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Creato il" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Ultima Modifica il" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Ultimo Aggiornamento di" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Ultimo Aggiornamento il" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Prodotti" diff --git a/product_template_tags/i18n/nl_NL.po b/product_template_tags/i18n/nl_NL.po new file mode 100644 index 00000000000..9c2fc694353 --- /dev/null +++ b/product_template_tags/i18n/nl_NL.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# Peter Hageman , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 02:14+0000\n" +"PO-Revision-Date: 2018-01-03 02:14+0000\n" +"Last-Translator: Peter Hageman , 2018\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Aangemaakt door" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Aangemaakt op" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Weergavenaam" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Laatst aangepast door" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Laatst aangepast op" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Productsjabloon" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "Producten" diff --git a/product_template_tags/i18n/product_template_tags.pot b/product_template_tags/i18n/product_template_tags.pot new file mode 100644 index 00000000000..5a47397fa53 --- /dev/null +++ b/product_template_tags/i18n/product_template_tags.pot @@ -0,0 +1,98 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "" + diff --git a/product_template_tags/i18n/sl.po b/product_template_tags/i18n/sl.po new file mode 100644 index 00000000000..2158de3d904 --- /dev/null +++ b/product_template_tags/i18n/sl.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_template_tags +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-27 03:49+0000\n" +"PO-Revision-Date: 2018-01-27 03:49+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_products_count +msgid "# of Products" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_color +msgid "Color Index" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_company_id +#: model:ir.ui.view,arch_db:product_template_tags.product_template_tag_search_view +msgid "Company" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_uid +msgid "Created by" +msgstr "Ustvaril" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_create_date +msgid "Created on" +msgstr "Ustvarjeno" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_display_name +msgid "Display Name" +msgstr "Prikazni naziv" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_id +msgid "ID" +msgstr "ID" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag___last_update +msgid "Last Modified on" +msgstr "Zadnja sprememba" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_uid +msgid "Last Updated by" +msgstr "Zadnji posodobil" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_write_date +msgid "Last Updated on" +msgstr "Zadnja posodobitev" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_name +msgid "Name" +msgstr "Naziv" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template_tag +msgid "Product Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_product_tag_ids +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_ids +#: model:ir.ui.menu,name:product_template_tags.product_template_tag_config_menu +msgid "Product Tags" +msgstr "" + +#. module: product_template_tags +#: model:ir.model,name:product_template_tags.model_product_template +msgid "Product Template" +msgstr "Predloga proizvoda" + +#. module: product_template_tags +#: model:ir.actions.act_window,name:product_template_tags.product_template_tag_act_window +msgid "Product Template Tag" +msgstr "" + +#. module: product_template_tags +#: model:ir.model.fields,field_description:product_template_tags.field_product_template_tag_product_tmpl_ids +msgid "Products" +msgstr "" diff --git a/product_template_tags/models/__init__.py b/product_template_tags/models/__init__.py new file mode 100644 index 00000000000..4b28608ef18 --- /dev/null +++ b/product_template_tags/models/__init__.py @@ -0,0 +1,2 @@ +from . import product_template +from . import product_template_tag diff --git a/product_template_tags/models/product_template.py b/product_template_tags/models/product_template.py new file mode 100644 index 00000000000..230e4b1c3e4 --- /dev/null +++ b/product_template_tags/models/product_template.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + + _inherit = 'product.template' + + tag_ids = fields.Many2many( + comodel_name='product.template.tag', string="Product Tags", + relation='product_template_product_tag_rel', + column1='product_tmpl_id', column2='tag_id') diff --git a/product_template_tags/models/product_template_tag.py b/product_template_tags/models/product_template_tag.py new file mode 100644 index 00000000000..a7ef8f5e01b --- /dev/null +++ b/product_template_tags/models/product_template_tag.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class ProductTemplateTag(models.Model): + + _name = 'product.template.tag' + _description = 'Product Tag' + + name = fields.Char(string="Name", required=True, translate=True) + color = fields.Integer(string="Color Index") + product_tmpl_ids = fields.Many2many( + comodel_name='product.template', string="Products", + relation='product_template_product_tag_rel', + column1='tag_id', column2='product_tmpl_id') + products_count = fields.Integer( + string="# of Products", compute='_compute_products_count', store=True) + company_id = fields.Many2one( + comodel_name='res.company', string="Company", + default=lambda self: self._default_company()) + + @api.model + def _default_company(self): + return self.env['res.users']._get_company() + + @api.multi + @api.depends('product_tmpl_ids') + def _compute_products_count(self): + for rec in self: + rec.products_count = len(rec.product_tmpl_ids) diff --git a/product_template_tags/security/product_template_rule.xml b/product_template_tags/security/product_template_rule.xml new file mode 100644 index 00000000000..6fbdabfad14 --- /dev/null +++ b/product_template_tags/security/product_template_rule.xml @@ -0,0 +1,17 @@ + + + + + + + product.template.tag company (in product_template_tags) + + + + + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + + + diff --git a/product_template_tags/security/product_template_tag.xml b/product_template_tags/security/product_template_tag.xml new file mode 100644 index 00000000000..bb21504b64d --- /dev/null +++ b/product_template_tags/security/product_template_tag.xml @@ -0,0 +1,17 @@ + + + + + + + product.template.tag access user (in product_template_tags) + + + + + + + + + diff --git a/product_template_tags/static/description/icon.png b/product_template_tags/static/description/icon.png new file mode 100644 index 0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}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/product_template_tags/views/product_template.xml b/product_template_tags/views/product_template.xml new file mode 100644 index 00000000000..804d3d9e1b5 --- /dev/null +++ b/product_template_tags/views/product_template.xml @@ -0,0 +1,54 @@ + + + + + + + product.template.form (in product_template_tags) + product.template + + + + + + + + + + + + + + product.template.kanban (in product_template_tags) + product.template + + + + +
+ + + +
+
+ +
+
+ + + product.template.search (in product_template_tags) + product.template + + + + + + + + + + +
+ diff --git a/product_template_tags/views/product_template_tag.xml b/product_template_tags/views/product_template_tag.xml new file mode 100644 index 00000000000..c1ac8c289e3 --- /dev/null +++ b/product_template_tags/views/product_template_tag.xml @@ -0,0 +1,73 @@ + + + + + + + product.template.tag.form (in product_template_tags) + product.template.tag + +
+
+ +
+ +
+ + + + + +
+ + + + + + product.template.tag.search (in product_template_tags) + product.template.tag + + + + + + + + + + + + + product.template.tag.tree (in product_template_tags) + product.template.tag + + + + + + + + + + + Product Template Tag + product.template.tag + tree,form + form + + + + Product Tags + + + + + + From 64ea41698f50d07cb7c78e8c73ddbdac3eaa71f0 Mon Sep 17 00:00:00 2001 From: Jordi Riera <547282+foutoucour@users.noreply.github.com> Date: Fri, 13 Jul 2018 08:08:13 -0400 Subject: [PATCH 018/210] Update __manifest__.py remove utf8 --- product_template_tags/__manifest__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/product_template_tags/__manifest__.py b/product_template_tags/__manifest__.py index df854a29c77..a3da376428e 100644 --- a/product_template_tags/__manifest__.py +++ b/product_template_tags/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). From cd46a5d54292f49911d3b09a0424c6eee4b0c21a Mon Sep 17 00:00:00 2001 From: Jordi Riera <547282+foutoucour@users.noreply.github.com> Date: Fri, 13 Jul 2018 08:08:42 -0400 Subject: [PATCH 019/210] Update product_template.py remove utf8 --- product_template_tags/models/product_template.py | 1 - 1 file changed, 1 deletion(-) diff --git a/product_template_tags/models/product_template.py b/product_template_tags/models/product_template.py index 230e4b1c3e4..f801d88deb3 100644 --- a/product_template_tags/models/product_template.py +++ b/product_template_tags/models/product_template.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). From 2d5aceb35d1a363c3256083929541bd641954b6a Mon Sep 17 00:00:00 2001 From: Jordi Riera <547282+foutoucour@users.noreply.github.com> Date: Fri, 13 Jul 2018 08:09:01 -0400 Subject: [PATCH 020/210] Update product_template_tag.py remove utf-8 --- product_template_tags/models/product_template_tag.py | 1 - 1 file changed, 1 deletion(-) diff --git a/product_template_tags/models/product_template_tag.py b/product_template_tags/models/product_template_tag.py index a7ef8f5e01b..51e02212290 100644 --- a/product_template_tags/models/product_template_tag.py +++ b/product_template_tags/models/product_template_tag.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). From f79f910061cfbc3035a1a632720db8d65469ea94 Mon Sep 17 00:00:00 2001 From: Xavier Brochard Date: Wed, 12 Sep 2018 16:42:34 +0200 Subject: [PATCH 021/210] Fix tab name in product form Tab name is "Inventory" instead of "Purchase" --- product_supplierinfo_revision/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_supplierinfo_revision/README.rst b/product_supplierinfo_revision/README.rst index 2c7ce3b599f..39e7ff8d4e7 100644 --- a/product_supplierinfo_revision/README.rst +++ b/product_supplierinfo_revision/README.rst @@ -24,7 +24,7 @@ To use this module: a price increased accordingly to the percent entered. Old supplier pricelist will have a date end from which pricelist will be out of date. #. You can check supplier pricelists as well as variation percent in the - product form, by clicking on *Purchase* tab. + product form, by clicking on *Inventory* tab. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot From 609469aeaa297e186dd9d0d33a741cbc11cb7fac Mon Sep 17 00:00:00 2001 From: Xavier Brochard Date: Wed, 12 Sep 2018 16:57:07 +0200 Subject: [PATCH 022/210] Add stock module in instrucions --- product_supplierinfo_revision/README.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/product_supplierinfo_revision/README.rst b/product_supplierinfo_revision/README.rst index 39e7ff8d4e7..88d9f659af7 100644 --- a/product_supplierinfo_revision/README.rst +++ b/product_supplierinfo_revision/README.rst @@ -23,8 +23,9 @@ To use this module: #. By clicking on Apply button, a new supplier pricelist will be created with a price increased accordingly to the percent entered. Old supplier pricelist will have a date end from which pricelist will be out of date. -#. You can check supplier pricelists as well as variation percent in the - product form, by clicking on *Inventory* tab. +#. Once the Inventory Management module (stock) is installed, you can check + supplier pricelists as well as variation percent in the product form, by + clicking on *Inventory* tab. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot From cb61b04e204c461ee17ff19820ae506a3aa81c8e Mon Sep 17 00:00:00 2001 From: Xavier Brochard Date: Wed, 12 Sep 2018 20:03:30 +0200 Subject: [PATCH 023/210] Configuration instructions --- product_supplierinfo_revision/README.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/product_supplierinfo_revision/README.rst b/product_supplierinfo_revision/README.rst index 88d9f659af7..3e18417524b 100644 --- a/product_supplierinfo_revision/README.rst +++ b/product_supplierinfo_revision/README.rst @@ -6,8 +6,15 @@ Product Supplierinfo Revision ============================= -This module allows create revisions of supplier info prices. +This module allows to create revisions of supplier info prices. +Configuration +============= + +#. Install Purchase module. +#. Check *Purchase > Settings > Vendor Price* : "Allow using and importing + vendor pricelists", this will create the *Purchases > Purchase > + Supplier Pricelist* menu. Usage ===== From c05f07564e5401abe00cbdf5f1e522ac12dfec18 Mon Sep 17 00:00:00 2001 From: Xavier Brochard Date: Thu, 13 Sep 2018 12:32:36 +0200 Subject: [PATCH 024/210] Typo --- product_supplierinfo_revision/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_supplierinfo_revision/README.rst b/product_supplierinfo_revision/README.rst index 3e18417524b..95d78e43db0 100644 --- a/product_supplierinfo_revision/README.rst +++ b/product_supplierinfo_revision/README.rst @@ -30,7 +30,7 @@ To use this module: #. By clicking on Apply button, a new supplier pricelist will be created with a price increased accordingly to the percent entered. Old supplier pricelist will have a date end from which pricelist will be out of date. -#. Once the Inventory Management module (stock) is installed, you can check +#. Once the Inventory Management (*stock*) module is installed, you can check supplier pricelists as well as variation percent in the product form, by clicking on *Inventory* tab. From 89b3c7b2d099dd511d368aacc876846a555ca70d Mon Sep 17 00:00:00 2001 From: Sergio Teruel Albert Date: Thu, 11 Oct 2018 20:02:46 +0200 Subject: [PATCH 025/210] [11.0][NEW] product_secondary_unit: New module for setting a secondary unit for a product (#377) --- product_secondary_unit/README.rst | 84 ++++++++++++++ product_secondary_unit/__init__.py | 2 + product_secondary_unit/__manifest__.py | 21 ++++ product_secondary_unit/i18n/es.po | 106 ++++++++++++++++++ product_secondary_unit/models/__init__.py | 3 + .../models/product_second_unit.py | 47 ++++++++ .../models/product_template.py | 18 +++ .../readme/CONTRIBUTORS.rst | 2 + product_secondary_unit/readme/DESCRIPTION.rst | 2 + product_secondary_unit/readme/USAGE.rst | 5 + .../security/ir.model.access.csv | 2 + .../static/description/icon.png | Bin 0 -> 9455 bytes product_secondary_unit/tests/__init__.py | 2 + .../tests/test_product_second_unit.py | 52 +++++++++ .../views/product_views.xml | 32 ++++++ 15 files changed, 378 insertions(+) create mode 100644 product_secondary_unit/README.rst create mode 100644 product_secondary_unit/__init__.py create mode 100644 product_secondary_unit/__manifest__.py create mode 100644 product_secondary_unit/i18n/es.po create mode 100644 product_secondary_unit/models/__init__.py create mode 100755 product_secondary_unit/models/product_second_unit.py create mode 100755 product_secondary_unit/models/product_template.py create mode 100644 product_secondary_unit/readme/CONTRIBUTORS.rst create mode 100644 product_secondary_unit/readme/DESCRIPTION.rst create mode 100644 product_secondary_unit/readme/USAGE.rst create mode 100644 product_secondary_unit/security/ir.model.access.csv create mode 100644 product_secondary_unit/static/description/icon.png create mode 100644 product_secondary_unit/tests/__init__.py create mode 100644 product_secondary_unit/tests/test_product_second_unit.py create mode 100755 product_secondary_unit/views/product_views.xml diff --git a/product_secondary_unit/README.rst b/product_secondary_unit/README.rst new file mode 100644 index 00000000000..3757c47dc45 --- /dev/null +++ b/product_secondary_unit/README.rst @@ -0,0 +1,84 @@ +====================== +Product Secondary Unit +====================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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_secondary_unit + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_secondary_unit + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/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 module extends the functionality of product module to allow define +other units with their conversion factor. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module you need to: + +#. Go to a *Product > General Information tab*. +#. Create any record in "Secondary unit of measure". +#. Set the conversion factor. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Carlos Dauden +* Sergio Teruel + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/product-attribute `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_secondary_unit/__init__.py b/product_secondary_unit/__init__.py new file mode 100644 index 00000000000..3275ac2adf3 --- /dev/null +++ b/product_secondary_unit/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import models diff --git a/product_secondary_unit/__manifest__.py b/product_secondary_unit/__manifest__.py new file mode 100644 index 00000000000..7a04b95f739 --- /dev/null +++ b/product_secondary_unit/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + 'name': 'Product Secondary Unit', + 'summary': 'Set a secondary unit per product', + 'version': '11.0.1.0.0', + 'development_status': 'Beta', + 'category': 'Product', + 'website': 'https://github.com/OCA/product-attribute', + 'author': 'Tecnativa, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': [ + 'product', + ], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_views.xml', + ], +} diff --git a/product_secondary_unit/i18n/es.po b/product_secondary_unit/i18n/es.po new file mode 100644 index 00000000000..5c936aecebb --- /dev/null +++ b/product_secondary_unit/i18n/es.po @@ -0,0 +1,106 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_secondary_unit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-09-05 10:03+0000\n" +"PO-Revision-Date: 2018-09-05 12:05+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.0.6\n" +"Last-Translator: \n" +"Language: es_ES\n" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_secondary_unit +#: model:ir.model.fields,help:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,help:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,help:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Default Secondary Unit of Measure." +msgstr "Segunda unidad de medida por defecto" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_sale_secondary_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_sale_secondary_uom_id +msgid "Default unit sale" +msgstr "Unidad de venta por defecto" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_display_name +#, fuzzy +msgid "Display Name" +msgstr "Mostrar Nombre" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_id +#, fuzzy +msgid "ID" +msgstr "ID" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit___last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_uid +msgid "Last Updated by" +msgstr "Última actualización de" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_name +msgid "Name" +msgstr "Nombre" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_template +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_product_tmpl_id +msgid "Product Template" +msgstr "Plantilla de producto" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_factor +msgid "Secondary Unit Factor" +msgstr "Factor segunda unidad" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Secondary Unit of Measure" +msgstr "Segunda unidad de medida" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_secondary_unit +msgid "product.secondary.unit" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary Unit" +msgstr "Unidad Secundaria" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary unit of measure" +msgstr "Segunda unidad de medida" diff --git a/product_secondary_unit/models/__init__.py b/product_secondary_unit/models/__init__.py new file mode 100644 index 00000000000..4775c1b3fcc --- /dev/null +++ b/product_secondary_unit/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import product_second_unit +from . import product_template diff --git a/product_secondary_unit/models/product_second_unit.py b/product_secondary_unit/models/product_second_unit.py new file mode 100755 index 00000000000..914186ad826 --- /dev/null +++ b/product_secondary_unit/models/product_second_unit.py @@ -0,0 +1,47 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + + +class ProductSecondaryUnit(models.Model): + _name = 'product.secondary.unit' + + name = fields.Char(required=True) + code = fields.Char() + product_tmpl_id = fields.Many2one( + comodel_name='product.template', + string='Product Template', + required=True, + ) + uom_id = fields.Many2one( + comodel_name='product.uom', + string='Secondary Unit of Measure', + required=True, + help="Default Secondary Unit of Measure.", + ) + factor = fields.Float( + string='Secondary Unit Factor', + default=1.0, + digits=0, + required=True, + ) + + @api.multi + def name_get(self): + result = [] + for unit in self: + result.append((unit.id, "{unit_name}-{factor}".format( + unit_name=unit.name, + factor=unit.factor)) + ) + return result + + @api.model + def name_search(self, name='', args=None, operator='ilike', limit=100): + if args is None: + args = [] + units = self.search([('code', '=', name)] + args, limit=1) + if not units: + return super(ProductSecondaryUnit, self).name_search( + name=name, args=args, operator=operator, limit=limit) + return units.name_get() diff --git a/product_secondary_unit/models/product_template.py b/product_secondary_unit/models/product_template.py new file mode 100755 index 00000000000..067316bdc60 --- /dev/null +++ b/product_secondary_unit/models/product_template.py @@ -0,0 +1,18 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + secondary_uom_ids = fields.One2many( + comodel_name='product.secondary.unit', + inverse_name='product_tmpl_id', + string='Secondary Unit of Measure', + help='Default Secondary Unit of Measure.', + ) + sale_secondary_uom_id = fields.Many2one( + comodel_name='product.secondary.unit', + string='Default unit sale', + ) diff --git a/product_secondary_unit/readme/CONTRIBUTORS.rst b/product_secondary_unit/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..b919cb776aa --- /dev/null +++ b/product_secondary_unit/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Carlos Dauden +* Sergio Teruel diff --git a/product_secondary_unit/readme/DESCRIPTION.rst b/product_secondary_unit/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..006bd6d63a2 --- /dev/null +++ b/product_secondary_unit/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the functionality of product module to allow define +other units with their conversion factor. diff --git a/product_secondary_unit/readme/USAGE.rst b/product_secondary_unit/readme/USAGE.rst new file mode 100644 index 00000000000..3f837c39383 --- /dev/null +++ b/product_secondary_unit/readme/USAGE.rst @@ -0,0 +1,5 @@ +To use this module you need to: + +#. Go to a *Product > General Information tab*. +#. Create any record in "Secondary unit of measure". +#. Set the conversion factor. diff --git a/product_secondary_unit/security/ir.model.access.csv b/product_secondary_unit/security/ir.model.access.csv new file mode 100644 index 00000000000..5ca549da6e5 --- /dev/null +++ b/product_secondary_unit/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_secondary_unit_user,access_product_second_unit_user,model_product_secondary_unit,base.group_user,1,1,1,1 diff --git a/product_secondary_unit/static/description/icon.png b/product_secondary_unit/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2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x{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/product_secondary_unit/tests/__init__.py b/product_secondary_unit/tests/__init__.py new file mode 100644 index 00000000000..62bc6773d19 --- /dev/null +++ b/product_secondary_unit/tests/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import test_product_second_unit diff --git a/product_secondary_unit/tests/test_product_second_unit.py b/product_secondary_unit/tests/test_product_second_unit.py new file mode 100644 index 00000000000..3b01607bba3 --- /dev/null +++ b/product_secondary_unit/tests/test_product_second_unit.py @@ -0,0 +1,52 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo.tests import SavepointCase + + +class TestProductSecondaryUnit(SavepointCase): + at_install = False + post_install = True + + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.product_uom_kg = cls.env.ref('product.product_uom_kgm') + cls.product_uom_unit = cls.env.ref('product.product_uom_unit') + cls.product = cls.env['product.template'].create({ + 'name': 'test', + 'uom_id': cls.product_uom_kg.id, + 'uom_po_id': cls.product_uom_kg.id, + 'secondary_uom_ids': [ + (0, 0, { + 'code': 'A', + 'name': 'unit-700', + 'uom_id': cls.product_uom_unit.id, + 'factor': 0.7, + }), + (0, 0, { + 'code': 'B', + 'name': 'unit-900', + 'uom_id': cls.product_uom_unit.id, + 'factor': 0.9, + }), + ], + }) + secondary_unit = cls.env['product.secondary.unit'].search([ + ('product_tmpl_id', '=', cls.product.id), + ], limit=1) + cls.product.sale_secondary_uom_id = secondary_unit.id + + def test_product_secondary_unit_name(self): + self.assertEqual( + self.product.sale_secondary_uom_id.name_get()[0][1], + 'unit-700-0.7') + + def test_product_secondary_unit_search(self): + args = [('product_tmpl_id.product_variant_ids', 'in', + self.product.product_variant_ids.ids)] + name_get = self.env['product.secondary.unit'].name_search( + name='A', args=args) + self.assertEqual(len(name_get), 1) + name_get = self.env['product.secondary.unit'].name_search( + name='X', args=args) + self.assertEqual(len(name_get), 0) diff --git a/product_secondary_unit/views/product_views.xml b/product_secondary_unit/views/product_views.xml new file mode 100755 index 00000000000..2ef69a3b719 --- /dev/null +++ b/product_secondary_unit/views/product_views.xml @@ -0,0 +1,32 @@ + + + + + + Product template Secondary Unit + product.template + + + + + + + + + + + + + + + + + + + + + + From 1196c938c724a9d6f8fbd27cd44f6050cbaa7a68 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 11 Oct 2018 18:02:50 +0000 Subject: [PATCH 026/210] [UPD] README.rst --- .../static/description/index.html | 431 ++++++++++++++++++ 1 file changed, 431 insertions(+) create mode 100644 product_secondary_unit/static/description/index.html diff --git a/product_secondary_unit/static/description/index.html b/product_secondary_unit/static/description/index.html new file mode 100644 index 00000000000..58907ad4632 --- /dev/null +++ b/product_secondary_unit/static/description/index.html @@ -0,0 +1,431 @@ + + + + + + +Product Secondary Unit + + + +
+

Product Secondary Unit

+ + +

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

+

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

+

Table of contents

+ +
+

Usage

+

To use this module you need to:

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

Bug Tracker

+

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

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/product-attribute project on GitHub.

+

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

+
+
+
+ + From 42a27abb55f4201842df5de9f12e561e6e61ef16 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 11 Oct 2018 18:02:50 +0000 Subject: [PATCH 027/210] [ADD] setup.py --- setup/_metapackage/VERSION.txt | 2 +- setup/_metapackage/setup.py | 1 + .../odoo/addons/product_secondary_unit | 1 + setup/product_secondary_unit/setup.cfg | 2 ++ setup/product_secondary_unit/setup.py | 6 ++++++ 5 files changed, 11 insertions(+), 1 deletion(-) create mode 120000 setup/product_secondary_unit/odoo/addons/product_secondary_unit create mode 100644 setup/product_secondary_unit/setup.cfg create mode 100644 setup/product_secondary_unit/setup.py diff --git a/setup/_metapackage/VERSION.txt b/setup/_metapackage/VERSION.txt index ea05d3ccba7..8de9fe7b7f5 100644 --- a/setup/_metapackage/VERSION.txt +++ b/setup/_metapackage/VERSION.txt @@ -1 +1 @@ -11.0.20180823.0 \ No newline at end of file +11.0.20181011.0 \ No newline at end of file diff --git a/setup/_metapackage/setup.py b/setup/_metapackage/setup.py index 8c85dd0521b..dac56184540 100644 --- a/setup/_metapackage/setup.py +++ b/setup/_metapackage/setup.py @@ -16,6 +16,7 @@ 'odoo11-addon-product_manufacturer', 'odoo11-addon-product_multi_category', 'odoo11-addon-product_priority', + 'odoo11-addon-product_secondary_unit', 'odoo11-addon-product_sequence', 'odoo11-addon-product_state', 'odoo11-addon-product_supplierinfo_revision', diff --git a/setup/product_secondary_unit/odoo/addons/product_secondary_unit b/setup/product_secondary_unit/odoo/addons/product_secondary_unit new file mode 120000 index 00000000000..243d462314d --- /dev/null +++ b/setup/product_secondary_unit/odoo/addons/product_secondary_unit @@ -0,0 +1 @@ +../../../../product_secondary_unit \ No newline at end of file diff --git a/setup/product_secondary_unit/setup.cfg b/setup/product_secondary_unit/setup.cfg new file mode 100644 index 00000000000..3c6e79cf31d --- /dev/null +++ b/setup/product_secondary_unit/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/setup/product_secondary_unit/setup.py b/setup/product_secondary_unit/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/product_secondary_unit/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From db7d2e75dfbced4118e1035e5da2f0982ec7d54b Mon Sep 17 00:00:00 2001 From: oca-travis Date: Thu, 11 Oct 2018 19:57:13 +0000 Subject: [PATCH 028/210] [UPD] Update product_secondary_unit.pot --- product_secondary_unit/i18n/es.po | 9 +- .../i18n/product_secondary_unit.pot | 106 ++++++++++++++++++ 2 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 product_secondary_unit/i18n/product_secondary_unit.pot diff --git a/product_secondary_unit/i18n/es.po b/product_secondary_unit/i18n/es.po index 5c936aecebb..a00fd986880 100644 --- a/product_secondary_unit/i18n/es.po +++ b/product_secondary_unit/i18n/es.po @@ -8,14 +8,19 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-09-05 10:03+0000\n" "PO-Revision-Date: 2018-09-05 12:05+0200\n" +"Last-Translator: \n" "Language-Team: \n" +"Language: es_ES\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 2.0.6\n" -"Last-Translator: \n" -"Language: es_ES\n" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_code +msgid "Code" +msgstr "" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid diff --git a/product_secondary_unit/i18n/product_secondary_unit.pot b/product_secondary_unit/i18n/product_secondary_unit.pot new file mode 100644 index 00000000000..69e6cd3a39f --- /dev/null +++ b/product_secondary_unit/i18n/product_secondary_unit.pot @@ -0,0 +1,106 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_secondary_unit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_code +msgid "Code" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid +msgid "Created by" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_date +msgid "Created on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,help:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,help:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,help:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Default Secondary Unit of Measure." +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_sale_secondary_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_sale_secondary_uom_id +msgid "Default unit sale" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_display_name +msgid "Display Name" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_id +msgid "ID" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_name +msgid "Name" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_template +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_product_tmpl_id +msgid "Product Template" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_factor +msgid "Secondary Unit Factor" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Secondary Unit of Measure" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_secondary_unit +msgid "product.secondary.unit" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary Unit" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary unit of measure" +msgstr "" + From 18c7d3a27061b2fdb9bdc5cd3a754c4070a2a1fe Mon Sep 17 00:00:00 2001 From: David Dufresne <27902736+ddufresne@users.noreply.github.com> Date: Fri, 12 Oct 2018 08:04:07 -0400 Subject: [PATCH 029/210] [IMP] product_brand: Make the kanban card of product.brand consistent with other odoo apps. (#364) * Make the logo always the same width (64px). * Remove the description (200 first caracters). Not relevant for a configuration model. * Move the brand name and product count beside the image. This is the way it is displayed in partners and products kanban views. --- product_brand/__manifest__.py | 2 +- product_brand/views/product_brand_view.xml | 22 ++++++---------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/product_brand/__manifest__.py b/product_brand/__manifest__.py index 57e28f79a77..9c58da5dc73 100644 --- a/product_brand/__manifest__.py +++ b/product_brand/__manifest__.py @@ -8,7 +8,7 @@ { 'name': 'Product Brand Manager', - 'version': '11.0.1.1.0', + 'version': '11.0.1.2.0', 'category': 'Product', 'summary': "Product Brand Manager", 'author': 'NetAndCo, Akretion, Prisnet Telecommunications SA, ' diff --git a/product_brand/views/product_brand_view.xml b/product_brand/views/product_brand_view.xml index d1bfae05b46..f8579219183 100644 --- a/product_brand/views/product_brand_view.xml +++ b/product_brand/views/product_brand_view.xml @@ -83,29 +83,19 @@ -
- - - +
+
+ +

- - - +

- - - - ... - -
From 62b60a9545c302dce0271a89fe2a01b5d4b78f1f Mon Sep 17 00:00:00 2001 From: oihane Date: Thu, 18 Sep 2014 10:49:56 +0200 Subject: [PATCH 030/210] --- product_supplierinfo_for_customer/__init__.py | 19 +++ .../__openerp__.py | 41 +++++++ product_supplierinfo_for_customer/i18n/es.po | 57 +++++++++ .../product_supplierinfo_for_customer.pot | 57 +++++++++ .../models/__init__.py | 21 ++++ .../models/product_supplierinfo.py | 36 ++++++ .../models/product_template.py | 32 +++++ .../models/res_partner.py | 34 ++++++ .../views/product_view.xml | 113 ++++++++++++++++++ 9 files changed, 410 insertions(+) create mode 100644 product_supplierinfo_for_customer/__init__.py create mode 100644 product_supplierinfo_for_customer/__openerp__.py create mode 100644 product_supplierinfo_for_customer/i18n/es.po create mode 100644 product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot create mode 100644 product_supplierinfo_for_customer/models/__init__.py create mode 100644 product_supplierinfo_for_customer/models/product_supplierinfo.py create mode 100644 product_supplierinfo_for_customer/models/product_template.py create mode 100644 product_supplierinfo_for_customer/models/res_partner.py create mode 100644 product_supplierinfo_for_customer/views/product_view.xml diff --git a/product_supplierinfo_for_customer/__init__.py b/product_supplierinfo_for_customer/__init__.py new file mode 100644 index 00000000000..7fc7c09f9b0 --- /dev/null +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/__openerp__.py b/product_supplierinfo_for_customer/__openerp__.py new file mode 100644 index 00000000000..2fc53288647 --- /dev/null +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/i18n/es.po b/product_supplierinfo_for_customer/i18n/es.po new file mode 100644 index 00000000000..1b8f413639d --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot b/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot new file mode 100644 index 00000000000..a48ab71467d --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/__init__.py b/product_supplierinfo_for_customer/models/__init__.py new file mode 100644 index 00000000000..67021782557 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_supplierinfo.py b/product_supplierinfo_for_customer/models/product_supplierinfo.py new file mode 100644 index 00000000000..8d9f5f6538a --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_template.py b/product_supplierinfo_for_customer/models/product_template.py new file mode 100644 index 00000000000..1c9fd3749d1 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/res_partner.py b/product_supplierinfo_for_customer/models/res_partner.py new file mode 100644 index 00000000000..97d8bb467a8 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml new file mode 100644 index 00000000000..ca1f111fac5 --- /dev/null +++ b/product_supplierinfo_for_customer/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 3787b5c16b5619c0a4e8b1239767ce9cf7072614 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 5 Feb 2015 17:30:02 +0100 Subject: [PATCH 031/210] product_supplierinfo_for_customer: Views and documentation --- product_supplierinfo_for_customer/README.rst | 19 +++++ .../__openerp__.py | 7 -- product_supplierinfo_for_customer/i18n/es.po | 71 +++++++++++++++---- .../product_supplierinfo_for_customer.pot | 67 +++++++++++++---- .../views/product_view.xml | 31 ++++---- 5 files changed, 147 insertions(+), 48 deletions(-) create mode 100644 product_supplierinfo_for_customer/README.rst diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst new file mode 100644 index 00000000000..35c4a20fab6 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/__openerp__.py b/product_supplierinfo_for_customer/__openerp__.py index 2fc53288647..33cef3643c3 100644 --- a/product_supplierinfo_for_customer/__openerp__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/i18n/es.po b/product_supplierinfo_for_customer/i18n/es.po index 1b8f413639d..df5232cbaa4 100644 --- a/product_supplierinfo_for_customer/i18n/es.po +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot b/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot index a48ab71467d..32dbe81b428 100644 --- a/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index ca1f111fac5..9024a2babf3 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 4497d711e4941fed5aea025c6c45c7096dea2a31 Mon Sep 17 00:00:00 2001 From: oihane Date: Wed, 11 Feb 2015 13:20:42 +0100 Subject: [PATCH 032/210] Related to #638 --- .../views/product_view.xml | 77 +++++++++++++++---- 1 file changed, 60 insertions(+), 17 deletions(-) diff --git a/product_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index 9024a2babf3..1482579b694 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 b1fcbe01e9c4b353b02855432e674a64e97a5d58 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 033/210] Slovene translations of odoomrp modules --- product_supplierinfo_for_customer/i18n/sl.po | 104 +++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 product_supplierinfo_for_customer/i18n/sl.po diff --git a/product_supplierinfo_for_customer/i18n/sl.po b/product_supplierinfo_for_customer/i18n/sl.po new file mode 100644 index 00000000000..e0423baa22e --- /dev/null +++ b/product_supplierinfo_for_customer/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 8bf0165ad3b3ec8d181797148b7d7bdf6c2d839b Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 27 Aug 2015 04:00:40 +0200 Subject: [PATCH 034/210] product_supplierinfo_for_customer: Avoid side effects + improve README --- product_supplierinfo_for_customer/README.rst | 37 ++++++++++++++++--- product_supplierinfo_for_customer/__init__.py | 2 +- .../__openerp__.py | 6 ++- .../models/__init__.py | 3 +- .../models/product_pricelist.py | 18 +++++++++ .../models/product_supplierinfo.py | 23 ++++++++++-- .../models/product_template.py | 16 ++++---- .../models/res_partner.py | 2 +- .../views/product_view.xml | 1 + 9 files changed, 85 insertions(+), 23 deletions(-) create mode 100644 product_supplierinfo_for_customer/models/product_pricelist.py diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst index 35c4a20fab6..8f1fd69696d 100644 --- a/product_supplierinfo_for_customer/README.rst +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/__init__.py b/product_supplierinfo_for_customer/__init__.py index 7fc7c09f9b0..a9609aa0b11 100644 --- a/product_supplierinfo_for_customer/__init__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/__openerp__.py b/product_supplierinfo_for_customer/__openerp__.py index 33cef3643c3..b9fc4c5384a 100644 --- a/product_supplierinfo_for_customer/__openerp__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/models/__init__.py b/product_supplierinfo_for_customer/models/__init__.py index 67021782557..b60c45a6539 100644 --- a/product_supplierinfo_for_customer/models/__init__.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_pricelist.py b/product_supplierinfo_for_customer/models/product_pricelist.py new file mode 100644 index 00000000000..49ee7421be6 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_supplierinfo.py b/product_supplierinfo_for_customer/models/product_supplierinfo.py index 8d9f5f6538a..a957eb839e5 100644 --- a/product_supplierinfo_for_customer/models/product_supplierinfo.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_template.py b/product_supplierinfo_for_customer/models/product_template.py index 1c9fd3749d1..8e84ddb61b8 100644 --- a/product_supplierinfo_for_customer/models/product_template.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/res_partner.py b/product_supplierinfo_for_customer/models/res_partner.py index 97d8bb467a8..6c7e0303075 100644 --- a/product_supplierinfo_for_customer/models/res_partner.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index 1482579b694..30f841710c1 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 e798208f72eaa24abd44996a0d1b2a156c02fa71 Mon Sep 17 00:00:00 2001 From: oihane Date: Thu, 3 Sep 2015 15:45:54 +0200 Subject: [PATCH 035/210] Create 'customer' type from menu option --- .../views/product_view.xml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/product_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index 30f841710c1..f6db3069922 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 76ddb80cbf0a3cdf951caeec44ac7c4dc0fa1841 Mon Sep 17 00:00:00 2001 From: oihane Date: Fri, 4 Sep 2015 12:57:15 +0200 Subject: [PATCH 036/210] Added know issue with computed fields --- product_supplierinfo_for_customer/README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst index 8f1fd69696d..dfacd33ea3f 100644 --- a/product_supplierinfo_for_customer/README.rst +++ b/product_supplierinfo_for_customer/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 bbc52af235392fa12dd5b3fa4ff1a248bf5ddeae Mon Sep 17 00:00:00 2001 From: alfredoavanzosc Date: Mon, 28 Sep 2015 16:50:37 +0200 Subject: [PATCH 037/210] product_supplierinfo_for_customer: Create "demo" data, and "tests" folder. --- product_supplierinfo_for_customer/__init__.py | 16 +------- .../__openerp__.py | 18 +++++---- .../demo/product_demo.xml | 15 +++++++ .../models/__init__.py | 16 +------- .../models/product_pricelist.py | 6 +-- .../models/product_supplierinfo.py | 16 +------- .../models/product_template.py | 16 +------- .../models/res_partner.py | 16 +------- .../tests/__init__.py | 5 +++ .../test_product_supplierinfo_for_customer.py | 40 +++++++++++++++++++ 10 files changed, 78 insertions(+), 86 deletions(-) create mode 100644 product_supplierinfo_for_customer/demo/product_demo.xml create mode 100644 product_supplierinfo_for_customer/tests/__init__.py create mode 100644 product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py diff --git a/product_supplierinfo_for_customer/__init__.py b/product_supplierinfo_for_customer/__init__.py index a9609aa0b11..2bbe2de9996 100644 --- a/product_supplierinfo_for_customer/__init__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/__openerp__.py b/product_supplierinfo_for_customer/__openerp__.py index b9fc4c5384a..e0de40d6284 100644 --- a/product_supplierinfo_for_customer/__openerp__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/demo/product_demo.xml b/product_supplierinfo_for_customer/demo/product_demo.xml new file mode 100644 index 00000000000..d667cc72421 --- /dev/null +++ b/product_supplierinfo_for_customer/demo/product_demo.xml @@ -0,0 +1,15 @@ + + + + + + + 1 + 1 + customer + + + + diff --git a/product_supplierinfo_for_customer/models/__init__.py b/product_supplierinfo_for_customer/models/__init__.py index b60c45a6539..3e4ccebb841 100644 --- a/product_supplierinfo_for_customer/models/__init__.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_pricelist.py b/product_supplierinfo_for_customer/models/product_pricelist.py index 49ee7421be6..cac559a0c09 100644 --- a/product_supplierinfo_for_customer/models/product_pricelist.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_supplierinfo.py b/product_supplierinfo_for_customer/models/product_supplierinfo.py index a957eb839e5..635c2ec1887 100644 --- a/product_supplierinfo_for_customer/models/product_supplierinfo.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_template.py b/product_supplierinfo_for_customer/models/product_template.py index 8e84ddb61b8..4fa58d94acd 100644 --- a/product_supplierinfo_for_customer/models/product_template.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/res_partner.py b/product_supplierinfo_for_customer/models/res_partner.py index 6c7e0303075..8e41b79cb5d 100644 --- a/product_supplierinfo_for_customer/models/res_partner.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/tests/__init__.py b/product_supplierinfo_for_customer/tests/__init__.py new file mode 100644 index 00000000000..bc0476c8174 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py b/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py new file mode 100644 index 00000000000..c2723f1e217 --- /dev/null +++ b/product_supplierinfo_for_customer/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 56057b78a59cc3905dce3dc7aa32e31128d35081 Mon Sep 17 00:00:00 2001 From: Javier Iniesta Date: Thu, 22 Oct 2015 13:30:50 +0200 Subject: [PATCH 038/210] license target link --- product_supplierinfo_for_customer/README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst index dfacd33ea3f..a51a69d4454 100644 --- a/product_supplierinfo_for_customer/README.rst +++ b/product_supplierinfo_for_customer/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 d55c003a3cf0f513312312198d332473483ccdd2 Mon Sep 17 00:00:00 2001 From: Javier Iniesta Date: Thu, 22 Oct 2015 13:51:45 +0200 Subject: [PATCH 039/210] OCA as author added --- product_supplierinfo_for_customer/__openerp__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product_supplierinfo_for_customer/__openerp__.py b/product_supplierinfo_for_customer/__openerp__.py index e0de40d6284..dcf3495737c 100644 --- a/product_supplierinfo_for_customer/__openerp__.py +++ b/product_supplierinfo_for_customer/__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', From 544b3711739542d7b11da4b3bd994b505e68ec73 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Tue, 29 Nov 2016 09:26:01 -0500 Subject: [PATCH 040/210] OCA Transbot updated translations from Transifex --- product_supplierinfo_for_customer/i18n/de.po | 128 +++++++++++++++++++ product_supplierinfo_for_customer/i18n/es.po | 53 +++++--- product_supplierinfo_for_customer/i18n/fr.po | 123 ++++++++++++++++++ product_supplierinfo_for_customer/i18n/sl.po | 46 +++++-- 4 files changed, 324 insertions(+), 26 deletions(-) create mode 100644 product_supplierinfo_for_customer/i18n/de.po create mode 100644 product_supplierinfo_for_customer/i18n/fr.po diff --git a/product_supplierinfo_for_customer/i18n/de.po b/product_supplierinfo_for_customer/i18n/de.po new file mode 100644 index 00000000000..49246583ecf --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/i18n/es.po b/product_supplierinfo_for_customer/i18n/es.po index df5232cbaa4..027bca24642 100644 --- a/product_supplierinfo_for_customer/i18n/es.po +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/i18n/fr.po b/product_supplierinfo_for_customer/i18n/fr.po new file mode 100644 index 00000000000..a0c9aad1161 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/i18n/sl.po b/product_supplierinfo_for_customer/i18n/sl.po index e0423baa22e..ad5fa16f4dd 100644 --- a/product_supplierinfo_for_customer/i18n/sl.po +++ b/product_supplierinfo_for_customer/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 384bc31519d07dd2cb6adddbdd66537c391063a7 Mon Sep 17 00:00:00 2001 From: Yennifer Santiago Date: Wed, 28 Jun 2017 14:41:57 +0000 Subject: [PATCH 041/210] product_customer_code: New README. [REF] product_supplierinfo_for_customer: Complete README. --- product_supplierinfo_for_customer/README.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst index a51a69d4454..0faca127474 100644 --- a/product_supplierinfo_for_customer/README.rst +++ b/product_supplierinfo_for_customer/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 96f5cbe36187f598898859de4ac6e3a3f8e33f11 Mon Sep 17 00:00:00 2001 From: aheficent Date: Mon, 31 Jul 2017 15:21:58 +0200 Subject: [PATCH 042/210] product_supplierinfo_for_customer to v9 --- product_supplierinfo_for_customer/README.rst | 5 +- .../__openerp__.py | 28 ++------ .../demo/product_demo.xml | 3 - .../models/__init__.py | 1 - .../models/product_pricelist.py | 18 ----- .../test_product_supplierinfo_for_customer.py | 69 ++++++++++++++++--- .../views/product_view.xml | 27 ++++---- 7 files changed, 82 insertions(+), 69 deletions(-) delete mode 100644 product_supplierinfo_for_customer/models/product_pricelist.py diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst index 0faca127474..a2d9df46b21 100644 --- a/product_supplierinfo_for_customer/README.rst +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/__openerp__.py b/product_supplierinfo_for_customer/__openerp__.py index dcf3495737c..24881a189a5 100644 --- a/product_supplierinfo_for_customer/__openerp__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/demo/product_demo.xml b/product_supplierinfo_for_customer/demo/product_demo.xml index d667cc72421..c6a331f13d3 100644 --- a/product_supplierinfo_for_customer/demo/product_demo.xml +++ b/product_supplierinfo_for_customer/demo/product_demo.xml @@ -7,9 +7,6 @@ 1 1 customer - diff --git a/product_supplierinfo_for_customer/models/__init__.py b/product_supplierinfo_for_customer/models/__init__.py index 3e4ccebb841..f4daa63b35a 100644 --- a/product_supplierinfo_for_customer/models/__init__.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_pricelist.py b/product_supplierinfo_for_customer/models/product_pricelist.py deleted file mode 100644 index cac559a0c09..00000000000 --- a/product_supplierinfo_for_customer/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_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py b/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py index c2723f1e217..23940de587f 100644 --- a/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index f6db3069922..ddeee2e809e 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 88dc35d20c969bbe2ee0eb6d6c41df3138fb7794 Mon Sep 17 00:00:00 2001 From: aheficent Date: Fri, 29 Sep 2017 16:13:53 +0200 Subject: [PATCH 043/210] [MIG] product_supplierinfo_for_customer to v10 --- product_supplierinfo_for_customer/README.rst | 17 ++--- product_supplierinfo_for_customer/__init__.py | 3 - .../{__openerp__.py => __manifest__.py} | 10 +-- .../demo/product_demo.xml | 4 +- .../models/__init__.py | 3 - .../models/product_supplierinfo.py | 20 +++--- .../models/product_template.py | 9 +-- .../models/res_partner.py | 9 +-- .../tests/__init__.py | 3 - .../test_product_supplierinfo_for_customer.py | 9 +-- .../views/product_view.xml | 64 +++++++++++++------ 11 files changed, 81 insertions(+), 70 deletions(-) rename product_supplierinfo_for_customer/{__openerp__.py => __manifest__.py} (77%) diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst index a2d9df46b21..601c1edec91 100644 --- a/product_supplierinfo_for_customer/README.rst +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/__init__.py b/product_supplierinfo_for_customer/__init__.py index 2bbe2de9996..a0fdc10fe11 100644 --- a/product_supplierinfo_for_customer/__init__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/__openerp__.py b/product_supplierinfo_for_customer/__manifest__.py similarity index 77% rename from product_supplierinfo_for_customer/__openerp__.py rename to product_supplierinfo_for_customer/__manifest__.py index 24881a189a5..f61cd9647dd 100644 --- a/product_supplierinfo_for_customer/__openerp__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/demo/product_demo.xml b/product_supplierinfo_for_customer/demo/product_demo.xml index c6a331f13d3..123cbe06e8a 100644 --- a/product_supplierinfo_for_customer/demo/product_demo.xml +++ b/product_supplierinfo_for_customer/demo/product_demo.xml @@ -1,5 +1,5 @@ - + @@ -9,4 +9,4 @@ customer - + diff --git a/product_supplierinfo_for_customer/models/__init__.py b/product_supplierinfo_for_customer/models/__init__.py index f4daa63b35a..fe99cab361e 100644 --- a/product_supplierinfo_for_customer/models/__init__.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_supplierinfo.py b/product_supplierinfo_for_customer/models/product_supplierinfo.py index 635c2ec1887..5c01d9ab558 100644 --- a/product_supplierinfo_for_customer/models/product_supplierinfo.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_template.py b/product_supplierinfo_for_customer/models/product_template.py index 4fa58d94acd..360562a9cd3 100644 --- a/product_supplierinfo_for_customer/models/product_template.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/res_partner.py b/product_supplierinfo_for_customer/models/res_partner.py index 8e41b79cb5d..7ca95f3abe7 100644 --- a/product_supplierinfo_for_customer/models/res_partner.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/tests/__init__.py b/product_supplierinfo_for_customer/tests/__init__.py index bc0476c8174..02b8a718f29 100644 --- a/product_supplierinfo_for_customer/tests/__init__.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py b/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py index 23940de587f..41cdf12aacd 100644 --- a/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index ddeee2e809e..5721a982615 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 e3498ffbfc17411fdee8b11583c8e196cc56acfc Mon Sep 17 00:00:00 2001 From: aheficent Date: Mon, 6 Nov 2017 18:02:06 +0100 Subject: [PATCH 044/210] [IMP] Add back the option to import the prices from supplierinfo to PL --- product_supplierinfo_for_customer/README.rst | 5 +- .../models/__init__.py | 2 + .../models/pricelist.py | 24 ++ .../models/product_product.py | 50 +++ .../test_product_supplierinfo_for_customer.py | 22 ++ .../views/product_view.xml | 321 +++++++++--------- 6 files changed, 261 insertions(+), 163 deletions(-) create mode 100644 product_supplierinfo_for_customer/models/pricelist.py create mode 100644 product_supplierinfo_for_customer/models/product_product.py diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst index 601c1edec91..a6f4d2f41e2 100644 --- a/product_supplierinfo_for_customer/README.rst +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/__init__.py b/product_supplierinfo_for_customer/models/__init__.py index fe99cab361e..6ab9a3a8829 100644 --- a/product_supplierinfo_for_customer/models/__init__.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/pricelist.py b/product_supplierinfo_for_customer/models/pricelist.py new file mode 100644 index 00000000000..c180d689642 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_product.py b/product_supplierinfo_for_customer/models/product_product.py new file mode 100644 index 00000000000..4f5a5cbbbc2 --- /dev/null +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py b/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py index 41cdf12aacd..bfe104094d1 100644 --- a/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index 5721a982615..5f3ba00d696 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 d49e2575632e2277bb7d92f19b3589ed948b1e31 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sat, 30 Jun 2018 00:27:50 +0000 Subject: [PATCH 045/210] [UPD] Update product_supplierinfo_for_customer.pot --- .../product_supplierinfo_for_customer.pot | 88 +++++++++++++------ 1 file changed, 63 insertions(+), 25 deletions(-) diff --git a/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot b/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot index 32dbe81b428..57e77057e22 100644 --- a/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot +++ b/product_supplierinfo_for_customer/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 "" + From bbdacc83a062af45bf213f0fc3d63a20fdd225d6 Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 9 Jul 2018 16:49:00 +0200 Subject: [PATCH 046/210] [FIX] Move some views to product_supplierinfo_for_customer_sale --- .../__manifest__.py | 2 +- .../views/product_view.xml | 64 ------------------- 2 files changed, 1 insertion(+), 65 deletions(-) diff --git a/product_supplierinfo_for_customer/__manifest__.py b/product_supplierinfo_for_customer/__manifest__.py index f61cd9647dd..b8de7035987 100644 --- a/product_supplierinfo_for_customer/__manifest__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index 5f3ba00d696..1a003c31584 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 b4ef87484658ff977e2dcc2cf60a302a5483c1c9 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Thu, 12 Jul 2018 10:26:03 +0000 Subject: [PATCH 047/210] [UPD] Update product_supplierinfo_for_customer.pot --- .../product_supplierinfo_for_customer.pot | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot b/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot index 57e77057e22..36974fdcc65 100644 --- a/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot +++ b/product_supplierinfo_for_customer/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 "" From 2eec5761658d72442517653f211c2cae431ae6dc Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 16 Jul 2018 16:49:57 +0200 Subject: [PATCH 048/210] [REF] Don't overwrite views and fix view for customers --- .../__manifest__.py | 2 +- .../models/pricelist.py | 15 +-- .../views/product_view.xml | 109 +++++++++--------- 3 files changed, 57 insertions(+), 69 deletions(-) diff --git a/product_supplierinfo_for_customer/__manifest__.py b/product_supplierinfo_for_customer/__manifest__.py index b8de7035987..14b19abd177 100644 --- a/product_supplierinfo_for_customer/__manifest__.py +++ b/product_supplierinfo_for_customer/__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_supplierinfo_for_customer/models/pricelist.py b/product_supplierinfo_for_customer/models/pricelist.py index c180d689642..8987abb0688 100644 --- a/product_supplierinfo_for_customer/models/pricelist.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index 1a003c31584..627e281eb2c 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 985da89a30bb4d645a55fe0bb547d398081ef9bb Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 15 Oct 2018 13:36:27 +0200 Subject: [PATCH 057/210] [IMP] Use variant one2many introduced in v11 like variant_seller_ids --- .../models/product_template.py | 3 +++ .../views/product_view.xml | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/product_supplierinfo_for_customer/models/product_template.py b/product_supplierinfo_for_customer/models/product_template.py index 5bfe24c3b6a..0adad953802 100644 --- a/product_supplierinfo_for_customer/models/product_template.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index f1ee1e9ecfb..59c4a6982f1 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_product.py b/product_supplierinfo_for_customer/models/product_product.py index 31192b0b408..b83d73d2f10 100644 --- a/product_supplierinfo_for_customer/models/product_product.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_supplierinfo.py b/product_supplierinfo_for_customer/models/product_supplierinfo.py index c1356008a1c..4de9ded02ea 100644 --- a/product_supplierinfo_for_customer/models/product_supplierinfo.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/models/product_template.py b/product_supplierinfo_for_customer/models/product_template.py index 0adad953802..3c81688b4e5 100644 --- a/product_supplierinfo_for_customer/models/product_template.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py b/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py index 4ba218854b4..0ed66c351d6 100644 --- a/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index 59c4a6982f1..b812f9781e2 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/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 3cc82023611a27161594ac3a487b88569d221463 Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 15 Oct 2018 14:43:31 +0200 Subject: [PATCH 059/210] [IMP] Change to SavepointCase some tests --- .../test_product_supplierinfo_for_customer.py | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py b/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py index 0ed66c351d6..e716cca0d1b 100644 --- a/product_supplierinfo_for_customer/tests/test_product_supplierinfo_for_customer.py +++ b/product_supplierinfo_for_customer/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 3b0eeb999a9016d6ce95a4286930ab4e72b7f85d Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 18 Oct 2018 19:03:20 +0000 Subject: [PATCH 060/210] [UPD] README.rst --- product_supplierinfo_for_customer/README.rst | 68 ++- .../static/description/index.html | 451 ++++++++++++++++++ 2 files changed, 502 insertions(+), 17 deletions(-) create mode 100644 product_supplierinfo_for_customer/static/description/index.html diff --git a/product_supplierinfo_for_customer/README.rst b/product_supplierinfo_for_customer/README.rst index 047cafc1180..2c7f4fdbac3 100644 --- a/product_supplierinfo_for_customer/README.rst +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/static/description/index.html b/product_supplierinfo_for_customer/static/description/index.html new file mode 100644 index 00000000000..aeab64507d6 --- /dev/null +++ b/product_supplierinfo_for_customer/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.

+
+
+
+ + From 8952aa13d1e71b0521a75a1a41b5f7b43c96eac9 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 18 Oct 2018 19:03:20 +0000 Subject: [PATCH 061/210] [ADD] setup.py --- setup/_metapackage/VERSION.txt | 2 +- setup/_metapackage/setup.py | 1 + .../odoo/addons/product_supplierinfo_for_customer | 1 + setup/product_supplierinfo_for_customer/setup.cfg | 2 ++ setup/product_supplierinfo_for_customer/setup.py | 6 ++++++ 5 files changed, 11 insertions(+), 1 deletion(-) create mode 120000 setup/product_supplierinfo_for_customer/odoo/addons/product_supplierinfo_for_customer create mode 100644 setup/product_supplierinfo_for_customer/setup.cfg create mode 100644 setup/product_supplierinfo_for_customer/setup.py diff --git a/setup/_metapackage/VERSION.txt b/setup/_metapackage/VERSION.txt index 8de9fe7b7f5..f2bdf603933 100644 --- a/setup/_metapackage/VERSION.txt +++ b/setup/_metapackage/VERSION.txt @@ -1 +1 @@ -11.0.20181011.0 \ No newline at end of file +11.0.20181018.0 \ No newline at end of file diff --git a/setup/_metapackage/setup.py b/setup/_metapackage/setup.py index dac56184540..c3d33e5900a 100644 --- a/setup/_metapackage/setup.py +++ b/setup/_metapackage/setup.py @@ -19,6 +19,7 @@ 'odoo11-addon-product_secondary_unit', 'odoo11-addon-product_sequence', 'odoo11-addon-product_state', + 'odoo11-addon-product_supplierinfo_for_customer', 'odoo11-addon-product_supplierinfo_revision', 'odoo11-addon-product_weight', 'odoo11-addon-stock_production_lot_firmware_version', diff --git a/setup/product_supplierinfo_for_customer/odoo/addons/product_supplierinfo_for_customer b/setup/product_supplierinfo_for_customer/odoo/addons/product_supplierinfo_for_customer new file mode 120000 index 00000000000..b4ca0a600ad --- /dev/null +++ b/setup/product_supplierinfo_for_customer/odoo/addons/product_supplierinfo_for_customer @@ -0,0 +1 @@ +../../../../product_supplierinfo_for_customer \ No newline at end of file diff --git a/setup/product_supplierinfo_for_customer/setup.cfg b/setup/product_supplierinfo_for_customer/setup.cfg new file mode 100644 index 00000000000..3c6e79cf31d --- /dev/null +++ b/setup/product_supplierinfo_for_customer/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/setup/product_supplierinfo_for_customer/setup.py b/setup/product_supplierinfo_for_customer/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/product_supplierinfo_for_customer/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From 33d67eeab90995b90a8d2db3e87ff254d8b226ee Mon Sep 17 00:00:00 2001 From: oca-travis Date: Thu, 18 Oct 2018 19:43:25 +0000 Subject: [PATCH 062/210] [UPD] Update product_supplierinfo_for_customer.pot --- .../product_supplierinfo_for_customer.pot | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot b/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot index 5db6549bb27..c3d0ffe94c5 100644 --- a/product_supplierinfo_for_customer/i18n/product_supplierinfo_for_customer.pot +++ b/product_supplierinfo_for_customer/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 "" From 53a437c0cde3686f84698d69bf46a0455d1736de Mon Sep 17 00:00:00 2001 From: Sergio Teruel Date: Thu, 25 Oct 2018 23:00:02 +0200 Subject: [PATCH 063/210] [11.0][ADD] product_secondary_unit: Add default secondary unit for purchases --- product_secondary_unit/__manifest__.py | 2 +- product_secondary_unit/i18n/es.po | 12 ++++++++++-- product_secondary_unit/models/product_template.py | 4 ---- .../tests/test_product_second_unit.py | 7 ++----- product_secondary_unit/views/product_views.xml | 5 ----- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/product_secondary_unit/__manifest__.py b/product_secondary_unit/__manifest__.py index 7a04b95f739..3eff04f5948 100644 --- a/product_secondary_unit/__manifest__.py +++ b/product_secondary_unit/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Product Secondary Unit', 'summary': 'Set a secondary unit per product', - 'version': '11.0.1.0.0', + 'version': '11.0.1.0.1', 'development_status': 'Beta', 'category': 'Product', 'website': 'https://github.com/OCA/product-attribute', diff --git a/product_secondary_unit/i18n/es.po b/product_secondary_unit/i18n/es.po index a00fd986880..b8ce1848db4 100644 --- a/product_secondary_unit/i18n/es.po +++ b/product_secondary_unit/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-05 10:03+0000\n" -"PO-Revision-Date: 2018-09-05 12:05+0200\n" +"POT-Creation-Date: 2018-10-26 10:00+0000\n" +"PO-Revision-Date: 2018-10-26 12:01+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: es_ES\n" @@ -39,6 +39,14 @@ msgstr "Creado en" msgid "Default Secondary Unit of Measure." msgstr "Segunda unidad de medida por defecto" +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_purchase_secondary_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_purchase_secondary_uom_id +#, fuzzy +#| msgid "Default unit sale" +msgid "Default unit purchase" +msgstr "Unidad de venta por defecto" + #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_sale_secondary_uom_id #: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_sale_secondary_uom_id diff --git a/product_secondary_unit/models/product_template.py b/product_secondary_unit/models/product_template.py index 067316bdc60..b729a648a27 100755 --- a/product_secondary_unit/models/product_template.py +++ b/product_secondary_unit/models/product_template.py @@ -12,7 +12,3 @@ class ProductTemplate(models.Model): string='Secondary Unit of Measure', help='Default Secondary Unit of Measure.', ) - sale_secondary_uom_id = fields.Many2one( - comodel_name='product.secondary.unit', - string='Default unit sale', - ) diff --git a/product_secondary_unit/tests/test_product_second_unit.py b/product_secondary_unit/tests/test_product_second_unit.py index 3b01607bba3..f05b1bb936e 100644 --- a/product_secondary_unit/tests/test_product_second_unit.py +++ b/product_secondary_unit/tests/test_product_second_unit.py @@ -31,15 +31,12 @@ def setUpClass(cls): }), ], }) - secondary_unit = cls.env['product.secondary.unit'].search([ + cls.secondary_unit = cls.env['product.secondary.unit'].search([ ('product_tmpl_id', '=', cls.product.id), ], limit=1) - cls.product.sale_secondary_uom_id = secondary_unit.id def test_product_secondary_unit_name(self): - self.assertEqual( - self.product.sale_secondary_uom_id.name_get()[0][1], - 'unit-700-0.7') + self.assertEqual(self.secondary_unit.name_get()[0][1], 'unit-700-0.7') def test_product_secondary_unit_search(self): args = [('product_tmpl_id.product_variant_ids', 'in', diff --git a/product_secondary_unit/views/product_views.xml b/product_secondary_unit/views/product_views.xml index 2ef69a3b719..c0f2817b410 100755 --- a/product_secondary_unit/views/product_views.xml +++ b/product_secondary_unit/views/product_views.xml @@ -9,11 +9,6 @@ - - - From af8677381c62a7c1e10f11f3476aeb73a25ac479 Mon Sep 17 00:00:00 2001 From: William Olhasque Date: Mon, 5 Nov 2018 11:07:01 +0000 Subject: [PATCH 064/210] Added translation using Weblate (French) --- product_secondary_unit/i18n/fr.po | 106 ++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 product_secondary_unit/i18n/fr.po diff --git a/product_secondary_unit/i18n/fr.po b/product_secondary_unit/i18n/fr.po new file mode 100644 index 00000000000..990c63616fc --- /dev/null +++ b/product_secondary_unit/i18n/fr.po @@ -0,0 +1,106 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_secondary_unit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_code +msgid "Code" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid +msgid "Created by" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_date +msgid "Created on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,help:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,help:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,help:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Default Secondary Unit of Measure." +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_sale_secondary_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_sale_secondary_uom_id +msgid "Default unit sale" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_display_name +msgid "Display Name" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_id +msgid "ID" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_name +msgid "Name" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_template +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_product_tmpl_id +msgid "Product Template" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_factor +msgid "Secondary Unit Factor" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_secondary_uom_ids +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_uom_id +#: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_secondary_uom_ids +msgid "Secondary Unit of Measure" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.model,name:product_secondary_unit.model_product_secondary_unit +msgid "product.secondary.unit" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary Unit" +msgstr "" + +#. module: product_secondary_unit +#: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view +msgid "secondary unit of measure" +msgstr "" From 1e45bd982442e12f39f082af961b6ace8929f864 Mon Sep 17 00:00:00 2001 From: William Olhasque Date: Mon, 5 Nov 2018 11:07:30 +0000 Subject: [PATCH 065/210] Translated using Weblate (French) Currently translated at 100.0% (17 of 17 strings) Translation: product-attribute-11.0/product-attribute-11.0-product_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_secondary_unit/fr/ --- product_secondary_unit/i18n/fr.po | 38 ++++++++++++++++--------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/product_secondary_unit/i18n/fr.po b/product_secondary_unit/i18n/fr.po index 990c63616fc..e0e87d3d298 100644 --- a/product_secondary_unit/i18n/fr.po +++ b/product_secondary_unit/i18n/fr.po @@ -6,101 +6,103 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2018-11-06 11:25+0000\n" +"Last-Translator: William Olhasque \n" "Language-Team: none\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.2.2\n" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_code msgid "Code" -msgstr "" +msgstr "Code" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_uid msgid "Created by" -msgstr "" +msgstr "Créé par" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_create_date msgid "Created on" -msgstr "" +msgstr "Créé le" #. module: product_secondary_unit #: model:ir.model.fields,help:product_secondary_unit.field_product_product_secondary_uom_ids #: model:ir.model.fields,help:product_secondary_unit.field_product_secondary_unit_uom_id #: model:ir.model.fields,help:product_secondary_unit.field_product_template_secondary_uom_ids msgid "Default Secondary Unit of Measure." -msgstr "" +msgstr "Unité de mesure secondaire par défaut." #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_sale_secondary_uom_id #: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_sale_secondary_uom_id msgid "Default unit sale" -msgstr "" +msgstr "Unité de vente par défaut" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_display_name msgid "Display Name" -msgstr "" +msgstr "Nom affiché" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_id msgid "ID" -msgstr "" +msgstr "ID" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit___last_update msgid "Last Modified on" -msgstr "" +msgstr "Dernière Modification le" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_uid msgid "Last Updated by" -msgstr "" +msgstr "Dernière mise à jour par" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_write_date msgid "Last Updated on" -msgstr "" +msgstr "Dernière mise à jour le" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_name msgid "Name" -msgstr "" +msgstr "Nom" #. module: product_secondary_unit #: model:ir.model,name:product_secondary_unit.model_product_template #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_product_tmpl_id msgid "Product Template" -msgstr "" +msgstr "Modèle de produit" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_factor msgid "Secondary Unit Factor" -msgstr "" +msgstr "Facteur de l'unité secondaire" #. module: product_secondary_unit #: model:ir.model.fields,field_description:product_secondary_unit.field_product_product_secondary_uom_ids #: model:ir.model.fields,field_description:product_secondary_unit.field_product_secondary_unit_uom_id #: model:ir.model.fields,field_description:product_secondary_unit.field_product_template_secondary_uom_ids msgid "Secondary Unit of Measure" -msgstr "" +msgstr "Unité de mesure secondaire" #. module: product_secondary_unit #: model:ir.model,name:product_secondary_unit.model_product_secondary_unit msgid "product.secondary.unit" -msgstr "" +msgstr "product.secondary.unit" #. module: product_secondary_unit #: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view msgid "secondary Unit" -msgstr "" +msgstr "Unité secondaire" #. module: product_secondary_unit #: model:ir.ui.view,arch_db:product_secondary_unit.product_template_form_view msgid "secondary unit of measure" -msgstr "" +msgstr "Unité de mesure secondaire" From ca20d6fc8935e7b9f3c150a2c9094f419a559463 Mon Sep 17 00:00:00 2001 From: Sergio Teruel Date: Fri, 16 Nov 2018 16:36:31 +0100 Subject: [PATCH 066/210] [11.0][ADD] product_cost_security: New module to restrict product cost view --- product_cost_security/__init__.py | 2 ++ product_cost_security/__manifest__.py | 20 +++++++++++ product_cost_security/l18n/es.po | 33 ++++++++++++++++++ product_cost_security/models/__init__.py | 2 ++ product_cost_security/models/product.py | 19 ++++++++++ product_cost_security/readme/CONTRIBUTORS.rst | 1 + product_cost_security/readme/DESCRIPTION.rst | 2 ++ product_cost_security/readme/USAGE.rst | 6 ++++ .../security/product_cost_security.xml | 10 ++++++ .../static/description/icon.png | Bin 0 -> 9455 bytes 10 files changed, 95 insertions(+) create mode 100644 product_cost_security/__init__.py create mode 100644 product_cost_security/__manifest__.py create mode 100644 product_cost_security/l18n/es.po create mode 100644 product_cost_security/models/__init__.py create mode 100644 product_cost_security/models/product.py create mode 100644 product_cost_security/readme/CONTRIBUTORS.rst create mode 100644 product_cost_security/readme/DESCRIPTION.rst create mode 100644 product_cost_security/readme/USAGE.rst create mode 100644 product_cost_security/security/product_cost_security.xml create mode 100644 product_cost_security/static/description/icon.png diff --git a/product_cost_security/__init__.py b/product_cost_security/__init__.py new file mode 100644 index 00000000000..3275ac2adf3 --- /dev/null +++ b/product_cost_security/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import models diff --git a/product_cost_security/__manifest__.py b/product_cost_security/__manifest__.py new file mode 100644 index 00000000000..307ba5df9df --- /dev/null +++ b/product_cost_security/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + 'name': 'Product Cost Security', + 'summary': 'Product cost security restriction view', + 'version': '11.0.1.0.0', + 'development_status': 'Beta', + 'category': 'Product', + 'website': 'https://github.com/OCA/product-attribute', + 'author': 'Tecnativa, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': [ + 'product', + ], + 'data': [ + 'security/product_cost_security.xml', + ], +} diff --git a/product_cost_security/l18n/es.po b/product_cost_security/l18n/es.po new file mode 100644 index 00000000000..1f02ace8d45 --- /dev/null +++ b/product_cost_security/l18n/es.po @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_cost_security +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-11-16 15:34+0000\n" +"PO-Revision-Date: 2018-11-16 16:35+0100\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.0.6\n" +"Last-Translator: \n" +"Language: es\n" + +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_cost +msgid "Access to product costs" +msgstr "Acceso a ver el coste de productos" + +#. module: product_cost_security +#: model:ir.model,name:product_cost_security.model_product_product +msgid "Product" +msgstr "Producto" + +#. module: product_cost_security +#: model:ir.model,name:product_cost_security.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" diff --git a/product_cost_security/models/__init__.py b/product_cost_security/models/__init__.py new file mode 100644 index 00000000000..05b2491b81e --- /dev/null +++ b/product_cost_security/models/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import product diff --git a/product_cost_security/models/product.py b/product_cost_security/models/product.py new file mode 100644 index 00000000000..930295b4d3b --- /dev/null +++ b/product_cost_security/models/product.py @@ -0,0 +1,19 @@ +# Copyright 2018 Sergio Teruel - Tecnativa +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + standard_price = fields.Float( + groups='product_cost_security.group_product_cost', + ) + + +class ProductProduct(models.Model): + _inherit = 'product.product' + + standard_price = fields.Float( + groups='product_cost_security.group_product_cost', + ) diff --git a/product_cost_security/readme/CONTRIBUTORS.rst b/product_cost_security/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..f24a0b0dc74 --- /dev/null +++ b/product_cost_security/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Sergio Teruel diff --git a/product_cost_security/readme/DESCRIPTION.rst b/product_cost_security/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..67338debe44 --- /dev/null +++ b/product_cost_security/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Add a security group for product standar_price field. +Only users with this group can view this field. diff --git a/product_cost_security/readme/USAGE.rst b/product_cost_security/readme/USAGE.rst new file mode 100644 index 00000000000..3bd7527284c --- /dev/null +++ b/product_cost_security/readme/USAGE.rst @@ -0,0 +1,6 @@ +To use this module you need to: + +#. Go to a *Setting > Users and Companies > Users*. +#. Select a user and add "Access to product costs" group. +#. Go to product form view logged with this user and you will see the + standard_price field. diff --git a/product_cost_security/security/product_cost_security.xml b/product_cost_security/security/product_cost_security.xml new file mode 100644 index 00000000000..25b9e4dd69c --- /dev/null +++ b/product_cost_security/security/product_cost_security.xml @@ -0,0 +1,10 @@ + + + + + Access to product costs + + + diff --git a/product_cost_security/static/description/icon.png b/product_cost_security/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2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I_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From c5402a1b9f4f821886e9c4298c046d121a97fb39 Mon Sep 17 00:00:00 2001 From: Sergio Teruel Date: Thu, 22 Nov 2018 10:00:41 +0100 Subject: [PATCH 067/210] [11.0][FIX] product_supplierinfo_for_customer: Hide variant suppliers in product template --- product_supplierinfo_for_customer/views/product_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_supplierinfo_for_customer/views/product_view.xml b/product_supplierinfo_for_customer/views/product_view.xml index b812f9781e2..7a0a96683b6 100644 --- a/product_supplierinfo_for_customer/views/product_view.xml +++ b/product_supplierinfo_for_customer/views/product_view.xml @@ -114,7 +114,7 @@ - + Date: Tue, 27 Nov 2018 09:21:10 +0000 Subject: [PATCH 069/210] Update translation files Updated by Update PO files to match POT (msgmerge) hook in Weblate. --- product_supplierinfo_for_customer/i18n/de.po | 165 +++++++++++------- product_supplierinfo_for_customer/i18n/es.po | 140 +++++++++------- product_supplierinfo_for_customer/i18n/fr.po | 113 +++++++------ product_supplierinfo_for_customer/i18n/sl.po | 167 +++++++++++-------- 4 files changed, 340 insertions(+), 245 deletions(-) diff --git a/product_supplierinfo_for_customer/i18n/de.po b/product_supplierinfo_for_customer/i18n/de.po index 49246583ecf..624f3fc94c6 100644 --- a/product_supplierinfo_for_customer/i18n/de.po +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/i18n/es.po b/product_supplierinfo_for_customer/i18n/es.po index 027bca24642..9f089db2f9b 100644 --- a/product_supplierinfo_for_customer/i18n/es.po +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/i18n/fr.po b/product_supplierinfo_for_customer/i18n/fr.po index a0c9aad1161..d085395b65b 100644 --- a/product_supplierinfo_for_customer/i18n/fr.po +++ b/product_supplierinfo_for_customer/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_supplierinfo_for_customer/i18n/sl.po b/product_supplierinfo_for_customer/i18n/sl.po index ad5fa16f4dd..f0dbb6da55e 100644 --- a/product_supplierinfo_for_customer/i18n/sl.po +++ b/product_supplierinfo_for_customer/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}" From 85e90561a6b16db7e6a1731948c7a0346b345bb5 Mon Sep 17 00:00:00 2001 From: Carlos Dauden Date: Wed, 8 Mar 2017 18:20:02 +0100 Subject: [PATCH 070/210] [9.0][ADD] product_pricelist_direct_print (#223) --- product_pricelist_direct_print/README.rst | 87 +++++++++ product_pricelist_direct_print/__init__.py | 3 + product_pricelist_direct_print/__openerp__.py | 22 +++ product_pricelist_direct_print/i18n/es.po | 173 ++++++++++++++++++ .../static/description/icon.png | Bin 0 -> 9455 bytes .../tests/__init__.py | 3 + .../test_product_pricelist_direct_print.py | 64 +++++++ .../views/report_product_pricelist.xml | 107 +++++++++++ .../wizards/__init__.py | 3 + .../wizards/product_pricelist_print.py | 64 +++++++ .../wizards/product_pricelist_print_view.xml | 88 +++++++++ 11 files changed, 614 insertions(+) create mode 100644 product_pricelist_direct_print/README.rst create mode 100644 product_pricelist_direct_print/__init__.py create mode 100644 product_pricelist_direct_print/__openerp__.py create mode 100644 product_pricelist_direct_print/i18n/es.po create mode 100644 product_pricelist_direct_print/static/description/icon.png create mode 100644 product_pricelist_direct_print/tests/__init__.py create mode 100644 product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py create mode 100644 product_pricelist_direct_print/views/report_product_pricelist.xml create mode 100644 product_pricelist_direct_print/wizards/__init__.py create mode 100644 product_pricelist_direct_print/wizards/product_pricelist_print.py create mode 100644 product_pricelist_direct_print/wizards/product_pricelist_print_view.xml diff --git a/product_pricelist_direct_print/README.rst b/product_pricelist_direct_print/README.rst new file mode 100644 index 00000000000..6d2c44be415 --- /dev/null +++ b/product_pricelist_direct_print/README.rst @@ -0,0 +1,87 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +============================== +Product Pricelist Direct Print +============================== + +Print price list from menu option, product templates, products variants or +price lists + +Configuration +============= + +To configure this module, you need to: + +* Go to **Apps** and install **Sales Management** +* Go to **Sales > Configuration > Settings** +* Scroll to **Quotations & Sales > Sale Price** +* Set **Different prices per customer segment** or + **Advanced pricing based on formula** + +Usage +===== + +To use this module, you have several options: + +#. Go to **Sales > Sales > Print Price List** + +#. Go to **Sales > Sales > Products** + * Select products in list view + * Press **Print > Price List** + +#. Go to **Sales > Sales > Product Variants** + * Select products in list view + * Press **Print > Price List** + +#. Go to **Sales > Configuration > Pricelists > Pricelists** + * Select one Pricelist + * Press **Print > Price List** + +#. Go to **Sales > Sales > Customers** + * Select one customer + * Press **Print > Price List** + + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/135/9.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + + +Contributors +------------ + +* Carlos Dauden + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/product_pricelist_direct_print/__init__.py b/product_pricelist_direct_print/__init__.py new file mode 100644 index 00000000000..9e69410edad --- /dev/null +++ b/product_pricelist_direct_print/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import wizards diff --git a/product_pricelist_direct_print/__openerp__.py b/product_pricelist_direct_print/__openerp__.py new file mode 100644 index 00000000000..0052fba3a3f --- /dev/null +++ b/product_pricelist_direct_print/__openerp__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Carlos Dauden +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Product Pricelist Direct Print", + "summary": "Print price list from menu option, product templates, " + "products variants or price lists", + "version": "9.0.1.0.0", + "category": "Product", + "website": "http://www.tecnativa.com", + "author": "Tecnativa, " + "Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": [ + "product", + ], + "data": [ + "views/report_product_pricelist.xml", + "wizards/product_pricelist_print_view.xml", + ], +} diff --git a/product_pricelist_direct_print/i18n/es.po b/product_pricelist_direct_print/i18n/es.po new file mode 100644 index 00000000000..1eb279490e1 --- /dev/null +++ b/product_pricelist_direct_print/i18n/es.po @@ -0,0 +1,173 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-20 17:19+0100\n" +"PO-Revision-Date: 2017-01-20 17:20+0100\n" +"Last-Translator: Carlos Dauden \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"X-Generator: Poedit 1.8.7.1\n" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Cost Price" +msgstr "Precio coste" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Currency:
" +msgstr "Moneda:
" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Description" +msgstr "Descripción" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "List Price" +msgstr "Precio tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List Name:
" +msgstr "Nombre tarifa:
" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Print date:
" +msgstr "Fecha impresión:
" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Sale Price" +msgstr "Precio ficha" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Cancel" +msgstr "Cancelar" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_categ_ids +msgid "Categories" +msgstr "Categorías" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Filter Options" +msgstr "Opciones de filtrado" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_id +msgid "ID" +msgstr "ID (identificación)" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +msgid "Keep empty for all products" +msgstr "Dejar vacío para mostrar todos los productos" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print___last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_uid +msgid "Last Updated by" +msgstr "Última actualización de" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_template_pricelist_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List" +msgstr "Tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_pricelist_id +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Pricelist" +msgstr "Tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Print" +msgstr "Imprimir" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_pricelist_print +#: model:ir.ui.menu,name:product_pricelist_direct_print.menu_product_pricelist_print +msgid "Print Price List" +msgstr "Imprimir tarifa" + +#. module: product_pricelist_direct_print +#: model:ir.actions.report.xml,name:product_pricelist_direct_print.action_report_product_pricelist +msgid "Product Price List" +msgstr "Tarifa de productos" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Products" +msgstr "Productos" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_standard_price +msgid "Show Cost Price" +msgstr "Mostrar precio de coste" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_sale_price +msgid "Show Sale Price" +msgstr "Mostrar precio ficha" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_variants +msgid "Show variants" +msgstr "Mostrar variantes" + +#. module: product_pricelist_direct_print +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:56 +#, python-format +msgid "You must set price list or any show price option." +msgstr "Debe seleccionar una tarifa o alguna opción mostrar precio." + +#. module: product_pricelist_direct_print +#: model:ir.model,name:product_pricelist_direct_print.model_product_pricelist_print +msgid "product.pricelist.print" +msgstr "" diff --git a/product_pricelist_direct_print/static/description/icon.png b/product_pricelist_direct_print/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD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A;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/product_pricelist_direct_print/tests/__init__.py b/product_pricelist_direct_print/tests/__init__.py new file mode 100644 index 00000000000..681c4b08dcb --- /dev/null +++ b/product_pricelist_direct_print/tests/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import test_product_pricelist_direct_print diff --git a/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py b/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py new file mode 100644 index 00000000000..bc3f2e660c5 --- /dev/null +++ b/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Carlos Dauden +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openerp.tests.common import SavepointCase +from openerp.exceptions import ValidationError + + +class TestProductPricelistDirectPrint(SavepointCase): + + @classmethod + def setUpClass(cls): + super(TestProductPricelistDirectPrint, cls).setUpClass() + cls.pricelist = cls.env.ref('product.list0') + cls.category = cls.env['product.category'].create({ + 'name': 'Test category', + 'type': 'normal', + }) + cls.product = cls.env['product.product'].create({ + 'name': 'Product for test', + 'categ_id': cls.category.id, + 'default_code': 'TESTPROD01', + }) + + cls.partner = cls.env['res.partner'].create({ + 'name': 'Partner for test', + 'property_product_pricelist': cls.pricelist.id, + }) + + cls.wiz_obj = cls.env['product.pricelist.print'] + + def test_defaults(self): + wiz = self.wiz_obj.new() + res = wiz.with_context( + active_model='product.pricelist', + active_id=self.pricelist.id, + ).default_get([]) + self.assertEqual(res['pricelist_id'], self.pricelist.id) + res = wiz.with_context( + active_model='res.partner', + active_id=self.partner.id, + ).default_get([]) + self.assertEqual( + res['pricelist_id'], self.partner.property_product_pricelist.id) + res = wiz.with_context( + active_model='product.template', + active_ids=self.product.product_tmpl_id.ids, + ).default_get([]) + self.assertEqual( + res['product_tmpl_ids'][0][2], self.product.product_tmpl_id.ids) + res = wiz.with_context( + active_model='product.product', + active_ids=self.product.ids, + ).default_get([]) + self.assertEqual( + res['product_ids'][0][2], self.product.ids) + self.assertTrue(res['show_variants']) + + with self.assertRaises(ValidationError): + wiz.print_report() + + wiz.show_sale_price = True + res = wiz.print_report() + self.assertIn('report_name', res) diff --git a/product_pricelist_direct_print/views/report_product_pricelist.xml b/product_pricelist_direct_print/views/report_product_pricelist.xml new file mode 100644 index 00000000000..f4c12b1de63 --- /dev/null +++ b/product_pricelist_direct_print/views/report_product_pricelist.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + diff --git a/product_pricelist_direct_print/wizards/__init__.py b/product_pricelist_direct_print/wizards/__init__.py new file mode 100644 index 00000000000..1c3b98a8265 --- /dev/null +++ b/product_pricelist_direct_print/wizards/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import product_pricelist_print diff --git a/product_pricelist_direct_print/wizards/product_pricelist_print.py b/product_pricelist_direct_print/wizards/product_pricelist_print.py new file mode 100644 index 00000000000..3025d42f47e --- /dev/null +++ b/product_pricelist_direct_print/wizards/product_pricelist_print.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Carlos Dauden +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openerp import _, api, fields, models +from openerp.exceptions import ValidationError + + +class ProductPricelistPrint(models.TransientModel): + _name = 'product.pricelist.print' + + pricelist_id = fields.Many2one( + comodel_name='product.pricelist', + string='Pricelist', + ) + partner_id = fields.Many2one( + comodel_name='res.partner', + string='Customer', + ) + categ_ids = fields.Many2many( + comodel_name='product.category', + string='Categories', + ) + show_variants = fields.Boolean() + product_tmpl_ids = fields.Many2many( + comodel_name='product.template', + string='Products', + help='Keep empty for all products', + ) + product_ids = fields.Many2many( + comodel_name='product.product', + string='Products', + help='Keep empty for all products', + ) + show_standard_price = fields.Boolean(string='Show Cost Price') + show_sale_price = fields.Boolean(string='Show Sale Price') + + @api.model + def default_get(self, fields): + res = super(ProductPricelistPrint, self).default_get(fields) + if self.env.context.get('active_model') == 'product.template': + res['product_tmpl_ids'] = [ + (6, 0, self.env.context.get('active_ids', []))] + elif self.env.context.get('active_model') == 'product.product': + res['show_variants'] = True + res['product_ids'] = [ + (6, 0, self.env.context.get('active_ids', []))] + elif self.env.context.get('active_model') == 'product.pricelist': + res['pricelist_id'] = self.env.context.get('active_id', False) + elif self.env.context.get('active_model') == 'res.partner': + res['partner_id'] = self.env.context.get('active_id', False) + partner = self.env['res.partner'].browse( + self.env.context.get('active_id', False)) + res['pricelist_id'] = partner.property_product_pricelist.id + return res + + @api.multi + def print_report(self): + if not(self.pricelist_id or self.show_standard_price or + self.show_sale_price): + raise ValidationError(_( + 'You must set price list or any show price option.')) + return self.env['report'].get_action( + self, 'product_pricelist_direct_print.report_product_pricelist') diff --git a/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml b/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml new file mode 100644 index 00000000000..64fd0a09e5f --- /dev/null +++ b/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml @@ -0,0 +1,88 @@ + + + + + + Product pricelist print + product.pricelist.print + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + +
From fe90f2afde63370e85cb7b2c05a6f58565d1634a Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 11 Mar 2017 00:17:46 -0500 Subject: [PATCH 071/210] OCA Transbot updated translations from Transifex --- product_pricelist_direct_print/i18n/es.po | 30 ++-- product_pricelist_direct_print/i18n/fr.po | 179 ++++++++++++++++++++++ 2 files changed, 197 insertions(+), 12 deletions(-) create mode 100644 product_pricelist_direct_print/i18n/fr.po diff --git a/product_pricelist_direct_print/i18n/es.po b/product_pricelist_direct_print/i18n/es.po index 1eb279490e1..b7f5a3de279 100644 --- a/product_pricelist_direct_print/i18n/es.po +++ b/product_pricelist_direct_print/i18n/es.po @@ -1,21 +1,22 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_pricelist_direct_print -# +# * product_pricelist_direct_print +# +# Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-20 17:19+0100\n" -"PO-Revision-Date: 2017-01-20 17:20+0100\n" -"Last-Translator: Carlos Dauden \n" -"Language-Team: \n" -"Language: es\n" +"POT-Creation-Date: 2017-03-09 03:40+0000\n" +"PO-Revision-Date: 2017-03-09 03:40+0000\n" +"Last-Translator: OCA Transbot , 2017\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: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 1.8.7.1\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: product_pricelist_direct_print #: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document @@ -72,6 +73,11 @@ msgstr "Creado por" msgid "Created on" msgstr "Creado en" +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id +msgid "Customer" +msgstr "" + #. module: product_pricelist_direct_print #: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name msgid "Display Name" @@ -162,7 +168,7 @@ msgid "Show variants" msgstr "Mostrar variantes" #. module: product_pricelist_direct_print -#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:56 +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:61 #, python-format msgid "You must set price list or any show price option." msgstr "Debe seleccionar una tarifa o alguna opción mostrar precio." diff --git a/product_pricelist_direct_print/i18n/fr.po b/product_pricelist_direct_print/i18n/fr.po new file mode 100644 index 00000000000..d8f98f221a8 --- /dev/null +++ b/product_pricelist_direct_print/i18n/fr.po @@ -0,0 +1,179 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print +# +# Translators: +# leemannd , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-09 03:40+0000\n" +"PO-Revision-Date: 2017-03-09 03:40+0000\n" +"Last-Translator: leemannd , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"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_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Currency:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Description" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "List Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List Name:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Print date:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Cancel" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_categ_ids +msgid "Categories" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_date +msgid "Created on" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id +msgid "Customer" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name +msgid "Display Name" +msgstr "Nom d'affichage" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Filter Options" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_id +msgid "ID" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +msgid "Keep empty for all products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print___last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_uid +msgid "Last Updated by" +msgstr "Dernière modification par" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_template_pricelist_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_pricelist_id +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Pricelist" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Print" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_pricelist_print +#: model:ir.ui.menu,name:product_pricelist_direct_print.menu_product_pricelist_print +msgid "Print Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.report.xml,name:product_pricelist_direct_print.action_report_product_pricelist +msgid "Product Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Products" +msgstr "Produits" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_standard_price +msgid "Show Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_sale_price +msgid "Show Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_variants +msgid "Show variants" +msgstr "" + +#. module: product_pricelist_direct_print +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:61 +#, python-format +msgid "You must set price list or any show price option." +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model,name:product_pricelist_direct_print.model_product_pricelist_print +msgid "product.pricelist.print" +msgstr "" From d88106df69491b129d81e55c85772938eb28462a Mon Sep 17 00:00:00 2001 From: Carlos Dauden Date: Fri, 23 Feb 2018 16:22:21 +0100 Subject: [PATCH 072/210] [IMP] product_pricelist_direct_print: Add order option + change widget for pricelist (#290) --- product_pricelist_direct_print/__openerp__.py | 2 +- product_pricelist_direct_print/i18n/es.po | 32 ++++++++++++++----- .../views/report_product_pricelist.xml | 8 +++++ .../wizards/product_pricelist_print.py | 4 +++ .../wizards/product_pricelist_print_view.xml | 3 +- 5 files changed, 39 insertions(+), 10 deletions(-) diff --git a/product_pricelist_direct_print/__openerp__.py b/product_pricelist_direct_print/__openerp__.py index 0052fba3a3f..b023cc36df7 100644 --- a/product_pricelist_direct_print/__openerp__.py +++ b/product_pricelist_direct_print/__openerp__.py @@ -6,7 +6,7 @@ "name": "Product Pricelist Direct Print", "summary": "Print price list from menu option, product templates, " "products variants or price lists", - "version": "9.0.1.0.0", + "version": "9.0.1.1.0", "category": "Product", "website": "http://www.tecnativa.com", "author": "Tecnativa, " diff --git a/product_pricelist_direct_print/i18n/es.po b/product_pricelist_direct_print/i18n/es.po index b7f5a3de279..2a28164d55b 100644 --- a/product_pricelist_direct_print/i18n/es.po +++ b/product_pricelist_direct_print/i18n/es.po @@ -1,22 +1,23 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_pricelist_direct_print -# +# # Translators: # OCA Transbot , 2017 msgid "" msgstr "" "Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-03-09 03:40+0000\n" -"PO-Revision-Date: 2017-03-09 03:40+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2018-02-19 18:53+0100\n" +"PO-Revision-Date: 2018-02-19 19:00+0100\n" +"Last-Translator: Carlos Dauden \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es\n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.7.1\n" #. module: product_pricelist_direct_print #: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document @@ -76,7 +77,7 @@ msgstr "Creado en" #. module: product_pricelist_direct_print #: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id msgid "Customer" -msgstr "" +msgstr "Cliente" #. module: product_pricelist_direct_print #: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name @@ -93,6 +94,11 @@ msgstr "Opciones de filtrado" msgid "ID" msgstr "ID (identificación)" +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Internal Reference" +msgstr "Referencia interna" + #. module: product_pricelist_direct_print #: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids #: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids @@ -114,6 +120,16 @@ msgstr "Última actualización de" msgid "Last Updated on" msgstr "Última actualización en" +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Name" +msgstr "Nombre" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field +msgid "Order" +msgstr "Orden" + #. module: product_pricelist_direct_print #: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print #: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print @@ -168,7 +184,7 @@ msgid "Show variants" msgstr "Mostrar variantes" #. module: product_pricelist_direct_print -#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:61 +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:65 #, python-format msgid "You must set price list or any show price option." msgstr "Debe seleccionar una tarifa o alguna opción mostrar precio." diff --git a/product_pricelist_direct_print/views/report_product_pricelist.xml b/product_pricelist_direct_print/views/report_product_pricelist.xml index f4c12b1de63..d0054479d5a 100644 --- a/product_pricelist_direct_print/views/report_product_pricelist.xml +++ b/product_pricelist_direct_print/views/report_product_pricelist.xml @@ -58,6 +58,14 @@ + + + + + + diff --git a/product_pricelist_direct_print/wizards/product_pricelist_print.py b/product_pricelist_direct_print/wizards/product_pricelist_print.py index 3025d42f47e..d42af170553 100644 --- a/product_pricelist_direct_print/wizards/product_pricelist_print.py +++ b/product_pricelist_direct_print/wizards/product_pricelist_print.py @@ -34,6 +34,10 @@ class ProductPricelistPrint(models.TransientModel): ) show_standard_price = fields.Boolean(string='Show Cost Price') show_sale_price = fields.Boolean(string='Show Sale Price') + order_field = fields.Selection([ + ('name', 'Name'), + ('default_code', 'Internal Reference'), + ], string='Order') @api.model def default_get(self, fields): diff --git a/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml b/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml index 64fd0a09e5f..a1614270d1f 100644 --- a/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml +++ b/product_pricelist_direct_print/wizards/product_pricelist_print_view.xml @@ -9,11 +9,12 @@
- + + From 106a81200be3c03588ec8a33c00ca4e24b77395c Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sat, 23 Jun 2018 18:25:22 +0000 Subject: [PATCH 073/210] [UPD] Update product_pricelist_direct_print.pot --- product_pricelist_direct_print/i18n/fr.po | 21 +- .../i18n/product_pricelist_direct_print.pot | 190 ++++++++++++++++++ 2 files changed, 208 insertions(+), 3 deletions(-) create mode 100644 product_pricelist_direct_print/i18n/product_pricelist_direct_print.pot diff --git a/product_pricelist_direct_print/i18n/fr.po b/product_pricelist_direct_print/i18n/fr.po index d8f98f221a8..580f003782c 100644 --- a/product_pricelist_direct_print/i18n/fr.po +++ b/product_pricelist_direct_print/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * product_pricelist_direct_print -# +# # Translators: # leemannd , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-03-09 03:40+0000\n" "Last-Translator: leemannd , 2017\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: product_pricelist_direct_print @@ -93,6 +93,11 @@ msgstr "" msgid "ID" msgstr "" +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Internal Reference" +msgstr "" + #. module: product_pricelist_direct_print #: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids #: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids @@ -114,6 +119,16 @@ msgstr "Dernière modification par" msgid "Last Updated on" msgstr "" +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Name" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field +msgid "Order" +msgstr "" + #. module: product_pricelist_direct_print #: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print #: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print @@ -168,7 +183,7 @@ msgid "Show variants" msgstr "" #. module: product_pricelist_direct_print -#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:61 +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:65 #, python-format msgid "You must set price list or any show price option." msgstr "" diff --git a/product_pricelist_direct_print/i18n/product_pricelist_direct_print.pot b/product_pricelist_direct_print/i18n/product_pricelist_direct_print.pot new file mode 100644 index 00000000000..d3f4a7f3351 --- /dev/null +++ b/product_pricelist_direct_print/i18n/product_pricelist_direct_print.pot @@ -0,0 +1,190 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_pricelist_direct_print +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Currency:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Description" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "List Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List Name:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Print date:
" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Cancel" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_categ_ids +msgid "Categories" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_uid +msgid "Created by" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_date +msgid "Created on" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id +msgid "Customer" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name +msgid "Display Name" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Filter Options" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_id +msgid "ID" +msgstr "" + +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Internal Reference" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +msgid "Keep empty for all products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print___last_update +msgid "Last Modified on" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_date +msgid "Last Updated on" +msgstr "" + +#. module: product_pricelist_direct_print +#: selection:product.pricelist.print,order_field:0 +msgid "Name" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field +msgid "Order" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_product_pricelist_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_template_pricelist_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document +msgid "Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_pricelist_id +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Pricelist" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Print" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_pricelist_print +#: model:ir.ui.menu,name:product_pricelist_direct_print.menu_product_pricelist_print +msgid "Print Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.actions.report.xml,name:product_pricelist_direct_print.action_report_product_pricelist +msgid "Product Price List" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_ids +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids +#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print +msgid "Products" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_standard_price +msgid "Show Cost Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_sale_price +msgid "Show Sale Price" +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_variants +msgid "Show variants" +msgstr "" + +#. module: product_pricelist_direct_print +#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:65 +#, python-format +msgid "You must set price list or any show price option." +msgstr "" + +#. module: product_pricelist_direct_print +#: model:ir.model,name:product_pricelist_direct_print.model_product_pricelist_print +msgid "product.pricelist.print" +msgstr "" + From 234825e7067d0b5f3b031057b93c837a4bc3940a Mon Sep 17 00:00:00 2001 From: David Date: Wed, 18 Jul 2018 09:44:00 +0200 Subject: [PATCH 074/210] [MIG] product_pricelist_direct_print: Migration to 11.0 --- product_pricelist_direct_print/README.rst | 104 ++-- product_pricelist_direct_print/__init__.py | 3 +- .../{__openerp__.py => __manifest__.py} | 10 +- .../data/mail_template_data.xml | 31 ++ .../data/pricelist_send_action.xml | 15 + .../models/__init__.py | 1 + .../models/res_partner.py | 16 + .../readme/CONFIGURE.rst | 7 + .../readme/CONTRIBUTORS.rst | 4 + .../readme/DESCRIPTION.rst | 2 + .../readme/USAGE.rst | 15 + .../static/description/index.html | 471 ++++++++++++++++++ .../test_product_pricelist_direct_print.py | 15 +- .../views/report_product_pricelist.xml | 6 +- .../wizards/__init__.py | 2 - .../wizards/product_pricelist_print.py | 59 ++- .../wizards/product_pricelist_print_view.xml | 24 +- 17 files changed, 708 insertions(+), 77 deletions(-) rename product_pricelist_direct_print/{__openerp__.py => __manifest__.py} (75%) create mode 100644 product_pricelist_direct_print/data/mail_template_data.xml create mode 100644 product_pricelist_direct_print/data/pricelist_send_action.xml create mode 100644 product_pricelist_direct_print/models/__init__.py create mode 100644 product_pricelist_direct_print/models/res_partner.py create mode 100644 product_pricelist_direct_print/readme/CONFIGURE.rst create mode 100644 product_pricelist_direct_print/readme/CONTRIBUTORS.rst create mode 100644 product_pricelist_direct_print/readme/DESCRIPTION.rst create mode 100644 product_pricelist_direct_print/readme/USAGE.rst create mode 100644 product_pricelist_direct_print/static/description/index.html diff --git a/product_pricelist_direct_print/README.rst b/product_pricelist_direct_print/README.rst index 6d2c44be415..1869aed13fa 100644 --- a/product_pricelist_direct_print/README.rst +++ b/product_pricelist_direct_print/README.rst @@ -1,87 +1,107 @@ -.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg - :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html - :alt: License: LGPL-3 - ============================== Product Pricelist Direct Print ============================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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_pricelist_direct_print + :alt: OCA/product-attribute +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/product-attribute-11-0/product-attribute-11-0-product_pricelist_direct_print + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/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| + Print price list from menu option, product templates, products variants or price lists +**Table of contents** + +.. contents:: + :local: + Configuration ============= To configure this module, you need to: -* Go to **Apps** and install **Sales Management** -* Go to **Sales > Configuration > Settings** -* Scroll to **Quotations & Sales > Sale Price** -* Set **Different prices per customer segment** or - **Advanced pricing based on formula** +#. Go to *Apps* and install *Sales Management* +#. Go to *Sales > Configuration > Settings* +#. Scroll to *Pricing* +#. Set *Multiple Sales Prices per Product* on an either + *Multiple prices per product* or *Prices computed from formulas* Usage ===== To use this module, you have several options: -#. Go to **Sales > Sales > Print Price List** +#. Go to *Sales > Catalog > Print Price List* -#. Go to **Sales > Sales > Products** +#. Go to *Sales > Catalog > Products* * Select products in list view - * Press **Print > Price List** + * Press *Print > Price List* -#. Go to **Sales > Sales > Product Variants** +#. Go to *Sales > Catalog > Product Variants* * Select products in list view - * Press **Print > Price List** + * Press *Print > Price List* -#. Go to **Sales > Configuration > Pricelists > Pricelists** - * Select one Pricelist - * Press **Print > Price List** - -#. Go to **Sales > Sales > Customers** - * Select one customer - * Press **Print > Price List** - - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/135/9.0 +#. Go to *Sales > Orders > Customers** + * Select a customer + * Press *Print > Price List* Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- - -* Odoo Community Association: `Icon `_. +Authors +~~~~~~~ +* Tecnativa Contributors ------------- +~~~~~~~~~~~~ + +* `Tecnativa `_: -* Carlos Dauden + * Carlos Dauden + * David Vidal -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_pricelist_direct_print/__init__.py b/product_pricelist_direct_print/__init__.py index 9e69410edad..aee8895e7a3 100644 --- a/product_pricelist_direct_print/__init__.py +++ b/product_pricelist_direct_print/__init__.py @@ -1,3 +1,2 @@ -# -*- coding: utf-8 -*- - +from . import models from . import wizards diff --git a/product_pricelist_direct_print/__openerp__.py b/product_pricelist_direct_print/__manifest__.py similarity index 75% rename from product_pricelist_direct_print/__openerp__.py rename to product_pricelist_direct_print/__manifest__.py index b023cc36df7..428f906c032 100644 --- a/product_pricelist_direct_print/__openerp__.py +++ b/product_pricelist_direct_print/__manifest__.py @@ -1,22 +1,22 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Carlos Dauden # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - { "name": "Product Pricelist Direct Print", "summary": "Print price list from menu option, product templates, " "products variants or price lists", - "version": "9.0.1.1.0", + "version": "11.0.1.0.0", "category": "Product", - "website": "http://www.tecnativa.com", + "website": "https://www.github.com/OCA/product-attribute", "author": "Tecnativa, " "Odoo Community Association (OCA)", "license": "AGPL-3", "depends": [ - "product", + "sale", ], "data": [ + "data/pricelist_send_action.xml", "views/report_product_pricelist.xml", "wizards/product_pricelist_print_view.xml", + "data/mail_template_data.xml", ], } diff --git a/product_pricelist_direct_print/data/mail_template_data.xml b/product_pricelist_direct_print/data/mail_template_data.xml new file mode 100644 index 00000000000..f458d209e5d --- /dev/null +++ b/product_pricelist_direct_print/data/mail_template_data.xml @@ -0,0 +1,31 @@ + + + + + Pricelist - Send by Email + ${(object.write_uid.email and '"%s" <%s>' % (object.write_uid.name, object.write_uid.email) or '')|safe} + ${object.pricelist_id.company_id.name or object.write_uid.company_id.name} Pricelist (Ref ${object.pricelist_id.name or 'n/a' }) + ${object.partner_id and object.partner_id.id or ''} + + + + ${object.pricelist_id.name} + ${object.partner_id and object.partner_id.lang or object.write_uid.partner_id.lang} + Dear ${object.partner_id and object.partner_id.name or 'customer'},

+

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

+

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

+

Thank you,

+ +

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

+]]>
+
+ +
diff --git a/product_pricelist_direct_print/data/pricelist_send_action.xml b/product_pricelist_direct_print/data/pricelist_send_action.xml new file mode 100644 index 00000000000..eb6ead84c08 --- /dev/null +++ b/product_pricelist_direct_print/data/pricelist_send_action.xml @@ -0,0 +1,15 @@ + + + + + Send customer pricelist by EMail + ir.actions.server + + code + + if records: + action = records.action_customer_pricelist_email_send() + + + + diff --git a/product_pricelist_direct_print/models/__init__.py b/product_pricelist_direct_print/models/__init__.py new file mode 100644 index 00000000000..91fed54d404 --- /dev/null +++ b/product_pricelist_direct_print/models/__init__.py @@ -0,0 +1 @@ +from . import res_partner diff --git a/product_pricelist_direct_print/models/res_partner.py b/product_pricelist_direct_print/models/res_partner.py new file mode 100644 index 00000000000..5827b5d9a1a --- /dev/null +++ b/product_pricelist_direct_print/models/res_partner.py @@ -0,0 +1,16 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, models + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + @api.multi + def action_customer_pricelist_email_send(self): + wiz = self.env['product.pricelist.print'] + for partner in self.filtered(lambda x: not x.parent_id): + wiz.create({ + 'partner_id': partner.id, + 'pricelist_id': partner.property_product_pricelist.id, + }).force_pricelist_send() diff --git a/product_pricelist_direct_print/readme/CONFIGURE.rst b/product_pricelist_direct_print/readme/CONFIGURE.rst new file mode 100644 index 00000000000..4ea78d11a04 --- /dev/null +++ b/product_pricelist_direct_print/readme/CONFIGURE.rst @@ -0,0 +1,7 @@ +To configure this module, you need to: + +#. Go to *Apps* and install *Sales Management* +#. Go to *Sales > Configuration > Settings* +#. Scroll to *Pricing* +#. Set *Multiple Sales Prices per Product* on an either + *Multiple prices per product* or *Prices computed from formulas* diff --git a/product_pricelist_direct_print/readme/CONTRIBUTORS.rst b/product_pricelist_direct_print/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..4ca7694cc75 --- /dev/null +++ b/product_pricelist_direct_print/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Carlos Dauden + * David Vidal diff --git a/product_pricelist_direct_print/readme/DESCRIPTION.rst b/product_pricelist_direct_print/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..48e18bfe13a --- /dev/null +++ b/product_pricelist_direct_print/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Print price list from menu option, product templates, products variants or +price lists diff --git a/product_pricelist_direct_print/readme/USAGE.rst b/product_pricelist_direct_print/readme/USAGE.rst new file mode 100644 index 00000000000..dfad26fec6d --- /dev/null +++ b/product_pricelist_direct_print/readme/USAGE.rst @@ -0,0 +1,15 @@ +To use this module, you have several options: + +#. Go to *Sales > Catalog > Print Price List* + +#. Go to *Sales > Catalog > Products* + * Select products in list view + * Press *Print > Price List* + +#. Go to *Sales > Catalog > Product Variants* + * Select products in list view + * Press *Print > Price List* + +#. Go to *Sales > Orders > Customers** + * Select a customer + * Press *Print > Price List* diff --git a/product_pricelist_direct_print/static/description/index.html b/product_pricelist_direct_print/static/description/index.html new file mode 100644 index 00000000000..43b2df7921a --- /dev/null +++ b/product_pricelist_direct_print/static/description/index.html @@ -0,0 +1,471 @@ + + + + + + +Product Pricelist Direct Print + + + +
+

Product Pricelist Direct Print

+ + +

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

+

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

+

Table of contents

+ +
+

Configuration

+

To configure this module, you need to:

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

Usage

+

To use this module, you have several options:

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

Bug Tracker

+

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

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/product-attribute project on GitHub.

+

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

+
+
+
+ + diff --git a/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py b/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py index bc3f2e660c5..90d0797d0ac 100644 --- a/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py +++ b/product_pricelist_direct_print/tests/test_product_pricelist_direct_print.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Carlos Dauden # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp.tests.common import SavepointCase -from openerp.exceptions import ValidationError +from odoo.tests.common import SavepointCase +from odoo.exceptions import ValidationError class TestProductPricelistDirectPrint(SavepointCase): @@ -21,12 +20,11 @@ def setUpClass(cls): 'categ_id': cls.category.id, 'default_code': 'TESTPROD01', }) - cls.partner = cls.env['res.partner'].create({ 'name': 'Partner for test', 'property_product_pricelist': cls.pricelist.id, + 'email': 'test@test.com', }) - cls.wiz_obj = cls.env['product.pricelist.print'] def test_defaults(self): @@ -55,10 +53,13 @@ def test_defaults(self): self.assertEqual( res['product_ids'][0][2], self.product.ids) self.assertTrue(res['show_variants']) - with self.assertRaises(ValidationError): wiz.print_report() - wiz.show_sale_price = True res = wiz.print_report() self.assertIn('report_name', res) + + def test_partner_pricelist_batch_mailing(self): + partner = self.partner.copy({'email': 'other@test.com'}) + partner |= self.partner + partner.action_customer_pricelist_email_send() diff --git a/product_pricelist_direct_print/views/report_product_pricelist.xml b/product_pricelist_direct_print/views/report_product_pricelist.xml index d0054479d5a..628b7205f69 100644 --- a/product_pricelist_direct_print/views/report_product_pricelist.xml +++ b/product_pricelist_direct_print/views/report_product_pricelist.xml @@ -4,8 +4,8 @@