diff --git a/jikimo_sale_multiple_supply_methods/controllers/main.py b/jikimo_sale_multiple_supply_methods/controllers/main.py
index b5a25749..ed6ec426 100644
--- a/jikimo_sale_multiple_supply_methods/controllers/main.py
+++ b/jikimo_sale_multiple_supply_methods/controllers/main.py
@@ -39,6 +39,7 @@ class JikimoSaleRoutePicking(Sf_Bf_Connect):
item['embryo_redundancy_id'] = item['embryo_redundancy'].id
product = request.env['product.template'].sudo().product_create(product_id, item, order_id,
kw['order_number'], i)
+ product.product_tmpl_id.is_customer_provided = True if item['embryo_redundancy_id'] else False
order_id.with_user(request.env.ref("base.user_admin")).sale_order_create_line(product, item)
i += 1
res['factory_order_no'] = order_id.name
diff --git a/jikimo_sale_multiple_supply_methods/models/product_template.py b/jikimo_sale_multiple_supply_methods/models/product_template.py
index c7dfa1ab..640571f7 100644
--- a/jikimo_sale_multiple_supply_methods/models/product_template.py
+++ b/jikimo_sale_multiple_supply_methods/models/product_template.py
@@ -6,12 +6,6 @@ class ProductTemplate(models.Model):
is_manual_processing = fields.Boolean(string='人工线下加工')
is_customer_provided = fields.Boolean(string='客供料')
- def product_create(self, product_id, item, order_id, order_number, i):
- product_id = super(ProductTemplate, self).product_create(product_id, item, order_id, order_number, i)
- product_id.product_tmpl_id.is_customer_provided = True if item['embryo_redundancy_id'] else False
- return product_id
-
-
def copy_template(self, product_template_id):
if not isinstance(product_template_id, ProductTemplate):
raise ValueError('%s必须是ProductTemplate类型' % product_template_id)
diff --git a/sf_base/models/base.py b/sf_base/models/base.py
index 15d4f9cc..d7a71e1e 100644
--- a/sf_base/models/base.py
+++ b/sf_base/models/base.py
@@ -415,9 +415,9 @@ class ReSaleOrder(models.Model):
class EmbryoRedundancy(models.Model):
_name = "sf.embryo.redundancy"
+ code = fields.Char('编码', required=True)
name = fields.Char('名称', required=True)
long = fields.Float('长度(mm)', required=True)
width = fields.Float('宽度(mm)', required=True)
height = fields.Float('高度(mm)', required=True)
- code = fields.Char('编码', required=True)
active = fields.Boolean('有效', default=True)
diff --git a/sf_dlm_management/views/product_template_management_view.xml b/sf_dlm_management/views/product_template_management_view.xml
index 7f0e9ad5..1f3dc50b 100644
--- a/sf_dlm_management/views/product_template_management_view.xml
+++ b/sf_dlm_management/views/product_template_management_view.xml
@@ -19,6 +19,7 @@
+
diff --git a/sf_sale/models/sale_order.py b/sf_sale/models/sale_order.py
index 0b1871ed..e2389ee2 100644
--- a/sf_sale/models/sale_order.py
+++ b/sf_sale/models/sale_order.py
@@ -133,6 +133,7 @@ class ReSaleOrder(models.Model):
'product_uom_qty': item['number'],
'model_glb_file': base64.b64decode(item['model_file']),
'remark': item.get('remark'),
+ 'embryo_redundancy_id': item.get('embryo_redundancy_id'),
'is_incoming_material': True if item.get('embryo_redundancy_id') else False,
'manual_quotation': item.get('manual_quotation')
}