销售订单新增合同日期字段

This commit is contained in:
yuxianghui
2025-06-10 15:26:32 +08:00
parent 484fab85be
commit c6b47bd68d
2 changed files with 2 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ class JikimoSaleRoutePicking(Sf_Bf_Connect):
i += 1 i += 1
if kw.get('contract_file_name') and kw.get('contract_file') and kw.get('contract_code'): if kw.get('contract_file_name') and kw.get('contract_file') and kw.get('contract_code'):
order_id.create_sale_documents(kw.get('contract_file_name'), kw.get('contract_file')) order_id.create_sale_documents(kw.get('contract_file_name'), kw.get('contract_file'))
order_id.write({'contract_code': kw.get('contract_code')}) order_id.write({'contract_code': kw.get('contract_code'), 'contract_date': kw.get('contract_date')})
res['factory_order_no'] = order_id.name res['factory_order_no'] = order_id.name
order_id.confirm_to_supply_method() order_id.confirm_to_supply_method()
except Exception as e: except Exception as e:

View File

@@ -64,6 +64,7 @@ class ReSaleOrder(models.Model):
model_display_version = fields.Char('模型展示版本', default="v1") model_display_version = fields.Char('模型展示版本', default="v1")
contract_code = fields.Char('合同编号') contract_code = fields.Char('合同编号')
contract_date = fields.Date('合同日期')
contract_document_id = fields.Many2one('documents.document', string='合同文件') contract_document_id = fields.Many2one('documents.document', string='合同文件')
contract_file = fields.Binary(related='contract_document_id.datas', string='合同文件内容') contract_file = fields.Binary(related='contract_document_id.datas', string='合同文件内容')
contract_file_name = fields.Char(related='contract_document_id.attachment_id.name', string='文件名') contract_file_name = fields.Char(related='contract_document_id.attachment_id.name', string='文件名')