Task#1958723
This commit fixes the survey form to allow creating, testing and sharing
surveys that don't have sections as long as they don't use the "page_per_section"
layout.
closesodoo/odoo#32159
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- when answer is correct, then score should be +1.
Related to Issue: 1967506
closesodoo/odoo#32612
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.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
Before this commit, Odoo notifies the user of all the recurring past
events, existing before the installation of the module Calendar (old
events imported when synchronizing with Google, for instance). This
occurs only the first time a synchronization with Google is made. This
occurs because Odoo notify all the events that occurs since the last
time it notified, and the first time you install the module the date of
the last notification is empty.
Now, when the module Calendar is installed, the date of the last
notification is set by default to the current date (the date of the
installation of the module)
opw-1942443
closesodoo/odoo#32535
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
In the manifest must be auto_install instead of auto-install
complementary to commit f14092cclosesodoo/odoo#30980
Signed-off-by: Martin Trigaux (mat) <mat@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
Buttons "Send message / Log note / Activity" are on two lines instead of
one. In addition there is a 1px glitch on the attachment icon.
Also long attachment name on tiny screens (i.e. iPhone 5) breaks the
composer layout: horizontal scrollbar appears.
The two-line buttons effect is related to a change (fix) in Bootstrap
4.2 which removes the white-space: nowrap on .btn. It was originally
introduced in Odoo through https://github.com/odoo/odoo/pull/29949.
Reference: Original Bootstrap PR https://github.com/twbs/bootstrap/pull/27010
Task ID: 1946573
closesodoo/odoo#31939
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
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>
fine-tuning commit 1120bffb66
Before this commit, the search on message_has_error (used when clicking
on a failure notification) only display errors linked to message of the
current user. Also, the filter Has_error is true, in the messages view
in technical menu only display the message with errors of current user.
Now, the filter Has_error is true display the message with errors of all
users. The search on message_has_error behave as before.
opw-1958813
closesodoo/odoo#32462
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Before this commit, the code would try to loop over all possible combinations
following their sequences, until it found the requested one, which could be
extremely slow if there was a lot of combinations.
Now if the given combination is possible, we skip that useless looping and
yield it directly.
To reproduce this: create a product template with millions of possible
combinations (using dynamic attributes) and try to add to cart a combination
that would be found late in the looping. Before the commit, the request would
take too much time.
opw-1958623
closesodoo/odoo#32433
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
On a quotation template, the "Terms and conditions" (note) field may
override the company terms and conditions.
The company terms and conditions is translatable is translatable at
least since 2013 (a510050ba) but the quotation template terms and
conditions has never been translatable.
With this changeset the quotation template terms and conditions are
translatable (so when used on a partner in the lang of the partner for
the quotation).
opw-1960728
closes#32236
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
If an user unlinks an attachment,
it doesn't remove it as message_main_attachment_id.
opw 1950403
closesodoo/odoo#32347
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
When post_refresh is set to 'always', the displayed record is entirely reloaded
each time a message is posted in the chatter.
However no such thing exists for when attachments are uploaded.
This is of use e.g. when in the view there are fields that have attributes that
depend on computed fields, themselves dependent on the record's attachments.
One such case is the OCR.
opw 1950403
Commit a26496b6e7 registered an attachment added through the widget as record's
message_main_attachment.
This to make the OCR feature available for such attachments.
However we copy more closely the behaviour in message_post,
which only puts the attachment as main if there isn't already a main.
opw 1950403
Avoid overlap between address and title in case of a long address.
opw-1966325
closesodoo/odoo#32546
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Commit 9214d78152 is a bit old and made
huge white spaces between graphs
Commit 89931d1749 introduces
a dedicated svg container, on which we can set a fixed height
The 250 px comes from what is being done in the web_dashboard app
with commit odoo/enterprise@1638e5d481
OPW 1944857
closesodoo/odoo#32522
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>