产品添加税信息

This commit is contained in:
liaodanlong
2024-07-19 16:46:53 +08:00
parent a0d3b40548
commit 03fe730c50

View File

@@ -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 = '机床刀位'