diff --git a/mrp_workcenter_group/README.rst b/mrp_workcenter_group/README.rst new file mode 100644 index 000000000..9e2514ac3 --- /dev/null +++ b/mrp_workcenter_group/README.rst @@ -0,0 +1,17 @@ +Description +=========== + +See __openerp__.py + +Define your workcenter groups +----------------------------- + + .. image:: static/description/group.png + :alt: Define your workcenter groups on Odoo ERP + + +Attach a group to your workcenter +--------------------------------- + + .. image:: static/description/workc.png + :alt: Attach a group to your workcenter with Odoo ERP diff --git a/mrp_workcenter_group/__init__.py b/mrp_workcenter_group/__init__.py new file mode 100644 index 000000000..d6571b201 --- /dev/null +++ b/mrp_workcenter_group/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) All Rights Reserved 2015 Akretion +# @author David BEAL +# +# 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 . import workcenter diff --git a/mrp_workcenter_group/__openerp__.py b/mrp_workcenter_group/__openerp__.py new file mode 100644 index 000000000..0bcce9c6b --- /dev/null +++ b/mrp_workcenter_group/__openerp__.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) All Rights Reserved 2015 Akretion +# @author David BEAL +# +# 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': 'MRP Workcenter Group', + 'version': '0.5', + 'author': 'Akretion,Odoo Community Association (OCA)', + 'summary': "Organise Workcenters by section", + 'category': 'Manufacturing', + 'depends': [ + 'mrp_operations', + ], + 'description': """ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License + +MRP Workcenter Group +==================== + +* Add Workcenter Groups to apply some behavior to several Workcenters at once +* Define a new 'Group by' entry named 'Group' in Workcenter search view + +Configuration +============= + +To visualize features offered by this module, you need to: + + * go to Settings > Configuration > Manufacturing + * in the section Manufacturing Order / Planning, + check "Manage routings and work orders" and Validate + +Usage +===== + +To use this module, you need to go to: + + * Manufacturing > Configuration > Workcenter Groups + + +Credits +======= + +Contributors +------------ + +* David BEAL +* Sébastien BEAU + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://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. +""", + 'website': 'http://www.akretion.com/', + 'data': [ + 'workcenter_view.xml', + ], + 'demo': [ + 'demo/workcenter.group.csv', + 'demo/mrp.workcenter.csv', + ], + 'license': 'AGPL-3', + 'tests': [], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/mrp_workcenter_group/demo/mrp.workcenter.csv b/mrp_workcenter_group/demo/mrp.workcenter.csv new file mode 100644 index 000000000..9dfd3787f --- /dev/null +++ b/mrp_workcenter_group/demo/mrp.workcenter.csv @@ -0,0 +1,4 @@ +id,workcenter_group_id/id +mrp.mrp_workcenter_0,assemble +mrp.mrp_workcenter_2,assemble +mrp.mrp_workcenter_1,other diff --git a/mrp_workcenter_group/demo/workcenter.group.csv b/mrp_workcenter_group/demo/workcenter.group.csv new file mode 100644 index 000000000..b3e7bad3f --- /dev/null +++ b/mrp_workcenter_group/demo/workcenter.group.csv @@ -0,0 +1,3 @@ +id,name +assemble,Assemble +other,Other diff --git a/mrp_workcenter_group/i18n/mrp_workcenter_group.pot b/mrp_workcenter_group/i18n/mrp_workcenter_group.pot new file mode 100644 index 000000000..b404fd8d9 --- /dev/null +++ b/mrp_workcenter_group/i18n/mrp_workcenter_group.pot @@ -0,0 +1,62 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * mrp_workcenter_group +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-03-19 10:15+0000\n" +"PO-Revision-Date: 2015-03-19 10:15+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_workcenter_group +#: field:workcenter.group,active:0 +msgid "Active" +msgstr "" + +#. module: mrp_workcenter_group +#: view:mrp.workcenter:0 +#: field:mrp.workcenter,workcenter_group_id:0 +#: view:workcenter.group:0 +msgid "Group" +msgstr "" + +#. module: mrp_workcenter_group +#: view:workcenter.group:0 +#: field:workcenter.group,workcenter_ids:0 +msgid "Linked Workcenters" +msgstr "" + +#. module: mrp_workcenter_group +#: field:workcenter.group,name:0 +msgid "Name" +msgstr "" + +#. module: mrp_workcenter_group +#: field:workcenter.group,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: mrp_workcenter_group +#: code:_description:0 +#: model:ir.model,name:mrp_workcenter_group.model_mrp_workcenter +#, python-format +msgid "Work Center" +msgstr "" + +#. module: mrp_workcenter_group +#: code:_description:0 +#: model:ir.actions.act_window,name:mrp_workcenter_group.act_open_workcenter_group_view +#: model:ir.model,name:mrp_workcenter_group.model_workcenter_group +#: model:ir.ui.menu,name:mrp_workcenter_group.menu_mrp_workcenter_group +#: view:workcenter.group:0 +#, python-format +msgid "Workcenter Groups" +msgstr "" + diff --git a/mrp_workcenter_group/security/ir.model.access.csv b/mrp_workcenter_group/security/ir.model.access.csv new file mode 100644 index 000000000..4d3ba3c65 --- /dev/null +++ b/mrp_workcenter_group/security/ir.model.access.csv @@ -0,0 +1,4 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_workcenter_group_user","access_workcenter_group","model_workcenter_group","base.group_user",1,0,0,0 +"access_workcenter_group_mrp_user","access_workcenter_group_mrp_user","model_workcenter_group","stock.group_mrp_user",1,1,0,0 +"access_workcenter_group_mrp_user_mng","access_workcenter_group_mrp_user_mng","model_workcenter_group","stock.group_mrp_manager",1,1,1,1 diff --git a/mrp_workcenter_group/security/model_security.xml b/mrp_workcenter_group/security/model_security.xml new file mode 100644 index 000000000..2cad31edf --- /dev/null +++ b/mrp_workcenter_group/security/model_security.xml @@ -0,0 +1,15 @@ + + + + + + + + Workcenter multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + + diff --git a/mrp_workcenter_group/static/description/group.png b/mrp_workcenter_group/static/description/group.png new file mode 100644 index 000000000..f61dcd097 Binary files /dev/null and b/mrp_workcenter_group/static/description/group.png differ diff --git a/mrp_workcenter_group/static/description/index.html b/mrp_workcenter_group/static/description/index.html new file mode 100644 index 000000000..3b1eb19c4 --- /dev/null +++ b/mrp_workcenter_group/static/description/index.html @@ -0,0 +1,22 @@ + +
+ +
+

Workcenter Groups

+

An OCA module : validated by Odoo community experts

+

By Akretion

+
+ +

Workcenter Groups

+ + + + +

Define your workcenter groups



Attach a group to your workcenter



+ + + +
diff --git a/mrp_workcenter_group/static/description/workc.png b/mrp_workcenter_group/static/description/workc.png new file mode 100644 index 000000000..d20197176 Binary files /dev/null and b/mrp_workcenter_group/static/description/workc.png differ diff --git a/mrp_workcenter_group/static/src/img/icon.png b/mrp_workcenter_group/static/src/img/icon.png new file mode 100644 index 000000000..99ee21578 Binary files /dev/null and b/mrp_workcenter_group/static/src/img/icon.png differ diff --git a/mrp_workcenter_group/workcenter.py b/mrp_workcenter_group/workcenter.py new file mode 100644 index 000000000..81b36ef8c --- /dev/null +++ b/mrp_workcenter_group/workcenter.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: David BEAL +# Copyright 2015 Akretion +# +# 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.osv import orm, fields + + +class WorkcenterGroup(orm.Model): + _name = 'workcenter.group' + _description = 'Workcenter Groups' + _order = 'sequence ASC, name ASC' + + _columns = { + 'name': fields.char('Name'), + 'sequence': fields.integer('Sequence'), + 'active': fields.boolean('Active'), + 'workcenter_ids': fields.one2many( + 'mrp.workcenter', + 'workcenter_group_id', + readonly=True, + string="Workcenters" + ), + } + + _defaults = { + 'active': True, + } + + +class MrpWorkcenter(orm.Model): + _inherit = 'mrp.workcenter' + + _columns = { + 'workcenter_group_id': fields.many2one( + 'workcenter.group', + string='Group'), + } diff --git a/mrp_workcenter_group/workcenter_view.xml b/mrp_workcenter_group/workcenter_view.xml new file mode 100644 index 000000000..4418ff85a --- /dev/null +++ b/mrp_workcenter_group/workcenter_view.xml @@ -0,0 +1,80 @@ + + + + + + + + Workcenter Groups + ir.actions.act_window + workcenter.group + tree,form + [] + {} + + + + workcenter.group + tree + + + + + + + + + + + workcenter.group + form + +
+ + + + + + + + + + +
+
+
+ + + + + + + + mrp.workcenter + + + + + + + + + + mrp.workcenter + + + + + + + + +
+