销售订单行增加交期字段,销售订单列表默认值修改为供货方式待确认
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
|
||||
<record id="sale.action_quotations_with_onboarding" model="ir.actions.act_window">
|
||||
<field name="search_view_id" ref="jikimo_sale_order_view_search_inherit_quotation_supply_method"/>
|
||||
<field name="context">{'search_default_draft': 1}</field>
|
||||
<field name="context">{'search_default_supply_method': 1}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_quotations_supply_method" model="ir.actions.act_window">
|
||||
|
||||
@@ -150,6 +150,7 @@ class ReSaleOrder(models.Model):
|
||||
'is_incoming_material': True if item.get('embryo_redundancy_id') else False,
|
||||
'manual_quotation': item.get('manual_quotation'),
|
||||
'model_id': item['model_id'],
|
||||
'delivery_end_date': item['delivery_end_date'],
|
||||
}
|
||||
return self.env['sale.order.line'].with_context(skip_procurement=True).create(vals)
|
||||
|
||||
@@ -272,6 +273,8 @@ class ResaleOrderLine(models.Model):
|
||||
model_url = fields.Char('模型文件地址')
|
||||
model_id = fields.Char('模型id')
|
||||
|
||||
delivery_end_date = fields.Date('交货截止日期')
|
||||
|
||||
@api.depends('embryo_redundancy_id')
|
||||
def _compute_is_incoming_material(self):
|
||||
for line in self:
|
||||
|
||||
@@ -136,6 +136,10 @@
|
||||
<xpath expr="//field[@name='order_line']/tree/field[@name='product_uom']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='order_line']/tree/field[@name='remark']" position="before">
|
||||
<field name="delivery_end_date" optional="hide"/>
|
||||
</xpath>
|
||||
|
||||
<field name="user_id" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user