Skip to content

Commit

Permalink
[FIX] purchase: Add partner info to bill creation context
Browse files Browse the repository at this point in the history
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#53286

Signed-off-by: Nicolas Martinelli (nim) <[email protected]>
  • Loading branch information
agr-odoo committed Jun 19, 2020
1 parent 03fb98f commit 28d7beb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/purchase/models/purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ def action_view_invoice(self):
'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
Expand Down

0 comments on commit 28d7beb

Please sign in to comment.