Odoo Help

Welcome!

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

2

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

By
Remya
on 8/1/13, 8:59 AM 1,663 views

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

by
Remya
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.

Requirement:

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 ?

Xsias
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.

Remya
on 8/2/13, 6:56 AM

Did you get my question?

Remya
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 ?

Xsias
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

Remya
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.

Xsias
on 8/2/13, 8:22 AM

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

Remya
on 8/2/13, 8:32 AM

Custom fields are in Customer form.

Remya
on 8/2/13, 8:34 AM

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

Xsias
on 8/2/13, 9:45 AM
1
Xsias
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?

Remya
on 8/2/13, 2:08 AM

Have you ever created a custom module ?

Xsias
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?

Remya
on 8/2/13, 5:49 AM

I will update my question. Please check it.

Remya
on 8/2/13, 6:00 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 8/1/13, 8:59 AM
Seen: 1663 times
Last updated: 3/16/15, 8:10 AM