We are working with Odoo 14.
I have a manufacturing or production order in 'to_close' status and I am trying to complete it.
When I click on the 'Mark as Done' button, a warning window appears with the following content:
The operation cannot be completed:
- Create/update: a mandatory field is not set.
- Delete: another model requires the record being deleted. If possible, archive it instead.
Model: Journal Entry (account.move), Field: Status (state).
The information provided by the server 'log' file is:
ERROR SenoriodeBocos odoo.sql_db: bad query: INSERT INTO "account_move" ("id", "create_uid", "create_date", "write_uid", "write_date", "auto_post", "company_id", "currency_id", "date" , "invoice_incoterm_id", "invoice_user_id", "is_move_sent", "journal_id", "move_name", "move_type", "not_in_mod347", "ref", "reference_type", "sequence_option", "src_dest_region_id", "state", " stock_move_id", "team_id", "to_check") VALUES (nextval('account_move_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), false, 1, 1, '2023-03-12', NULL, 1, false, 8, NULL, 'entry', false, 'ZA/ET/FA/23/0003 - Red Wine TVZ Reserva 2017 (Jaulon)', ' none', false, NULL, NULL, 6383, 1, false) RETURNING id
ERROR: null value in column "state" of relation "account_move" violates not-null constraint
DETAIL: Failing row contains (1033, null, null, 2023-03-12, ZA/ET/FA/23/0003 - Red Wine TVZ Reserva 2017 (Jaulon), null, null, null, entry, f, 8, 1 , 1, null, null, f, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, f, null, null, 1, null, null , null, null, null, null, null, null, null, null, null, null, null, null, 1, 2023-03-12 11:31:30.076151, 1, 2023-03-12 11:31:30.076151 , null, null, null, null, 1, null, 6383, null, null, f, null, null, null, none, null, null, null, f, null, null, null, null, null, null, null , null, null, null, null, null, null, null, null, null, null, null, null, null, null).
The problem seems to be that from mrp_production or stock_move my Odoo14 cannot transmit to the 'state' column of the 'account_move' database table that the status of the manufacturing order is 'done' but it passes a status ' null'. And since this column has a 'no null' constraint I can't complete the order.
Could someone help me to solve this problem?
Thank you so much for your attention.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
296
Views
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up