1、优化销售订单列表页、详情页字段显示;2、优化新增采购订单列表页、详情页字段显示;

This commit is contained in:
yuxianghui
2024-12-18 16:39:54 +08:00
parent 202fafac84
commit 15eb36a5bc
3 changed files with 24 additions and 1 deletions

View File

@@ -263,6 +263,7 @@ class ProductTemplate(models.Model):
_inherit = 'product.template'
manual_quotation = fields.Boolean('人工编程', default=False)
part_name = fields.Char(string='零件名称', readonly=True)
class RePurchaseOrder(models.Model):
@@ -378,6 +379,12 @@ class RePurchaseOrder(models.Model):
return result
class PurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line'
part_name = fields.Char('零件名称', related='product_id.part_name', readonly=True)
class ResPartnerToSale(models.Model):
_inherit = 'res.partner'

View File

@@ -130,6 +130,12 @@
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="options">{'no_create': True}</attribute>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="after">
<field name="part_name" string="零件名称" optional="show"/>
</xpath>
<xpath expr="//field[@name='date_order']" position="attributes">
<attribute name="string">报价截止日期</attribute>
</xpath>
@@ -191,9 +197,15 @@
<attribute name="string">报价截止日期</attribute>
<attribute name="widget">''</attribute>
</xpath>
<xpath expr="//field[@name='date_order']" position="after">
<field name="date_planned"/>
</xpath>
<xpath expr="//field[@name='name']" position="after">
<field name="purchase_type"/>
</xpath>
<xpath expr="//field[@name='name']" position="attributes">
<attribute name="class">purchase_order_list_name</attribute>
</xpath>
</field>
</record>

View File

@@ -169,9 +169,10 @@
<field name="manual_quotation" />
<field name="is_incoming_material"/>
</xpath>
<xpath expr="//field[@name='date_order']" position="attributes">
<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>
</field>
</record>
@@ -287,6 +288,9 @@
<field name="amount_total" position="after">
<field name="delivery_warning" invisible="1"/>
</field>
<field name="date_order" position="attributes">
<attribute name="string">下单日期</attribute>
</field>
<xpath expr="//field[@name='date_order']" position="after">
<field name="order_code"/>
<field name="deadline_of_delivery"/>