diff --git a/customer_image_and_tags_in_pos/README.rst b/customer_image_and_tags_in_pos/README.rst index 71f078c73..32071a13e 100644 --- a/customer_image_and_tags_in_pos/README.rst +++ b/customer_image_and_tags_in_pos/README.rst @@ -1,5 +1,5 @@ .. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg - :target: http:s//www.gnu.org/licenses/lgpl-3.0-standalone.html + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 Customer Image And Tags In POS @@ -18,12 +18,13 @@ License ------- General Public License, Version 3 (LGPL v3). -(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) +(http://www.gnu.org/licenses/lgpl-3.0-standalone.html) Credits ------- -Developer: (V16) Fathima Mazlin AM, Contact: odoo@cybrosys.com +Developers: Version 16 - Fathima Mazlin AM @cybrosys +Contact: odoo@cybrosys.com Contacts -------- diff --git a/customer_image_and_tags_in_pos/__manifest__.py b/customer_image_and_tags_in_pos/__manifest__.py index 750779790..80afa7df6 100644 --- a/customer_image_and_tags_in_pos/__manifest__.py +++ b/customer_image_and_tags_in_pos/__manifest__.py @@ -21,15 +21,16 @@ ############################################################################### { 'name': 'Customer Image And Tags In POS', - 'version': '16.0.1.0.1', - 'category': 'Point of Sale', + 'version': '16.0.1.0.0', 'summary': 'Images and tags in pos customer session', 'description': 'Can see the image and tags of customer in ' 'customer selection page while choosing' ' the customer in pos', + 'category': 'Point of Sale', 'author': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions', + 'images': ['static/description/banner.png'], 'website': 'https://www.cybrosys.com', 'depends': ['base', 'point_of_sale'], 'assets': { @@ -39,10 +40,8 @@ 'customer_image_and_tags_in_pos/static/src/xml/PartnerLine.xml', ], }, - 'images': ['static/description/banner.jpg'], - 'license': 'LGPL-3', + 'application': False, 'installable': True, 'auto_install': False, - 'application': False, - + 'license': 'LGPL-3', } diff --git a/customer_image_and_tags_in_pos/doc/RELEASE_NOTES.md b/customer_image_and_tags_in_pos/doc/RELEASE_NOTES.md index cc8b28905..b36647de5 100644 --- a/customer_image_and_tags_in_pos/doc/RELEASE_NOTES.md +++ b/customer_image_and_tags_in_pos/doc/RELEASE_NOTES.md @@ -5,7 +5,3 @@ #### ADD - Initial commit for Customer Image And Tags In POS - -#### 24.08.2023 -#### Version 16.0.1.0.1 -#### DEBUG diff --git a/customer_image_and_tags_in_pos/models/pos_session.py b/customer_image_and_tags_in_pos/models/pos_session.py index 1fe0437d1..3bc284e67 100644 --- a/customer_image_and_tags_in_pos/models/pos_session.py +++ b/customer_image_and_tags_in_pos/models/pos_session.py @@ -27,51 +27,19 @@ class PosSession(models.Model): _inherit = 'pos.session' def _pos_ui_models_to_load(self): - models_to_load = [ - 'res.company', + """For load module to POS""" + result = super()._pos_ui_models_to_load() + result += [ 'res.partner.category', - 'decimal.precision', - 'uom.uom', - 'res.country.state', - 'res.country', - 'res.lang', - 'account.tax', - 'pos.session', - 'pos.config', - 'pos.bill', - 'res.partner', - 'stock.picking.type', - 'res.users', - 'product.pricelist', - 'res.currency', - 'pos.category', - 'product.product', - 'product.packaging', - 'account.cash.rounding', - 'pos.payment.method', - 'account.fiscal.position', ] - return models_to_load + return result def _loader_params_res_partner_category(self): """For load res partner category fields""" return { - 'search_params': {'fields': ['id', 'name']}} + 'search_params': {'fields': ['name', 'partner_ids']}} def _get_pos_ui_res_partner_category(self, params): """For getting parameters of res partner category model""" return self.env['res.partner.category'].search_read( **params['search_params']) - - def _loader_params_res_partner(self): - return { - 'search_params': { - 'domain': self._get_partners_domain(), - 'fields': [ - 'name', 'street', 'city', 'state_id', 'country_id', - 'vat', 'lang', 'phone', 'zip', 'mobile', 'email', - 'category_id', 'barcode', 'write_date', - 'property_account_position_id', 'property_product_pricelist', 'parent_name' - ], - }, - } diff --git a/customer_image_and_tags_in_pos/static/src/js/PartnerLine.js b/customer_image_and_tags_in_pos/static/src/js/PartnerLine.js index 03dbd85b1..462c165df 100644 --- a/customer_image_and_tags_in_pos/static/src/js/PartnerLine.js +++ b/customer_image_and_tags_in_pos/static/src/js/PartnerLine.js @@ -1,7 +1,5 @@ /** @odoo-module **/ import PartnerLine from 'point_of_sale.PartnerLine'; -import rpc from 'web.rpc'; -import ajax from 'web.ajax'; import Registries from 'point_of_sale.Registries'; const PosPartnerLine = (PartnerLine) => @@ -12,15 +10,15 @@ const PosPartnerLine = (PartnerLine) => get highlight() { var self = this; var tags = [] - var customer_tag = self.props.partner.category_id this.env.pos.customer_tag.forEach(function(items){ - customer_tag.forEach(function(item){ - if(item == items["id"]){ - tags.push(items.name) - } - }); + var partner = items.partner_ids + partner.forEach(function(item){ + if (self.props.partner.id == item){ + tags.push(items.name) + } + }); }); - this.props.tags = tags + this.props.partner['tags'] = tags } } -Registries.Component.extend(PartnerLine, PosPartnerLine); +Registries.Component.extend(PartnerLine, PosPartnerLine); \ No newline at end of file diff --git a/customer_image_and_tags_in_pos/static/src/js/customer_tag.js b/customer_image_and_tags_in_pos/static/src/js/customer_tag.js index 407baddf0..dbe4d786e 100644 --- a/customer_image_and_tags_in_pos/static/src/js/customer_tag.js +++ b/customer_image_and_tags_in_pos/static/src/js/customer_tag.js @@ -4,11 +4,11 @@ import Registries from 'point_of_sale.Registries'; const CustomerTag = (PosGlobalState) => class CustomerTag extends PosGlobalState { /** - Load customer tag data to PosGlobalState + load customer tag data to PosGlobalState **/ async _processData(loadedData) { await super._processData(loadedData); this.customer_tag = loadedData['res.partner.category']; } } -Registries.Model.extend(PosGlobalState, CustomerTag); +Registries.Model.extend(PosGlobalState, CustomerTag); \ No newline at end of file diff --git a/customer_image_and_tags_in_pos/static/src/xml/PartnerLine.xml b/customer_image_and_tags_in_pos/static/src/xml/PartnerLine.xml index b1491a643..659e0b7b0 100644 --- a/customer_image_and_tags_in_pos/static/src/xml/PartnerLine.xml +++ b/customer_image_and_tags_in_pos/static/src/xml/PartnerLine.xml @@ -27,7 +27,7 @@ position="after">