Several cases:
- on a dashboard viewtype, put a group by on the chart
- on a list viewtype, apply a group by and an ordered by
In both cases the parameters were not taken into account when
rendering the view in the board app
ref: 40dd121938
This was because, when saving an action for the board app
we tried to fill the "action's context" with only the contexts of:
- the search query (where context is just one of attributes)
- the ownQueryParams of the controller
Doing that, some other vital attributes, like group_by and orderedBy
where forgotten in the process. "C'est ballot!".
Also, the "real context" of those attributes was saved
as a context within the context.
But (!), the action's context will behave as a "real context" when spawning
views and controllers down the line.
After this commit, we flatten as much as possible all those nested
contexts at the time of saving the view
OPW 1944857
Fine-tuning of 0a4e67c609.
Due to some confusion, has_group had been replaced by user_has_groups
on the corresponding PR.
However the latter is not a higher-level version of the former,
since it checks the groups on the self.env.user, not on self.
As a result, the filtering was completely False, since it checked that the env
user was in group_user which was always True.
closesodoo/odoo#32653
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
As authenticated user, join the website livechat. As a portal user,
start a livechat. Close it, it asks you to review the chat but all
messages are displayed in english.
opw-1958819
closesodoo/odoo#32629
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Usecase:
- Go on a BoM with a routing. Go on the first operation and set
the next operation(batch field) as 'Once a minimum number of products is
processed'.
- Set the batch size (minimum operation) to 0.
- Create a MO and plan it.
- The second work order has state 'pending' instead of 'ready'
It happens because the system automatically set the first wo as
'ready' and the following as 'pending' and don't check the batch
and batch_size.
closesodoo/odoo#32628
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The validation error introduced in 552da8dc can pop up in contexts where
it is not expected;
e.g. not in editing user rights but while upgrading a module.
Therefore we make it more explicit, giving the user a way to resolve the error.
closesodoo/odoo#32623
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
From an onchange, at this point, (4) doesn't mean "no change" it means
"reset to database values". Through the interplay of client and server
reverse-engineering one another at this point the client (is supposed
to) assume the o2m results are "complete" and a diff from the
current *in-database* values rather than the in-client (sent to the
server) ones.
So a (1) should completely replace all existing values, and a (4)
should just remove all of them (but keep the record linked).
closesodoo/odoo#32617
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Steps to reproduce the bug:
- Create a SO with no salesperson
- Add a SO line with 2 storable product
- Confirm the SO and deliver only one product
- Click on "No backorder"
Bug:
A error was raised because the function "_log_activity"(called by _log_less_quantities_than_expected) requires a responsible
Partial Backport: https://github.com/odoo/odoo/commit/e1f9499d2672fb0a346f8ac74552f038f5204a64
opw:1950968
closesodoo/odoo#32592
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Set a product P to average valuation, real time
- Create a PO for 1 unit @ 100, validate the picking
- Create a PO for 1 unit @ 0 (e.g. you receive a free product)
You cannot validate the picking because of the message 'The cost of P is
currently equal to 0...'
This error message is historical, to prevent users from an incorrect
configuration.
Since we still want to prevent misconfiguration, but support the
mentioned use case, we introduce an `ir._config_parameter` for people
who 'know what they are doing'.
opw-1962249
closesodoo/odoo#32550
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This reverts commit abc45b1
Since by default the ondelete attribute of a many2one is `set null`,
this was completely unnecessary to begin with.
Bug caused by this commit:
Unlink a record that has some attachments.
The unlink first removes the record, then its related attachments.
It calls remove_as_main_attachment, which reads the attachment res_model and
res_id. This triggers a check that the related record can be read.
However the related record has already been removed, an exception is raised.
It is thus impossible to unlink a record.
Closes#32563closesodoo/odoo#32572
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
In multicurrency
Do an invoice with cash basis lines in the foreign currency
Make a payment for almost all the invoice
"almost" refers to the point where virtually all taxes will be paid
i.e., paying 90 over 100, that contains a tax of 5%
The tax paid will be an amount almost equal (to a few cents) to the
total amount of the tax
It is not negligible, but if the currency rates are in the right configuration
(i.e. 0.005888)
Before this commit: the Cash Basis reconciliation will be considered as full and will trigger
the creation of the Exchange Diff Entry.
In turn, paying the rest of the invoice will pop up an error saying that some entries are already reconciled
(with the Exchange Diff entry)
It is not *that* that an exchange rate entry has been created the first time
after all, a percentage sufficiently close to 100 has been paid
But it blocks subsequent reconciliation, hence this fix
After this commit, if the cash basis entry doesn't match at least 100% of the paid move
then, we force to not check for full reconciliation
OPW 1953027
closes#31168closesodoo/odoo#32023
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, test reconciliation was inherited by
test reconciliation widget.
It made the actual test_xx functions of the former
being executed twice
After this commit, we create an intermediary test class for setUp and helpers
And the tests for each class execute only once
Before this commit, when reverting a move
that will be subjected to the creation of a cash basis move
the process failed saying that some entries were already reconciled
That was because the process tried to create the cash basis move during
the revert.
This is wrong, because no real cash is dealt with.
After this fix, the move lines of the original entry are reconciled
only with their revert counterpart
OPW 1938809
closes#30972
When an error occurred in the longpolling, we used to resend a new
request immediately. This resulted in thousands of request in a few
seconds when we lost connection to the box.
closesodoo/odoo#32544
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
The protocol is hardcoded to `http` in the url for the longpolling
request (/point_of_sale/get_serialized_order). It should match the
same protocol as the page was loaded in to avoid Mixed Content errors.
closesodoo/odoo#32528
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
The search on products is quite a slow sql query and it's run different times.
We avoid that repetition by storing it in a variable.
opw 1941352
closesodoo/odoo#32626
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Have a timesheet uom per Day
Have a language with a different number format than English
Click on grid cell to change its value
Before this commit, the value was stuck on the highest value in range
This was because the parsing of the value into float was not taking into account
the real format of the float
After this commit, it works in all languages
OPW 1964657
closesodoo/odoo#32581
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The user can delete teams created during the installation of the Sale
Team module, both CRM and Sale modify those teams but the way they
modify the teams doesn't take their deletion into account.
opw-1962297
closesodoo/odoo#32412
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce:
- 2 Companies Parent A, and Child B
- Create a Stockable Product FIFO/automated,
- In A leave cost as 0, in B give cost of 10
- Create an SO for product in company B
- Logged into Parent A, validate the picking for Child B
Behavior before the fix:
An error was raised saying: Error cost of 0 (but the SO had been created in B, so the price had to be 10.)
Behavior after the fix:
Now the cost of the company B is taken.
closes#32329
opw:1966322
closesodoo/odoo#32615
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The method /web/binary/upload_attachment may be used (eg. it is the case
in enterprise documents module) without res_model (eg. if folder_id is
specified).
Thus we should make it work (that was not possible since a26496b6e).
opw-1964091
opw-1965832
opw-1967181
opw-1968063
closes#32692
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
If we use a group by on the account dashboard, the kanban tiles have the
size of a normal kanban card so all graphs and so on are overlapping
which is a little ugly.
With this changeset, we have the same base width as in the non-grouped
view (which in the non grouped view may change with flex).
On {0,MD} screen size, we get in one column full width and ignore this.
opw-1964331
closes#32659
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Commit 1be873d4 removed the modification of the reference field
from the _onchange_origin.
The reasoning was that since this is an onchange on invoice_line_ids, it was
applied too often, which annoyed users in the case they overwrote that field.
However when using the "Autocomplete" field (vendor_bill_purchase_id),
then the user expects values to by modified.
Before, it worked by setting the origin field, which trickled down
to the reference.
Since that commit removed this, we re-add it explicitly in that case.
opw 1962364
closesodoo/odoo#32500
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
In mass mailing access to partners when performing a mass mailing has been
done in batch to speedup computation [1]. Emails are put into a dictionary
allowing to find back the email based on partner_id.
However the matching between the partner and its emails is done using a
shortcut using the current document ID as partner ID. It works when performing
a mass mailing on partners but fails when performing a mass mailing on models
having message_get_default_recipients not returning only emails. Currently
in saas-14 main models return only emails (crm, event, mailing contacts) but
other models may encounter issues (applicants, tickets).
This commit fixes it by correctly matching partner id and its found email.
[1] See 65ed4553a5
m2m ORM operation (4, id, _) was not correctly used, resulting in an
unexpected behavior. Instead of adding the record, it would add the record and
also the res.user(4,).
As that used is generally the public user, without an email address, that bug
would not be that critical but if that res.user(4,) does not exist (eg deleted),
then the code simply crash as it tries to read user 4 from db.
closesodoo/odoo#32425
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Replied / Bounced / Opened states should be computed prior to Sent state.
Indeed Sent is the default state once the email is sent. Then replied,
bounced and opened are states that happen after sending the email. It
is therefore necessary to re-order the state computation to correctly compute
the statistic state.
Related to task ID 1924711
Linked to PR #32496
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In mass mailing access to partners when performing a mass mailing has been
done in batch to speedup computation [1]. Emails are put into a dictionary
allowing to find back the email based on partner_id.
However the matching between the partner and its emails is done using a
shortcut using the current document ID as partner ID. It works when performing
a mass mailing on partners but fails when performing a mass mailing on models
having message_get_default_recipients not returning only emails. Currently
in saas-14 main models return only emails (crm, event, mailing contacts) but
other models may encounter issues (applicants, tickets).
This commit fixes it by correctly matching partner id and its found email.
Related to task ID 1924711
Linked to PR #32496
[1] See 65ed4553a5
Correct the instructions needed to install a website theme
In 12.0 the steps have changed
closesodoo/odoo#31886
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
_compute_website_url can only be called on singletons
It should not be called with self but the record we are iterating on
closesodoo/odoo#32369
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
One module with 2 chart of accounts:
- psbo (local)
- ias (ifrs rules)
We added the VAT taxes with tax groups.
Tags are already added for if we want to add
the VAT report later.
Closes#21402closesodoo/odoo#32468
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Fixesodoo/odoo#27487
Noto Color Emoji produces an error on wkhtmltopdf, cf
wkhtmltopdf/wkhtmltopdf#4149
In the backend assets, the $font-family-sans-serif is changed in
web/static/src/scss/bootstrap_overridden.scss
In the reports assets, the $font-family-sans-serif was NOT changed in
web_editor/static/src/scss/bootstrap_overridden.scss
The default boostrap fonts were still used in reports, ignoring the changes made
for backend.
closesodoo/odoo#32312
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The basic font-family offered on Odoo do not support a large set of characters
and rely on the system fonts for non-latin languages
On a system without specific fonts installed, the characters were replaced by �
For Hebrew, the system sans-serif font (at least on Windows pc) was too small.
Rely on the unicode-range range CSS descriptor to load a font only for a
specific range of unicode code.
https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range
This way, the fonts are ignored for English text (and you don't have to load
the fonts of every possible language).
Add Noto fonts that covers many charsets.
There is an heavy version for many charset and lighter ones for Arabic and Hebrew
More ranges can be added later
Serve the fonts on our CDN to avoid shipping several MB of fonts for everyone
but lazyload it when needed.
Fixesodoo/odoo#32228Fixesodoo/odoo#21781
PR #30798 introduced thread, message, and attachments deletion on a
module uninstallation. When removing attachments it was also removing
files in the filestore even if those files were still in use by other
attachments.
opw-1968117
closesodoo/odoo#32682
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Example where the issue occurs:
- Publish an event
- Go to the website, register for that event
- At confirmation, when the email address is requested, click quickly
several times on the 'Continue' button
Several registrations are created since nothing prevents multi-clicks.
The stateful button feature of the `button.js` jQuery plugin has been
dropped in Bootstrap 4 (see [1]).
[1] https://getbootstrap.com/docs/4.1/migration/#buttons
opw-1958580
closesodoo/odoo#32571
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Avoid the user to use batch payment with negative invoices (credit notes
or refund) and positive invoices (customer invoices and vendor bills).
This will create two different payment, one for the negative invoices
and one for the positive invoices, it will not partially reconcile them
before register the payment.
The normal behaviour is to add the negative invoice (outstanding debits
of the supplier or the customer credit notes) to the positive invoice
(vendor bill or the customer invoice), and after register the payment of
the balance.
opw-1959687
closesodoo/odoo#32250
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>