When importing a module, if an error was raised
during the import, the traceback wasn't displayed
anywhere, making harder the debugging.
While it make sense to not display the entire traceback
to the user, in the web client, this is useful to
diplay the traceback in the logs, for debugging purposes.
opw-653882
The current code when applying negative operator on an expression used
recursion which in extreme case is not best friend with python.
e.g: on instance with a lot of wharehouse, some simple action could lead
to a domain with lot of elements which could easiliy go over the python
maximum recursion limit.
This commit fixes this by replacing recursion with iteration.
We have a stack of negation flags and loop on each token of the domain
as follow :
- when we iterate on a leaf, it consumes the top negation flag,
- after a '!' operator, the top token negation is inversed,
- after an '&' or '|' operator, the top negation flag is duplicated on
the top of the stack.
closes#9433
opw-653802
For these function fields, bypassing the ORM, using a SQL query,
improves the execution time by 100 for a set of 80 timesheets
in a database with
- 250K `hr.analytic.timesheet`
&
- 250K `hr.attendance`.
These function fields depends on a one2many field which use
the SQL view `hr_timesheet_sheet_sheet_day`.
When performing `sheet.period_ids`, two SQL requests are performed,
- the first just to know the ids in the sql view matching this sheet
- the second to read the fields `total_attendance` & `total_timesheet`
and the request is performed on the entire set of lines of this view
(~250K lines in the observed use case)
while, when replaced by this SQL request, only one request is performed,
on a restricted set of lines, speeding up significantly the computation
of these computed fields for smaller sets of sheets.
opw-653447
As everywhere else, dates & datetimes must be formatted according
to the format defined in the `res.lang` of the user, and within
the timezone of the user.
Before this revision, when adding a datetime field to a calendar view,
the raw value of the date was displayed, for instance:
`2015-01-01 10:00:00`
instead of
`01/01/2015 11:00:00`
for a user in English(US), in UTC +1.
fixes#5324
opw-653625
Closing a task associated to a sale order line requires
the write access to the according sale order line, that
a user who is only a Project > User does not have
by default.
Fixes#9286Closes#9352
When clicking on button "add_to_cart" for a product with several options,
the user must be redirected to the product page. In this way, the user can
choose the options, he wants to buy with the product before adding the product
in the cart.
opw:653356
Currently, the button "Send Email" next to the email address of an event
registration didn't work if a partner was not set.
This commit removes the button, thus removing the feature but partially
adds it back via the chatter suggested recipients in the same way it is
done for a lead.
It is still partially a feature regression since to work the viewing
user need more access rights (e.g read access right on res.partner)
than before.
closes#9486
opw-653127
If the invoicing policy of a PO is set to "Based on incoming shipments"
and the PO contains a product of type "service", it is never considered
as invoiced, and therefore reach the state "Done".
The reason is that no stock move is linked to this PO line, and
therefore it is never considered as invoiced since we check the invoice
state of the associated sotck moves.
This fix assumes that in this specific case, a PO line for a service is
always invoiced, since there is anyway no incoming shipment linked to
it.
opw-654317
This revision is related to a9d20d9fa0.
`dataset.cache` contains an item for each records, even
if the records hasn't been loaded in the cache. If a record
has not been loaded, only the record id is available, not
the other values. Thefore, this isn't possible to validate
the record values of records that have not been loaded
in the dataset cache.
opw-654013
When terms are translated in the website, their values are sent as HTML (with
text entities escaped). The function `xml_translate` is used to sanitize those
values, and sometimes crashes because of non-closed entities like `<br>`. Fix
it by using an HTML parser as a fallback.
This is a partial revert of 6c8e53a087.
Warning messages are automatically displayed if a module takes more than 1000ms to load, but this delay is a bit short if you make multiple rpc calls (sorry for all the dead kittens)
Variable 'event' is magically defined on some browsers like chrome, but not on
firefox. Anyway, those preventDefault() were useless as they are performed
beforehand.
This filter filters requests for this year. However allocation requests do not
have date_from and date_to. For requests not having those dates the filter
takes requests whose type (holiday_status_id) is active. This was the old
Year filter, that is applied only to allocation requests now. Leave request
are still based on date_from and date_to.
Revision 1e90257e58 removed hierarchy in
hr.employee.category model. Indeed they are used and displayed like tags
and not like hierarchical categories anymore.
However the allocation by tag was still using the childof operator
to go through hierarchy. No need to do that anymore.
Product grid layout is made with a table with colspans and rowspans
alongside fixed height cells (according to rowspan values). The fixed
height for cells was required because of chrome, which cannot have
fixed height rows to work properly. However, for some reasons, fixed
height cells combined with rowspan does not work everytime on firefox.
Solution is to combine the right solution (fixed height row and let the
cells compute their height according to rowspan values) and the fixed
height cell hack for the system to work on chrome.
This commit also corrects changes made in some previous commits in
website_sale.css without going through the .sass file.
It was bound to happen: some functionnality need to be triggered depending on the current edition of Odoo. To do this, we add a property 'version' on the global odoo object.
This change is mirrored on the enterprise repo.
The call to _compute_price is wrongly done, and therefore the parameters
of the method do not correspond. This leads to a valuation_price_unit
which is incorrect.
opw-653694