Merge branch 'feature/客供料入库单优化_1' into feature/sf视图展示界面优化
This commit is contained in:
@@ -203,7 +203,7 @@
|
||||
<record id="quality_alert_action_check" model="ir.actions.act_window">
|
||||
<field name="name">Quality Alerts</field>
|
||||
<field name="res_model">quality.alert</field>
|
||||
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
|
||||
<field name="view_mode">tree,kanban,form,pivot,graph,calendar</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new quality alert
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
.img-fluid {
|
||||
max-width: unset !important;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.o_inner_group .img-fluid {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="mrp.product_template_action" model="ir.actions.act_window">
|
||||
<field name="view_mode">tree,kanban,form,activity</field>
|
||||
<field name="context">
|
||||
{"search_default_categ_id":1,"search_default_consumable": 1, 'default_detailed_type': 'product'}
|
||||
</field>
|
||||
|
||||
@@ -689,6 +689,8 @@ class SfMaintenanceEquipment(models.Model):
|
||||
if next_date < date_now:
|
||||
next_date = date_now
|
||||
else:
|
||||
if not equipment.initial_action_date:
|
||||
raise ValidationError('重置保养日期不能为空!!!')
|
||||
next_date = equipment.initial_action_date + timedelta(days=equipment.period)
|
||||
equipment.next_action_date = next_date
|
||||
else:
|
||||
@@ -735,6 +737,8 @@ class SfMaintenanceEquipment(models.Model):
|
||||
if next_date < date_now:
|
||||
next_date = date_now
|
||||
else:
|
||||
if not equipment.initial_overhaul_date:
|
||||
raise ValidationError('重置维修日期不能为空')
|
||||
next_date = equipment.initial_overhaul_date + timedelta(days=equipment.overhaul_period)
|
||||
equipment.overhaul_date = next_date
|
||||
else:
|
||||
|
||||
@@ -554,7 +554,9 @@ class StockPicking(models.Model):
|
||||
|
||||
retrospect_ref = fields.Char('追溯参考', compute='_compute_move_ids', store=True)
|
||||
|
||||
@api.depends('move_ids')
|
||||
picking_type_sequence_code = fields.Char(related='picking_type_id.sequence_code')
|
||||
|
||||
@api.depends('move_ids', 'move_ids.product_id')
|
||||
def _compute_move_ids(self):
|
||||
for item in self:
|
||||
if item.move_ids:
|
||||
@@ -574,6 +576,7 @@ class StockPicking(models.Model):
|
||||
default_codes = ''
|
||||
if boms:
|
||||
for bom in boms:
|
||||
if bom.product_tmpl_id.default_code:
|
||||
code = bom.product_tmpl_id.default_code.split('-')[-1]
|
||||
default_code = bom.product_tmpl_id.default_code.split(f'-{code}')[0]
|
||||
if default_code not in default_codes:
|
||||
|
||||
@@ -18,10 +18,13 @@
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='user_id']" position="after">
|
||||
<field name="retrospect_ref"/>
|
||||
<field name="person_of_delivery"/>
|
||||
<field name="telephone_of_delivery"/>
|
||||
<field name="address_of_delivery"/>
|
||||
<field name="picking_type_sequence_code" invisible="1"/>
|
||||
<field name="retrospect_ref"
|
||||
attrs="{'invisible':[('picking_type_sequence_code','not in',['DL', 'INT', 'PC'])]}"/>
|
||||
<field name="person_of_delivery" attrs="{'invisible':[('picking_type_sequence_code','!=','DL')]}"/>
|
||||
<field name="telephone_of_delivery"
|
||||
attrs="{'invisible':[('picking_type_sequence_code','!=','DL')]}"/>
|
||||
<field name="address_of_delivery" attrs="{'invisible':[('picking_type_sequence_code','!=','DL')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<group string="加工信息">
|
||||
|
||||
<field name="date_planned_start" placeholder="如果不选择计划开始时间,会取当前时间来做排程" required="1"/>
|
||||
<field name="date_planned_finished" required="1"/>
|
||||
<field name="date_planned_finished" required="0" invisible="1"/>
|
||||
<field name="actual_process_time"/>
|
||||
<field name="actual_start_time"/>
|
||||
<field name="actual_end_time"/>
|
||||
|
||||
@@ -175,8 +175,8 @@
|
||||
<field name="name">驾驶舱</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">quality.cnc.test</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_id" ref="quality_cnc_test_view_kanban"/>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="view_id" ref="quality_cnc_test_view_tree"/>
|
||||
<field name="search_view_id" ref="quality_cnc_test_search"/>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{ 'search_default_filter_waiting':1}</field>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<record id="quality_control.quality_alert_action_check" model="ir.actions.act_window">
|
||||
<field name="name">质量缺陷单</field>
|
||||
<field name="res_model">quality.alert</field>
|
||||
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
|
||||
<field name="view_mode">tree,kanban,form,pivot,graph,calendar</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new quality alert
|
||||
|
||||
@@ -218,6 +218,7 @@
|
||||
<field name="context">
|
||||
{"search_default_categ_id":1,"search_default_filter_to_purchase":1, "purchase_product_template": 1}
|
||||
</field>
|
||||
<field name="view_mode">tree,kanban,form,activity</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -165,9 +165,11 @@
|
||||
<attribute name="string">拒绝接单</attribute>
|
||||
</xpath>
|
||||
<!--新增带料字段-->
|
||||
<xpath expr="//field[@name='order_line']/form//group//group//field[@name='analytic_distribution']" position="after">
|
||||
<xpath expr="//field[@name='order_line']/form//group//group//field[@name='analytic_distribution']"
|
||||
position="after">
|
||||
<field name="is_incoming_material"/>
|
||||
<field name="incoming_size" attrs="{'invisible': [('is_incoming_material', '=', False)],'readonly':1}"/>
|
||||
<field name="incoming_size"
|
||||
attrs="{'invisible': [('is_incoming_material', '=', False)],'readonly':1}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -218,7 +220,7 @@
|
||||
<attribute name="string">下单时间</attribute>
|
||||
</field>
|
||||
<field name="state" position="after">
|
||||
<field name="check_status" widget="badge"
|
||||
<field name="check_status" widget="badge" invisible="1"
|
||||
decoration-success="check_status == 'approved'"
|
||||
decoration-warning="check_status == 'pending'"
|
||||
decoration-danger="check_status == 'fail'"/>
|
||||
@@ -283,6 +285,8 @@
|
||||
</field>
|
||||
</record>
|
||||
<record id="sale.product_template_action" model="ir.actions.act_window">
|
||||
<field name="view_mode">tree,kanban,form,activity</field>
|
||||
<field name="view_id" ref="product.product_template_tree_view"/>
|
||||
<field name="context">{"search_default_categ_id":1,
|
||||
"search_default_filter_to_sell":1,"sale_multi_pricelist_product_template": 1}
|
||||
</field>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="stock.product_template_action_product" model="ir.actions.act_window">
|
||||
<field name="view_mode">tree,kanban,form,activity</field>
|
||||
<field name="context">
|
||||
{"search_default_categ_id":1,"search_default_consumable": 1, 'default_detailed_type': 'product'}
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user