2014-12-29 16:52 GMT+01:00 Cédric Krier <[email protected]>: > Hi, > > I'm trying to solve a problem for price with tax included. > Generally, when companies work this way they store the price with tax > included on the product for example (could be the list price field). > So the problem is how to make it works on the current sale design. > > Here is my idea, we could create a new module > sale_price_list_tax_included (name to be reworked) which will add a flag > on the price list to announce it will return a unit price that should be > considered as tax included. > On the sale, when such price list is used, we reverse compute the unit > price without tax using the tax on the line (for which the tax rule has > been applied).
I don't understand how/where to decide if price is include tax or not (flag). In trytond configuration file? I think this part not define in trytond configuration file because in some case you like to work price with tax include or not, for example, about type customer: * B2C -> tax included * B2B -> tax not included A global configuration will could define in new model: product.configuration; Do a method to retun if sale price will be calculate with tax or not included (it's possible third modules rewrite this method and do more conditions, for example configuration in shops) > Normally, if we have enough decimal on the unit price, it should always > be possible to find such unit price. The number of decimal needed will > depend on the rate of the taxes of course and the quantity sold. > So if we change tryton's module to use a configuration parameter for the > digits (instead of the hard coded 4), a good value could be defined for > each company according to their use case.
