Odoo Help


How to set tax and discount for a customer? [Closed]

on 8/1/13, 8:59 AM 2,561 views

The Question has been closed for reason: off-topic or not relevant

on 08/03/2013 03:02:56

I want to add tax & discount in res,partner.Below is the screenshot. Then add code in sale.py in the function _amount_all. in sale.py the amount calculates correct.

image description

Also updated code in account_invoice.py .when i create invoice total(71.25) & balance value(75) shows different. I tried to edit resudial function. But the value not changes.Below is the screenshot.

image description

Then i register payment. It shows the balance value(75),not original total amount(71.25).Below is the screenshot.

image description.


I have a product(price=1000/ any,now let it be 1000) with tax%=5. Then value is 1050. I created a customer with tax 5% & discount 30% . Then after creating a sale order the total amount is 787.50.

I tried to implement it through fiscal position & price list(here it shows wrong tax value). Both the options doesnt give any output.

How can i implement this?Any one can help me.

This is a case study or you have already implemented this ?

on 8/2/13, 6:22 AM

I implement it in core sale.py. I got the answer. But when create invoice & payment register this value is not getting there. please refer "How can we set tax % to a partner? " the screen shot.

on 8/2/13, 6:56 AM

Did you get my question?

on 8/2/13, 7:19 AM

I'm sorry, but i don't understand everything. You have already developed the functionality and you want externalize your code in a custom module ?

on 8/2/13, 7:28 AM

I added tax & discount field in res.partner model. Then wrote the code in my core sale.py. It shows correctly. Next when i created invoice and validate it shows like in the first screenshot. When i clicked on register payment button, it shows second screen shot. I dont know how to update the code in base module. So decided to create a custom module for my requirement. But i'm stuck

on 8/2/13, 7:35 AM

I don't see yours custom fields on the screenshots. Anyway, if i've well understand, you create a module, put him in add-on and you need to inherit the base view and the base python code. That's the next step.

on 8/2/13, 8:22 AM

Did you see my custom field? Please help me to implement my requirement.

on 8/2/13, 8:32 AM

Custom fields are in Customer form.

on 8/2/13, 8:34 AM

I don't know too. I'm sorry.

on 8/2/13, 9:45 AM
On 8/1/13, 10:38 AM

You can already do that in the V7 in module accounting for taxes and in each line of a sale order for discount if you activate in the user profil the option : Discount on lines. Is that you want or i'm wrong ?

Thats also right, But i want to add tax & discount for our each customer. Your answer is for product tax& discount. Did you know to implement?

on 8/2/13, 2:08 AM

Have you ever created a custom module ?

on 8/2/13, 5:45 AM

Yes. But now i'm stuck about accounting section. If i want to create a custom for this purpose, will you help me to implement?

on 8/2/13, 5:49 AM

I will update my question. Please check it.

on 8/2/13, 6:00 AM

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

Question tools

0 follower(s)


Asked: 8/1/13, 8:59 AM
Seen: 2561 times
Last updated: 9/26/17, 12:16 AM