[FIX] purchase: keep vendor reference
Create a PO and assign any string to the Vendor Reference field. Confirm and create an invoice. The Vendor Reference field on the invoice is empty, while it is expected to be filled in. opw-1879379
This commit is contained in:
committed by
Nicolas Martinelli
parent
b8fe404eae
commit
052a5702c5
@@ -101,8 +101,8 @@ class AccountInvoice(models.Model):
|
||||
@api.onchange('invoice_line_ids')
|
||||
def _onchange_origin(self):
|
||||
purchase_ids = self.invoice_line_ids.mapped('purchase_id')
|
||||
if purchase_ids:
|
||||
self.origin = ', '.join(purchase_ids.mapped('name'))
|
||||
self.origin = ', '.join(purchase_ids.mapped('name'))
|
||||
self.reference = ', '.join(purchase_ids.filtered('partner_ref').mapped('partner_ref'))
|
||||
|
||||
@api.onchange('partner_id', 'company_id')
|
||||
def _onchange_partner_id(self):
|
||||
|
||||
Reference in New Issue
Block a user