diff --git a/yuthon_sps_approval/models/inherit_product_template.py b/yuthon_sps_approval/models/inherit_product_template.py index 426d9f891..76c7012d4 100644 --- a/yuthon_sps_approval/models/inherit_product_template.py +++ b/yuthon_sps_approval/models/inherit_product_template.py @@ -9,4 +9,4 @@ class ProductTemplate(models.Model): template_ids = self.env["product.template"].browse(self._context.get('active_ids', self._context.get('active_id'))) company_id = self.env['res.company'].search([('name', '=', '集团本部')]) for template in template_ids: - template.company_id = company_id.id \ No newline at end of file + template.write({'company_id': company_id.id}) \ No newline at end of file