Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化报废和返工
This commit is contained in:
@@ -67,9 +67,10 @@ class JdEclp(models.Model):
|
|||||||
"""
|
"""
|
||||||
判断是否为出库单
|
判断是否为出库单
|
||||||
"""
|
"""
|
||||||
if self.name:
|
for record in self:
|
||||||
is_check_out = self.name.split('/')
|
if record.name:
|
||||||
self.check_out = is_check_out[1]
|
is_check_out = record.name.split('/')
|
||||||
|
record.check_out = is_check_out[1]
|
||||||
|
|
||||||
@api.depends('carrier_tracking_ref')
|
@api.depends('carrier_tracking_ref')
|
||||||
def query_bill_pdf(self):
|
def query_bill_pdf(self):
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<field name='categ_id' class="custom_required" attrs="{'readonly': [('id', '!=', False)]}"/>
|
<field name='categ_id' class="custom_required" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name='is_bfm' invisible="1"/>
|
<field name='is_bfm' invisible="1"/>
|
||||||
<field name='categ_type' invisible="1"/>
|
<field name='categ_type' invisible="1"/>
|
||||||
|
<field name='part_number' attrs="{'invisible': [('categ_type', '!=', '成品')]}"/>
|
||||||
<field name='manual_quotation' attrs="{'invisible':[('upload_model_file', '=', [])]}"/>
|
<field name='manual_quotation' attrs="{'invisible':[('upload_model_file', '=', [])]}"/>
|
||||||
<field name="upload_model_file"
|
<field name="upload_model_file"
|
||||||
widget="many2many_binary"
|
widget="many2many_binary"
|
||||||
|
|||||||
@@ -530,6 +530,7 @@ class ResProductMo(models.Model):
|
|||||||
|
|
||||||
# bfm下单
|
# bfm下单
|
||||||
manual_quotation = fields.Boolean('人工编程', default=False, readonly=True)
|
manual_quotation = fields.Boolean('人工编程', default=False, readonly=True)
|
||||||
|
part_number = fields.Char(string='零件图号', readonly=True)
|
||||||
|
|
||||||
@api.constrains('tool_length')
|
@api.constrains('tool_length')
|
||||||
def _check_tool_length_size(self):
|
def _check_tool_length_size(self):
|
||||||
@@ -626,6 +627,7 @@ class ResProductMo(models.Model):
|
|||||||
'model_remark': item['remark'],
|
'model_remark': item['remark'],
|
||||||
'default_code': '%s-%s' % (order_number, i),
|
'default_code': '%s-%s' % (order_number, i),
|
||||||
'manual_quotation': item['manual_quotation'] or False,
|
'manual_quotation': item['manual_quotation'] or False,
|
||||||
|
'part_number': item['part_number'] or '',
|
||||||
'active': True,
|
'active': True,
|
||||||
}
|
}
|
||||||
copy_product_id.sudo().write(vals)
|
copy_product_id.sudo().write(vals)
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
<xpath expr="//field[@name='user_id']" position="after">
|
<xpath expr="//field[@name='user_id']" position="after">
|
||||||
<field name="production_line_id" readonly="1"/>
|
<field name="production_line_id" readonly="1"/>
|
||||||
<field name="production_line_state" readonly="1"/>
|
<field name="production_line_state" readonly="1"/>
|
||||||
<field name="part_number"/>
|
<field name="part_number" string="成品的零件图号"/>
|
||||||
<field name="part_drawing"/>
|
<field name="part_drawing"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//header//button[@name='action_cancel']" position="replace">
|
<xpath expr="//header//button[@name='action_cancel']" position="replace">
|
||||||
|
|||||||
@@ -578,7 +578,7 @@
|
|||||||
<label for="material_height" string="高"/>
|
<label for="material_height" string="高"/>
|
||||||
<field name="material_height" class="o_address_zip"/>
|
<field name="material_height" class="o_address_zip"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="part_number"/>
|
<field name="part_number" string="成品的零件图号"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -859,14 +859,36 @@ class SfStockPicking(models.Model):
|
|||||||
|
|
||||||
check_in = fields.Char(string='查询是否为入库单', compute='_check_is_in')
|
check_in = fields.Char(string='查询是否为入库单', compute='_check_is_in')
|
||||||
|
|
||||||
|
def batch_stock_move(self):
|
||||||
|
"""
|
||||||
|
批量调拨,非就绪状态的会被忽略,完成后有通知提示
|
||||||
|
"""
|
||||||
|
for record in self:
|
||||||
|
if record.state != 'assigned':
|
||||||
|
continue
|
||||||
|
record.action_set_quantities_to_reservation()
|
||||||
|
record.button_validate()
|
||||||
|
|
||||||
|
notification_message = '批量调拨完成!请注意,状态非就绪的单据会被忽略'
|
||||||
|
return {
|
||||||
|
'effect': {
|
||||||
|
'fadeout': 'fast',
|
||||||
|
'message': notification_message,
|
||||||
|
'img_url': '/web/image/%s/%s/image_1024' % (
|
||||||
|
self.create_uid._name, self.create_uid.id) if 0 else '/web/static/img/smile.svg',
|
||||||
|
'type': 'rainbow_man',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@api.depends('name')
|
@api.depends('name')
|
||||||
def _check_is_in(self):
|
def _check_is_in(self):
|
||||||
"""
|
"""
|
||||||
判断是否为出库单
|
判断是否为出库单
|
||||||
"""
|
"""
|
||||||
if self.name:
|
for record in self:
|
||||||
is_check_in = self.name.split('/')
|
if record.name:
|
||||||
self.check_in = is_check_in[1]
|
is_check_in = record.name.split('/')
|
||||||
|
record.check_in = is_check_in[1]
|
||||||
|
|
||||||
def button_validate(self):
|
def button_validate(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -149,6 +149,9 @@
|
|||||||
<button name="action_assign" type="object" string="检查可用量"
|
<button name="action_assign" type="object" string="检查可用量"
|
||||||
groups="sf_base.group_sf_stock_user"/>
|
groups="sf_base.group_sf_stock_user"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<xpath expr="//header" position="inside">
|
||||||
|
<button name="batch_stock_move" type='object' string="批量调拨"/>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user