Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修复工件配送
This commit is contained in:
@@ -1042,7 +1042,10 @@ class SfWorkOrderBarcodes(models.Model):
|
|||||||
# [('routing_type', '=', '装夹预调'), ('rfid_code', '=', barcode)])
|
# [('routing_type', '=', '装夹预调'), ('rfid_code', '=', barcode)])
|
||||||
workorder_old = self.env['mrp.workorder'].search([('rfid_code', '=', barcode)])
|
workorder_old = self.env['mrp.workorder'].search([('rfid_code', '=', barcode)])
|
||||||
if workorder_old:
|
if workorder_old:
|
||||||
raise UserError('该托盘已绑定【%s】制造订单,请先解除绑定!!!' % workorder_old.production_id.name)
|
name = ''
|
||||||
|
for workorder in workorder_old:
|
||||||
|
name = '%s %s' % (name, workorder.production_id.name)
|
||||||
|
raise UserError('该托盘已绑定【%s】制造订单,请先解除绑定!!!' % name)
|
||||||
if workorder:
|
if workorder:
|
||||||
if workorder.routing_type == '装夹预调':
|
if workorder.routing_type == '装夹预调':
|
||||||
if workorder.state in ['done']:
|
if workorder.state in ['done']:
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
<field name="programming_no" readonly="1"/>
|
<field name="programming_no" readonly="1"/>
|
||||||
<field name="work_state" invisible="1"/>
|
<field name="work_state" invisible="1"/>
|
||||||
<field name="schedule_state" invisible='1'/>
|
<field name="schedule_state" invisible='1'/>
|
||||||
|
<field name="manual_quotation" readonly="1"/>
|
||||||
<field name="programming_state" readonly="1"/>
|
<field name="programming_state" readonly="1"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='user_id']" position="before">
|
<xpath expr="//field[@name='user_id']" position="before">
|
||||||
@@ -258,6 +259,18 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="product_template_search_view_manual_quotation" model="ir.ui.view">
|
||||||
|
<field name="name">product.template.search</field>
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//filter[@name='consumable']" position="after">
|
||||||
|
<separator/>
|
||||||
|
<filter string="人工编程" name="manual_quotation" domain="[('manual_quotation', '=', True)]"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<!-- 工单的操作按钮只让制造用户可见 -->
|
<!-- 工单的操作按钮只让制造用户可见 -->
|
||||||
<record id="sf_mrp_production_workorder_tree_editable_view" model="ir.ui.view">
|
<record id="sf_mrp_production_workorder_tree_editable_view" model="ir.ui.view">
|
||||||
<field name="name">sf.mrp.production.workorder.tree.editable</field>
|
<field name="name">sf.mrp.production.workorder.tree.editable</field>
|
||||||
|
|||||||
@@ -914,7 +914,7 @@
|
|||||||
<field name="pad_freight_id" string="目标货位"
|
<field name="pad_freight_id" string="目标货位"
|
||||||
options="{'no_create': True,'no_create_edit':True}"
|
options="{'no_create': True,'no_create_edit':True}"
|
||||||
attrs="{'invisible': [('dismantle_cause', 'not in', ['更换为其他刀具'])], 'readonly': [('state', '=', '已拆解')],
|
attrs="{'invisible': [('dismantle_cause', 'not in', ['更换为其他刀具'])], 'readonly': [('state', '=', '已拆解')],
|
||||||
'required': [('pad_freight_id', '!=', False), ('dismantle_cause', 'in', ['更换为其他刀具'])]}"/>
|
'required': [('pad_product_id', '!=', False), ('dismantle_cause', 'in', ['更换为其他刀具'])]}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -838,7 +838,7 @@ class Sf_stock_move_line(models.Model):
|
|||||||
if obj:
|
if obj:
|
||||||
obj.product_id = record.product_id.id
|
obj.product_id = record.product_id.id
|
||||||
# obj.location_status = '占用'
|
# obj.location_status = '占用'
|
||||||
obj.product_num += record.reserved_uom_qty
|
obj.product_num += record.qty_done
|
||||||
|
|
||||||
@api.onchange('destination_location_id')
|
@api.onchange('destination_location_id')
|
||||||
def _check_destination_location_id(self):
|
def _check_destination_location_id(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user