产品添加税信息
This commit is contained in:
@@ -640,6 +640,10 @@ class ResProductMo(models.Model):
|
|||||||
'part_number': item.get('part_number') or '',
|
'part_number': item.get('part_number') or '',
|
||||||
'active': True,
|
'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)
|
copy_product_id.sudo().write(vals)
|
||||||
product_id.product_tmpl_id.active = False
|
product_id.product_tmpl_id.active = False
|
||||||
return copy_product_id
|
return copy_product_id
|
||||||
@@ -947,6 +951,7 @@ class SfMaintenanceEquipmentAndProductTemplate(models.Model):
|
|||||||
raise ValidationError("机床基坐标获取失败")
|
raise ValidationError("机床基坐标获取失败")
|
||||||
|
|
||||||
|
|
||||||
|
sf_man
|
||||||
class SfMaintenanceEquipmentTool(models.Model):
|
class SfMaintenanceEquipmentTool(models.Model):
|
||||||
_name = 'maintenance.equipment.tool'
|
_name = 'maintenance.equipment.tool'
|
||||||
_description = '机床刀位'
|
_description = '机床刀位'
|
||||||
|
|||||||
Reference in New Issue
Block a user