[FIX] sale: SO name
In v8, the field "Order Reference" was part of the "Import-Compatible Export" fields. This is not the case anymore in v9 since the field is always read-only. The fix uses the same logic than v8: dedine the field as non-readonly for state "Draft" in the model, but always set it to readonly in the view. opw-676095
This commit is contained in:
+1
-1
@@ -98,7 +98,7 @@ class SaleOrder(models.Model):
|
||||
for order in self:
|
||||
order.order_line._compute_tax_id()
|
||||
|
||||
name = fields.Char(string='Order Reference', required=True, copy=False, readonly=True, index=True, default=lambda self: _('New'))
|
||||
name = fields.Char(string='Order Reference', required=True, copy=False, readonly=True, states={'draft': [('readonly', False)]}, index=True, default=lambda self: _('New'))
|
||||
origin = fields.Char(string='Source Document', help="Reference of the document that generated this sales order request.")
|
||||
client_order_ref = fields.Char(string='Customer Reference', copy=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user