diff --git a/stock_location_ownership/__init__.py b/stock_location_ownership/__init__.py new file mode 100644 index 000000000..643bee7ab --- /dev/null +++ b/stock_location_ownership/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2013 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 . import model diff --git a/stock_location_ownership/__openerp__.py b/stock_location_ownership/__openerp__.py new file mode 100644 index 000000000..bcd2582c0 --- /dev/null +++ b/stock_location_ownership/__openerp__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2013 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 . +# +############################################################################## + +{'name': 'Stock Location Ownership', + 'version': '0.1', + 'author': 'Camptocamp', + 'category': 'Warehouse', + 'license': 'AGPL-3', + 'complexity': 'normal', + 'images': [], + 'website': "http://www.camptocamp.com", + 'description': """ +Stock Location Ownership +======================== + +Adds an ownership on the stock locations +""", + 'depends': ['stock', + ], + 'demo': [], + 'data': ['view/stock_view.xml', + ], + 'test': [], + 'auto_install': False, + 'installable': True, + } diff --git a/stock_location_ownership/model/__init__.py b/stock_location_ownership/model/__init__.py new file mode 100644 index 000000000..8f66ed0bc --- /dev/null +++ b/stock_location_ownership/model/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2013 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 . import stock diff --git a/stock_location_ownership/model/stock.py b/stock_location_ownership/model/stock.py new file mode 100644 index 000000000..5a7e46e28 --- /dev/null +++ b/stock_location_ownership/model/stock.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2013 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.osv import orm, fields + + +class stock_location(orm.Model): + _inherit = 'stock.location' + + _columns = { + 'owner_id': fields.many2one( + 'res.partner', + 'Owner', + help="Owner of the location if different from the company " + "or address."), + } diff --git a/stock_location_ownership/view/stock_view.xml b/stock_location_ownership/view/stock_view.xml new file mode 100644 index 000000000..a6df89d22 --- /dev/null +++ b/stock_location_ownership/view/stock_view.xml @@ -0,0 +1,15 @@ + + + + + stock.location.form + stock.location + + + + + + + + +