Odoo Help

0

0
1 Answer
0
Avatar

Niyas Raphy

--Niyas Raphy--
15188
| 7 6 11
Calicut, الهند
--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‏/4‏/2019 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
15‏/4‏/2019 12:58 م

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

Sameer
16‏/4‏/2019 12:45 ص

It worked like a charm, Thanks bud!

Ask a Question
Writer
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