Files
odoo_source/addons/mrp_account/models
Saurabh Mishra 87f0222aee [FIX] mrp_account: produce mo when production account given
This issue occurs when the user has not provided production account and is
trying to produce the manufacturing order.

steps to produce:
- Install `mrp_production`, `account_accountant`.
- From Settings > Users > Manage Users  select a user (eg: Mitchell Admin) and
  under `Technical` select `Stock Accounting Automatic group`.
- Inventry > Configuration > Products > Product Categories open a category and
  change it's `Inventry Valuation` (property_valuation) to Automated.
- Through Accounting > Configuaration > Settings >
  Stock Valuation check `Automatic Accounting` and remove Production Account and
  save it. (You will see that production account got removed from the product
  category).
- Now create a manufacturing order by Manufacturing > Operations > Manufacturing
  Orders
- While creating manufacturing order select the product which comes under
  product category you have modified, then confirm the
  manufacturing order.
- Once it is confirmed click on `Produce All`.

video: https://encr.pw/09a2c

Error: `AttributeError: 'bool' object has no attribute 'id'`

Through our commit if the user does not specify a `Production Account` then the
user will face the UserError.  The error is specified in
`_get_accounting_data_for_valuation`  function while checking for `account_src`
or `account_dest`.

sentry-4271608065

closes odoo/odoo#128594

X-original-commit: 9265e785dedd8943296573fc6e5218925a33c522
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-15 13:06:04 +02:00
..
2023-06-23 17:59:57 +02:00
2023-06-23 17:59:57 +02:00
2023-06-23 17:59:57 +02:00