[IMP] stock_account: Add partner on account entries
Add the partner references on account entries created from a purchase order receipt or a customer invoice Part-of: odoo/odoo#99411
This commit is contained in:
@@ -501,12 +501,13 @@ class StockMove(models.Model):
|
||||
|
||||
def _prepare_account_move_vals(self, credit_account_id, debit_account_id, journal_id, qty, description, svl_id, cost):
|
||||
self.ensure_one()
|
||||
|
||||
valuation_partner_id = self._get_partner_id_for_valuation_lines()
|
||||
move_ids = self._prepare_account_move_line(qty, cost, credit_account_id, debit_account_id, description)
|
||||
date = self._context.get('force_period_date', fields.Date.context_today(self))
|
||||
return {
|
||||
'journal_id': journal_id,
|
||||
'line_ids': move_ids,
|
||||
'partner_id': valuation_partner_id,
|
||||
'date': date,
|
||||
'ref': description,
|
||||
'stock_move_id': self.id,
|
||||
|
||||
Reference in New Issue
Block a user