1、订单详情字段显示优化;2、采购单页面优化

This commit is contained in:
yuxianghui
2024-12-26 16:28:39 +08:00
parent b03eafcf94
commit 1b278a1432
3 changed files with 15 additions and 6 deletions

View File

@@ -324,7 +324,7 @@ class RePurchaseOrder(models.Model):
purchase.origin_sale_id = False
delivery_warning = fields.Selection([('normal', '正常'), ('warning', '预警'), ('overdue', '已逾期')],
string='交期状态',
string='交期状态', default='normal',
tracking=True)
@api.depends('partner_id')

View File

@@ -242,8 +242,10 @@
<attribute name="string">签约日期</attribute>
<attribute name="widget">''</attribute>
</xpath>
<xpath expr="//field[@name='date_planned']" position="replace">
</xpath>
<xpath expr="//field[@name='date_order']" position="after">
<field name="date_planned"/>
<field name="date_planned" string="最近交货日期"/>
</xpath>
<xpath expr="//field[@name='name']" position="after">
<field name="purchase_type"/>
@@ -291,7 +293,8 @@
<attribute name="string">采购员</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="after">
<field name="date_planned" string="预计到货日期" optional="show"/>
<field name="delivery_warning" optional="show"/>
<field name="date_planned" string="最近交货日期" optional="show" widget="date"/>
</xpath>
<xpath expr="//field[@name='name']" position="after">
<field name="purchase_type"/>
@@ -343,7 +346,7 @@
<xpath expr="//search" position="inside">
<searchpanel>
<field name="purchase_type" icon="fa-filter" enable_counters="1"/>
<field name="state" icon="fa-filter" enable_counters="1"/>
<field name="delivery_warning" icon="fa-filter" enable_counters="1"/>
</searchpanel>
</xpath>
</field>

View File

@@ -170,8 +170,14 @@
<field name="manual_quotation" />
<field name="is_incoming_material"/>
</xpath>
<xpath expr="//sheet//group//group[@name='order_details']//div[@class='o_td_label'][2]//label[@for='date_order']" position="attributes">
<attribute name="string">下单日期</attribute>
<xpath expr="//div[@class='o_td_label'][2]" position="replace"></xpath>
<xpath expr="//field[@name='date_order'][1]" position="replace"></xpath>
<xpath expr="//field[@name='date_order']" position="replace"></xpath>
<xpath expr="//div[@class='o_td_label'][1]" position="replace">
<div class="o_td_label" attrs="{'invisible': [('state', 'in', ['done', 'cancel'])]}">
<label for="date_order" string="下单日期"/>
</div>
<field name="date_order" attrs="{'invisible': [('state', 'in', ['done', 'cancel'])], 'required': True}" nolabel="1"/>
</xpath>
</field>