This question has been flagged
1 Reply
4459 Views

I want to allow a record in one2many tree view and allow to delete a record in one2many tree view based on its state.

For example: if state!='draft', disable the delete icon.

It is for account.invoice.line model.

I try to override the fields_view_get method, but It does not work.

I try to override the ir.rule, but the result is the same and the delete icon always displays.

 

 

 

 

Avatar
Discard
Author Best Answer

@Cyril Gaspard (GEM) : Thanks but It doesn't work: I get this error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

 

We cannot add states option for a field.

Avatar
Discard