Giter VIP home page Giter VIP logo

Comments (2)

theangryangel avatar theangryangel commented on August 19, 2024

You probably need to trigger the onchange specs.

Take a look at this section from the odoo development cookbook -

https://books.google.co.uk/books?id=Kv7fDAAAQBAJ&pg=PA141&lpg=PA141&dq=odoo+onchange+specs&source=bl&ots=jHXh3AmkuI&sig=ACfU3U2PFFuyrOd7_kxnut0tLavHSteL4g&hl=en&sa=X&ved=2ahUKEwiLkKr8qZzoAhXSYcAKHdoQCEoQ6AEwBXoECAQQAQ#v=onepage&q=odoo%20onchange%20specs&f=false

from odooly.

partoneoftwo avatar partoneoftwo commented on August 19, 2024

After way too many hours, I managed to get the functionality in Odoo to trigger; calculate taxes on created Expenses.

It does indeed calculate taxes now, so this is great!

This was achieved by running this command from Odooly:
env['hr.expense'].create({'product_id':39,'company_id':1,'employee_id':2,'name': "Zibby Tiny Lasagna",'unit_amount':'100','untaxed_amount':'100','quantity':'1','analytic_account_id':16,'company_currency_id':14,'account_id':'205','product_uom_id':1,'analytic_tag_ids':[('is_editable','0',[])],'tax_ids': [(6, 0, [5])]})

Remainder: The products are supposed to have a tax setting, but this is bruteforced by the tax_ids command above. So right now, Odoo doesn't follow which tax setting which was set in the product_id.

I found a clue, which got me closer to the solution here:
https://www.odoo.com/es_ES/forum/ayuda-1/question/solved-get-and-set-default-tax-by-python-command-line-82209

from odooly.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.