Skip to content
Snippets Groups Projects
Commit 914391fa authored by Adrien Widart (awt)'s avatar Adrien Widart (awt)
Browse files

[FIX] stock_landed_costs: set AML's account on its creation

To reproduce the issue:
1. create a product category with inventory valuation set as Manual
2. create a landed cost product using above category
3. enable anglo saxon accounting in accounting settings
4. create a vendor bill with this product and click save

Error: An error is displayed because of a missing account

We can remove the `create` override introduced by [1]. That way, we
avoid:
- a useless `create` layer
- a possible write on an AML just after its creation

The method `_get_computed_account` is called during the AML creation
process:
https://github.com/odoo/odoo/blob/8c8d657c85f76bd74d663843382af3dde8d885b8/addons/account/models/account_move.py#L2058
https://github.com/odoo/odoo/blob/8c8d657c85f76bd74d663843382af3dde8d885b8/addons/account/models/account_move.py#L1933



[1] f36c5c8a

OPW-3251714

closes odoo/odoo#119022

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
parent 9da82a6e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment