Before this commit, when having a kanban within a dashboard and clicking on an action button,
the action was not triggered, instead, the board form view triggered 'save' on the board model
leading to a server side traceback
After this commit, the action button triggers the demanded one and only this one.
OPW 805707
closes#22191closes#22371
- Create an invoice with an analytic account on a line
- Validate it
A read access error occurs.
The rule is too restrictive: reading should be allowed for users.
opw-805533
Before this rev., it crashed when the user used the quick create
to create several records (very quickly, or on a slow network),
e.g. on crm.lead (there must be a date field on the kanban record
to reproduce the crash).
The crash occurred when the 'read' RPCs for the created records
return misordered. For instance:
1) 'name_create' record 1 (called and returned)
2) call 'read' for record 1
3) 'name_create' record 2 (called and returned)
4) call 'read' for record 2
5) 'read' for record 2 returns
6) 'read' for record 1 returns
At step 5, the kanban column was updated with the new state, but
this state already contained record 1, which wasn't fetched yet.
This rev. ensures that the created records are added to the state
once they are fetched and ready to be displayed, not before.
Displaying the amount base for tax group with several lines in sale or invoice
report is too complex to manage. For example before the fix, using a group tax GT
with two excluded taxes(T1, T2) displayed the sum of the base of T1 and the sum of
the base of T2 which was completely wrong. But for a GT with an included tax affecting the amount
base T3 and an excluded tax T4, it 's not possible to display the common amount base for the tax group
because the base of T3 is not equal of the base of T4.
opw:804014
Introduce back part of `formatBinary` that was reverted with 7813a8e7.
When an image is unset, the value was `false` which would end up with a
bin_size of `NaN Bytes` which would end up displaying an error image
with source `data:image/png;base64,NaN Bytes`.
This commit get back a previous behavior so the bin_size when the
attachment does not exist is an empty string (so: '').
opw-805542
closes#22348
We added a constraint in [1] to improve the usability of introducing
tracked move lines in the system. However, this contraint proved to be
too costly (trigger multiple time during the validation process, never
called in batch as it is set on the model at the end of a o2m).
We replaces the constraint by checks on the validating process or by
(non-blocking) onchanges.
With these changes, validating the receipt of 3000 tracked move lines
goes from 17 minutes to around 4.
[1] 482407464a
opw-803887
Before this commit, users had only access to messages if they were
recipients. However, you can still be notified for messages your are not
a recipient; leaving you with notifications (needaction) on unreachable
message.
When creating a record with many default values, it could happen that
the number of ids returned by the default get (or onchange) exceeds the
limit for the form view.
For example, we can see the issue in the expenses list view. We can
increase the limit in the pager, to a value higher than 40. Then,
clicking on select all, then on 'Submit to manager' in the action menu
will result in a traceback.
The Submit to manager action will trigger a new action with a context key
'active_ids' with a large number of ids. After that, the web client
will execute the server actions, which will return a new action with a
context key 'default_expense_line_ids' with a bunch of ids. Then, it
will attempt to create a form view. This will call the
makeDefaultRecord method in the basic model. This method will generate
the commands for the one2many, for all ids, but will only load the 40
first sub records. After, it will attempt to apply the onchanges, with
some code that assumes that all operations of type 'ADD' correspond to a
local datapoint.
In this commit, we fix the code to properly work with operations of type
ADD with a res_id, but with no id. In that case, we simply generate a
command 'LINK_TO', since the value has not been changed.
opw 804370
This commit display only 'Invoicing' if cart have only service.
Set website_sale_order variable to get right context of order.
This commit closes 22259
In multi company, when a user 1 creates a purchase invoice I in company A.
The responsible of the invpoice I is user 1. But if the user 1 changes his company from
company A to company B. Then it raised an access error when a user 2 in company A
tries to duplicate the invoice I because the responsible is in an other company.
Now the responsible is not duplicated to avoid access error.
opw:805573
Others test classes extends the setup method, and break the
tests enviroment configuration. Extracting the global setup
in a common class is more modular and will make the enterprise
tests green again !
In python3 json.dumps acts differently:
- encoding parameter is not available
- output is unicode (in python 2 it was bytestring if only ascii or
unicode otherwise)
This commit adapt string types so getting hash for the certifications
works for python2 and python3 by having unicode up to the sha.
Since ensure_ascii is set on json.dumps, these things are not risky
since uncode and bytestring can be combined without encoding error.
opw-804561
closes#22301
/!\ Partial backport of https://github.com/odoo/odoo/commit/0a31cb9b4ae461119ecafdd05c5b979621ffb039
/!\ Should not be forward-ported
Before the websitepocalypse introduced in 11.0 (saas-17), when saving a
page in the editor, every `cleanForSave` method of snippet options were
called, even for snippet options which were not initialized (so if a
snippet was left unchanged before saving, the related `cleanForSave`
methods were called anyway). This behavior was bad code and did not make
much sense and was so removed with the websitepocalypse
(see https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8#diff-4c580abda3220e45c6b3f6bdcf77c733L415)
Unfortunatly, the behavior was necessary given the states of our snippet
options. Indeed, for the "latest posts" snippet, the `cleanForSave`
method removes the entire snippet content (as it is dynamically loaded).
The dynamic loading is performed by the snippet *animation*... and
removing the dynamic content should logically be done by the animation
too... which is the case. The problem is that animations are not stopped
before the editor is saved. This behavior was only implemented in
saas-11.1 (for future version 12.0) with commit https://github.com/odoo/odoo/commit/0a31cb9b4ae461119ecafdd05c5b979621ffb039
As a stable fix for 11.0, part of the mentioned commit is backported
here and some specific `cleanForSave` will be reviewed as animations if
necessary. Note: `cleanForSave` made useless by this commit are left
anyway as this is a stable fix.
See https://github.com/odoo/odoo/issues/22089
Corrected a code example that could lead to think that we can capture a non-integer amount of credits.
Added information concerning the commission that Odoo takes as a broker in IAP (25%).
Added information about the new functionality.
Issue: when the qWeb compress rendered HTML for a better Google PageSpeed
result, some text fields are missing spacebar between fa icons and text,
and between some fields.
When fetching x2manys in a x2many, the basic model did not properly sort
the internal data structure before fetching the data. This is usually
not an issue, except when we have an order which is different from the
order of the res_ids. In that case, it can cause crash in some
conditions, because the results from the fetchx2manybatched were applied
to the wrong datapoint.
To reproduce this issue, some specific conditions needs to be met. I
think that it is easier to refer to the test, instead of trying to
explain that.
In this commit, we properly sort the data at the correct place. Note
that this probably solves a bunch of other related issues, caused by the
fact that the internal structure was corrupted.
The function action_payslip_done has been overwritten in module hr_payroll_account.
Due to this overwrite, the function compute_sheet which creates the payslip lines
was called after the creation of the entries.
Then creating a refund payslip didn't create any entries.
opw:785033
A timeout of 300 seconds is not enough anymore to run all tests on some
runbots (e.g. runbot12) or Odoo.sh installations. The duration on these
servers is often slightly over 300, leading to a failing test.
This increase is logical since unit tests are added on a regular basis.
opw-805418
opw-804621
The "Mark all read" button either set all messages as read, or if a
domain is given, filter messages on it.
But this filtering is also dependent on not doing sudo so odd
notification to which we would somehow not have any access would never
disappear in the unread number.
Adding a sudo is risky, so this changeset just modify the test on domain
since in most instance the domain is just an empty list (so: []).
The added test before this change would fail at the last assert ("mark
all read should conclude all needactions even inacessible ones").
opw-805185
closes#22277
Cleaning dead code from these commits that have been reverted:
41fe7f9d1113d026b226b136b4477aaaf9f1f638#diff-54fd886cc58f994ad518ee72df4d3edeR50
2a5488619da22cfd901963dd141e722b195e82ab#diff-f96b339a9374f74489f1f98755e9787bL9253
41fe7f9d1113d026b226b136b4477aaaf9f1f638#diff-86d6d41b5bb7499bf055258d05549d59R3111
With these final changes, we hope to stop the many issues that have occured with
binary fields, from these commits:
255e8ca3d97813a8e71441fe7f9d112a5488619d
What remains is the format of binary fields in list views without widgets,
which shows the bin_size instead of the base64 string representation...
... Rest assured, the computation is in JS, so there are no 'bin_size'
shenaningans!
The google_drive module has not been converted to the new Odoo Javascript framework, and hence was not even started.
This commit corrects that.
The logic is essentially the same as in previous versions
The test implemented contains an inevitable hack that makes sure no other test is affected,
in particular by the new route that the module calls (and that any Sidebar will call)
OPW 801145
closes#21993
To send a sms, the number must be in international format. If phone_validation is installed and phone_international_format is set to no_prefix, the number is not in international format.
When calling the function report_action from write_company_and_print_report,
it failed because all the required data from the transient model "hr.holidays.summary.dept"
were lost.
opw:803051
In 9.0, an "Human Resources / Employee" see only hr.equipment for which
they are set as the "Employee".
But the code automatically subscribed the "Technician" because the field
name was named technically "user_id" which is automatically subscribed
by the system.
This led to a possible issue with read / unread message because of
feature that just happen by coincidence.
For 9.0 only (in 10.0 the field has been renamed technician_user_id and
access rules have been changed).
opw-805185
closes#22273
Before this rev., terms in the activity systray dropdown weren't
translated because the user_context (containing the user language)
wasn't passed.
Complete c591e4e6
opw-805431
On the payment confirmation page, when the payment is still pending.
Before this commit:
the user friendly message disappeared and a warning icon took its place
After this commit, the warning icon is prepended to the message.
OPW 787799
Since commit 55c0221e38 it is
not possible to unbuild what has not been build by ourself.
However we won't block the customer and let him unbuild everythings.