Odoo Help

Welcome!

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.

1

one2many tree view create, delete based on condition openerp/odoo

By
El hadji Dem
on 3/4/15, 4:00 PM 1,051 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.

 

 

 

 

0
El hadji Dem
On 3/5/15, 10:35 AM

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

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

2 follower(s)

Stats

Asked: 3/4/15, 4:00 PM
Seen: 1051 times
Last updated: 3/27/15, 6:40 PM