Accept Merge Request #1800: (feature/库存优化 -> develop)
Merge Request: Merge branch 'feature/销售视图优化' into feature/库存优化 Created By: @禹翔辉 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @禹翔辉 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1800?initial=true
This commit is contained in:
@@ -1259,6 +1259,7 @@ class MrpProduction(models.Model):
|
|||||||
'target': 'new',
|
'target': 'new',
|
||||||
'context': {
|
'context': {
|
||||||
'default_production_id': self.id,
|
'default_production_id': self.id,
|
||||||
|
'default_is_clamping': True if self.workorder_ids.filtered(lambda wk: wk.routing_type == '装夹预调') else False,
|
||||||
'default_workorder_ids': workorder_ids.ids if workorder_ids.ids != [] else self.workorder_ids.ids,
|
'default_workorder_ids': workorder_ids.ids if workorder_ids.ids != [] else self.workorder_ids.ids,
|
||||||
'default_hidden_workorder_ids': ','.join(map(str, work_id_list)) if work_id_list != [] else '',
|
'default_hidden_workorder_ids': ','.join(map(str, work_id_list)) if work_id_list != [] else '',
|
||||||
'default_reprogramming_num': cloud_programming.get('reprogramming_num') if cloud_programming else '',
|
'default_reprogramming_num': cloud_programming.get('reprogramming_num') if cloud_programming else '',
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class ReworkWizard(models.TransientModel):
|
|||||||
is_reprogramming = fields.Boolean(string='申请重新编程', default=False)
|
is_reprogramming = fields.Boolean(string='申请重新编程', default=False)
|
||||||
is_reprogramming_readonly = fields.Boolean(string='申请重新编程(只读)', default=False)
|
is_reprogramming_readonly = fields.Boolean(string='申请重新编程(只读)', default=False)
|
||||||
is_clamp_measure = fields.Boolean(string='保留装夹测量数据', default=True)
|
is_clamp_measure = fields.Boolean(string='保留装夹测量数据', default=True)
|
||||||
|
is_clamping = fields.Boolean(string='制造订单是否存在装夹预调工单')
|
||||||
reprogramming_num = fields.Integer('重新编程次数', default=0)
|
reprogramming_num = fields.Integer('重新编程次数', default=0)
|
||||||
programming_state = fields.Selection(
|
programming_state = fields.Selection(
|
||||||
[('待编程', '待编程'), ('编程中', '编程中'), ('已编程', '已编程'), ('已编程未下发', '已编程未下发'),
|
[('待编程', '待编程'), ('编程中', '编程中'), ('已编程', '已编程'), ('已编程未下发', '已编程未下发'),
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<field name="routing_type" invisible="True"/>
|
<field name="routing_type" invisible="True"/>
|
||||||
<field name="processing_panel_id" invisible="1"/>
|
<field name="processing_panel_id" invisible="1"/>
|
||||||
<field name="hidden_workorder_ids" class="css_not_available_msg"/>
|
<field name="hidden_workorder_ids" class="css_not_available_msg"/>
|
||||||
|
<field name="is_clamping" invisible="1"/>
|
||||||
<group>
|
<group>
|
||||||
<field name="hidden_workorder_ids" invisible="1"/>
|
<field name="hidden_workorder_ids" invisible="1"/>
|
||||||
<field options="{'no_create': True,'no_open': True}" readonly="1" name="workorder_ids"
|
<field options="{'no_create': True,'no_open': True}" readonly="1" name="workorder_ids"
|
||||||
@@ -26,7 +27,7 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</group>
|
</group>
|
||||||
<div attrs='{"invisible": [("routing_type","=","装夹预调")]}'>
|
<div attrs='{"invisible": ["|", ("routing_type","=","装夹预调"), ("is_clamping", "=", False)]}'>
|
||||||
<span style='font-weight:bold;'>保留装夹测量数据
|
<span style='font-weight:bold;'>保留装夹测量数据
|
||||||
<field name="is_clamp_measure" force_save="1"/>
|
<field name="is_clamp_measure" force_save="1"/>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -228,6 +228,18 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_order_form_inherit_sale_stock_qty_sf" model="ir.ui.view">
|
||||||
|
<field name="name">sale.order.line.tree.sale.stock.qty.sf</field>
|
||||||
|
<field name="inherit_id" ref="sale_stock.view_order_form_inherit_sale_stock_qty"/>
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//page/field[@name='order_line']/form/group/group/div[@name='ordered_qty']/widget[@name='qty_at_date_widget']" position="replace">
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//page/field[@name='order_line']/tree/widget[@name='qty_at_date_widget']" position="replace">
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="view_quotation_with_onboarding_tree_inherit_sf" model="ir.ui.view">
|
<record id="view_quotation_with_onboarding_tree_inherit_sf" model="ir.ui.view">
|
||||||
<field name="name">sale.order.quotation.tree.inherit.sf</field>
|
<field name="name">sale.order.quotation.tree.inherit.sf</field>
|
||||||
<field name="model">sale.order</field>
|
<field name="model">sale.order</field>
|
||||||
|
|||||||
@@ -935,6 +935,17 @@ class SfStockPicking(models.Model):
|
|||||||
_inherit = 'stock.picking'
|
_inherit = 'stock.picking'
|
||||||
|
|
||||||
check_in = fields.Char(string='查询是否为入库单', compute='_check_is_in')
|
check_in = fields.Char(string='查询是否为入库单', compute='_check_is_in')
|
||||||
|
product_uom_qty_sp = fields.Float('需求数量', compute='_compute_product_uom_qty_sp', store=True)
|
||||||
|
|
||||||
|
@api.depends('move_ids_without_package', 'move_ids_without_package.product_uom_qty')
|
||||||
|
def _compute_product_uom_qty_sp(self):
|
||||||
|
for sp in self:
|
||||||
|
if sp.move_ids_without_package:
|
||||||
|
sp.product_uom_qty_sp = 0
|
||||||
|
for move_id in sp.move_ids_without_package:
|
||||||
|
sp.product_uom_qty_sp += move_id.product_uom_qty
|
||||||
|
else:
|
||||||
|
sp.product_uom_qty_sp = 0
|
||||||
|
|
||||||
def batch_stock_move(self):
|
def batch_stock_move(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -156,6 +156,9 @@
|
|||||||
<xpath expr="//header" position="inside">
|
<xpath expr="//header" position="inside">
|
||||||
<button name="batch_stock_move" type='object' string="批量调拨"/>
|
<button name="batch_stock_move" type='object' string="批量调拨"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='location_dest_id']" position="after">
|
||||||
|
<field name="product_uom_qty_sp"/>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user