Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
7858 Представления

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.

Аватар
Отменить
Лучший ответ

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 ...

Related Posts Ответы Просмотры Активность
2
дек. 24
21259
0
сент. 24
1093
3
авг. 24
2212
0
февр. 24
1519
0
февр. 24
1102