From 6351aa605471fdb4a852fc13dbaae436a9676fee Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Tue, 26 May 2026 23:49:06 -0400 Subject: [PATCH] fix(configurator): pass .id when carrying material_process M2O to sale.order create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../wizard/fp_direct_order_wizard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fusion_plating/fusion_plating_configurator/wizard/fp_direct_order_wizard.py b/fusion_plating/fusion_plating_configurator/wizard/fp_direct_order_wizard.py index c64eb1a4..716b2f8f 100644 --- a/fusion_plating/fusion_plating_configurator/wizard/fp_direct_order_wizard.py +++ b/fusion_plating/fusion_plating_configurator/wizard/fp_direct_order_wizard.py @@ -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,