Odoo Help

0

0
1 Answer
0
Avatar

Niyas Raphy

--Niyas Raphy--
23423
| 7 7 11
Calicut, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123

Happy to help :)

Niyas Raphy
15-04-19 10:10

Hi,

For this what you can do is that, inherit the account.move and super the function of the POST) action_post) button and check whether the end user entered the journal items(line_ids), if lines_ids is not entered you can return a warning message.


def action_post(self):

    res = super(classname, self).action_post()

    if not self.line_ids:

        # return warning message

        raise ValidationError(_("No Journal Items"))

    return res


The code is just typed , not tested, so check and make necessary changes


Thanks

2 Comments
Sameer Ahmad
15-04-19 12:58

Thanks for the answer Raphy, I'll look into it and update the same.

Sameer Ahmad
16-04-19 00:45

It worked like a charm, Thanks bud!

Stel een vraag
Writer
Keep Informed
1 volger(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