diff --git a/sf_dlm_management/views/product_template_management_view.xml b/sf_dlm_management/views/product_template_management_view.xml index 94fc6b45..8842f8bf 100644 --- a/sf_dlm_management/views/product_template_management_view.xml +++ b/sf_dlm_management/views/product_template_management_view.xml @@ -32,6 +32,7 @@ attrs="{'invisible': [('categ_type', '!=', '刀具')],'required': [('categ_type', '=', '刀具')],'readonly': [('id', '!=', False)]}" placeholder="请选择"/> @@ -39,6 +40,7 @@ @@ -436,7 +438,7 @@ - + @@ -453,7 +455,7 @@ - + @@ -464,8 +466,8 @@ - - + @@ -553,14 +555,16 @@ - + diff --git a/sf_sale/views/purchase_order_view.xml b/sf_sale/views/purchase_order_view.xml index b0a4ed98..85f5b1c8 100644 --- a/sf_sale/views/purchase_order_view.xml +++ b/sf_sale/views/purchase_order_view.xml @@ -83,6 +83,9 @@ {'readonly': [('state', 'in', ['purchase'])]} + + {'no_create': True} + {'readonly': [('state', 'in', ['purchase'])]} diff --git a/sf_sale/views/sale_order_view.xml b/sf_sale/views/sale_order_view.xml index 8350c761..5670e2aa 100644 --- a/sf_sale/views/sale_order_view.xml +++ b/sf_sale/views/sale_order_view.xml @@ -119,7 +119,7 @@ string="模型文件" attrs="{'readonly': [('state', 'in', ['draft'])]}"/> - {'no_create': True} + {'no_create': True, 'no_quick_create': True} {'is_sale_order_line': True } diff --git a/sf_tool_management/wizard/wizard.py b/sf_tool_management/wizard/wizard.py index a77c9010..d6981922 100644 --- a/sf_tool_management/wizard/wizard.py +++ b/sf_tool_management/wizard/wizard.py @@ -1,3 +1,5 @@ +import logging + from datetime import timedelta, datetime from odoo import fields, models, api @@ -807,6 +809,7 @@ class ProductProduct(models.Model): """ product_id = self.env['product.product'].search([('name', '=', '功能刀具')]) + logging.info("product_id: %s" % product_id) stock_lot = self.env['stock.lot'].create({ 'name': self.get_stock_lot_name(tool_assembly_order_id), 'product_id': product_id.id, diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py index 236781ee..1a7ba1e0 100644 --- a/sf_warehouse/models/model.py +++ b/sf_warehouse/models/model.py @@ -880,7 +880,7 @@ class SfStockPicking(models.Model): line.compute_destination_location_id() else: # 对除刀柄之外的刀具物料进行 目标货位必填校验 - if self.location_dest_id.name == '刀具房' and line.product_id.cutting_tool_material_id not in ( + if self.location_dest_id.name == '刀具房' and line.product_id.cutting_tool_material_id.name not in ( '刀柄', False): raise ValidationError('请选择【%s】产品的目标货位!' % line.product_id.name) if line.current_location_id: