销售订单行增加交期字段,销售订单列表默认值修改为供货方式待确认
This commit is contained in:
@@ -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