diff options
| author | Xavier BOL (xbo) <xbo@odoo.com> | 2020-12-02 17:12:08 +0100 |
|---|---|---|
| committer | Xavier BOL (xbo) <xbo@odoo.com> | 2020-12-21 15:17:08 +0100 |
| commit | 2b1eec5c86ed26a0fb9317d29c0c4eec6186cf6e (patch) | |
| tree | d671b84c97268235446655961ff777036e320341 /doc/reference/javascript_reference.rst | |
| parent | 68f72c6db5dbe10b7f1ee42dd149db2d9dd978fc (diff) | |
[FIX] sale_timesheet: changes the constrains + compute sol
Before this commit, the constrains checks all timesheets if the SOL
corresponds to an sol in task/project/map entry. The problem with this,
it is for the timesheets which have already been invoiced, we cannot
changes their sol.
The calculation to determine the correct sol to a timesheet not yet
invoiced is made in the preprocess and postprecess in create and write
method of timesheet. The first problem is the postprecess does not look if the
sol computed in preprocess is correct and erase to put the sol computed
in this method. The second one is when the user add a line in task or a
ticket, the sol is empty and not compute. The user needs to save to
trigger the create/write methods and see the sol given in the timesheets
created. In the idea, if the user changes the employee of a
timesheet, the sol is not directly computed to have the sol in map entry
of this new employee (if the pricing type of the project linked is
employee rate).
In this commit, we filter the timesheets in the constrains to have only
the timesheet which have not already been invoiced.
We also add a compute method in the so_line field of timesheet, this
compute method will replace the works of the preprocess and postprocess
explained above. With this compute, we can determine directly the
correct sol for the timesheet when a change is made by the user.
task-2409761
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions
