diff --git a/stock_inventory_chatter/README.rst b/stock_inventory_chatter/README.rst new file mode 100644 index 000000000..0b94573b9 --- /dev/null +++ b/stock_inventory_chatter/README.rst @@ -0,0 +1,52 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================= +Stock Inventory Chatter +======================= + +This module adds the capability to log the changes being done in Inventory Adjustments. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/153/9.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Miquel Raïch + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://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 https://odoo-community.org. \ No newline at end of file diff --git a/stock_inventory_chatter/__init__.py b/stock_inventory_chatter/__init__.py new file mode 100644 index 000000000..e50f9b656 --- /dev/null +++ b/stock_inventory_chatter/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/stock_inventory_chatter/__openerp__.py b/stock_inventory_chatter/__openerp__.py new file mode 100644 index 000000000..a89b08295 --- /dev/null +++ b/stock_inventory_chatter/__openerp__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + 'name': 'Stock Inventory Chatter', + 'version': '9.0.1.0.0', + 'author': "Eficent, " + "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-warehouse", + 'category': 'Warehouse', + 'summary': "Log changes being done in Inventory Adjustments", + 'depends': ['stock'], + "data": [ + 'data/stock_data.xml', + 'views/stock_inventory_view.xml', + ], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, +} diff --git a/stock_inventory_chatter/data/stock_data.xml b/stock_inventory_chatter/data/stock_data.xml new file mode 100644 index 000000000..1ec808141 --- /dev/null +++ b/stock_inventory_chatter/data/stock_data.xml @@ -0,0 +1,23 @@ + + + + + + + Inventory Canceled + stock.inventory + + + + Inventory Confirmed + stock.inventory + + + + Inventory Done + stock.inventory + + + + + diff --git a/stock_inventory_chatter/models/__init__.py b/stock_inventory_chatter/models/__init__.py new file mode 100644 index 000000000..ea02a8d92 --- /dev/null +++ b/stock_inventory_chatter/models/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import stock diff --git a/stock_inventory_chatter/models/stock.py b/stock_inventory_chatter/models/stock.py new file mode 100644 index 000000000..26e7bfd51 --- /dev/null +++ b/stock_inventory_chatter/models/stock.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from openerp import api, fields, models + + +class StockInventory(models.Model): + _name = 'stock.inventory' + _inherit = ['stock.inventory', 'mail.thread', 'ir.needaction_mixin'] + + partner_id = fields.Many2one(track_visibility='always') + state = fields.Selection(track_visibility='onchange') + location_id = fields.Many2one(track_visibility='always') + filter = fields.Selection(track_visibility='onchange') + + @api.multi + def _track_subtype(self, init_values): + self.ensure_one() + if 'state' in init_values and self.state == 'cancel': + return 'stock_inventory_chatter.mt_inventory_canceled' + elif 'state' in init_values and self.state == 'confirm': + return 'stock_inventory_chatter.mt_inventory_confirmed' + elif 'state' in init_values and self.state == 'done': + return 'stock_inventory_chatter.mt_inventory_done' + return super(StockInventory, self)._track_subtype(init_values) diff --git a/stock_inventory_chatter/static/description/icon.png b/stock_inventory_chatter/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/stock_inventory_chatter/static/description/icon.png differ diff --git a/stock_inventory_chatter/views/stock_inventory_view.xml b/stock_inventory_chatter/views/stock_inventory_view.xml new file mode 100644 index 000000000..21362a7ea --- /dev/null +++ b/stock_inventory_chatter/views/stock_inventory_view.xml @@ -0,0 +1,21 @@ + + + + + + + Inventory form view - add chatter + stock.inventory + + + +
+ + +
+
+
+
+
+