Skip to content

Commit

Permalink
[FIX] website_quote: forbid to define a quote template on a sale order
Browse files Browse the repository at this point in the history
Defining a quote template may change the product list. The field template_id is now editable
only when the sale.order is in draft or sent state.
  • Loading branch information
sle-odoo committed Oct 6, 2014
1 parent 651d574 commit 1029dbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/website_quote/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def _get_total(self, cr, uid, ids, name, arg, context=None):

_columns = {
'access_token': fields.char('Security Token', required=True, copy=False),
'template_id': fields.many2one('sale.quote.template', 'Quote Template'),
'template_id': fields.many2one('sale.quote.template', 'Quote Template', readonly=True,
states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}),
'website_description': fields.html('Description'),
'options' : fields.one2many('sale.order.option', 'order_id', 'Optional Products Lines'),
'validity_date': fields.date('Expiry Date'),
Expand Down

0 comments on commit 1029dbc

Please sign in to comment.