diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2018-09-03 10:32:41 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim-odoo@users.noreply.github.com> | 2018-09-03 11:57:49 +0200 |
| commit | 5b89ca142d5e932dff0dffe04d187cf5eda7ac7e (patch) | |
| tree | 8f71ebfd7744105b622d2637d8977da829fa256d /addons | |
| parent | d448849ba3e340b6ec740eec36c67eb9ffa7b4f3 (diff) | |
[FIX] purchase: vendor reference
In case no PO has a vendor reference, keep the value.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/purchase/models/account_invoice.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/purchase/models/account_invoice.py b/addons/purchase/models/account_invoice.py index 056e3e8e6d5..1490bb9fec9 100644 --- a/addons/purchase/models/account_invoice.py +++ b/addons/purchase/models/account_invoice.py @@ -103,7 +103,7 @@ class AccountInvoice(models.Model): purchase_ids = self.invoice_line_ids.mapped('purchase_id') if purchase_ids: self.origin = ', '.join(purchase_ids.mapped('name')) - self.reference = ', '.join(purchase_ids.filtered('partner_ref').mapped('partner_ref')) + self.reference = ', '.join(purchase_ids.filtered('partner_ref').mapped('partner_ref')) or self.reference @api.onchange('partner_id', 'company_id') def _onchange_partner_id(self): |
