This commit make expense test depending on the
same common class as the other (in sale_expense).
Some data were badly defined (test data), using
field only existing when sale is installed. So move
this part in sale_expense.
Expense tests now check analytic entries when
sumbitting an expense.
This commits:
- extract default method from lambda of field
definition to avoid too long code line
- reorder method, according to guidelines
- rename method as guidelines says
- fix linting issues
This is the first step of a good code
cleaning of this module.
In 10.0 since 52f268d0 some parts such as the date/datetime widget are
adapted to the current locale and not just displayed in english.
But the dates in the slides module are always in english because they
don't wait for the locale to be loaded.
To wait for the locale, this commit add a wait for WebsiteRoot.instance
ensuring that locale and other WebsiteRoot widgets are ready.
This may have been preferred to create a dummy child widget to
WebsiteRoot, this way only WebsiteRoot would need to be ready and this
would have been more extensible but this is a bigger change.
note: this fix is for 11.0, for previous version the fix is ef8cd11a6b
opw-804555
closes#22241
In the activities, the name of the models were not translated
This is only the server side of the fix.
The context needs to be added in the JS call in another commit
opw-805431
In 10.0 since 52f268d0 some parts such as the date/datetime widget are
adapted to the current locale and not just displayed in english.
But the dates in the slides module are always in english because they
don't wait for the locale to be loaded.
To wait for the locale, this commit also adds a reference localeDef on
the website.website module.
note: this fix is only for [10.0,11.0[, another fix must be done in 11.0
opw-804555
closes#22241
When reinvoicing, an SO line should only be
incremented if the product policy is sales prices,
and in delivered qty. Otherwise, a new SO line is
created.
When validate and invoice with analytic account on
some invoice lines, analytic entries are created
with the account move creation, after that the move
is posted (still in the invoice validation) and the
analytic entries are regenerated (meaning deleted
and recreated).
As consequence, performance are bad, but also, since
in vendor bills flow, the creation of AAL can create
a new sale order line, we will get 2 SOL (one empty).
This commit avoid creating the first analytic entries
(the ones deleted on move posting) when validating
an invoice.
When we change the project of a task, we want the
related timesheets to be linked to the new project.
However, since a timesheet is an analytic line with
a project, a task with timesheet can not be without
project. In that case, an error is raise to prevent
this case.
opw-803811
Purpose
=======
Currently, when editing the number of holiday days, the field wage with holidays is computed.
The goal of this commit is to allow to edit the wage_with_holidays field and compute the wage amount instead.
Purpose
=======
Follow the coding guidelines (https://www.odoo.com/documentation/11.0/reference/guidelines.html)
Specification
=============
* each model has now its own .py file
* view files have better names
* reordered the methods for readability
* reimplemented email subtypes
Purpose
=======
Have a clear distinction between leave and allocation requests instead of
using the same model to mix 2 different concepts.
Splitting the model will allow different business code to be run on each
model as allocations and leaves are not exactly the same thing; this
will add some code but simplify future improvements
Specification
=============
1/ Completely separate the models
Model hr.holidays has been split into leave.request and
leave.allocation.
2/ Make reporting working again by using an SQL view aggregating data
from leaves and allocations
A new report has been added in order to aggregate
datas from both allocations and requests. The views have been modified
accordingly.
- Add missing tour stage in crm creating opportunity and minor fixes
- Label, Placeholder and Tip IMP
- Restrict Create new sales channel
- No Content Help Improvements
- Schedule Activity Button Layout Change
- Chatter Log IMP
The idea is that when we click on either the green, orange or red part
of the progressbar the count on it's right changes to whatever the value
of filtered records should be.
As discussed with fgi and apr mass archiving has been removed in kanban
it has been judged too dangerous for the new users that won't be abble
to easily revert the archived records
Revision on 41fe7f9d11
This commit intended to reduce the network load when reading records with
binary fields. This was made possible by enforcing the contextual key
`bin_size` to be set for records with binary fields.
However, it is causing some issues (see #22222, #22231) which are:
- write with bin_size:true generates a traceback
- read/search_read with bin_size:true breaks some images
on some views (e.g. base.view_partner_form)
Since the problems outweight the gain of these changes, we revert them.
- Create a PO, generate the vendor bill
- Change a price unit
- Change the invoice date
The price unit is reset to the PO value.
We only recompute it if the currency of the invoice is different from
the currency of the PO.
Fixes#22164
opw-804894
When computing the total_cost of a landed cost make sure to round the
individual costs of the valuation lines the same way as done by the
ORM (i.e. with the 'Product price' precision).
Otherwise the sum of the additional costs on the valuation lines will
not equal the price of the cost lines. This is wrong and leads to
errors during validation.
opw-804396
Field widgets now have a key 'context' that let them
extend the context of the dataPoint (e.g. list).
In particular, widgets on binary fields enforce the contextual
item {bin_size: True}, so that the server gives the size of the
binary field as its value, instead of its content.
This change on binary fields reduces network load when accessing
a view with binary fields.
Revert partially 255e8ca3d9
Removed widget 'download_link', as it was a sub-version of widget 'binary':
it did the exact same thing (representation of binary fields by means of a download link)
in a much better-looking way (download icon + filename as text of the download link,
instead of just a download link with text "Download").
Also, the values of binary fields might be already a human-readable binsize (e.g. 2.52 MBs),
instead of its plain textual string representation in base64:
The contextual parameter 'bin_size', when set to true, does not download the data of binary fields.
As a consequence, the server provides the sizes of the binary, instead of their value.
Order blogs by post_date
write_date is changed each time a new visitor reach the page (number of visit)
Fixes tw:legalsylvain/status/951559451399671808
Closes#22198
Log an info when a field is computed and stored, but not all its dependencies
are stored. Also allow to set explicitly `depends` on a field; this is useful
to restrict the dependencies of a related field.
Add decimal precision to quantitites in stock.production.lots.
Otherwise, if the UoM uses a DP larger than 2, inconsistencies may arise
since the field is automatically rounded to 2 decimals in the interface.
For example, if the DP of the UoM is 4:
- Set Qty Done to 1.234567
- Save => qty recorded in DB is 1.234567
- Edit, change nothing and save => qty recorded in DB is 1.23
This happens since the web client parses the value in the DOM and
detects a value change.
opw-788078
In other words, when a field F depends on a non-stored field G, it also depends
on G's dependencies. This guarantees that whenever a dependency of G is
modified, F will be invalidated and marked to recompute (if necessary).
The transitive closure of dependencies is not computed over stored fields.
Anyway stored fields already trigger the recomputation of their dependent
fields during their recomputation. The performance impact on the loading of a
registry is negligible (less than 1%), and the increase of recomputation
triggers is small (less than 10%).