From cb4f002bb709d988ce698ce20175bdce11d94401 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Sat, 23 Aug 2025 17:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/property_early_quitting.py | 1 - yuthon_trade/models/yuthon_seals_approval.py | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/yuthon_property_approval/models/property_early_quitting.py b/yuthon_property_approval/models/property_early_quitting.py index dc38b8cac..7786fc72a 100644 --- a/yuthon_property_approval/models/property_early_quitting.py +++ b/yuthon_property_approval/models/property_early_quitting.py @@ -44,7 +44,6 @@ class PropertyEarlyQuitting(models.Model): if self.address_id: self.name = '解除租赁合同协议' + '(' + self.address_id.name + ')' - def button_approval(self): for rec in self: rec.contract_id.write({ diff --git a/yuthon_trade/models/yuthon_seals_approval.py b/yuthon_trade/models/yuthon_seals_approval.py index 6790926b5..5f23b977a 100644 --- a/yuthon_trade/models/yuthon_seals_approval.py +++ b/yuthon_trade/models/yuthon_seals_approval.py @@ -28,3 +28,11 @@ class YuthonSealsApproval(models.Model): name_title = fields.Char(default=_get_default_name_title) self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) + + def end_approval(self): + workflow_id = (self.env['soong.workflow.record'].search([('code', '=', self.code)])) + self.env['soong.workflow.line'].create({ + 'model': self._name, + 'res_id': self.id, + 'workflow_record_id': workflow_id.id, + }) \ No newline at end of file