From 03fe730c50fb1552a86ff00463bb833c400392be Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Fri, 19 Jul 2024 16:46:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E6=B7=BB=E5=8A=A0=E7=A8=8E?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/product_template.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index 4d05de81..400cf0d6 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -640,6 +640,10 @@ class ResProductMo(models.Model): 'part_number': item.get('part_number') or '', 'active': True, } + tax_id = self.env['account.tax'].sudo().search( + [('type_tax_use', '=', 'sale'), ('amount', '=', item.get('tax')), ('price_include', '=', 'True')]) + if tax_id: + vals.update({'taxes_id':[(6,0,[int(tax_id)])]}) copy_product_id.sudo().write(vals) product_id.product_tmpl_id.active = False return copy_product_id @@ -947,6 +951,7 @@ class SfMaintenanceEquipmentAndProductTemplate(models.Model): raise ValidationError("机床基坐标获取失败") +sf_man class SfMaintenanceEquipmentTool(models.Model): _name = 'maintenance.equipment.tool' _description = '机床刀位'