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:
gsinghpal
2026-05-26 23:49:06 -04:00
parent a7cbd1a6f7
commit 6351aa6054

View File

@@ -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,