Odoo Help

1

0
2 Answers
0
Avatar

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
22710
| 8 9 10
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 

LinkedIn

Blog

Stackoverflow

ERP Harbor Consulting Services

Skype:sudhir@erpharbor.com
Website: http://www.erpharbor.com
Sudhir Arya (ERP Harbor Consulting Services)
6/12/19, 3:11 AM

Inside the sum() function, you must have some type of iteration.

Try following code:

​self.total_isc = sum(line.price_subtotal * tax.amount / 100 for tax in line.invoice_line_tax_ids)


3 Comments
giancarlo
6/12/19, 3:25 AM

I do not see an error, but I do not consider this line.( if line_tax.tipo_afectacion_isc.code in ["01","02","03"]: )

for line in self.invoice_line_ids:

for line_tax in line.invoice_line_tax_ids:

if line_tax.tipo_afectacion_isc.code in ["01","02","03"]:

self.total_isc = sum(line.price_subtotal*line.invoice_line_tax_ids.amount/100) if len(line.invoice_line_tax_ids)>0 else False

Sudhir Arya (ERP Harbor Consulting Services)
6/12/19, 3:44 AM

Do you mean the execution is not going in the if condition? If yes, print the code.

print line_tax.tipo_afectacion_isc.code, line_tax.tipo_afectacion_isc.code in ["01","02","03"]

giancarlo
6/12/19, 3:53 AM

Thank you,

solved with the information you gave me.

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