Skip to content

Commit

Permalink
[ADD] purchase_operating_unit_sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
njojic committed Jun 24, 2024
1 parent 77c673a commit a45ac36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion purchase_operating_unit_sequence/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class PurchaseOrder(models.Model):

@api.model
def create(self, vals):
if vals.get("name", "/") == "/" and vals.get("operating_unit_id", False):
if vals.get("operating_unit_id", False):
ou_id = self.env["operating.unit"].browse(vals["operating_unit_id"])
if ou_id.purchase_sequence_id:
vals["name"] = ou_id.purchase_sequence_id.next_by_id()
Expand Down

0 comments on commit a45ac36

Please sign in to comment.