Skip to content

Commit

Permalink
Update sequence handling for motor products in product synchronization.
Browse files Browse the repository at this point in the history
Removed sequence assignment from `product_template.py` for motor products and added it directly in `motor.py`. This ensures the sequence is set during the product creation, streamlining the synchronization process.
  • Loading branch information
cbusillo committed Jan 8, 2025
1 parent 098c5f0 commit a2c31cc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions product_connect/models/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ def create_motor_products(self) -> None:
"part_type": product_template.part_type.id,
"type": "consu",
"is_storable": True,
"sequence": product_template.sequence,
}
]
)
Expand Down
1 change: 0 additions & 1 deletion product_connect/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def create(self, vals_list: list["odoo.values.product_template"]) -> "odoo.model
for product in products:
if product.source == "motor":
product.name = product.motor_product_computed_name
product.sequence = product.motor_product_template.sequence
elif product.source == "import":
product.is_ready_for_sale = False
product.is_ready_to_list = True
Expand Down

0 comments on commit a2c31cc

Please sign in to comment.