From b60275ec5da55d93503f9e3f1997d8c5ca74b566 Mon Sep 17 00:00:00 2001 From: Jonatan Cloutier Date: Mon, 8 Apr 2013 11:44:53 -0400 Subject: [PATCH 1/3] Add mrp_industrial_design_bom module --- mrp_industrial_design_bom/__init__.py | 24 +++ mrp_industrial_design_bom/__openerp__.py | 39 +++++ mrp_industrial_design_bom/i18n/fr.po | 32 ++++ .../i18n/mrp_industrial_design_bom.pot | 32 ++++ .../industrial_design.py | 32 ++++ .../mrp_industrial_design.xml | 29 ++++ mrp_industrial_design_bom/report/__init__.py | 23 +++ .../report/bom_structure_custom.odt | Bin 0 -> 16824 bytes .../report/bom_structure_custom.py | 69 ++++++++ .../report/bom_structure_custom.rml | 158 ++++++++++++++++++ 10 files changed, 438 insertions(+) create mode 100644 mrp_industrial_design_bom/__init__.py create mode 100644 mrp_industrial_design_bom/__openerp__.py create mode 100644 mrp_industrial_design_bom/i18n/fr.po create mode 100644 mrp_industrial_design_bom/i18n/mrp_industrial_design_bom.pot create mode 100644 mrp_industrial_design_bom/industrial_design.py create mode 100644 mrp_industrial_design_bom/mrp_industrial_design.xml create mode 100644 mrp_industrial_design_bom/report/__init__.py create mode 100644 mrp_industrial_design_bom/report/bom_structure_custom.odt create mode 100644 mrp_industrial_design_bom/report/bom_structure_custom.py create mode 100644 mrp_industrial_design_bom/report/bom_structure_custom.rml diff --git a/mrp_industrial_design_bom/__init__.py b/mrp_industrial_design_bom/__init__.py new file mode 100644 index 000000000..55ce5467c --- /dev/null +++ b/mrp_industrial_design_bom/__init__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License +# along with this program. If not, see . +# +############################################################################## + +import industrial_design +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/mrp_industrial_design_bom/__openerp__.py b/mrp_industrial_design_bom/__openerp__.py new file mode 100644 index 000000000..03a8dced8 --- /dev/null +++ b/mrp_industrial_design_bom/__openerp__.py @@ -0,0 +1,39 @@ +# -*- encoding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Savoir-faire Linux (). +# +# 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' : 'Industrial design specification in BoM', + 'version' : '1.0', + "author" : "Savoir-faire Linux", + "website" : "http://www.savoirfairelinux.com", + 'license': 'AGPL-3', + 'category' : 'Specific Industry Applications', + 'depends' : ['mrp'], + "data" : ['mrp_industrial_design.xml'], + 'description': """ +Add the fields 'Bubble Number' and 'RefDes' (reference description) to a component in BoM view. +""", + 'auto_install': False, + 'installable': True +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/mrp_industrial_design_bom/i18n/fr.po b/mrp_industrial_design_bom/i18n/fr.po new file mode 100644 index 000000000..38d5b4bd1 --- /dev/null +++ b/mrp_industrial_design_bom/i18n/fr.po @@ -0,0 +1,32 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * mrp_industrial_design_bom +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-03-26 16:23+0000\n" +"PO-Revision-Date: 2013-03-26 14:00-0500\n" +"Last-Translator: Marc Cassuto \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" + +#. module: mrp_industrial_design_bom +#: model:ir.model,name:mrp_industrial_design_bom.model_mrp_bom +msgid "Bill of Material" +msgstr "Nomenclature" + +#. module: mrp_industrial_design_bom +#: field:mrp.bom,refdes:0 +msgid "Notes" +msgstr "notes" + +#. module: mrp_industrial_design_bom +#: field:mrp.bom,bubble_number:0 +msgid "No" +msgstr "N°" + diff --git a/mrp_industrial_design_bom/i18n/mrp_industrial_design_bom.pot b/mrp_industrial_design_bom/i18n/mrp_industrial_design_bom.pot new file mode 100644 index 000000000..b5ac69017 --- /dev/null +++ b/mrp_industrial_design_bom/i18n/mrp_industrial_design_bom.pot @@ -0,0 +1,32 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * mrp_industrial_design_bom +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-03-26 16:23+0000\n" +"PO-Revision-Date: 2013-03-26 16:23+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: mrp_industrial_design_bom +#: model:ir.model,name:mrp_industrial_design_bom.model_mrp_bom +msgid "Bill of Material" +msgstr "" + +#. module: mrp_industrial_design_bom +#: field:mrp.bom,refdes:0 +msgid "Notes" +msgstr "" + +#. module: mrp_industrial_design_bom +#: field:mrp.bom,bubble_number:0 +msgid "No" +msgstr "" + diff --git a/mrp_industrial_design_bom/industrial_design.py b/mrp_industrial_design_bom/industrial_design.py new file mode 100644 index 000000000..43fad49c4 --- /dev/null +++ b/mrp_industrial_design_bom/industrial_design.py @@ -0,0 +1,32 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2010 Savoir-faire Linux (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import fields, orm + +class mrp_bom(orm.Model): + _inherit = 'mrp.bom' + _columns = { + 'bubble_number': fields.integer('No'), + 'refdes': fields.text('Notes'), + } + + _order = "bubble_number" +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/mrp_industrial_design_bom/mrp_industrial_design.xml b/mrp_industrial_design_bom/mrp_industrial_design.xml new file mode 100644 index 000000000..3cc4a07d5 --- /dev/null +++ b/mrp_industrial_design_bom/mrp_industrial_design.xml @@ -0,0 +1,29 @@ + + + + + + + + mrp.bom.form.inherit + mrp.bom + + + + + + + + + + + + + + diff --git a/mrp_industrial_design_bom/report/__init__.py b/mrp_industrial_design_bom/report/__init__.py new file mode 100644 index 000000000..998985c1f --- /dev/null +++ b/mrp_industrial_design_bom/report/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Savoir-faire Linux (). +# +# 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 . +# +############################################################################## + +import bom_structure_custom diff --git a/mrp_industrial_design_bom/report/bom_structure_custom.odt b/mrp_industrial_design_bom/report/bom_structure_custom.odt new file mode 100644 index 0000000000000000000000000000000000000000..1734d3c48d26280625eab96bd829ff5b2b4246e6 GIT binary patch literal 16824 zcmeIZbzEIL(?5#4JH@RODDJj#cW-gnxU+FDP@EQbhvHD2;x5JAt++#REAWG!(<9G& z&U4>;@4vtBS(~+znaO05d?zbeqbLIjg#`u%2L>jY=Paz-!-7N&1_t(gJ!OGen_C+@ zy4e{U*x6Z`0}UL_ZEYBxZHyRf4IIoJ7;No~ZH#PzPS(aYjtq{*u8xX-6DC&Bi%)Wt$>3N^N8FsvQOOhFPb=v%N?e=7ntUbUND zGH73?$x=z`va}wixgf%iyBG-%C;teLaVxXIYq<|IU%tgGxFT8@y9%l5;U$drVnHvKRJN2Q?I~s@>|#glB+q$6d3=aeU*_U0Z6P_=gZ9 z3p#`r8aN-%&Zf1SvsU(Rxg?%~XiY}c{;QtHq)J+aX|`n}izg>v_Fclg*J~oJJ(^+E zwy6NvwKm2|k*&8u(Ua9M$vvt&?Uvlfj{b-Uehj>wHPkNk-zM;y8hlLB2v`CcQwT9@lB98 zgK3fz=(`*~#sKHoKrGw!>M`o-Lt&AMxZ5K%$MRuIXr0B@Q4Z_EaX8UtrhRlNL5bBrZq^8VaN*c^K$%&0ohg67u-Esg0kjSIJ@r`wYUAeyX=)@S97{T_?)3LD zjI{(bxuaINiYT(QxZl1WAAuhtqU}+1F*oX(8Zh;X2)%GbDfILBBxkwbLU~}B`Z>Qr zK1-7k8RgRPSeWqODimAzYS`DFg=^#_CgjK1SkF8tjhs($+zGdr>ky_{WsQu~m8iJ= zO$wdGLCY$wgcs&W%(#|o_?UhzS_?Wj#^CItxEsy&jFzzx$z`aVO!@%j5C3~|4B?NT z=gshW2Md#0$ZZZSKltBDh`&FjP=N?V*~FixrMnT?8q7ea-e09Z&;_d;nSC2WE_Hab zr040bc>aCwZHK3b(R=X;-p|f+p?RMqGZM{Dl;?|v>Bn{EE3i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S1{1F*p5vf;zA;I@;P=*%{avTQUAUPV*0@ zryG)g;QKiV9TzT!jC?^#r@7 zAY%uI|IYbO^_f`NKB4b_tM8wIAKRpT~&hmfOzuJ~Vq9Hy&E7V#`cHtckFQUcAhcv@wP)Rbod5e~~9#E>1_wWZxB^ zfqdqXk@`(kcJQQJ!00NZf0l9wM4IWd;Dwt~t(JVXOOVAXiV9Wi%Y4pxBPX&^)57M+IMRDLquf2Mj8{IIsDPkY z`|7r;)!TFftd(FrpSDZH=S~UJ&X<1iH0c0OD>g+La0o20e~+2|*>ivV{EDFdPpQWS{g>~9{*&>qTMN%ekAEf`vcDcg{wLpG z7q!n2{bwqm|NAz?FV25k^!~|d!ukaDPfp@_3H*!eR|Efwc7LzWo9pim;uq(y`u>y; z2KGE#{!Go>|8q+I6&wHFy?^rkhK_$eU;Kld|ACeNF6{40vGDv)rT&VY|1Relm;Ou^ z{~+hNalfI|ze{;W(?3(@KS=pIw*I@Mzw0yq50d`G+W)N-G~WMdoj I@IOEOA2|e~KmY&$ literal 0 HcmV?d00001 diff --git a/mrp_industrial_design_bom/report/bom_structure_custom.py b/mrp_industrial_design_bom/report/bom_structure_custom.py new file mode 100644 index 000000000..2e1b31b29 --- /dev/null +++ b/mrp_industrial_design_bom/report/bom_structure_custom.py @@ -0,0 +1,69 @@ +## -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +import time +from openerp.report import report_sxw +from openerp.osv import osv +from openerp import pooler + +class bom_structure(report_sxw.rml_parse): + def __init__(self, cr, uid, name, context): + super(bom_structure, self).__init__(cr, uid, name, context=context) + self.localcontext.update({ + 'time': time, + 'get_children':self.get_children, + }) + + def get_children(self, object, level=0): + result = [] + + def _get_rec(object, level): + for l in object: + res = {} + res['name'] = l.name + res['pname'] = l.product_id.name + res['pcode'] = l.product_id.default_code + res['pqty'] = l.product_qty + res['uname'] = l.product_uom.name + res['code'] = l.code + res['level'] = level + res['bnumber'] = l.bubble_number + result.append(res) + if l.child_complete_ids: + if level<6: + level += 1 + _get_rec(l.child_complete_ids,level) + if level>0 and level<6: + level -= 1 + return result + + children = _get_rec(object,level) + + return children + +report_sxw.report_sxw('report.custom.bom.structure', + 'mrp.bom', + 'mrp_industrial_design_bom/report/bom_structure_custom.rml', + parser=bom_structure, + header='internal') + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/mrp_industrial_design_bom/report/bom_structure_custom.rml b/mrp_industrial_design_bom/report/bom_structure_custom.rml new file mode 100644 index 000000000..26716096c --- /dev/null +++ b/mrp_industrial_design_bom/report/bom_structure_custom.rml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BOM Structure + + + + BOM Name + + + + Bubble Number + + + + Product Name + + + Quantity + + + BOM Ref + + + +
+ [[ repeatIn(objects, 'o') ]] + + + + [[ o.name ]] + + + + [[ o.bubble_number ]] + + + + [ [[ (o.product_id.default_code) or removeParentNode('font') ]] ] [[ o.product_id.name ]] + + + [[ o.product_qty ]] [[ o.product_uom.name ]] + + + [[ o.code ]] + + + +
+ [[ repeatIn(get_children(o.bom_lines), 'l') ]] + + + + [[ '... '*(l['level']) ]] - [[ l['name'] ]] + + + + [[ l['bnumber'] ]] + + + + [ [[ (l['pcode']) or removeParentNode('font') ]] ] [[ l['pname'] ]] + + + [[ l['pqty'] ]] [[ l['uname'] ]] + + + [[ l['code'] ]] + + + + + + +
+
+
+
+ From c25acb04cacf9b1e28e604951ab62a5abc9ddf8b Mon Sep 17 00:00:00 2001 From: Jonatan Cloutier Date: Thu, 11 Apr 2013 16:46:55 -0400 Subject: [PATCH 2/3] Fix xml indentation --- mrp_industrial_design_bom/mrp_industrial_design.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mrp_industrial_design_bom/mrp_industrial_design.xml b/mrp_industrial_design_bom/mrp_industrial_design.xml index 3cc4a07d5..35a9828d7 100644 --- a/mrp_industrial_design_bom/mrp_industrial_design.xml +++ b/mrp_industrial_design_bom/mrp_industrial_design.xml @@ -1,14 +1,14 @@ - + + string="BOM Structure"/> mrp.bom.form.inherit From 0e787bfe1edca7ab1c4eed31152ee568b339d30d Mon Sep 17 00:00:00 2001 From: Jonatan Cloutier Date: Fri, 26 Apr 2013 09:44:37 -0400 Subject: [PATCH 3/3] rename bom_structure_custom by bom_structure_industrial_design --- mrp_industrial_design_bom/mrp_industrial_design.xml | 6 +++--- mrp_industrial_design_bom/report/__init__.py | 2 +- ...stom.odt => bom_structure_industrial_design.odt} | Bin ...custom.py => bom_structure_industrial_design.py} | 4 ++-- ...stom.rml => bom_structure_industrial_design.rml} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename mrp_industrial_design_bom/report/{bom_structure_custom.odt => bom_structure_industrial_design.odt} (100%) rename mrp_industrial_design_bom/report/{bom_structure_custom.py => bom_structure_industrial_design.py} (96%) rename mrp_industrial_design_bom/report/{bom_structure_custom.rml => bom_structure_industrial_design.rml} (100%) diff --git a/mrp_industrial_design_bom/mrp_industrial_design.xml b/mrp_industrial_design_bom/mrp_industrial_design.xml index 35a9828d7..54c8c74fe 100644 --- a/mrp_industrial_design_bom/mrp_industrial_design.xml +++ b/mrp_industrial_design_bom/mrp_industrial_design.xml @@ -4,10 +4,10 @@ diff --git a/mrp_industrial_design_bom/report/__init__.py b/mrp_industrial_design_bom/report/__init__.py index 998985c1f..0be3c550d 100644 --- a/mrp_industrial_design_bom/report/__init__.py +++ b/mrp_industrial_design_bom/report/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -import bom_structure_custom +import bom_structure_industrial_design diff --git a/mrp_industrial_design_bom/report/bom_structure_custom.odt b/mrp_industrial_design_bom/report/bom_structure_industrial_design.odt similarity index 100% rename from mrp_industrial_design_bom/report/bom_structure_custom.odt rename to mrp_industrial_design_bom/report/bom_structure_industrial_design.odt diff --git a/mrp_industrial_design_bom/report/bom_structure_custom.py b/mrp_industrial_design_bom/report/bom_structure_industrial_design.py similarity index 96% rename from mrp_industrial_design_bom/report/bom_structure_custom.py rename to mrp_industrial_design_bom/report/bom_structure_industrial_design.py index 2e1b31b29..cba61bee7 100644 --- a/mrp_industrial_design_bom/report/bom_structure_custom.py +++ b/mrp_industrial_design_bom/report/bom_structure_industrial_design.py @@ -59,9 +59,9 @@ class bom_structure(report_sxw.rml_parse): return children -report_sxw.report_sxw('report.custom.bom.structure', +report_sxw.report_sxw('report.industrialdesign.bom.structure', 'mrp.bom', - 'mrp_industrial_design_bom/report/bom_structure_custom.rml', + 'mrp_industrial_design_bom/report/bom_structure_industrial_design.rml', parser=bom_structure, header='internal') diff --git a/mrp_industrial_design_bom/report/bom_structure_custom.rml b/mrp_industrial_design_bom/report/bom_structure_industrial_design.rml similarity index 100% rename from mrp_industrial_design_bom/report/bom_structure_custom.rml rename to mrp_industrial_design_bom/report/bom_structure_industrial_design.rml