Skip to content

Commit 28d7beb

Browse files
committed
[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#53286 Signed-off-by: Nicolas Martinelli (nim) <[email protected]>
1 parent 03fb98f commit 28d7beb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/purchase/models/purchase.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ def action_view_invoice(self):
431431
'default_type': 'in_invoice',
432432
'default_company_id': self.company_id.id,
433433
'default_purchase_id': self.id,
434+
'default_partner_id': self.partner_id.id,
434435
}
435436
# Invoice_ids may be filtered depending on the user. To ensure we get all
436437
# invoices related to the purchase order, we read them in sudo to fill the

0 commit comments

Comments
 (0)