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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
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:
- Remove attributes
readonly
andstates
fromorder_line
insale/sale.py
- Add attribute
attrs={'readonly': [(parent.state,'!=','draft')]}
to all fields of thesale.order.line
in viewsale.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 ...
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
How to add a sequence a field?
Resolvido
|
|
2
dez. 24
|
21272 | |
|
0
set. 24
|
1097 | ||
|
3
ago. 24
|
2226 | ||
|
0
fev. 24
|
1522 | ||
|
0
fev. 24
|
1106 |