purchase_usability: don't write ref on account.move, because ref is for the supplier invoice number

This commit is contained in:
Alexis de Lattre
2023-06-12 23:24:25 +02:00
parent 5f6b731e50
commit d2bc7be9fe

View File

@@ -68,6 +68,13 @@ class PurchaseOrder(models.Model):
# ]
return res
def _prepare_invoice(self):
# Don't write self.partner_ref on 'ref' of invoice... ref is for the
# supplier invoice number !
vals = super()._prepare_invoice()
vals["ref"] = ''
return vals
class PurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line'