diff options
| author | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2020-02-17 08:03:16 +0000 |
|---|---|---|
| committer | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2020-02-17 15:48:37 +0000 |
| commit | 8de07a8aa569cf6e21388d67c02344c8fdf0751e (patch) | |
| tree | 83e634a7957002df463717eaaf0581316e85d1bc | |
| parent | 4dd36a86e95b4883f8a0a2fc3ed2ceb72a2559ae (diff) | |
[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>
| -rw-r--r-- | addons/purchase/models/purchase.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index 41c6b5ac35b..1dc8a09c23a 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -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 |
