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>
Default time was set to default=fields.Datetime.now() instead of
default=lambda self: fields.Datetime.now(),
resulting in a discrepancy when printing the report.
opw 1917523
When creating a new line on a customer invoice, we could get the price
unit in the company currency instead of the invoice currency.
This is because the uom_id onchange would ignore currency when setting
the price.
Changing an invoice line's price unit on uom_id change was introduced
in february 2018 in saas-11.3 with 3a38080ff.
Change to how currency is applied when setting an invoice line's price
unit was introduced in june 2018 in 9.0 with 367fadc8.
So there was a missing part in saas-11.3 to adapt 367fadc8 for 3a38080ff
change that is added with this commit.
Without the fix, the added test failed with:
AssertionError: 10.0 != 20
opw-1920504
closes#29776
On installation demo data causes an error on 31 december since we test:
is 31 december at midnight < now() => so after midnight error.
Solve this by comparing today instead of datetime.
opw-29776
closes#29830
The code that is in charge to prevent deletion of required fields or
duplicate of model field was not working anymore since 11.0.
That code should still be refactored in master to be more robust.
opw-1919630
closesodoo/enterprise#3337
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
When creating a banner using the web editor, the targeted image
appears centered in the editor but is aligned on the left in the
email.
The issue also happened with other alignment (left in a centered
widget, right, ...) for example on outlook 2007 and should be solved
with this changeset.
note: 12.0 version of #29214
opw-1904827
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
closes#29954
Before this commit, BS4 color for active list-group-item (white) would always
be overriden by our portal custom css to the BS4 color for inactive one.
Part of #29884
Since 12.0, some modal footer button order were changed. The primary button
would not be the one in the modal footer corner.
This is against bootstrap but more annoyingly, users are intuitively clicking
on the secondary button, ending up closing the modal and losing form
information they entered.
This commit simply fix the regression from 12.0 as before 12.0 these buttons
were positionned correctly.
Note that a commit in master (saas-12.2) will fix all the other ones that were
wrongly positionned before 12.0.
Step to reproduce:
- Go to an event having the possibility to register.
- Click on 'Register Now', a modal is shown to write details (name, email..)
- You intuitively click on 'Cancel' as it is the bottom right button
|________________________________ CONFIRM _ CANCEL _|
- The modal is closed, if you try to open it again your infos are lost
Closes#29884
task-1922120
Layouts were not accepted by Pingen due to the fact that the class that we added to the recipient's address was not present in stable versions.
The format was therefore not adapted to Pingen.
We then remove this class to fix layouts in stable versions.
closesodoo/odoo#29976
In community, when entering the Manufacturing app, the first view is the
Manufacturing orders list view as it's not the case in enterpise, the
two steps are only necessary in enterprise.
Note: even if it fix the tour, the main bug could still be there.
closesodoo/odoo#30016
- When installing an accounting l10n module, the method `try_loading_for_current_company`
is called and could cause a deadlock.
The deadlock is caused by the fact that if the installation is started
via a web request the code tries to retrieve the current user's
company by doing `request.env.user.company_id`.
This causes issues since the installation code has its own postgresql
cursor while calling `request.env.user.company_id` will create its own
cursor.
So two cursors exists for the same Odoo worker.
The installation cursor asks for a lock on `res_users` while the
second cursor (the request one) will try to read on `res_users` and
wait the first lock to be dropped.
The lock is never dropped since the python code isn't running anymore
waiting for the `request.env.user.company_id` to be completed.
Causing the deadlock.
To fix the issue, we avoid the creation/usage of a cursor created by
`requesŧ`.
So to retrieve the current user's company, we read the user id on the
request's session, then browse the `res.user` record with the
installation cusror.
Fix issue introduced by commit d40956c790closesodoo/odoo#29927
The tests of the sale module are not constistent. Success depends on version
in use (com vs ent) and the modules installed (sale, stock, event_sale).
**Fix 1**
The "Description" field is updated by a onchange while saving the record.
**Fix 2**
The `sale_stock` module adds a new step to click "ok" on the warning modal
shown when saling a product without enough of that product on hand. The added
step was added to test_01 (that doesn't show the modal) instead of test_02.
**Fix 3**
There is a difference between the price of the SO between community and
enterprise.
**Fix 4**
The event_sale module changes the form view thus need to perform more steps
to create a record.
opw-1912266
closesodoo/odoo#29679
When running in kiosk mode, it is necessary to refresh the interface
once a week since the session is garbage collected.
The garbage collection method `session_gc` relies on the last
modification time of the session file. However, the session file is only
saved when the field key `should_save` of the session request is `True`.
This happens when the session is `modified`, i.e. an item on the cookie
is set.
In practice, the session is saved at each reload of the page. Regular
RPC calls, such as the one used in commit 6e1b660f9c, do not
trigger a modification of the session file. Therefore, we create a new
route which explicitly sets the session as `modified`, which ultimately
triggers a `save` in `get_response`.
opw-1917254
closesodoo/odoo#29919
Following commit c4e0e5461c
Before the current commit the placeholder was used at the end of the logic, so
it ignored the parameters such as width, height, crop, ...
Now the image is correctly replaced by the placeholder before we try to apply
the rest of the logic.
One example of such problem was in website_sale_comparison, on the comparison
page, if we tried to compare a product which had no image, the placeholder image
was bigger than expected.
task-1929646
closesodoo/odoo#30525
The purpose is to set the style of the product label and product barcode
reports that was lost in bootstrap v3 to bootstrap v4 conversion.
opw-1920478
closesodoo/odoo#30407
In 3d2ca8104e some change were introduced to the graph view.
But part of it had no sense when displaying data over 2 group by.
eg. if the first level has 2 groups (2018, 2019) and each second level 2
groups (Done,Cancelled), we could have:
2018/Done: 0
2018/Cancelled: 5
2019/Done: 8
2019/Cancelled: 9
this gives us two main groups [2018: 5] / [2019: 17], the code
remove the 2018 because [2018/Done] is 0 so we have something odd
with columns not in order, and in stacked bar chart some part of
a bar at the wrong offset
opw-1932517
closes#30529