diff --git a/pos_product_category/views/pos_product_category.xml b/pos_product_category/views/pos_product_category.xml deleted file mode 100644 index afa219ba..00000000 --- a/pos_product_category/views/pos_product_category.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/pos_product_category/README.rst b/pos_remove_pos_category/README.rst similarity index 86% rename from pos_product_category/README.rst rename to pos_remove_pos_category/README.rst index 83fe6d6a..98f1ec5f 100644 --- a/pos_product_category/README.rst +++ b/pos_remove_pos_category/README.rst @@ -1,14 +1,16 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg :alt: License -POS Product Category -==================== +POS Remove POS Category +======================= -This module was written to replace POS categories by product categories. +This module was written to replace POS categories by product categories +in the point of sale. -Important notes: +Important notes +--------------- - When the module is installed the link beetween products and POS categories - is **overwritten** by a link beetween product categories + is **overwritten** by a link beetween products and product categories (the link is the field pos_categ_id in the table product_template) - When the module is uninstalled the link beetween products and POS categories is restored in an **empty** state (NULL values) diff --git a/pos_product_category/__init__.py b/pos_remove_pos_category/__init__.py similarity index 100% rename from pos_product_category/__init__.py rename to pos_remove_pos_category/__init__.py diff --git a/pos_product_category/__openerp__.py b/pos_remove_pos_category/__openerp__.py similarity index 94% rename from pos_product_category/__openerp__.py rename to pos_remove_pos_category/__openerp__.py index a5bdaed5..5e888038 100644 --- a/pos_product_category/__openerp__.py +++ b/pos_remove_pos_category/__openerp__.py @@ -20,7 +20,7 @@ ############################################################################## { - 'name': 'POS Product Category', + 'name': 'POS Remove POS Category', 'version': '0.1', 'author': 'Akretion, Odoo Community Association (OCA)', 'category': 'Sales Management', @@ -31,7 +31,7 @@ 'website': 'https://www.akretion.com', 'data': [ 'point_of_sale_view.xml', - 'views/pos_product_category.xml', + 'views/pos_remove_pos_category.xml', ], 'installable': True, 'auto_install': False, diff --git a/pos_product_category/i18n/fr.po b/pos_remove_pos_category/i18n/fr.po similarity index 78% rename from pos_product_category/i18n/fr.po rename to pos_remove_pos_category/i18n/fr.po index ced07127..d0394bb8 100644 --- a/pos_product_category/i18n/fr.po +++ b/pos_remove_pos_category/i18n/fr.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * pos_product_category +# * pos_remove_pos_category # msgid "" msgstr "" @@ -15,8 +15,8 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: pos_product_category -#: model:ir.model,name:pos_product_category.model_product_template +#. module: pos_remove_pos_category +#: model:ir.model,name:pos_remove_pos_category.model_product_template msgid "Product Template" msgstr "Modèle d'article" diff --git a/pos_product_category/i18n/pos_product_category.pot b/pos_remove_pos_category/i18n/pos_remove_pos_category.pot similarity index 77% rename from pos_product_category/i18n/pos_product_category.pot rename to pos_remove_pos_category/i18n/pos_remove_pos_category.pot index b74133ed..83e447d8 100644 --- a/pos_product_category/i18n/pos_product_category.pot +++ b/pos_remove_pos_category/i18n/pos_remove_pos_category.pot @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * pos_product_category +# * pos_remove_pos_category # msgid "" msgstr "" @@ -15,8 +15,8 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: pos_product_category -#: model:ir.model,name:pos_product_category.model_product_template +#. module: pos_remove_pos_category +#: model:ir.model,name:pos_remove_pos_category.model_product_template msgid "Product Template" msgstr "" diff --git a/pos_product_category/module.py b/pos_remove_pos_category/module.py similarity index 97% rename from pos_product_category/module.py rename to pos_remove_pos_category/module.py index f3972a92..b94d925b 100644 --- a/pos_product_category/module.py +++ b/pos_remove_pos_category/module.py @@ -31,7 +31,7 @@ class Module(models.Model): context = context or {} for module in self.browse(cr, uid, ids, context=context): - if module.name == 'pos_product_category': + if module.name == 'pos_remove_pos_category': # As we have loose previous POS categs restore them # in a sane empty state diff --git a/pos_product_category/point_of_sale_view.xml b/pos_remove_pos_category/point_of_sale_view.xml similarity index 100% rename from pos_product_category/point_of_sale_view.xml rename to pos_remove_pos_category/point_of_sale_view.xml diff --git a/pos_product_category/product.py b/pos_remove_pos_category/product.py similarity index 94% rename from pos_product_category/product.py rename to pos_remove_pos_category/product.py index 4e0cd4cb..fdadfe46 100644 --- a/pos_product_category/product.py +++ b/pos_remove_pos_category/product.py @@ -46,16 +46,16 @@ _auto_end_original = models.BaseModel._auto_end def _auto_end(self, cr, context=None): """ Create the foreign keys recorded by _auto_init. - (pos_product_category monkey patching) + (pos_remove_pos_category monkey patching) """ context = context or {} module = context['module'] foreign_keys = [] - patched = 'openerp.addons.pos_product_category' in sys.modules + patched = 'openerp.addons.pos_remove_pos_category' in sys.modules for t, k, r, d in self._foreign_keys: if patched and (t, k) == ('product_template', 'pos_categ_id'): - if module == 'pos_product_category': + if module == 'pos_remove_pos_category': cr.execute(''' ALTER TABLE product_template DROP CONSTRAINT IF EXISTS diff --git a/pos_product_category/static/src/js/pos_product_category.js b/pos_remove_pos_category/static/src/js/pos_remove_pos_category.js similarity index 96% rename from pos_product_category/static/src/js/pos_product_category.js rename to pos_remove_pos_category/static/src/js/pos_remove_pos_category.js index 9e90f40e..8664c6cc 100644 --- a/pos_product_category/static/src/js/pos_product_category.js +++ b/pos_remove_pos_category/static/src/js/pos_remove_pos_category.js @@ -16,7 +16,7 @@ * ******************************************************************************/ -openerp.pos_product_category = function(instance, local) { +openerp.pos_remove_pos_category = function(instance, local) { module = instance.point_of_sale; var initialize_original = module.PosModel.prototype.initialize; diff --git a/pos_remove_pos_category/views/pos_remove_pos_category.xml b/pos_remove_pos_category/views/pos_remove_pos_category.xml new file mode 100644 index 00000000..11d499de --- /dev/null +++ b/pos_remove_pos_category/views/pos_remove_pos_category.xml @@ -0,0 +1,10 @@ + + + + + +