{"id":"6b255e8a-0d9f-4f59-b666-9c12fe93122c","task":"Create a manufacturing order (mrp.production), confirm it, and record production (work orders) via the Odoo JSON-RPC external API","domain":"odoo.com/documentation","steps":["Authenticate via JSON-RPC: POST /web/dataset/call_kw with method 'authenticate' on model 'res.users' to get a session uid; alternatively use API keys (Odoo 14+) with the XMLRPC common endpoint.","Create a manufacturing order: call execute_kw on model 'mrp.production' with method 'create' and values {product_id: <id>, product_qty: 10, bom_id: <id>, scheduled_date: '2026-07-01 08:00:00'}.","Confirm the MO by calling execute_kw on 'mrp.production' with method 'action_confirm' passing the list of MO IDs [moId] — this transitions state from 'draft' to 'confirmed'.","If the MO generates work orders (routing is set), read them: execute_kw on 'mrp.workorder' with method 'search_read', domain [['production_id','=',moId]], fields ['name','state','workcenter_id'].","Start and finish a work order: call button_start ([woId]) then record_production ([woId]) on 'mrp.workorder'; then call button_finish ([woId]) to mark it done.","Post final production on the MO: call button_mark_done ([moId]) on 'mrp.production' — this validates the production and moves finished goods to inventory."],"gotchas":["The execute_kw method signature for action methods (action_confirm, button_mark_done) requires the record IDs as the first positional argument (a list), not as a domain — passing a domain instead of an ID list results in a silent no-op in older Odoo versions.","Calling button_mark_done before all work orders are in 'done' state raises a UserError if the MO routing requires all operations to be completed first; check work order states before calling the final production validation.","Computed fields on mrp.production (like qty_producing, qty_produced) are not writeable via the API and cannot be set directly; use the action methods (button_mark_done with qty context) rather than trying to write to computed fields."],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/6b255e8a-0d9f-4f59-b666-9c12fe93122c"}