Skip to content
Snippets Groups Projects
Commit 75b45e73 authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] purchase_stock: add the partner_id to the price difference lines


Steps to reproduce the bug:
- Create a storable product, e.g:”Product A”, with a AVCO + Automated category
- Make sure to assign an account in the price difference account field
- Create an RFQ with the “Product A”
- Confirm RFQ and receive the product
- Create the vendor bill and edit to change the unit cost from 55 to 56
- Post the bill
- Check journal items

Problem:
Price difference accounts have no partner_id

opw-2616388

closes odoo/odoo#75038

Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
parent dfec2b07
Branches
Tags
No related merge requests found
......@@ -153,6 +153,7 @@ class AccountMove(models.Model):
'analytic_tag_ids': [(6, 0, line.analytic_tag_ids.ids)],
'exclude_from_invoice_tab': True,
'is_anglo_saxon_line': True,
'partner_id': line.partner_id.id,
}
vals.update(line._get_fields_onchange_subtotal(price_subtotal=vals['price_subtotal']))
lines_vals_list.append(vals)
......@@ -172,6 +173,7 @@ class AccountMove(models.Model):
'analytic_tag_ids': [(6, 0, line.analytic_tag_ids.ids)],
'exclude_from_invoice_tab': True,
'is_anglo_saxon_line': True,
'partner_id': line.partner_id.id,
}
vals.update(line._get_fields_onchange_subtotal(price_subtotal=vals['price_subtotal']))
lines_vals_list.append(vals)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment