Skip to content

Commit

Permalink
Rename "stroke" to "strokes" in motor product fields and views.
Browse files Browse the repository at this point in the history
This update ensures consistency in field naming across models and views by using the plural form "strokes" to reflect its many-to-many relationship. The change improves clarity and aligns with naming conventions, reducing potential confusion for developers.
  • Loading branch information
cbusillo committed Jan 18, 2025
1 parent 3da28cc commit 629318a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion product_connect/models/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def create_motor_products(self) -> None:
current_product_ids = set(motor.products.ids)

for product_template in product_templates:
if product_template.stroke and motor.stroke not in product_template.stroke:
if product_template.strokes and motor.stroke not in product_template.strokes:
continue
if product_template.configurations and motor.configuration not in product_template.configurations:
continue
Expand Down
2 changes: 1 addition & 1 deletion product_connect/models/motor_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MotorProductTemplate(models.Model):

name = fields.Char(required=True)

stroke = fields.Many2many("motor.stroke")
strokes = fields.Many2many("motor.stroke")
configurations = fields.Many2many("motor.configuration")
manufacturers = fields.Many2many("product.manufacturer", domain=[("is_motor_manufacturer", "=", True)])
excluded_by_parts = fields.Many2many("motor.part.template")
Expand Down
2 changes: 1 addition & 1 deletion product_connect/views/motor_product_template_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<field name="part_type"/>
<field name="manufacturers" widget="many2many_tags"/>
<field name="configurations" widget="many2many_tags"/>
<field name="stroke" widget="many2many_tags"/>
<field name="strokes" widget="many2many_tags"/>
<field name="excluded_by_parts" widget="many2many_tags"/>
<field name="sequence"/>
</list>
Expand Down

0 comments on commit 629318a

Please sign in to comment.