If we round the tax amount already added to the other line, the result may vary
depending on the order of the lines.
This is because round half even is used so the result may depend on the already
summed tax amounts.
Closes#14047
(grafted from e1e376f91bc1e111cdef39ddcbbfd92d201ea6c9)
--HG--
branch : 7.0
The rounding error must not be distributed between taxable lines having
different taxes otherwise the tax amount is not stable for the same base
amount.
Closes#13673
(grafted from 09294cc144f08088547eee0b5f47f36e5ad61926)
--HG--
branch : 7.0
The lines may or may not have a party depending on the account.
So the order key must avoid compare party instance with None value.
Closes#13268
(grafted from 97e730164485c038de7744ea0a3fb189fd7426fa)
--HG--
branch : 7.0
If the digits of the field is 0, than using '0.0' trigger the validation error
introduced by 2be02f249a1d.
Closes#13197
(grafted from 979cd092ea24f04328af5f4ff315c418e1c5b3e6)
--HG--
branch : 7.0
Some Function fields has the move as prefix which is removed when applied to
the move. But when setting default value for the line, the move prefix must
not be removed.
Closes#12967
(grafted from bce77308e529f2e96c46da2296546f047af48161)
--HG--
branch : 7.0
Replace the year of a date is not safe, it is better to use relativedelta.
Closes#13064
(grafted from 4b19fb0bc801a784139c0c6245d8649480e13280)
--HG--
branch : 7.0
When a new parent is added to a tree template like types, taxes or tax codes,
the corresponding record of the new template parent is not yet created.
So we need to use a default value for the parent and update again the tree
after creating the new records.
Closes#12755
(grafted from 561f9c7dbdc2a2c39c1fe5f6bf7274d01ee9ebd6)
--HG--
branch : 7.0
The fiscal years are created centered on the passed date such that if the
current day change during the execution, the fiscal year is still usable.
Also fiscal year can be created for a range of dates such that it is guarantee
that the dates are in the fiscal year.
And finally remove datetime and dateutil import when they are not used.
Closes#9977