diff --git a/mrp_workcenter_group/__init__.py b/mrp_workcenter_group/__init__.py new file mode 100644 index 000000000..eb7db24f6 --- /dev/null +++ b/mrp_workcenter_group/__init__.py @@ -0,0 +1,24 @@ +# -*- 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..d921c0545 --- /dev/null +++ b/mrp_workcenter_group/__openerp__.py @@ -0,0 +1,62 @@ +# -*- 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', + 'summary': "Organise Workcenters by section", + 'maintener': 'Akretion', + 'category': 'Manufacturing', + 'depends': [ + 'mrp_operations', + ], + 'description': """ +Features +-------- + +* Add a new model: Workcenter Groups +* Add a many2one field 'Group' in workcenter view form based on this model +* Define a new 'Group by' entry named 'Group' in search view + + + +Contributors +------------ +* David BEAL + +""", + 'website': 'http://www.akretion.com/', + 'data': [ + 'workcenter_view.xml', + ], + 'demo': [ + ], + 'external_dependencies': { + 'python': [], + }, + 'license': 'AGPL-3', + 'tests': [], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/mrp_workcenter_group/workcenter.py b/mrp_workcenter_group/workcenter.py new file mode 100644 index 000000000..b0bb2b0e9 --- /dev/null +++ b/mrp_workcenter_group/workcenter.py @@ -0,0 +1,44 @@ +# -*- 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'), + } + + +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..cfdd2a125 --- /dev/null +++ b/mrp_workcenter_group/workcenter_view.xml @@ -0,0 +1,52 @@ + + + + + + + + Workcenter Groups + ir.actions.act_window + workcenter.group + tree,form + [] + {} + + + + workcenter.group + tree + + + + + + + + + + + + + + + + mrp.workcenter + + + + + + + + + + +