[FIX] purchase: add source document to vendor bill
Create a purchase order, confirm it and create the vendor bill. The source document will be not filled. Fixing the related variable and changing also the missing reference to the partner opw-2197272 closes odoo/odoo#45534 X-original-commit: 8498dbe10db87f718b9287f69188c627e36f98a3 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -426,8 +426,8 @@ class PurchaseOrder(models.Model):
|
||||
# Do not set an invoice_id if we want to create a new bill.
|
||||
if not create_bill:
|
||||
result['res_id'] = self.invoice_ids.id or False
|
||||
result['context']['default_origin'] = self.name
|
||||
result['context']['default_reference'] = self.partner_ref
|
||||
result['context']['default_invoice_origin'] = self.name
|
||||
result['context']['default_ref'] = self.partner_ref
|
||||
return result
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user