Skip to content

Commit

Permalink
[IMP] mrp_repair_type: Change column name to avoid conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
unaiberis authored and anajuaristi committed Dec 26, 2024
1 parent 438a0e5 commit c44ef78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mrp_repair_type/models/mrp_repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class RepairOrderType(models.Model):
class RepairOrder(models.Model):
_inherit = "repair.order"

repair_type_id = fields.Many2one(
repair_order_type_id = fields.Many2one(
comodel_name="repair.order.type", string="Repair order type"
)
2 changes: 1 addition & 1 deletion repair_order_type/models/repair_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def onchange_location_id(self):
def create(self, vals):
if vals.get("name", "/") == "/" and vals.get("type_id"):
repair_type = self.env["repair.order.type"].browse(vals["type_id"])
if repair_type.sequence_id:
if hasattr(repair_type, "sequence_id") and repair_type.sequence_id:
vals["name"] = repair_type.sequence_id.next_by_id()
return super().create(vals)

Expand Down

0 comments on commit c44ef78

Please sign in to comment.