Skip to content
Snippets Groups Projects
Commit 28d7beb7 authored by Andrea Grazioso (agr-odoo)'s avatar Andrea Grazioso (agr-odoo)
Browse files

[FIX] purchase: Add partner info to bill creation context


Create a purchase order
Confirm
Create the bill from the PO
Some fields related to the partner are left empty, shipping address,
incoterms, ...

While the account.move related to the bill is created,
all onchanges triggered by partner_id change are called on an empty
record.
This will mess up all the fields that should be pre filled
based on the partner_id record

opw-2276391

closes odoo/odoo#53286

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 03fb98f8
No related branches found
No related tags found
No related merge requests found
......@@ -431,6 +431,7 @@ class PurchaseOrder(models.Model):
'default_type': 'in_invoice',
'default_company_id': self.company_id.id,
'default_purchase_id': self.id,
'default_partner_id': self.partner_id.id,
}
# Invoice_ids may be filtered depending on the user. To ensure we get all
# invoices related to the purchase order, we read them in sudo to fill the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment