Before this commit if the loading of the registry failed because of an
AttributeError or a psycopg2 error the http dispatcher would redirect
the user to the database manager.
This can be problematic because integrators (e.g. odoo.sh) may choose to
disable / forbid access to the database manager, and when the registry
crashes because of e.g. a migration, the real error will be overshadowed
by an AccessDenied error or somesuch depending on the path taken to
forbid access to the database manager.
With this commit, the real exception is simply reraised
closesodoo/odoo#49238
X-original-commit: de4e67dcc52916337251370387aea6aea893a60e
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is another fine-tuning of 348a5d0.
The buttons size is sometimes problematic so
we should reduce it.
OPW-2220893
closesodoo/odoo#49227
X-original-commit: 57999ea32c0cc85283faf06f6edb8649af784838
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Currently, sometimes users are getting confusing between the concepts
of 'objects' and 'models' when doing advanced configuration or
customization.
So, In this commit we replace 'object' label by 'model'.And also add
quicksearch on the relation field.
TaskId: 2209594
Related Ent PR: https://github.com/odoo/enterprise/pull/9556
closes odoo/odoo#48647
Closes: #48647
Related: odoo/enterprise#9556
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, the Employee picture stays on top of the card of the employee
we're looking for. The image does not disappear after a search is validated.
Steps to reproduce:
>> On employee kanban focus cursor on search panel, then mouse over
to employee image so it will be zoomed, now without mouse leave just
type in the search panel and enter, the big zoomed image stuck on
screen and don't even know how to make it go away.
So in this commit, We fix that on keudown hide the zoom image so
when user search on search panel it will hide the zoom image.
OnShow of zoom bind the generic even keydown and on that just
hide the image so it should not stick on screen.
TaskID : 2212808
Closes : #48253
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
During theme install, theme.ir.ui.view are copied as ir.ui.view for the
requested website.
During theme update, those already created ir.ui.view will receive the
theme.ir.ui.view modifications, including the `arch`, even if it was changed by
the user, meaning the user changes would be lost.
Here are some examples which will be wiped away when the theme
is updated (only if the view is loaded from the theme module):
- Changes made from website HTML/CSS/JS editor.
- Changes made from website builder e.g. Theme modify footer with XPath
and user make changes in footer then user changes will be gone on theme update
- Changes made directly in the arch of ir.ui.view in the backend.
This commit fixes that behavior by not updating views which were modified by
the user.
closesodoo/odoo#49224
X-original-commit: 9906e1d403c4e9137a0313c342a455f425e95b8e
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Kishan Gajjar <kishanegajjar@gmail.com>
Before this commit, invoices do show the reference in the body of
the document, while the stock moves don't. it wasn't consistent.
After this fix, the stock move title is now displayed on mobile too.
closesodoo/odoo#49217
Task-id: 2182609
X-original-commit: 4c12aff2998c436b5bc05f119bc3d7a5f95cdfcd
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Issue
- Access rights > archive ir exports & line
- Any list view
- Select all > action > export
Access rights error
- Export all (next to import button)
Export done
Cause
Action > export does a search_read which checks
access rights
Export all is bypassing that check
Solution
Do a search_read when clicking on export all
before doing the export process
OPW-2230048
closesodoo/odoo#49203
X-original-commit: 8aa89d4c416bdcf3c7f6543f3d32006f9807c938
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
* add a `raw` computed field, though only update some of base to use
it (addons for which that makes sense can be migrated progressively)
* avoid working with base64 data when it's possible to work with the
actual data
* improve datas (base64 encoded content): should depend on bin_size
closesodoo/odoo#47212
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
With website_slides installed go to website, select a course in which
the user is enrolled, try to upload a pdf
Traceback will occur because the category recordset is needed but the id
is passed to _resequence_slides
opw-2229756
closesodoo/odoo#49198
X-original-commit: 6d9b367a79d09d3d7a9dde890ca651aa09b93987
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Followup of #48896, ensures that the registry is correctly cleaned up
after the installation of the different l10n_* modules and that the
subsequent setup_models is done with the correct registry
closesodoo/odoo#49197
X-original-commit: bfd6bdcd89724f04442bbe07307177c523bed5f0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
TL;DR: remember `osv` and `except_orm` ? You can forget about them.
* Deprecated `except_orm` dropped.
* `UserError` elevated as super type of all user-related
errors.
* Unused `DeferredException` dropped.
* Unused `QWebException` dropped (real one is in `qweb.py`).
* `MailDeliveryException` made a python exception.
* `name` legacy exception attribute made an alias of the python standard
`args[0]` attribute and deprecated.
* `value` legacy exception attribute dropped.
* `exception_type` RPC error response key dropped.
* Deprecated `osv` module dropped.
* `--osv-memory-age-limit` cli option made an alias of
`--transient-age-limit` and deprecated.
The `odoo.exceptions.Warning` have long been a deprecated alias to
`UserError`. It is going to be removed in a future version but first we
explicitly deprecate it with a warning.
The `odoo.exceptions.DeferredException` was a very old internal
exception, it has been removed without deprecation notice as it is never
raised.
The `odoo.exceptions.except_orm` has been a deprecated exception type
with deprecation warning for 5 years, it has been removed in favor of
UserError which becomes the super class of all user-related errors.
The `odoo.base.models.ir_mail_server.MailDeliveryException` was
inheriting `except_orm`. As it is not related to a user error but is
more of a problem an admin much take care of, the exception has been
made a Python error.
The `exception_type` JSON key in RPC error responses was holding an
hardcoded value derived from the exception type. Its usage has been
dropped in favor of the `name` JSON key that holds the precise exception
name. Again as it was hardly used in the source code (beside the crash
manager) it has been dropped without deprecation warning.
Since we are here trying to clean odoo custom exceptions, we are also
deprecating the `name` exception attribute in favor of the more standard
`args[0]` attribute.
The `name` (along with `value`) were two attributes used to raise
`except_orm` exceptions before the introduction of `UserError`,
`AccessError` and related exceptions. The `name` attribute, at the time,
was holding the exception type/title. Nowadays it contains the error
message. The `value` attribute, at the time, was holding the error
message. Nowadays it is no more used.
The `osv` module contains very old deprecated aliases. There is no
simple way to log a deprecation warning for osv, osv_memory and
osv_abstract but as they have not been in use for ages, they have been
removed too. To be consistent, the `--osv-memory-age-limit` cli option
has been made a deprecated alias to the `--transient-age-limit`.
closesodoo/odoo#45723
Task: 2187728
Related: odoo/enterprise#9162
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
After cb76a0022, three more Qunit tests were found to fail randomly.
closesodoo/odoo#49190
X-original-commit: 9809c53e65059d53a9f115ab29ef02583f84bdb5
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit fixes timer related issues on survey flows, for both regulars
surveys and survey sessions.
The timer was unreliable in its completion by a whole second, which had not a
big impact at the user level but could make some tests fail (randomly).
Side changes from this commit:
- Reduced delays in the survey session tests to speed up testing
- Removed some timer flickering on survey views
LINKS
Task 2230526
Runbot error ID 535
closesodoo/odoo#49178
X-original-commit: 15c72aec71d42624685fb0fc9df25279c7855310
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- A tag has been added next to the title of each tab in the profile when the user come from a specific forum. The goal is to indicate to the user that the displayed content is specific to a given forum. The tag can be clicked by the user to remove the applied filter.
- Change label in edit profile page from "real name" to "name"
Task Id: 2214425
closesodoo/odoo#48665
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before 13.0, when there is no salesperson on the customer or company or
website, when a ecommerce sale order is done we get the OdooBot as
salesperson because we update partner on sale order in superuser.
In 13.0, since superuser doesn't change UID, the salesperson will be
assigned to "Public User" or the customer that create this order.
opw-2232201
closes#49141closesodoo/odoo#49161
X-original-commit: 0b6a2569920b6584652c39b3465998649fe305b4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Current Behaviour:
As Admin:
- Install timeoff and enable Multi company
- Create new company and switch to that company
- Go to timeoff > Managers > All > Allocations > Create a record
An AccessError is raised from `_onchange_type` because it try to
access `employee_ids[:1].id` and it may gives employee of another company.
Expected Behaviour:
After this commit, it will not raise the AccessError. if employee of
that company is exist then and then set on leave allocation.
so we have already compute field `employee_id`, it will gives employee
of current company.
closes odoo/odoo#49120
Taskid: 2179571
Closes: #45381
X-original-commit: 73b3d11a0b443116ce91d889397c6d85a13ca1eb
Related: odoo/enterprise#9712
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
There is an alignment issue while browsing courses page in Leaderboard and
Latest achievements panel.
In this commit we simply fix it with no-gutters to have all items aligned
properly.
TaskID - 2227683
closesodoo/odoo#49125
X-original-commit: 84270b8f542313235a35fc0449600a8ff5dc8785
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
When a PoS session is closed in anglosaxon accounting with real time stock valuation, the stock moves linked to PoS orders are used to create the stock valuation entry.
When an order is composed of only products of type 'service', there are no picking linked to the order, and so the entry is created with all stock moves having no picking_id.
After this commit:
To avoid this problem, we are checking that the PoS order has a picking before looking for stock moves.
OPW-2206625
closesodoo/odoo#49117
X-original-commit: 0386e1f099bf42a59a79febfa06906dd76bd62e2
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
While installing a module on an existing database, the modification of
groups should reset the `base.user_groups_view` to a dummy view in order
to validate user views. The `user_groups_view` is set to its "right"
value at the end of the installation.
closesodoo/odoo#49114
X-original-commit: 071bd77944484bad6f2c0cb9a7a98785dcc693c6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Improve the mailing.trace.report search view to help users find their statistics based on specific campaigns, and added some minor changes to mailing views
- Rename "mass mail campaign" to "mailing campaign"
- Rename "create a mass mailing list" to "create a mailing list"
- Add sum footer on bounce
- Add mailing and campaign field to reporting search view
- Hide campaign field in search views when campaign option is not activated
Task ID 2210331
closesodoo/odoo#48711
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, users can't switch Outgoing Mail Server once the mailing has been
sent. This might cause issue some situation. For example, the user has two
Email Servers. He tries sending with the first server and something is wrong
then emails couldn't be sent. So in this case user can not edit the mail
server and instead has to create another mailing with second working server.
This commit improves the behavior by removing the readonly attr on
`Mail Server` field of mass mailing.
Task-Id : 2223141
Closes : #48256
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Create a tax:
Fixed price: 0.355
Included in price
- Assign the tax to product P
- Create a POS order with P and a price 0, pay by bank
- Create a POS order with P and a price 10, pay by bank
- Close the POS session.
The following entry is created:
D C
Tax Received 0.01 0.00
Product Sales 0.00 9.65
Product Sales 0.36 0.00
Receivable 10.00 0.00
Several issues:
- the entry is posted and unbalanced: covered in #48484
- rounding of 0.355 was either 0.36 or 0.35: to fix one day... [1]
- the tax received of 0.36 for the POS order of 0 is booked on the debit
rather than on credit, leading to a difference 0.01.
This happens because the taxes amounts for the POS order of 10 are
positive, while they should be negative for a sale as done in [2].
We set the amounts as negative as done for incoming invoices, and adapt
the tax line creation accordingly.
[1] The use case is weird: a fixed price of 0.355 while we only have 2
digits in the currency?
[2] https://github.com/odoo/odoo/blob/e415cffa2ffb3fe4b5f0e32bd96b3433387a95e3/addons/account/models/account_move.py#L461
opw-2168096
closesodoo/odoo#49104
X-original-commit: 5df8ed72d03de635f3c38ce59c1b3e9c9ce51ed2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Usecase : sell a mto/manufacture product. Confirm the sale order.
Cancel the delivery and the production then
duplicate the delivery.
- if the delivery was cancelled before the production, another
production is created.
- if the delivery was cancelled after the production, no other
production is created.
In the second case, the production cancellation will reset the procure
method of the delivery. The duplication will not trigger the mto
procurement.
This commit will override the procure method of each cancelled moves and
set it to `make_to_stock'. This way, we have the same behavior independently of the flow.
Task : 2212125
closesodoo/odoo#48366
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Followup of
https://github.com/odoo/odoo/commit/58df6c86e06304b2c5f020e0fb93988e9e388fe0.
By default, the create, when not specified as `api.model`, supports
creation in batch (thus the batching opportunity isn't lost here).
BUT, if a create override isn't specified as `api.model` or
`api.model_create_multi`, it won't be accessible in rpc calls (because
the ORM thinks a record in self is needed).
It doesn't look like somebody can create stock move lines from the web
client itself, but it doesn't cost anything to follow the global api
(and it's clearer to clearly specify the create as create_multi).
closesodoo/odoo#48964
X-original-commit: a4fd8f8062046bcea97d9f7cfe300e19020cdecd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
For the `mrp.routing.workcenter`, removes the help from the `worksheet`
field to set it into the view.
This way, the tooltip doesn't appear each time the user cursor is placed
in front of the pdf in the workorder tablet view (`mpr_workorder`).
task-2225362
closesodoo/odoo#48903
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Adds special taxes used in sales and purchase of alcoholic beverages.
[FIX] l10n_cl: change percentage amount of "retencion de segunda categoría" to the value changed by law in year 2020
closesodoo/odoo#48804
X-original-commit: c7592d614728ded8e6a9faa570a49b370515ecea
Signed-off-by: Josse Colpaert <jco@openerp.com>
When `_synchronize_alias` was introduced into crm.team.write, the write
method become incompatible with batch writes because
`_synchronize_alias` assumes `self` is a recordset of length 1 and
performs attribute accesses directly on self, this makes the __get__
crash because it performs a `self.ensure_one()`
With this commit, crm.team.write will iterate over the self recordset
and call `_synchronize_alias` on every record of the recordset.
This also solves a uninstallation problem in sale_crm because a write is
performed on crm.team in an uninstall_hook.
closesodoo/odoo#49088
X-original-commit: a9511cd42be365e58371d717b8197aac644eaf33
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
This commit concerns tours executed in onboarding mode (the user
manually follows the steps and consumes the tips).
Commit [1] changed the default event type to consume a tip from
'mousedown' to 'click'. This caused an issue when a tip was
attached to an element that had to be dragged and dropped. The
issue has been fixed by [2]. This fix is based on the fact
that draggable elements have classname 'ui-draggable-handle'.
Kanban records are draggable, but their implementation uses the
'sortable' feature of jQuery instead of the 'draggable' one (the
records are also sorted in their column). So [2] isn't enough in
this case. For instance, in the crm tour, the tip telling to drag
and drop a record to another column can't be consumed.
This commit handles the case of sortable elements that have to be
dragged and dropped.
[1] e5bc2e7306251a55ce90adeef992840517c240e6
[2] 3f458fe06e6a629edc72428eab749068c2eba1ba
closesodoo/odoo#49072
X-original-commit: 67335bda1653f592011a57146fb750d7b69cfc27
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
before this commit: from commit: https://github.com/odoo/odoo/commit/d58d6e270f4106d717821438490f60bc4f71306e parent context
was propagated to sub views, propagating whole context to sub view creates
issue as it contains default_* key inside it, there is a chance that sub view
has same field name which matches with default_fieldName in context,
e.g. go to sale order form view and create sale order line, while selecting
product, write in product_id field so that Create and Edit option comes,
select Create and Edit option, so whatever previously written in product_id
field will be added in product.product form's context as default_name,
now go to Purchase tab of product form and try to create Supplier, but note
that Vendors One2many should be editable, if it is not then to produce this
issue, make Vendor o2m list editable top/bottom, as soon as you click on
Vendor o2m's create button traceback generated which comes from name_get of
res.partner, issue raised because vendor o2m has m2o of res.partner and field
name is 'name', when default_get for vendor o2m is called it will propagate context
and context has default_name='typed string in product_id', as name field is
m2o with res.partner it will generate traceback as m2o accepts (id, name) tuple
not string
after this commit: propagate context to sub view but remove default_* keys
from parent context
task-2121161
closesodoo/odoo#49075
X-original-commit: 2e3756e0ce96a9e0c5fa304632a2600cbd832ef5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In case `carrier_tracking_url` is `False`, a `TypeError` is raised and
not catched.
opw-2232268
closesodoo/odoo#49083
X-original-commit: a4b5bd7770bca3f2e4327c65de673e2fcc00e7e5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Activate "Product Packagings" in the Sales Settings
- Define a package on a storable product with a contained Qty of 1.8
- Sell 5.4 units of this product in an SO and use the package.
A warning is raised.
This happens because 5.4 % 1.8 = 2.220446049250313e-16
opw-2228859
closesodoo/odoo#49070
X-original-commit: f1e79c74a5c07d6be3154629f6f381ebaf907fb1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>