Compare commits
4 Commits
master_sf_
...
feature/页面
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
128bebf338 | ||
|
|
151bc5da4f | ||
|
|
66c745af3c | ||
|
|
9cfc8418ec |
@@ -19,7 +19,6 @@ from odoo.addons.sf_mrs_connect.models.ftp_operate import FtpController
|
||||
|
||||
class ResMrpWorkOrder(models.Model):
|
||||
_inherit = 'mrp.workorder'
|
||||
_order = 'sequence asc'
|
||||
_description = '工单'
|
||||
|
||||
product_tmpl_name = fields.Char('坯料产品名称', related='production_bom_id.bom_line_ids.product_id.name')
|
||||
@@ -1750,6 +1749,23 @@ class ResMrpWorkOrder(models.Model):
|
||||
self.check_ids.filtered(lambda ch: ch.is_inspect is True and ch.quality_state == 'waiting').write(
|
||||
{'quality_state': 'none'})
|
||||
|
||||
@api.model
|
||||
def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
|
||||
aggregate_field = 'create_date:max'
|
||||
if aggregate_field not in fields:
|
||||
fields.append(aggregate_field)
|
||||
orderby = "create_date desc"
|
||||
|
||||
return super(ResMrpWorkOrder, self).read_group(
|
||||
domain,
|
||||
fields,
|
||||
groupby,
|
||||
offset=offset,
|
||||
limit=limit,
|
||||
orderby=orderby,
|
||||
lazy=lazy
|
||||
)
|
||||
|
||||
|
||||
class CNCprocessing(models.Model):
|
||||
_name = 'sf.cnc.processing'
|
||||
|
||||
@@ -755,6 +755,24 @@ class StockPicking(models.Model):
|
||||
if move_id.product_id.tracking in ['serial', 'lot'] and not move_id.move_line_nosuggest_ids:
|
||||
move_id.action_show_details()
|
||||
|
||||
@api.model
|
||||
def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
|
||||
aggregate_field = 'create_date:max'
|
||||
if aggregate_field not in fields:
|
||||
fields.append(aggregate_field)
|
||||
|
||||
orderby = "create_date desc"
|
||||
|
||||
return super(StockPicking, self).read_group(
|
||||
domain,
|
||||
fields,
|
||||
groupby,
|
||||
offset=offset,
|
||||
limit=limit,
|
||||
orderby=orderby,
|
||||
lazy=lazy
|
||||
)
|
||||
|
||||
|
||||
class ReStockMove(models.Model):
|
||||
_inherit = 'stock.move'
|
||||
|
||||
@@ -455,7 +455,7 @@
|
||||
<field name="inherit_id" ref="mrp.mrp_production_workorder_tree_editable_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<attribute name="default_order">sequence</attribute>
|
||||
<attribute name="default_order">create_date desc</attribute>
|
||||
<attribute name="decoration-warning">delivery_warning == 'warning'</attribute>
|
||||
<attribute name="decoration-danger">delivery_warning == 'overdue'</attribute>
|
||||
</xpath>
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
action="action_quotations_supply_method"
|
||||
parent="sale.sale_order_menu"
|
||||
groups="sf_base.group_production_engineer"
|
||||
sequence="2"/>
|
||||
sequence="20"/>
|
||||
|
||||
<record id="sale.menu_sale_order" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(4, ref('sf_base.group_production_engineer'))]"/>
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
<xpath expr="//field[@name='origin']" position="after">
|
||||
<field name="retrospect_ref"/>
|
||||
</xpath>
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<attribute name="default_order">create_date desc</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ class RePurchaseOrder(models.Model):
|
||||
contract_summary = fields.Text(string='合同概况')
|
||||
|
||||
# 选择是否为紧急采购
|
||||
urgent_purchase = fields.Selection([('no', '否'), ('yes', '是')], string='紧急采购', default='no')
|
||||
urgent_purchase = fields.Selection([('no', '否'), ('yes', '是')], string='紧急采购', default='yes')
|
||||
|
||||
@api.depends('origin')
|
||||
def _compute_purchase_type(self):
|
||||
|
||||
@@ -298,6 +298,10 @@
|
||||
<xpath expr="//field[@name='name']" position="attributes">
|
||||
<attribute name="class">purchase_order_list_name</attribute>
|
||||
</xpath>
|
||||
<!-- 修改 tree 视图的排序规则 -->
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<attribute name="default_order">date_approve desc</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -14,16 +14,14 @@
|
||||
<!-- name="Orders"-->
|
||||
<!-- sequence="10">-->
|
||||
|
||||
<!-- <menuitem id="menu_sale_quotations"-->
|
||||
<!-- action="action_quotations_with_onboarding"-->
|
||||
<!-- groups="sales_team.group_sale_salesman"-->
|
||||
<!-- sequence="10"/>-->
|
||||
|
||||
<!-- <menuitem id="menu_sale_order"-->
|
||||
<!-- name="Orders"-->
|
||||
<!-- action="action_orders"-->
|
||||
<!-- groups="sales_team.group_sale_salesman"-->
|
||||
<!-- sequence="20"/>-->
|
||||
<menuitem id="sale.menu_sale_quotations"
|
||||
parent="sale.sale_order_menu"
|
||||
sequence="20"/>
|
||||
|
||||
<menuitem id="sale.menu_sale_order"
|
||||
parent="sale.sale_order_menu"
|
||||
sequence="10"/>
|
||||
|
||||
|
||||
<!-- <menuitem id="report_sales_team"-->
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
<field name="name">功能刀具组装</field>
|
||||
<field name="model">sf.functional.tool.assembly</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree create="0" delete="0">
|
||||
<tree create="0" delete="0" default_order="create_date desc">
|
||||
<field name="assembly_order_code"/>
|
||||
<field name="barcode_id" optional="hide"/>
|
||||
<field name="code" optional="hide"/>
|
||||
|
||||
Reference in New Issue
Block a user