Odoo Help


1 Answer
6/27/17, 9:24 AM

why 2 discounts , i think you can make 2 discounts using one, (just do the math , and make one global fixed discount amount ).

However , there's always a way to do this kind of stuff using code ,

first , you have to seperate the global discount and per line discount ,

make 2 sepearate selections fields foreach type of discounts ,

discount1 = fields.Selection(['globalFix','Global Fix'],['globalPourcentage','Global %'])

discount2 = fields.Selection(['perLineFix','per Line Fix'],['perLinePourcentage','per line %'])

then using the onchage method

def onchange_discount(self):

if self.discount1 == 'globalFix':

     your calculations ()

if self.discount2 == 'per line' :

your calculations ()

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.

Odoo Training Center

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

Test it now