diff --git a/product_management_system/doc/RELEASE_NOTES.md b/product_management_system/doc/RELEASE_NOTES.md index 062dae864..80a705507 100644 --- a/product_management_system/doc/RELEASE_NOTES.md +++ b/product_management_system/doc/RELEASE_NOTES.md @@ -5,3 +5,9 @@ #### ADD - Initial Commit for Product Management System + +#### 25.09.2024 +#### Version 16.0.1.0.0 +#### ADD + +- BUg Fix for Product Management System diff --git a/product_management_system/static/src/js/product_management_system.js b/product_management_system/static/src/js/product_management_system.js index 7199a4d01..5eb651dea 100644 --- a/product_management_system/static/src/js/product_management_system.js +++ b/product_management_system/static/src/js/product_management_system.js @@ -41,6 +41,7 @@ var KanbanButton = KanbanController.extend({ var toast = $('.toast') var checked = $(ev.target).is(':checked'); var record_id =parseInt($(ev.target).data('id')); + console.log('record_idrecord_idrecord_idrecord_id', record_id) if (checked){ toast.addClass('show'); toast.css("display","inline"); diff --git a/product_management_system/wizard/product_accessory.py b/product_management_system/wizard/product_accessory.py index 64b04643d..71f46510c 100644 --- a/product_management_system/wizard/product_accessory.py +++ b/product_management_system/wizard/product_accessory.py @@ -37,11 +37,13 @@ class ProductAccessory(models.TransientModel): help='Products wanted to added as Accessory Products') def action_add_accessory_products(self): - """ - Function for adding Accessory Products for the selected products - """ + """Function for adding Accessory Products for the selected products""" if self.product_ids and self.accessory_ids: for products in self.product_ids: for items in self.accessory_ids: products.accessory_product_ids = [ fields.Command.link(items.id)] + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_add_attribute.py b/product_management_system/wizard/product_add_attribute.py index 06f6d5987..e2cc6600a 100644 --- a/product_management_system/wizard/product_add_attribute.py +++ b/product_management_system/wizard/product_add_attribute.py @@ -38,9 +38,7 @@ class ProductAddAttribute(models.TransientModel): help='Attribute Lines') def action_add_product_attributes(self): - """ - Function for adding Attributes and Variants for Selected Products - """ + """Function for adding Attributes and Variants for Selected Products""" if self.product_ids and self.attribute_line_ids: for products in self.product_ids: for line in self.attribute_line_ids: @@ -48,12 +46,14 @@ class ProductAddAttribute(models.TransientModel): 'attribute_id': line.attribute_id.id, 'value_ids': line.value_ids, })] + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } class ProductAttribute(models.TransientModel): - """ - Model for attribute_lines for the model product.add.attribute - """ + """Model for attribute_lines for the model product.add.attribute""" _name = 'product.management.attribute' _description = 'Product Attributes' diff --git a/product_management_system/wizard/product_add_vendor.py b/product_management_system/wizard/product_add_vendor.py index 4b6b77ae0..9af40c08e 100644 --- a/product_management_system/wizard/product_add_vendor.py +++ b/product_management_system/wizard/product_add_vendor.py @@ -37,9 +37,7 @@ class ProductAddVendor(models.TransientModel): help='Product Vendors') def action_add_product_vendors(self): - """ - Function for adding seller_ids (product vendors) for Selected Products - """ + """Function for adding seller_ids (product vendors) for Selected Products""" if self.product_ids and self.vendor_ids: for products in self.product_ids: for vendor in self.vendor_ids: @@ -49,6 +47,10 @@ class ProductAddVendor(models.TransientModel): 'currency_id': vendor.currency_id.id, 'delay': vendor.delay, })] + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } class ProductAttribute(models.TransientModel): diff --git a/product_management_system/wizard/product_alternative.py b/product_management_system/wizard/product_alternative.py index 32d8ad8c8..58d189461 100644 --- a/product_management_system/wizard/product_alternative.py +++ b/product_management_system/wizard/product_alternative.py @@ -39,11 +39,13 @@ class ProductAlternative(models.TransientModel): domain="[('id', 'not in', product_ids)]") def action_add_alternative_products(self): - """ - Function for adding alternative products for Selected Products - """ + """Function for adding alternative products for Selected Products""" if self.product_ids and self.alternative_ids: for products in self.product_ids: for items in self.alternative_ids: products.alternative_product_ids = [ fields.Command.link(items.id)] + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_archive.py b/product_management_system/wizard/product_archive.py index 6159bce03..6f9a08470 100644 --- a/product_management_system/wizard/product_archive.py +++ b/product_management_system/wizard/product_archive.py @@ -34,11 +34,13 @@ class ProductArchive(models.TransientModel): help='Products which are selected') def action_archive_product(self): - """ - Function for archiving Selected Products - """ + """Function for archiving Selected Products""" if self.product_ids: for products in self.product_ids: products.write({ 'active': False }) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_category_change.py b/product_management_system/wizard/product_category_change.py index 397a105b0..2ad91f225 100644 --- a/product_management_system/wizard/product_category_change.py +++ b/product_management_system/wizard/product_category_change.py @@ -37,11 +37,13 @@ class ProductCategoryChange(models.TransientModel): help='Category') def action_product_category_change_confirm(self): - """ - Function for changing category of Selected Products - """ + """Function for changing category of Selected Products""" if self.product_ids and self.category_id: for rec in self.product_ids: rec.write({ 'categ_id': self.category_id }) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_category_website.py b/product_management_system/wizard/product_category_website.py index 37223ef82..9f7b4e2e8 100644 --- a/product_management_system/wizard/product_category_website.py +++ b/product_management_system/wizard/product_category_website.py @@ -37,10 +37,13 @@ class ProductWebsiteCategory(models.TransientModel): help='Select Product Category In Website') def action_change_website_category(self): - """ - Function for changing public_categ_ids (Website Category) of Selected Products - """ + """Function for changing public_categ_ids (Website Category) of + Selected Products""" if self.product_ids and self.public_categ_ids: for products in self.product_ids: for items in self.public_categ_ids: products.public_categ_ids = [fields.Command.link(items.id)] + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_change_tracking.py b/product_management_system/wizard/product_change_tracking.py index 27a446090..759c02cb8 100644 --- a/product_management_system/wizard/product_change_tracking.py +++ b/product_management_system/wizard/product_change_tracking.py @@ -41,9 +41,11 @@ class ProductChangeTracking(models.TransientModel): default='none', required=True) def action_change_product_tracking(self): - """ - Function for changing tracking method of selected products - """ + """Function for changing tracking method of selected products""" if self.product_ids: for products in self.product_ids: products.write({'tracking': self.tracking}) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_customer_lead_time.py b/product_management_system/wizard/product_customer_lead_time.py index 3de1becd6..162b2e28f 100644 --- a/product_management_system/wizard/product_customer_lead_time.py +++ b/product_management_system/wizard/product_customer_lead_time.py @@ -36,9 +36,12 @@ class ProductCustomerLeadTime(models.TransientModel): help='Delivery lead time in days') def action_change_customer_lead_time(self): - """ - Function for changing sale_delay (Customer Lead Time) of Selected Products - """ + """Function for changing sale_delay (Customer Lead Time) of + Selected Products""" if self.product_ids and self.sale_delay != 0: for products in self.product_ids: products.write({'sale_delay': self.sale_delay}) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_customer_tax.py b/product_management_system/wizard/product_customer_tax.py index 2b3960f9e..29a2d1e09 100644 --- a/product_management_system/wizard/product_customer_tax.py +++ b/product_management_system/wizard/product_customer_tax.py @@ -38,10 +38,12 @@ class ProductCustomerTax(models.TransientModel): help='Customer Tax') def action_change_customer_tax(self): - """ - Function for changing tax_ids (Customer Tax) of selected products - """ + """Function for changing tax_ids (Customer Tax) of selected products""" if self.product_ids and self.tax_ids: for products in self.product_ids: for items in self.tax_ids: products.taxes_id = [fields.Command.link(items.id)] + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_delete.py b/product_management_system/wizard/product_delete.py index 181e3fa4c..0cc131950 100644 --- a/product_management_system/wizard/product_delete.py +++ b/product_management_system/wizard/product_delete.py @@ -34,9 +34,12 @@ class ProductDelete(models.TransientModel): help='Products which are selected') def action_delete_product(self): - """ - Function for deleting selected products - """ + """Function for deleting selected products""" if self.product_ids: for products in self.product_ids: products.unlink() + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + diff --git a/product_management_system/wizard/product_inventory_location.py b/product_management_system/wizard/product_inventory_location.py index 7451fe9d2..2543436f1 100644 --- a/product_management_system/wizard/product_inventory_location.py +++ b/product_management_system/wizard/product_inventory_location.py @@ -38,10 +38,12 @@ class ProductInventoryLocation(models.TransientModel): domain="[('usage','=','inventory')]") def action_change_inventory_location(self): - """ - Function for changing product inventory location of selected products - """ + """Function for changing product inventory location of selected products""" if self.product_ids and self.inventory_location_id: for products in self.product_ids: products.write( {'property_stock_inventory': self.inventory_location_id}) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_invoice.py b/product_management_system/wizard/product_invoice.py index b6f54f1d9..079baa083 100644 --- a/product_management_system/wizard/product_invoice.py +++ b/product_management_system/wizard/product_invoice.py @@ -39,9 +39,12 @@ class ProductInvoice(models.TransientModel): default='order', required=True) def action_change_invoice_policy_products(self): - """ - Function for changing invoice policy of selected products - """ + """Function for changing invoice policy of selected products""" if self.product_ids: for products in self.product_ids: products.write({'invoice_policy': self.invoice_policy}) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + diff --git a/product_management_system/wizard/product_make_purchasable.py b/product_management_system/wizard/product_make_purchasable.py index 612dae04e..97316a3bd 100644 --- a/product_management_system/wizard/product_make_purchasable.py +++ b/product_management_system/wizard/product_make_purchasable.py @@ -34,21 +34,25 @@ class ProductMakePurchasable(models.TransientModel): help='Products which are selected') def action_product_make_purchasable_confirm(self): - """ - Function for making product purchasable - """ + """Function for making product purchasable""" if self.product_ids: for rec in self.product_ids: rec.write({ 'purchase_ok': True }) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } def action_product_make_purchasable_false(self): - """ - Function for making product not purchasable - """ + """Function for making product not purchasable""" if self.product_ids: for rec in self.product_ids: rec.write({ 'purchase_ok': False }) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_make_salable.py b/product_management_system/wizard/product_make_salable.py index 4ec291a3a..670f6de13 100644 --- a/product_management_system/wizard/product_make_salable.py +++ b/product_management_system/wizard/product_make_salable.py @@ -34,21 +34,25 @@ class ProductMakeSaleable(models.TransientModel): help='Products which are selected') def action_product_make_salable_confirm(self): - """ - Function for making product Salable - """ + """Function for making product Salable""" if self.product_ids: for rec in self.product_ids: rec.write({ 'sale_ok': True }) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } def action_product_make_salable_false(self): - """ - Function for making product not Salable - """ + """Function for making product not Salable""" if self.product_ids: for rec in self.product_ids: rec.write({ 'sale_ok': False }) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_optional.py b/product_management_system/wizard/product_optional.py index 6e6e00ba2..c56ee9cf4 100644 --- a/product_management_system/wizard/product_optional.py +++ b/product_management_system/wizard/product_optional.py @@ -39,11 +39,13 @@ class ProductOptional(models.TransientModel): domain="[('id', 'not in', product_ids)]") def action_add_optional_products(self): - """ - Function for adding optional products for selected products - """ + """Function for adding optional products for selected products""" if self.product_ids and self.optional_ids: for products in self.product_ids: for items in self.optional_ids: products.optional_product_ids = [ fields.Command.link(items.id)] + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_production_location.py b/product_management_system/wizard/product_production_location.py index 9ae48eac4..70ad6515e 100644 --- a/product_management_system/wizard/product_production_location.py +++ b/product_management_system/wizard/product_production_location.py @@ -38,10 +38,12 @@ class ProductProductionLocation(models.TransientModel): domain="[('usage','=','production')]") def action_change_production_location(self): - """ - Function for changing production location of the selected products - """ + """Function for changing production location of the selected products""" if self.product_ids: for products in self.product_ids: products.write( {'property_stock_production': self.production_location_id}) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_publish.py b/product_management_system/wizard/product_publish.py index 943b089b9..101047829 100644 --- a/product_management_system/wizard/product_publish.py +++ b/product_management_system/wizard/product_publish.py @@ -34,17 +34,21 @@ class ProductPublish(models.TransientModel): help='Products which are selected') def action_publish_product(self): - """ - Function for making selected products publish on website - """ + """Function for making selected products publish on website""" if self.product_ids: for products in self.product_ids: products.write({'is_published': True}) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } def action_not_publish_product(self): - """ - Function for not making selected products publish on website - """ + """Function for not making selected products publish on website""" if self.product_ids: for products in self.product_ids: products.write({'is_published': False}) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_update_price.py b/product_management_system/wizard/product_update_price.py index 9d007d03b..b68bdc37d 100644 --- a/product_management_system/wizard/product_update_price.py +++ b/product_management_system/wizard/product_update_price.py @@ -36,11 +36,13 @@ class ProductUpdatePrice(models.TransientModel): help='Price of the product') def action_product_update_price_confirm(self): - """ - Function for updating price of the selected products - """ + """Function for updating price of the selected products""" if self.product_ids: for rec in self.product_ids: rec.write({ 'list_price': self.product_price if self.product_price != 0 else rec.list_price, }) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/product_management_system/wizard/product_vendor_tax.py b/product_management_system/wizard/product_vendor_tax.py index f0ba30f39..cf3cd76f3 100644 --- a/product_management_system/wizard/product_vendor_tax.py +++ b/product_management_system/wizard/product_vendor_tax.py @@ -38,10 +38,12 @@ class ProductVendorTax(models.TransientModel): domain="[('type_tax_use', '=', 'purchase')]") def action_change_vendor_tax(self): - """ - Function for updating vendor tax of the selected products - """ + """Function for updating vendor tax of the selected products""" if self.product_ids and self.tax_ids: for products in self.product_ids: for items in self.tax_ids: products.supplier_taxes_id = [fields.Command.link(items.id)] + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + }