fix(configurator): pass .id when carrying material_process M2O to sale.order create
Regression from G2 conversion (Char → Many2One). The wizard's action_create_order built so_vals with 'x_fc_material_process': self.material_process (the recordset) instead of .id. Passing a recordset where an integer FK is expected raised: psycopg2.ProgrammingError: can't adapt type 'fusion.plating.process.node' at sale.order create time, breaking Confirm Order. Python-only fix — no module upgrade needed, systemctl restart picks it up.
This commit is contained in:
@@ -736,7 +736,8 @@ class FpDirectOrderWizard(models.Model):
|
||||
'note': self.terms_and_conditions or False,
|
||||
# Express Orders header (2026-05-26)
|
||||
'x_fc_internal_notes': self.internal_notes or False,
|
||||
'x_fc_material_process': self.material_process or False,
|
||||
# material_process is a Many2One since 19.0.22.1.0 — pass .id
|
||||
'x_fc_material_process': self.material_process.id if self.material_process else False,
|
||||
'x_fc_tooling_charge': self.tooling_charge or 0.0,
|
||||
'pricelist_id': self.pricelist_id.id if self.pricelist_id else False,
|
||||
'validity_date': self.validity_date or False,
|
||||
|
||||
Reference in New Issue
Block a user