opw-1921686
The failed mail notification group all the records of the same
model that failed to send an email.
Before this commit, the failed mail notification displayed as
title the name of the last record that failed to send an email.
Now, the notification displays as title the model name.
closesodoo/odoo#30134
This commit adds a test to test the scenario fixed in the parent commit.
Creating a new test module is necessary as the bug is only revealed when the
current module is different than the model._original_module (cf c9837ac5dc)
Before that commit, was failing only the second search of
test_ir_model_data_inherits_depends.
Add other test to avoid regression of the bugs corrected at 574f4c3d and c9837acclosesodoo/odoo#30116
On a field created through a _inherits, the fields on the child model did not
benefit from the parent _modules information.
If two models are created in module base
class Partner(models.Model):
_name = 'res.partner'
class User(models.Model):
_inherits = {'res.partner': 'partner_id'}
partner_id = fields.Many2one('res.partner')
and a second module auth_signup adds a field on the parent model
class ResPartner(models.Model):
_inherit = 'res.partner'
signup_token = fields.Char()
Both res.users and res.partner should have an ir.model.data create
base_setup.field_res_partner__signup_token was correctly created but
base_setup.field_res_users__signup_token was not created
The reason is was, in the call to _reflect_model, since 574f4c3deb, the
creation of ir.model.data is based on the field._modules
However, the field res.partner.signup_token did not propagate its _modules value
to the related field res.users.signup_token
With this patch, both ir.model.data are created.
This allow a proper uninstallation of fields as well as translation.
opw-1916965
Before this commit, the price printed in the product label was the
list_price (catalog price) it didn't take into account the extra price
of the variants.
Now, the price printed is the lst_price (catalog value + extra).
closesodoo/odoo#30039
Task #1923443
Purpose
=======
When adding a like/dislike to a slide, the like/dislike counter was not properly updated.
partly closes#29901closesodoo/odoo#30027
Task #1923443
Purpose
=======
Probably due to the migration to bootstrap 4, the active tab panel in the 'slide_detail_view' was not displayed
on page loading (and only when switching back and forth in the tabs).
partly closes#29901
Make an expense report containing 2 expenses
one of them has tax exigible on payment
Validate the whole thing and make a payment
Before this commit, the journal entries were wrong
this was because:
- there were 2 move lines in the payable account
Each of them wanting to reconcile with the payment, and each of them trying
to create an cash basis entry
- the amounts were incorrect too, as the matched percentage was computed
on move lines that were not in a payable/receivable, but in taxes accounts
OPW 1912247
closesodoo/odoo#29878
PAYPAL
------
The paypal tests are not working working for two reasons:
- we check that there is no date in pending state on payment
transaction, but since the refactoring in this commit: https://github.com/odoo/odoo/commit/01216345e28374b554bfe95df82d607c591271cf
the date is always set before the validation of transaction.
- Since the changes on dates, the datetime field doesn't return a string
anymore and the comparison fails. So we convert the datetime to string
for the comparison.
BUCKAROO
--------
The buckaroo tests were not working for multiple reasons.
STRIPE
------
The payment stripe tests were not working because:
- The reference set in transactions were not the same as the ones givent
to the payment provider.
- we were checking for a script tag in form that has been removed in
commit https://github.com/odoo/odoo/commit/7c639be4aadce20bf6662ab347470fadf9afd99f
AUTHORIZE
---------
This test cannot be tested on runbot due to its server to server way of
working
closesodoo/odoo#30105
The field partner id is not a required field in payment transaction, and
we try to read its value in the dictionnary given to the create
function, so if a transaction is created without the partner_id, it will
raise a KeyError.
So to fix it, we only complete the pratner values on the payment
transaction if a partner_id is given.
opw-1922531
Before this commit, the product's description for customers was not translated in the
invoice.
Now, the product's description for customers is translated in the invoice.
closesodoo/odoo#30107
In the 'banner' snippet, there is a column using a white jumbotron
component. Those comes with a default background color so when using the
website builder to remove the white background, it did not go away;
it was replaced with the default background color (some gray).
This commit sets the default background color of jumbotron components to
'transparent'.
task-1889341
closesodoo/odoo#30099
utils.round_precision() is expecting a float as precision (0.01) whereas utils.round_decimals() is expecting the number of digits to consider after the coma (2).
The previous code was totally wrong in that regard, which led to reconciliation wrongly considered as total in foreign currency, as long as the amount_currency difference was lower than the currency precision digits.
closesodoo/odoo#30091
* website_theme_install
This commit will add MODULE_UNINSTALL_FLAG to the cleanup methods of themes and
modules.
This is necessary to also unlink inherited views of those we try to unlink.
Before this commit, an error would be raised when trying to delete a view that
still had other inherited views (either created manually by the user, or with
just bad luck in the order of which the views are deleted).
PR: #29753
If a module has a view that has been copied (copy on write, web editor,
customize show, manual copy, ...), currently the copied view will not be deleted
if the module of the original view is removed.
If the copy is not used anymore, it is not a problem (but still polluting the
database), but if the copy is still used (ex. it is an inherit of a view still
in use), then it will crash if that copy references other data (views, fields,
...) that were in the module that is now removed.
Eg.
The view `website_sale_comparison.product_add_to_compare` is inheriting
`website_sale.product` and calls `website_sale_comparison.add_to_compare`.
If the view `website_sale_comparison.product_add_to_compare` is copied (when
using the web editor on the product page -> copy on write is making a copy of
the `product` view and all its tree), then the product page on website will
crash when the module `website_sale_comparison` is removed because
`product_add_to_compare` will call the deleted view `add_to_compare`.
The solution is to also remove copied views when removing a module. Instead of
just using the xml id, we should look for the `key` starting with the module
name currently removed, because copied views don't have an external id.
task-1920005
PR: #29753
`ref` could raise even if raise_if_not_found was False on `viewref`, now we
prevent that, and rely only on the exception on `viewref`.
Also, when not set to raise, the method could return None instead of a recorset.
PR: #29753
In 12.0 commit f2302dfb2 the method openDmWindow was renamed
openDMChatWindowFromBlankThreadWindow but it called openDmWindow at one
location which caused click on user connection notification to cause an
error instead of opening a chat window.
opw-1910521
closes#30084
With 12.0's (#28297) empty translations were no longer added by default
with the idea that if needed the "Generate Missing Terms" wizard should
be used.
But that wizard itself used what was modified so also did not added
empty translation.
With this changeset, empty translations are added when using the
"Generate Missing Terms" wizard.
fixes#29184closes#30037
When using multi-company, the base currency of a product is the currency of the
main company, not a contextual company.
closes#29905closes#29946closes#30046
In commit f8dad1bb4b, we tried to fix the currency
conversion of products by always using the currency of the product as the base.
This is still correct.
However, the conversion method also needs to know the company (to find the
correct currency rate), and it was assumed the company was also always set on
the product. This is of course not correct when using multi-company.
In this commit we fix that issue by falling back if no company is set on the
product. The order of the fallback is: product website company, given website
company, given pricelist company, current user company.
closes#29905closes#29946closes#30046
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Wolfgang Taferner <wolfgang.taferner@wt-io-it.at>
Before this commit, when changing the website field in a record form view,
the is_published field would be force to false, ending unpublishing the record
if it was published.
That behavior was coming from the fact that is_published field is missing from
the form view. Thus, onchange on website is triggering a recompute server side
without is_published as the JS framework is not sending the field.
The ORM is then fallbacking on default Boolean value (False) for is_published
when sending back the onchange result.
This would only appear on object with 'website.published.multi.mixin' and with
website_id in the form view.
task-1919689
closesodoo/odoo#29707
The weight computation was not working anymore on packages that don't
have any quant, because they are fresh ones.
We fix this by setting back the behaviour with the picking id in
context and adapt the function to find the corresponding move lines.
closesodoo/odoo#30071
Fine-tuning of commit b48d2b6b5e.
The call to unlink inside the unlink can recurse infinitely
in case there is a copy of a menu.
We replace that direct call by an accumulator so no recursion occurs.
opw 1922448closesodoo/odoo#30032
Create a paiement, post it, cancel it, set it to draft, post it again:
The move_name has been incremented instead of staying the same as before.
-opw: 1919241
Search bank account without partner to handle the case the res.partner.bank already exists but is set
on a different partner. Without this commit, the error 'An account with the same number already exists'
was raised.
Before this commit, website_id field would not be added in form view, making it
impossible to set a website on a delivery method and so impossible to restrict
a delivery method to a specific website.
Now, adding this field will be enough as we already search() on
website_published carrier and the delivery.carrier model has the
'website.published.multi.mixin' mixin that will filter accessible website when
searching on website_published field.
+ add missing groups on website_id field
+ remove useless website_published
opw-1918189
closesodoo/odoo#29749
Before this commit, if a user tries to group a kanban view by a date or
a datetime interval, then tries to drag and drop a record from one column to
another, then the web client crashes. This is actually an invalid
operation, and is supposed to be disallowed. There is already some code
that properly handle the situation. However, the field attribute was
not properly read in the case of fields of type date/datetime.
Related to Issue: #1911975
Co-authored-by: Mohammed Shekha <msh@openerp.com>
closesodoo/odoo#30029
rST is somewhat unforgiving when it comes to whitespace. The extra
indentation on list would generate (nested) blockquotes instead of
just paragraphs & list items, and the missing empty lines would make
rST parse the entire block as a single paragraph rather than a
paragraph followed by a list.
closesodoo/odoo#30058
The Pie Chart title is not translatable, since a string defined in a
`t-att-` cannot be translated.
We use the attribute `title` instead.
Tests are adapted in https://github.com/odoo/enterprise/pull/3379
opw-1908220
closesodoo/odoo#29991
When a percentage if formatted, the decimal separator used is always
`.`, while it should be the decimal separator of the language.
opw-1908220
closesodoo/odoo#30030
opw-1919744
Before this commit, the user in the leave_type had the choice between
three validations : 'hr', 'manager' and 'both'. The behaviour of the
application was exactly the same if 'hr' or 'manager' was chosen.
In this commit, a computed field was added only to hide this choice,
and restrict the user to choice between the 'double validation'
or the normal validation.
This commit must be reverted once the fonctional part is implemented.
closesodoo/odoo#29952
opw-1910505
Before this commit, the next button in the media dialog widget reloaded
the page and opened only the iframe of the widget.
Now, the button only update the media dialog widget.
closesodoo/odoo#29981
In case a record is no longer referenced in the updated module, its external id
is deleted.
If the linked record still exists, it is deleted as well.
This last clause was incorrect as the record may still be referenced in other
modules.
If a field is declared in module A
class FooA(models.Model):
_name = 'foo'
bar = fields.Char()
and overriden in module B
class FooB(models.Model:
_inherit = 'foo'
bar = fields.Char(translate=True)
In case the field is no longer inherited in module B (code change, moved to
another module,...), the ir.model.field record for bar was deleted.
Two external ids are linked to field bar:
A.field_foo__bar
B.field_foo__bar
The ir.model.field record should be dropped only if both ir.model.data entries
are no longer loaded.
Otherwise, only the ir.model.data entry should be deleted (i.e. B.field_foo__bar
in the above example).
Fixesodoo/odoo#29820closesodoo/odoo#30018