This question has been flagged
5 Replies
12840 Views

So far, the stock journal accounting entries for the stock moves resulting from a point of sale order do not make reference to the product.

How to add the product reference to the accounting entry for the move line ?

Avatar
Discard
Best Answer

The product is stored with the Journal Item (move line) but is not shown in the User Interface.

Add product_id to the form view to see which product was involved (screenshot from v11 but it is the same in v9 and v10):



Avatar
Discard
Author

Thanks Ray for the guidance;

I was able to add the product_id to the tree view of accounting entries, but not to the form view! any further guidance to achieve this with the Studio app?

In addtion, it appears that not all journal item move line are storing the product data: for instance when the "standard" price is changed there is no reference to the product (which is not acceptable from an accounting point of view); How to correct this issue?

Yes, that is something missing from standard Odoo. You may perhaps add comment here https://github.com/odoo/odoo/pull/19515 so this PR might grab better attention.

Author Best Answer

My comment added to https://github.com/odoo/odoo/pull/19515

How to add your new code proposal via the studio apps?

addons/stock_account/models/product.py

@@ -124,11 +124,13 @@ def do_change_standard_price(self, new_price, account_id):

'line_ids': [(0, 0, {

'name': _('Standard Price changed'),

'account_id': debit_account_id,

+ 'product_id': product.id,

'debit': abs(diff * qty_available),

'credit': 0,

}), (0, 0, {

'name': _('Standard Price changed'),

'account_id': credit_account_id,

+ 'product_id': product.id,

'debit': 0,

'credit': abs(diff * qty_available),

})],

Avatar
Discard