Skip to content

Commit 0defc7f

Browse files
Apply suggestions from code review
Co-authored-by: Denis Roussel (ACSONE) <[email protected]>
1 parent 477680a commit 0defc7f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

product_merge/wizards/product_merge_wizard.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class ProductMergeWizard(models.TransientModel):
1616
string="Product Model",
1717
domain="[('id', 'in', product_ids)]",
1818
required=True,
19+
ondelete="cascade"
1920
)
2021
product_ids = fields.Many2many(
2122
comodel_name="product.template", string="Products to Merge", required=True

product_merge/wizards/product_merge_wizard_line.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ class ProductMergeWizardLine(models.TransientModel):
99
_name = "product.merge.wizard.line"
1010
_description = "Merge Products Wizard Line"
1111

12-
wizard_id = fields.Many2one("product.merge.wizard", string="Wizard", required=True)
12+
wizard_id = fields.Many2one("product.merge.wizard", string="Wizard", required=True, ondelete="cascade")
1313
product_id = fields.Many2one(
14-
comodel_name="product.product", string="Product", required=True
14+
comodel_name="product.product", string="Product", required=True, ondelete="cascade"
1515
)
1616
attribute_value_ids = fields.Many2many(
1717
comodel_name="product.attribute.value",

0 commit comments

Comments
 (0)