Odoo Help

2

0
1 Answer
2
Avatar

Pawan Kumar Sharma India

--Pawan Kumar Sharma--
SunArc Technologies
8918
| 6 4 7
Gangashahar(Bikaner), India
--Pawan Kumar Sharma--


Pawan Kumar Sharma India
10/25/17, 7:44 AM

Problem Solved.

I added constrain, that return a warning;

from openerp.exceptions import ValidationError

    @api.constrains('wizard')  # wizard is the one2many field
    def _check_grade_choisi(self):
        for record in self:
            l = []
            if not any([s.check_box for s in record.wizard]) : #Here i check if all checkbox field is False
                raise ValidationError("Your warning")

Ask a Question
Keep Informed
1 follower(s)
About This Community

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

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now