Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Make order lines notes editable after sale order confirmation

on 3/15/13, 4:56 AM 1,936 views

I need to change the order line notes/comments even after the sale order is confirmed. I cannot figure out where is the read-only attribute controled by the view or sale_order_line module.


Andreas Brueckl

--Andreas Brueckl--
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 3/15/13, 2:24 PM

It is defined in file sale/sale.py:

'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)]}),

The whole sale.order.line is only writable if the order is in state draft. Here is one suggestion to get your intended functionality:

  1. Remove attributes readonly and states from order_line in sale/sale.py
  2. Add attribute attrs={'readonly': [(parent.state,'!=','draft')]} to all fields of the sale.order.line in view sale.order.form.

But I think its would be not a good practice coz there comes a corresponding entries in customer invoice and when when we change(Edit) S.O Lines then it will not reflect further in accounting, it will show only previous one ...

on 3/15/13, 2:30 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 3/15/13, 4:56 AM
Seen: 1936 times
Last updated: 3/16/15, 8:10 AM