From 8371f7e92cadc9dcbf917270e889a90182b9a264 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 25 Jul 2018 18:19:49 +0200 Subject: [PATCH 01/21] [ADD] Product_nomenclature --- product_nomenclature/README.rst | 7 ++ product_nomenclature/__init__.py | 5 ++ product_nomenclature/__manifest__.py | 24 ++++++ product_nomenclature/models/__init__.py | 6 ++ .../models/product_nomenclature.py | 49 ++++++++++++ .../models/product_template.py | 10 +++ .../security/ir.model.access.csv | 3 + .../static/description/barcode.png | Bin 0 -> 5069 bytes .../static/description/icon.png | Bin 0 -> 3680 bytes product_nomenclature/tests/__init__.py | 1 + .../tests/test_nomenclature.py | 35 +++++++++ .../product_nomenclature_product_views.xml | 59 ++++++++++++++ .../views/product_nomenclature_views.xml | 73 ++++++++++++++++++ product_nomenclature/views/product_views.xml | 23 ++++++ 14 files changed, 295 insertions(+) create mode 100644 product_nomenclature/README.rst create mode 100644 product_nomenclature/__init__.py create mode 100644 product_nomenclature/__manifest__.py create mode 100644 product_nomenclature/models/__init__.py create mode 100644 product_nomenclature/models/product_nomenclature.py create mode 100644 product_nomenclature/models/product_template.py create mode 100644 product_nomenclature/security/ir.model.access.csv create mode 100644 product_nomenclature/static/description/barcode.png create mode 100644 product_nomenclature/static/description/icon.png create mode 100644 product_nomenclature/tests/__init__.py create mode 100644 product_nomenclature/tests/test_nomenclature.py create mode 100644 product_nomenclature/views/product_nomenclature_product_views.xml create mode 100644 product_nomenclature/views/product_nomenclature_views.xml create mode 100644 product_nomenclature/views/product_views.xml diff --git a/product_nomenclature/README.rst b/product_nomenclature/README.rst new file mode 100644 index 000000000..c6c28bad7 --- /dev/null +++ b/product_nomenclature/README.rst @@ -0,0 +1,7 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +==================== +Product Nomenclature +==================== diff --git a/product_nomenclature/__init__.py b/product_nomenclature/__init__.py new file mode 100644 index 000000000..56b694d7b --- /dev/null +++ b/product_nomenclature/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2017 Creu Blanca +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from . import models diff --git a/product_nomenclature/__manifest__.py b/product_nomenclature/__manifest__.py new file mode 100644 index 000000000..107cb0af6 --- /dev/null +++ b/product_nomenclature/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2017 Creu Blanca +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +{ + 'name': 'Product nomenclature', + 'version': '11.0.1.0.0', + 'author': 'Creu Blanca, Odoo Community Association (OCA)', + 'category': 'Product', + 'depends': [ + 'product', + 'sales_team', + ], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_nomenclature_product_views.xml', + 'views/product_nomenclature_views.xml', + 'views/product_views.xml', + ], + 'website': 'https://github.com/Eficent/cb-addons', + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/product_nomenclature/models/__init__.py b/product_nomenclature/models/__init__.py new file mode 100644 index 000000000..e4dd8036e --- /dev/null +++ b/product_nomenclature/models/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2017 Creu Blanca +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from . import product_template +from . import product_nomenclature diff --git a/product_nomenclature/models/product_nomenclature.py b/product_nomenclature/models/product_nomenclature.py new file mode 100644 index 000000000..4750e7c92 --- /dev/null +++ b/product_nomenclature/models/product_nomenclature.py @@ -0,0 +1,49 @@ +from odoo import api, fields, models, _ + + +class ProductNomenclature(models.Model): + _name = 'product.nomenclature' + + code = fields.Char(required=True) + name = fields.Text(required=True) + item_ids = fields.One2many( + 'product.nomenclature.product', + inverse_name='nomenclature_id' + ) + active = fields.Boolean(default=True) + + @api.multi + def action_view_items(self): + action = self.env.ref('product_nomenclature.' + 'product_nomenclature_product_action') + result = action.read()[0] + result['context'] = {'default_nomenclature_id': self.id} + result['domain'] = [('nomenclature_id', '=', self.id)] + return result + + +class ProductNomenclatureProduct(models.Model): + _name = 'product.nomenclature.product' + + nomenclature_id = fields.Many2one( + 'product.nomenclature', + required=True, + ) + product_template_id = fields.Many2one( + 'product.template', + required=True + ) + code = fields.Char(required=True) + name = fields.Char(required=True) + + _sql_constraints = [('product_nomenclature_unique', + 'unique(product_template_id, nomenclature_id)', + _('Product must be unique in a nomenclature')) + ] + + @api.onchange('product_template_id') + def _onchange_product_template(self): + if not self.name: + self.name = self.product_template_id.name + if not self.code: + self.code = self.product_template_id.default_code diff --git a/product_nomenclature/models/product_template.py b/product_nomenclature/models/product_template.py new file mode 100644 index 000000000..cff8d7806 --- /dev/null +++ b/product_nomenclature/models/product_template.py @@ -0,0 +1,10 @@ +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + nomenclature_ids = fields.One2many( + 'product.nomenclature.product', + inverse_name='product_template_id' + ) diff --git a/product_nomenclature/security/ir.model.access.csv b/product_nomenclature/security/ir.model.access.csv new file mode 100644 index 000000000..45a62f290 --- /dev/null +++ b/product_nomenclature/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_nomenclature,access_product_nomenclature,model_product_nomenclature,base.group_user,1,0,0,0 +access_product_nomenclature_product,access_product_nomenclature_product,model_product_nomenclature_product,base.group_user,1,0,0,0 \ No newline at end of file diff --git a/product_nomenclature/static/description/barcode.png b/product_nomenclature/static/description/barcode.png new file mode 100644 index 0000000000000000000000000000000000000000..82de7a38ebac5e7f458af15f410780022fc6dcba GIT binary patch literal 5069 zcmeHKdr(tX9*)vVx7gy=U7;XhTO-seAR_NTthQoQz=eXy@=#LXkPw0i8c4(dR}z!k5Rzo^>`HmfxL#?@qPjX;&cN7S-RqtWsWa#G-pS>vKIONdm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+!!hdk`(O9Fe!fe8=GfAS%B30TG3~IRW-e8z%EzsCp zjjm$Ky>bxegW#@Ti`93x3W_{*_P3<>22*Gf18WYh0;w*av)x`N#y9?haPOM*>NcLh t>;AchX51hv#Mg0q`K>%xf$;@P#YrT4+uL~ID^D6BKZtvuv337n{|Ro(OoRXc literal 0 HcmV?d00001 diff --git a/product_nomenclature/static/description/icon.png b/product_nomenclature/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..270165a99d3eab185d3a91690cf94a0f649594c1 GIT binary patch literal 3680 zcmV-m4xjOfP)O!gdgcHC4ed!p zK~#9!?VNdZR8^kGKlLiLB_vgqgzO|_1Hv8_6F~$-!DbU#WJVMeop$DUWV&g`GfuZN zZTC#m((Rd1X-8~96cH4W#RWzX6xk#MSpozSLLg*MWvkTs>b*CAR45V&VG+VhpZcDY zKkC(e_ucoY-|u&S_jlimhWv7cpl(`15J3=N5MU5s5MWS2fI)!WQz2b_L5n1kE4!E) zrX?-Zh)+>C)a+!nSI0S>DbQ|)*vOK!H~?NOsb-VT9QZC(bn&=eWJE+LAsP)OPB))B zBn}8B8nwDEy&p|iCDLJ%k7=@lmr`Ts9}{)O_l+($V~>?_Oc%!Rn)7@$W(bjCp#ao7 zT}(VyM!voWgI!I0J1iB8$#_K{Cu?l{{#*^831K+2A%8nA+}G>iLo2M!$?6aufW>6w z_4qI-JWfj0g#bK&$WRk0It^5n^Ll((hwuRU$3(F zIh>ug9h;m0`3E>xXQQgw9ynfQZ{b{Z4eZ{|*tFzM`>;8jOwUN>;Lv2|icQ@YV5sC{ zh0(>joGc=Y2Hwv*!jc`kJ3Z&%`HLV+{7_!Sv!8rUNnJf9wg#Tvca$IY?E{b7-=-5S z*|D4V^NtW1olh5ge3_~OKAmha1>%HDF-b4u#!nZIU3 z;B$-D%Uk>Mcq{)Hj=EZK_$_k&nhliH)nB!rDtimd_vP`$iPHcq?4Qn_BqI~N&FTjj zE{VLMbFhAJ3fb{7D2l@3OnLw*=DB-wSv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^GJ7hS(UDz}=cyi`pwTdOKwmO@MgrQ_C<=2R< zg@(+YQA{1s7oiLCJk~JK(!fS}qB)!w?z<;YKu}tX3I8&FG>PW$z%uU} zmyA!i^K+n<+_85&54_OOL{@B11|`HI2m<3WdQ;cp zUPonZim`w&w*VG}mDW?7=yC3Vq zJVAgR>G|=ad2Gaxz~_S(%FzI4YHjQ)DhV8)+c%ZxmF6J8wz3$F%ox}&@VTI}nuk}c z#p9C@C7GEk*R{(PXT+MZ+~Vi_x;4P4FjHW2Ns?u@6cp0vcH@&}e6mcV+s&4OLZnuA zjx^|rmem0;L=A&*iN3&U zd}eB^H7WtCn~<4CNb3xI*6yGp#25tFZU#PdBmir4YBI}aPC-FIqtUQz<`nKpO9{C6 z>IS!JCK1&n(r0RI^oxyVP<$+cM#G3+3B>g1fzvDUU{*$88Tav-QkFe*aSh#^GF(8PGwXT~!8oShbJ zNYI6^mC9%|8lL#@Q%Y?0oT{#6;o6NTvcz4oGiZU=l1UfBcW2LIbGq>OBsBORb=!Tm z6q6=QbpTaofrrW}sBZBu;oNNstu+o8d4e$r@LH;Ox>$Aa2LMD_LX`c<^t;VI>Q%Ct zu4)(d$uh;Q)#*T)KfNDklQaFxlOVtwNN0Q!nz#h$H(a%2R5d`CD5CTmtmYxA``_P* zl7uA5ss^ZP3v_rz5QHGWo7Kg%EYRqJ0B=072rzgA49rIDQm21(6L{*h!0eoE15bSx y*v;Un#{#=i%u}ZYc2juju)yJWL;oRkSN%W4Ny`@!;)H(y0000 + + + product.nomenclature.product.form + product.nomenclature.product + +
+ + + + + + + + +
+
+
+ + product.nomenclature.product.form + product.nomenclature.product + 10 + + + + + + + + + + + + product.nomenclature.product.search + product.nomenclature.product + + + + + + + + + + + Nomenclature Items + ir.actions.act_window + product.nomenclature.product + form + tree,form + +

+ Click to create a nomenclature item. +

+
+
+ +
diff --git a/product_nomenclature/views/product_nomenclature_views.xml b/product_nomenclature/views/product_nomenclature_views.xml new file mode 100644 index 000000000..a58bb4475 --- /dev/null +++ b/product_nomenclature/views/product_nomenclature_views.xml @@ -0,0 +1,73 @@ + + + + product.nomenclature.form + product.nomenclature + +
+ +
+ +
+
+

+ +

+

+ +

+
+
+
+
+
+ + + product.nomenclature.form + product.nomenclature + + + + + + + + + + product.nomenclature.search + product.nomenclature + + + + + + + + + + + Nomenclatures + ir.actions.act_window + product.nomenclature + form + tree,form + +

+ Click to create a nomenclature. +

+
+
+ +
diff --git a/product_nomenclature/views/product_views.xml b/product_nomenclature/views/product_views.xml new file mode 100644 index 000000000..63c2bc7e1 --- /dev/null +++ b/product_nomenclature/views/product_views.xml @@ -0,0 +1,23 @@ + + + + product.template.common.form + product.template + + + + + + + + + + + + + + + + + From d24ebccaccb432a1af532e79cd25ba0953d7dfb2 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Thu, 26 Jul 2018 10:28:05 +0200 Subject: [PATCH 02/21] [FIX] Change product.template for product.product on nomenclatures --- product_nomenclature/__manifest__.py | 1 - product_nomenclature/models/__init__.py | 2 +- .../{product_template.py => product.py} | 6 +++--- .../models/product_nomenclature.py | 19 +++++++++--------- .../tests/test_nomenclature.py | 8 ++++---- .../product_nomenclature_product_views.xml | 6 +++--- product_nomenclature/views/product_views.xml | 20 ------------------- 7 files changed, 21 insertions(+), 41 deletions(-) rename product_nomenclature/models/{product_template.py => product.py} (51%) diff --git a/product_nomenclature/__manifest__.py b/product_nomenclature/__manifest__.py index 107cb0af6..e3f1a2cb3 100644 --- a/product_nomenclature/__manifest__.py +++ b/product_nomenclature/__manifest__.py @@ -15,7 +15,6 @@ 'security/ir.model.access.csv', 'views/product_nomenclature_product_views.xml', 'views/product_nomenclature_views.xml', - 'views/product_views.xml', ], 'website': 'https://github.com/Eficent/cb-addons', 'license': 'LGPL-3', diff --git a/product_nomenclature/models/__init__.py b/product_nomenclature/models/__init__.py index e4dd8036e..29170084d 100644 --- a/product_nomenclature/models/__init__.py +++ b/product_nomenclature/models/__init__.py @@ -2,5 +2,5 @@ # Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -from . import product_template +from . import product from . import product_nomenclature diff --git a/product_nomenclature/models/product_template.py b/product_nomenclature/models/product.py similarity index 51% rename from product_nomenclature/models/product_template.py rename to product_nomenclature/models/product.py index cff8d7806..a746479de 100644 --- a/product_nomenclature/models/product_template.py +++ b/product_nomenclature/models/product.py @@ -1,10 +1,10 @@ from odoo import fields, models -class ProductTemplate(models.Model): - _inherit = 'product.template' +class ProductProduct(models.Model): + _inherit = 'product.product' nomenclature_ids = fields.One2many( 'product.nomenclature.product', - inverse_name='product_template_id' + inverse_name='product_id' ) diff --git a/product_nomenclature/models/product_nomenclature.py b/product_nomenclature/models/product_nomenclature.py index 4750e7c92..1c6689251 100644 --- a/product_nomenclature/models/product_nomenclature.py +++ b/product_nomenclature/models/product_nomenclature.py @@ -29,21 +29,22 @@ class ProductNomenclatureProduct(models.Model): 'product.nomenclature', required=True, ) - product_template_id = fields.Many2one( - 'product.template', + product_id = fields.Many2one( + 'product.product', required=True ) code = fields.Char(required=True) name = fields.Char(required=True) - _sql_constraints = [('product_nomenclature_unique', - 'unique(product_template_id, nomenclature_id)', - _('Product must be unique in a nomenclature')) + _sql_constraints = [( + 'product_nomenclature_unique', + 'unique(product_id, nomenclature_id)', + _('Product must be unique in a nomenclature')) ] - @api.onchange('product_template_id') - def _onchange_product_template(self): + @api.onchange('product_id') + def _onchange_product(self): if not self.name: - self.name = self.product_template_id.name + self.name = self.product_id.name if not self.code: - self.code = self.product_template_id.default_code + self.code = self.product_id.default_code diff --git a/product_nomenclature/tests/test_nomenclature.py b/product_nomenclature/tests/test_nomenclature.py index efba7944d..af53ff9f4 100644 --- a/product_nomenclature/tests/test_nomenclature.py +++ b/product_nomenclature/tests/test_nomenclature.py @@ -8,7 +8,7 @@ def setUp(self): 'name': 'Nomenclature', 'code': 'nomenclature', }) - self.product = self.env['product.template'].create({ + self.product = self.env['product.product'].create({ 'name': 'Product', 'default_code': 'prd', }) @@ -16,9 +16,9 @@ def setUp(self): def test_onchange(self): item = self.env['product.nomenclature.product'].new({ 'nomenclature_id': self.nomenclature.id, - 'product_template_id': self.product.id, + 'product_id': self.product.id, }) - item._onchange_product_template() + item._onchange_product() self.assertEqual(self.product.name, item.name) self.assertEqual(self.product.default_code, item.code) @@ -27,7 +27,7 @@ def test_view(self): 'nomenclature_id': self.nomenclature.id, 'name': 'TESt', 'code': 'tests', - 'product_template_id': self.product.id, + 'product_id': self.product.id, }) action = self.nomenclature.action_view_items() items = self.env['product.nomenclature.product'].search( diff --git a/product_nomenclature/views/product_nomenclature_product_views.xml b/product_nomenclature/views/product_nomenclature_product_views.xml index ae11d3042..464166a17 100644 --- a/product_nomenclature/views/product_nomenclature_product_views.xml +++ b/product_nomenclature/views/product_nomenclature_product_views.xml @@ -8,7 +8,7 @@ - + @@ -23,7 +23,7 @@ - + @@ -35,7 +35,7 @@ product.nomenclature.product - + diff --git a/product_nomenclature/views/product_views.xml b/product_nomenclature/views/product_views.xml index 63c2bc7e1..bbd57ea1d 100644 --- a/product_nomenclature/views/product_views.xml +++ b/product_nomenclature/views/product_views.xml @@ -1,23 +1,3 @@ - - product.template.common.form - product.template - - - - - - - - - - - - - - - - From 3253b46d6ed27d086480adf3dedff4c697e3d4fe Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 7 Nov 2018 14:03:57 +0100 Subject: [PATCH 03/21] [FIX] safe_box --- product_nomenclature/i18n/es.po | 146 ++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 product_nomenclature/i18n/es.po diff --git a/product_nomenclature/i18n/es.po b/product_nomenclature/i18n/es.po new file mode 100644 index 000000000..21fc65c19 --- /dev/null +++ b/product_nomenclature/i18n/es.po @@ -0,0 +1,146 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_nomenclature +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-11-07 10:19+0000\n" +"PO-Revision-Date: 2018-11-07 10:19+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_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_active +msgid "Active" +msgstr "Activo" + +#. module: product_nomenclature +#: model:ir.ui.view,arch_db:product_nomenclature.product_nomenclature_search +msgid "Archived" +msgstr "Archivado" + +#. module: product_nomenclature +#: model:ir.actions.act_window,help:product_nomenclature.product_nomenclature_product_action +msgid "Click to create a nomenclature item." +msgstr "Click to create a nomenclature item." + +#. module: product_nomenclature +#: model:ir.actions.act_window,help:product_nomenclature.product_nomenclature_action +msgid "Click to create a nomenclature." +msgstr "Click to create a nomenclature." + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_code +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_code +msgid "Code" +msgstr "Código" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_create_uid +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_create_date +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_create_date +msgid "Created on" +msgstr "Creado en" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_display_name +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_id +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_id +msgid "ID" +msgstr "ID (identificación)" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_item_ids +msgid "Item" +msgstr "Item" + +#. module: product_nomenclature +#: model:ir.ui.view,arch_db:product_nomenclature.product_nomenclature_form +msgid "Items" +msgstr "Elementos" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature___last_update +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product___last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_write_uid +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_write_date +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_name +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_name +msgid "Name" +msgstr "Nombre" + +#. module: product_nomenclature +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_nomenclature_id +#: model:ir.model.fields,field_description:product_nomenclature.field_product_product_nomenclature_ids +msgid "Nomenclature" +msgstr "Nomenclature" + +#. module: product_nomenclature +#: model:ir.actions.act_window,name:product_nomenclature.product_nomenclature_product_action +msgid "Nomenclature Items" +msgstr "Nomenclature Items" + +#. module: product_nomenclature +#: model:ir.actions.act_window,name:product_nomenclature.product_nomenclature_action +#: model:ir.ui.view,arch_db:product_nomenclature.product_nomenclature_search +msgid "Nomenclatures" +msgstr "Nomenclatures" + +#. module: product_nomenclature +#: model:ir.model,name:product_nomenclature.model_product_product +#: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_product_id +msgid "Product" +msgstr "Producto" + +#. module: product_nomenclature +#: model:ir.ui.view,arch_db:product_nomenclature.product_nomenclature_product_search +msgid "Product Nomenclatures" +msgstr "Product Nomenclatures" + +#. module: product_nomenclature +#: code:addons/product_nomenclature/models/product_nomenclature.py:42 +#: sql_constraint:product.nomenclature.product:0 +#, python-format +msgid "Product must be unique in a nomenclature" +msgstr "Product must be unique in a nomenclature" + +#. module: product_nomenclature +#: model:ir.model,name:product_nomenclature.model_product_nomenclature +msgid "product.nomenclature" +msgstr "product.nomenclature" + +#. module: product_nomenclature +#: model:ir.model,name:product_nomenclature.model_product_nomenclature_product +msgid "product.nomenclature.product" +msgstr "product.nomenclature.product" + From 15d38d50f46ac165af549ef8c6d2cb941c5df257 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Mon, 12 Nov 2018 11:26:02 +0100 Subject: [PATCH 04/21] [FIX] views --- .../views/product_nomenclature_product_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_nomenclature/views/product_nomenclature_product_views.xml b/product_nomenclature/views/product_nomenclature_product_views.xml index 464166a17..7a95e18ff 100644 --- a/product_nomenclature/views/product_nomenclature_product_views.xml +++ b/product_nomenclature/views/product_nomenclature_product_views.xml @@ -8,7 +8,7 @@ - + From 857e2f75b879b9b46ebb5c3987f8b1e7c2a620a5 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Mon, 12 Nov 2018 15:13:18 +0100 Subject: [PATCH 05/21] [ADD] translation --- product_nomenclature/i18n/es.po | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/product_nomenclature/i18n/es.po b/product_nomenclature/i18n/es.po index 21fc65c19..4cd7c7623 100644 --- a/product_nomenclature/i18n/es.po +++ b/product_nomenclature/i18n/es.po @@ -1,19 +1,21 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_nomenclature +# * product_nomenclature # msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-07 10:19+0000\n" -"PO-Revision-Date: 2018-11-07 10:19+0000\n" +"POT-Creation-Date: 2018-11-07 10:28+0000\n" +"PO-Revision-Date: 2018-11-07 16:59+0100\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"Language: es\n" +"X-Generator: Poedit 2.2\n" #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_active @@ -28,12 +30,12 @@ msgstr "Archivado" #. module: product_nomenclature #: model:ir.actions.act_window,help:product_nomenclature.product_nomenclature_product_action msgid "Click to create a nomenclature item." -msgstr "Click to create a nomenclature item." +msgstr "Haga clic para crear un elemento de nomenclatura." #. module: product_nomenclature #: model:ir.actions.act_window,help:product_nomenclature.product_nomenclature_action msgid "Click to create a nomenclature." -msgstr "Click to create a nomenclature." +msgstr "Haga clic para crear una nomenclatura." #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_code @@ -63,7 +65,7 @@ msgstr "Nombre mostrado" #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_id #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_id msgid "ID" -msgstr "ID (identificación)" +msgstr "ID" #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_item_ids @@ -79,13 +81,13 @@ msgstr "Elementos" #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature___last_update #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product___last_update msgid "Last Modified on" -msgstr "Última modificación el" +msgstr "Última modificación en" #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_write_uid #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_write_uid msgid "Last Updated by" -msgstr "Última actualización por" +msgstr "Última actualización de" #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_write_date @@ -103,18 +105,18 @@ msgstr "Nombre" #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_nomenclature_id #: model:ir.model.fields,field_description:product_nomenclature.field_product_product_nomenclature_ids msgid "Nomenclature" -msgstr "Nomenclature" +msgstr "Nomenclatura" #. module: product_nomenclature #: model:ir.actions.act_window,name:product_nomenclature.product_nomenclature_product_action msgid "Nomenclature Items" -msgstr "Nomenclature Items" +msgstr "Articulos de nomenclatura" #. module: product_nomenclature #: model:ir.actions.act_window,name:product_nomenclature.product_nomenclature_action #: model:ir.ui.view,arch_db:product_nomenclature.product_nomenclature_search msgid "Nomenclatures" -msgstr "Nomenclatures" +msgstr "Nomenclaturas" #. module: product_nomenclature #: model:ir.model,name:product_nomenclature.model_product_product @@ -125,14 +127,14 @@ msgstr "Producto" #. module: product_nomenclature #: model:ir.ui.view,arch_db:product_nomenclature.product_nomenclature_product_search msgid "Product Nomenclatures" -msgstr "Product Nomenclatures" +msgstr "Nomenclaturas de producto" #. module: product_nomenclature #: code:addons/product_nomenclature/models/product_nomenclature.py:42 #: sql_constraint:product.nomenclature.product:0 #, python-format msgid "Product must be unique in a nomenclature" -msgstr "Product must be unique in a nomenclature" +msgstr "El producto debe ser único en una nomenclatura" #. module: product_nomenclature #: model:ir.model,name:product_nomenclature.model_product_nomenclature @@ -143,4 +145,3 @@ msgstr "product.nomenclature" #: model:ir.model,name:product_nomenclature.model_product_nomenclature_product msgid "product.nomenclature.product" msgstr "product.nomenclature.product" - From baee9490b0289ca595cdbfde1f324af85eac1be9 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 14 Nov 2018 09:41:58 +0100 Subject: [PATCH 06/21] [I18N] --- product_nomenclature/i18n/es.po | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/product_nomenclature/i18n/es.po b/product_nomenclature/i18n/es.po index 4cd7c7623..a28976457 100644 --- a/product_nomenclature/i18n/es.po +++ b/product_nomenclature/i18n/es.po @@ -1,21 +1,19 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * product_nomenclature +# * product_nomenclature # msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-07 10:28+0000\n" -"PO-Revision-Date: 2018-11-07 16:59+0100\n" +"POT-Creation-Date: 2018-11-14 08:31+0000\n" +"PO-Revision-Date: 2018-11-14 08:31+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Transfer-Encoding: \n" "Plural-Forms: \n" -"Language: es\n" -"X-Generator: Poedit 2.2\n" #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_active @@ -81,19 +79,19 @@ msgstr "Elementos" #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature___last_update #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product___last_update msgid "Last Modified on" -msgstr "Última modificación en" +msgstr "Última modificación el" #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_write_uid #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_write_uid msgid "Last Updated by" -msgstr "Última actualización de" +msgstr "Última actualización por" #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_product_write_date #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_write_date msgid "Last Updated on" -msgstr "Última actualización en" +msgstr "Última actualización el" #. module: product_nomenclature #: model:ir.model.fields,field_description:product_nomenclature.field_product_nomenclature_name @@ -144,4 +142,5 @@ msgstr "product.nomenclature" #. module: product_nomenclature #: model:ir.model,name:product_nomenclature.model_product_nomenclature_product msgid "product.nomenclature.product" -msgstr "product.nomenclature.product" +msgstr "product.nomenclatura.producto" + From e8649971dea957efba30a677d0cbe1273367d8e9 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Mon, 24 Dec 2018 13:07:58 +0100 Subject: [PATCH 07/21] [FIX] Travis --- product_nomenclature/security/ir.model.access.csv | 2 +- product_nomenclature/views/product_views.xml | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 product_nomenclature/views/product_views.xml diff --git a/product_nomenclature/security/ir.model.access.csv b/product_nomenclature/security/ir.model.access.csv index 45a62f290..190475e52 100644 --- a/product_nomenclature/security/ir.model.access.csv +++ b/product_nomenclature/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_product_nomenclature,access_product_nomenclature,model_product_nomenclature,base.group_user,1,0,0,0 -access_product_nomenclature_product,access_product_nomenclature_product,model_product_nomenclature_product,base.group_user,1,0,0,0 \ No newline at end of file +access_product_nomenclature_product,access_product_nomenclature_product,model_product_nomenclature_product,base.group_user,1,0,0,0 diff --git a/product_nomenclature/views/product_views.xml b/product_nomenclature/views/product_views.xml deleted file mode 100644 index bbd57ea1d..000000000 --- a/product_nomenclature/views/product_views.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - From dff7e198bce6d3cb87774eeb4344b314be708b91 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Tue, 7 May 2019 09:19:37 +0200 Subject: [PATCH 08/21] [IMP] product_nomenclature --- product_nomenclature/models/product_nomenclature.py | 1 + .../views/product_nomenclature_product_views.xml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/product_nomenclature/models/product_nomenclature.py b/product_nomenclature/models/product_nomenclature.py index 1c6689251..549b4711f 100644 --- a/product_nomenclature/models/product_nomenclature.py +++ b/product_nomenclature/models/product_nomenclature.py @@ -35,6 +35,7 @@ class ProductNomenclatureProduct(models.Model): ) code = fields.Char(required=True) name = fields.Char(required=True) + active = fields.Boolean(default=True) _sql_constraints = [( 'product_nomenclature_unique', diff --git a/product_nomenclature/views/product_nomenclature_product_views.xml b/product_nomenclature/views/product_nomenclature_product_views.xml index 7a95e18ff..61e7ce2d2 100644 --- a/product_nomenclature/views/product_nomenclature_product_views.xml +++ b/product_nomenclature/views/product_nomenclature_product_views.xml @@ -26,6 +26,11 @@ + From fbb48b466b7e84d543c8f8558ede4705a7e6776f Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Thu, 9 May 2019 09:22:27 +0200 Subject: [PATCH 09/21] [FIX] Author --- product_nomenclature/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_nomenclature/__manifest__.py b/product_nomenclature/__manifest__.py index e3f1a2cb3..869ac51b7 100644 --- a/product_nomenclature/__manifest__.py +++ b/product_nomenclature/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Product nomenclature', 'version': '11.0.1.0.0', - 'author': 'Creu Blanca, Odoo Community Association (OCA)', + 'author': 'Creu Blanca', 'category': 'Product', 'depends': [ 'product', From 01ab7f1d7c8484aef21102a1824a2519e9177930 Mon Sep 17 00:00:00 2001 From: Jaime Arroyo Date: Mon, 29 Jul 2019 15:34:06 +0200 Subject: [PATCH 10/21] [11.0][IMP] Add confirmation to archive button --- .../views/product_nomenclature_product_views.xml | 1 + product_nomenclature/views/product_nomenclature_views.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/product_nomenclature/views/product_nomenclature_product_views.xml b/product_nomenclature/views/product_nomenclature_product_views.xml index 61e7ce2d2..32fa270db 100644 --- a/product_nomenclature/views/product_nomenclature_product_views.xml +++ b/product_nomenclature/views/product_nomenclature_product_views.xml @@ -27,6 +27,7 @@ - product.nomenclature.product.search product.nomenclature.product - - - + + + - - + Nomenclature Items ir.actions.act_window product.nomenclature.product @@ -61,5 +65,4 @@

- diff --git a/product_nomenclature/views/product_nomenclature_views.xml b/product_nomenclature/views/product_nomenclature_views.xml index 75b6dd458..c369660a5 100644 --- a/product_nomenclature/views/product_nomenclature_views.xml +++ b/product_nomenclature/views/product_nomenclature_views.xml @@ -7,25 +7,33 @@
-

- +

- +

@@ -33,32 +41,31 @@ - product.nomenclature.form product.nomenclature - - + + - product.nomenclature.search product.nomenclature - - - + + + - - + Nomenclatures ir.actions.act_window product.nomenclature @@ -70,5 +77,4 @@

- From 9ab310e732963cc207a854536ce3faf3ee380dfa Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 2 Jun 2021 16:19:28 +0200 Subject: [PATCH 15/21] [IMP] githubactions: Copy logic from OCA --- product_nomenclature/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_nomenclature/__manifest__.py b/product_nomenclature/__manifest__.py index d8759ec05..27f545166 100644 --- a/product_nomenclature/__manifest__.py +++ b/product_nomenclature/__manifest__.py @@ -14,7 +14,7 @@ "views/product_nomenclature_views.xml", ], "website": "https://github.com/Eficent/cb-addons", - "license": "LGPL-3", + "license": "AGPL-3", "installable": True, "auto_install": False, } From 97821990ce6858acabf61ad199b00a90b11d18df Mon Sep 17 00:00:00 2001 From: Alba Riera Date: Thu, 1 Jul 2021 09:34:41 +0200 Subject: [PATCH 16/21] [MIG] product_nomenclature: Migration to 13.0 --- product_nomenclature/__manifest__.py | 4 +-- .../models/product_nomenclature.py | 1 - .../security/ir.model.access.csv | 2 ++ .../product_nomenclature_product_views.xml | 1 - .../views/product_nomenclature_views.xml | 29 ++++++++++--------- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/product_nomenclature/__manifest__.py b/product_nomenclature/__manifest__.py index 27f545166..25d4f2432 100644 --- a/product_nomenclature/__manifest__.py +++ b/product_nomenclature/__manifest__.py @@ -4,10 +4,10 @@ { "name": "Product nomenclature", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "author": "Creu Blanca", "category": "Product", - "depends": ["product", "sales_team"], + "depends": ["sale"], "data": [ "security/ir.model.access.csv", "views/product_nomenclature_product_views.xml", diff --git a/product_nomenclature/models/product_nomenclature.py b/product_nomenclature/models/product_nomenclature.py index 4371f8161..3782037f1 100644 --- a/product_nomenclature/models/product_nomenclature.py +++ b/product_nomenclature/models/product_nomenclature.py @@ -12,7 +12,6 @@ class ProductNomenclature(models.Model): ) active = fields.Boolean(default=True) - @api.multi def action_view_items(self): action = self.env.ref( "product_nomenclature." "product_nomenclature_product_action" diff --git a/product_nomenclature/security/ir.model.access.csv b/product_nomenclature/security/ir.model.access.csv index 190475e52..3c3392325 100644 --- a/product_nomenclature/security/ir.model.access.csv +++ b/product_nomenclature/security/ir.model.access.csv @@ -1,3 +1,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_product_nomenclature,access_product_nomenclature,model_product_nomenclature,base.group_user,1,0,0,0 access_product_nomenclature_product,access_product_nomenclature_product,model_product_nomenclature_product,base.group_user,1,0,0,0 +salemanager_product_nomenclature,salemanager_product_nomenclature,product_nomenclature.model_product_nomenclature,sales_team.group_sale_manager,1,1,1,1 +salemanager_product_nomenclature_product,salemanager_product_nomenclature_product,product_nomenclature.model_product_nomenclature_product,sales_team.group_sale_manager,1,1,1,1 diff --git a/product_nomenclature/views/product_nomenclature_product_views.xml b/product_nomenclature/views/product_nomenclature_product_views.xml index cfd976123..a523bc277 100644 --- a/product_nomenclature/views/product_nomenclature_product_views.xml +++ b/product_nomenclature/views/product_nomenclature_product_views.xml @@ -57,7 +57,6 @@ Nomenclature Items ir.actions.act_window product.nomenclature.product - form tree,form

diff --git a/product_nomenclature/views/product_nomenclature_views.xml b/product_nomenclature/views/product_nomenclature_views.xml index c369660a5..9c0dfd744 100644 --- a/product_nomenclature/views/product_nomenclature_views.xml +++ b/product_nomenclature/views/product_nomenclature_views.xml @@ -6,20 +6,13 @@ +

-