diff --git a/product_multi_uom/__manifest__.py b/product_multi_uom/__manifest__.py index aa5fea21e..797673595 100644 --- a/product_multi_uom/__manifest__.py +++ b/product_multi_uom/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################# { 'name': "Product Multi UoM", - 'version': '17.0.1.0.0', + 'version': '17.0.1.1.0', 'category': 'Sales', 'summary': 'This module help to sell a product with multiple Uom category', 'description': "This versatile module empowers your sales strategy by " @@ -37,7 +37,7 @@ 'depends': ['base', 'sale_management'], 'data': [ 'security/ir.model.access.csv', - 'views/product_template_views.xml', + 'views/product_product_views.xml', 'views/sale_order_line_views.xml', ], 'images': ['static/description/banner.png'], diff --git a/product_multi_uom/doc/RELEASE_NOTES.md b/product_multi_uom/doc/RELEASE_NOTES.md index 50d0c06e9..d932df733 100644 --- a/product_multi_uom/doc/RELEASE_NOTES.md +++ b/product_multi_uom/doc/RELEASE_NOTES.md @@ -4,3 +4,8 @@ #### Version 17.0.1.0.0 #### ADD - Initial Commit for Product Multi UoM + +#### 22.05.2024 +#### Version 17.0.1.1.0 +#### UPDT +- Changed to Product variants level. diff --git a/product_multi_uom/models/__init__.py b/product_multi_uom/models/__init__.py index 14d7258db..e151b8b19 100644 --- a/product_multi_uom/models/__init__.py +++ b/product_multi_uom/models/__init__.py @@ -19,6 +19,6 @@ # If not, see . # ############################################################################# -from . import product_template +from . import product_product from . import sale_order_line from . import secondary_uom_line diff --git a/product_multi_uom/models/product_template.py b/product_multi_uom/models/product_product.py similarity index 97% rename from product_multi_uom/models/product_template.py rename to product_multi_uom/models/product_product.py index c9e57e486..ae33d8493 100644 --- a/product_multi_uom/models/product_template.py +++ b/product_multi_uom/models/product_product.py @@ -22,9 +22,9 @@ from odoo import api, fields, models -class ProductTemplate(models.Model): +class ProductProduct(models.Model): """Inherits the 'product.template' for adding the secondary uom""" - _inherit = "product.template" + _inherit = "product.product" is_need_secondary_uom = fields.Boolean(string="Need Secondary UoM's", help="Enable this field for " diff --git a/product_multi_uom/models/sale_order_line.py b/product_multi_uom/models/sale_order_line.py index 1dd80fc5a..728fd8b04 100644 --- a/product_multi_uom/models/sale_order_line.py +++ b/product_multi_uom/models/sale_order_line.py @@ -50,16 +50,16 @@ class SaleOrderLine(models.Model): """Function that update the product_uom_qty as the value in the secondary uom quantity""" all_uom = [] - if self.product_template_id.is_need_secondary_uom: + if self.product_id.is_need_secondary_uom: self.is_secondary_readonly = True - for uom in self.product_template_id.secondary_uom_ids: + for uom in self.product_id.secondary_uom_ids: all_uom.append(uom.secondary_uom_id.id) if self.is_secondary_readonly: self.product_uom_readonly = True if self.secondary_product_uom_id.id in all_uom: primary_uom_ratio = self.env['secondary.uom.line'].search( [('secondary_uom_id', '=', self.secondary_product_uom_id.id), - ('product_id', '=', self.product_template_id.id)]).mapped( + ('product_id', '=', self.product_id.id)]).mapped( 'secondary_uom_ratio') converted_uom_qty = primary_uom_ratio[ 0] * self.secondary_product_uom_qty diff --git a/product_multi_uom/models/secondary_uom_line.py b/product_multi_uom/models/secondary_uom_line.py index 270f5b4c1..3f9638814 100644 --- a/product_multi_uom/models/secondary_uom_line.py +++ b/product_multi_uom/models/secondary_uom_line.py @@ -34,7 +34,7 @@ class SecondaryUomLine(models.Model): secondary_uom_id = fields.Many2one('uom.uom', string='Secondary UoM', help="Select the Secondary UoM", required=True) - product_id = fields.Many2one('product.template', readonly=True, + product_id = fields.Many2one('product.product', readonly=True, string="Product", help="Product having the Secondary UOM") secondary_uom_ratio = fields.Float(string='Secondary UoM Ratio', diff --git a/product_multi_uom/static/description/assets/screenshots/2.png b/product_multi_uom/static/description/assets/screenshots/2.png index a91db45b4..ecc130a22 100644 Binary files a/product_multi_uom/static/description/assets/screenshots/2.png and b/product_multi_uom/static/description/assets/screenshots/2.png differ diff --git a/product_multi_uom/static/description/assets/screenshots/3.png b/product_multi_uom/static/description/assets/screenshots/3.png index acff2f039..a38b62e97 100644 Binary files a/product_multi_uom/static/description/assets/screenshots/3.png and b/product_multi_uom/static/description/assets/screenshots/3.png differ diff --git a/product_multi_uom/static/description/assets/screenshots/4.png b/product_multi_uom/static/description/assets/screenshots/4.png index 22ff74c64..17a269232 100644 Binary files a/product_multi_uom/static/description/assets/screenshots/4.png and b/product_multi_uom/static/description/assets/screenshots/4.png differ diff --git a/product_multi_uom/static/description/assets/screenshots/5.png b/product_multi_uom/static/description/assets/screenshots/5.png index 70d2b57b6..f534cc49e 100644 Binary files a/product_multi_uom/static/description/assets/screenshots/5.png and b/product_multi_uom/static/description/assets/screenshots/5.png differ diff --git a/product_multi_uom/static/description/assets/screenshots/6.png b/product_multi_uom/static/description/assets/screenshots/6.png index 913498426..1bc8c119a 100644 Binary files a/product_multi_uom/static/description/assets/screenshots/6.png and b/product_multi_uom/static/description/assets/screenshots/6.png differ diff --git a/product_multi_uom/static/description/assets/screenshots/8.png b/product_multi_uom/static/description/assets/screenshots/8.png index 2a858e248..605dd972d 100644 Binary files a/product_multi_uom/static/description/assets/screenshots/8.png and b/product_multi_uom/static/description/assets/screenshots/8.png differ diff --git a/product_multi_uom/views/product_template_views.xml b/product_multi_uom/views/product_product_views.xml similarity index 65% rename from product_multi_uom/views/product_template_views.xml rename to product_multi_uom/views/product_product_views.xml index f6ec47460..b5a068458 100644 --- a/product_multi_uom/views/product_template_views.xml +++ b/product_multi_uom/views/product_product_views.xml @@ -1,10 +1,10 @@ - - - product.template.view.form.inherit.product.multi.uom - product.template - + + + product.product.view.form.inherit.product.multi.uom + product.product +