If the vat is not set on the company and calls the method of web service
parameters for Bizkaia, it will raise an AttributeError like the 'bool' object
has no attribute 'startswith'.
Fix this issue by adding a condition to check the company's vat.
Sentry - 4282481635
closesodoo/odoo#127954
X-original-commit: 2eb66299a2edc5dd5194a7ea7a2ef208a135d533
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
When an HTML field is empty and no block can be dropped inside it, it
is very difficult to locate or even notice.
This commit adds a placeholder text inside sanitized HTML fields.
Steps to reproduce:
- Install website_crm_partner_assign.
- Go to a contact without website description.
- Go to its website page.
- Edit page.
=> The `partner.website_description` field is difficult to locate.
task-3293600
closesodoo/odoo#120588
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
*: web_editor
When an HTML field sanitizes its attributes, it can still be filled with
HTML content (blocks, styling, power box commands) using the website
builder. This causes problems because those elements can then be broken
by the sanitizing.
It is possible to break elements so badly that the page cannot be
edited anymore to fix the problem.
This commit prevents the user from dropping snippet blocks inside the
content of such fields.
Steps to reproduce:
(Unless `slide.slide`'s `description` becomes
`sanitize_attributes=False` in the meantime.)
- Edit a single Course's slide.
- Drop a Carousel into the description field at the bottom.
- Save.
=> Carousel did not work.
Worse:
- Instead of the Carousel, drop a Countdown.
=> An error happens on each page reload, and the edit mode cannot be
reached anymore.
task-3293600
Part-of: odoo/odoo#120588
After odoo/odoo@ad40298a9, when a user having access to timesheet app
but not to accounting app tries to see his timesheet in list view, and
some lines have been invoiced manually, an access error is raised.
This commit ensure that user can compute `readonly_timesheet` even when
user has no accounting access.
opw-3415661
closesodoo/odoo#127996
X-original-commit: 8f224acaac2d3c67d06284726a75194c9dc20a28
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce:
-------------------
- with timezone "Europe/Brussels" (UTC +02:00);
- create an attendance that starts at 1:00 AM;
- go to pivot view in Reporting tab.
Issue:
------
Attendance appears to be a day early.
Cause:
------
When converting a date to UTC for database storage,
it's possible that the date may change
(due to a large offset or hours close to 00:00).
Therefore, when we use `CAST(check_in as DATE)`,
we will keep the date that has potentially changed.
Solution:
---------
Use postgresql's `at time zone <timezone_name>`
statement to convert the recorded attendance
to UTC in the employee's timezone.
Note:
-----
On an employee's form view, the "Working Hours" field
(`resource_calendar_id`) is required.
The `resource_calendar_id` field is a Many to One
to the `resource.calendar` model.
The `resource.calendar` model contains
the `tz` field, which is required.
As a result, it will always be possible to find
an employee's timezone via his calendar resource.
Hypothesis:
-----------
Attendances are created using the browser's timezone.
It is normal to think that the employee's
calendar timezone is the same as his browser timezone.
opw-3370874
closesodoo/odoo#127989
X-original-commit: 8ac7e19ce94685438ab16f052c6550e86e692a75
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Before, if the product was both in the order and in optional
products, the user could not edit the quantity.
Now, the user can edit the quantity for all optional products.
task-3290530
Part-of: odoo/odoo#120229
This commit fixes the style of the close chatter button in the
attachment view to match new Milk button design
It also fixes a no spacing issue between `.o-mail-Chatter-close` and
`.o-mail-Chatter-follow`
task-3415853
part of task-3326263
closesodoo/odoo#127978
X-original-commit: f655bdfda5caf6608d4364f49bdddf25f3abf201
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
=== ISSUE ===
If you open the calendar module with an event with attendees, the status
button showing if the user accepted the invitation or not is missing a
left margin.
=== AFTER ===
We add a `ms-1` class to the buttons to space them correctly.
task-3389679
part of task-3326263
closesodoo/odoo#127976
X-original-commit: 86595f718ec5824d53f49ae7495677dd31551d57
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
With this update the version of python goes to 3.9.2
In addition, a unique password system has been put in place
closesodoo/odoo#127975
X-original-commit: a0feb285ff2ff4a9b82f87ff5abefb307847f25a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
When deleting a page, `search_url_dependencies` tries to trawl through
all models to see if they might have a link to the page being deleted.
However if the user invoking that function does not have access to a
model with an HTML field, it raises an error. Given pages are managed
by website designers which are *not administrators* there is no reason
to believe the current user has access to every model in the
database (not that even admins do these days). Since
`search_url_dependencies` is a best-effort search anyway, just ignore
any model to which the current user doesn't have access.
An alternative would be to do the search in sudo mode, but that
doesn't seem necessary, and could even be problematic if a match is
found:
- it might leak information the user should not access (because the
record name is returned, as well as the model & field names)
- it will trigger further access errors (because links to problematic
records are provided, on which the user might want to click)
closesodoo/odoo#127973
X-original-commit: 47a69a186bc415bf61a523da9686ca96c0beb74e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Create an invoice and without saving it:
- Add a line
- Switch currency
Issue: currency change of the move is not propagated to the move line.
Not even after saving and confirming the invoice
opw-3267497
closesodoo/odoo#127878
X-original-commit: 4774a66771d66c20011ed4d8b543b007ec21e059
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
The use-case is a first call to onchange2() where:
- a one2many field has a default value with a new line
- some onchange method discards that line
The diff should not return a "delete" command for the discarded line,
since the client does not know about it. Instead, for that first call,
it should behave like if the initial value of the field was empty.
Part-of: odoo/odoo#127718
Ensure to close all connections before setting the flag that prevents any
notification (notably the notification to disconnect).
task-3392096
closesodoo/odoo#127953
X-original-commit: 905307e8d08ed3595a1f965fe846f1fe6ebe9d5c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When the cart has a zero amount (because of pricelist, coupons, ...),
providers are not loaded nor displayed.
Furthermore, if there is no need for delivery (because the cart only
contains services), delivery carriers logic is not loaded either.
In this case, without carriers nor providers managing the disabling/enabling
of the confirmation button (o_payment_submit_button), the base logic handling
the T&C checkbox didn't properly enable the button when it should have.
Introduced by 608e90e998, already fixed
for payment form by 04059d09dfd7dc57a5c86c842d6fea300e1441aa
opw-3418472
closesodoo/odoo#127950
X-original-commit: d3bcf03adb93d2727ed81e1b9ffe0a2bbc5707b0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Issue:
The `_compute_amount_to_invoice` computation wasn't taking
into account the fact that invoices have a direction (i.e. either
going outbound(+) or coming inbound(-) (cf. `_compute_direction_sign`)).
This, in turn, makes the value of `amount_to_invoice` incorrect
for sales order with a credit note.
Solution:
In `_compute_amount_to_invoice`, multiply the value of
`invoice_amount_currency` with the opposite of the
`direction_sign` of the invoice, to account for the invoice direction.
opw-3360439
X-original-commit: 06ef17f2eefe89abfca64721185ac053fa8de820
[FIX] sale: fix amount to invoice for credit notes
Issue:
The `_compute_amount_to_invoice` computation wasn't taking
into account the fact that invoices have a direction (i.e. either
going outbound(+) or coming inbound(-) (cf. `_compute_direction_sign`)).
This, in turn, makes the value of `amount_to_invoice` incorrect
for sales order with a credit note.
Solution:
In `_compute_amount_to_invoice`, multiply the value of
`invoice_amount_currency` with the opposite of the
`direction_sign` of the invoice, to account for the invoice direction.
opw-3360439
closesodoo/odoo#127914
X-original-commit: d258774f120fb470d969e68c05cf0d8da0c4557a
Signed-off-by: John Laterre (jol) <jol@odoo.com>
To reproduce (on runbot):
- as admin, open "Furniture Technical Specifications" course
- click on "Add attendees" and select "Joel Willis" and "Send" it
- as "Joel Willis" ('portal' user) go to eLearning (/slides)
- click on "All Courses" (/slides/all?my=1)
- user get a 403 Forbidden error.
As `slide.channel.partner` is restricted to only "eLearning / Officer"
group, do the subquery as sudo() so that user can filter on it's own
courses
closesodoo/odoo#127913
X-original-commit: 085b42ea512859bda979dd566295cd8f9394c913
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
When the user deletes the certificate of facturae EDI invoices on Spain and
tries to send an invoice from the `Send & Print`, button error will be produced
says, the local variable 'xml_content' referenced before the assignment.
Steps to produce:
- Install the 'l10n_es_edi_facturae' module and change the company to ES Company.
- Accounting > Configuration > Spain Facturae EDI > Certificates.
- Delete all the certificate(s).
- Now create one Invoice > Confirm > Send & Print > Click on `Send & Print`
a button from the wizard.
- Error will be produced.
Fix this issue by handling the error from the
`_l10n_es_edi_facturae_render_facturae` method. If the certificate is not found,
`userError` will be raised.
Sentry-4265566923
closesodoo/odoo#127910
X-original-commit: 14e6954bf35c19f5415ad71e52591dd25794e47b
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
Oversight in revision
8c38baee85
In SQL,
The underscore character ( _ ) represents a single character
to match a pattern from a word or string.
Meaning
`name LIKE 'x_%'`
allows names starting by `x`, and not names starting by `x_` as expected.
Add the escape in the constraint to enforce starting by `x_`
and not just `x`
closesodoo/odoo#127883
Before this commit, when opening the media dialog, the optimized images
would be fetched too.
An optimized image is an image related to an original one which received
some modification (crop etc).
Those optimized images are hidden by default, and can only be shown when
toggling the "Show optimized" option, which can be shown only in debug
mode.
So, fetching those images outside debug mode is:
1. Useless, as we don't do anything with those and never show them
2. Buggy sometimes, as a full patch of "Load more" images could be
composed of only optimized images, meaning the "load more" will
actually look like it did nothing, as all received images are (and
will remain) hidden.
There is a tiny exception: if the edited image is an optimized one, we
still need to fetch it's attachment so we can show this image in the
media dialog as selected.
This fix thus filter out all the optimized images (except the one from
the explained exception) from the `search_read()`.
opw-3372811
closesodoo/odoo#127853
X-original-commit: 24177b5e2b56a94a51ac4b922d555beda9347611
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit simply restricts the clickable with of any checkbox component
to be restricted to the checkbox (or toggle) itself so that the user can
no longer toggle it from possibly a long range.
opw-3378955
closesodoo/odoo#127118
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
PURPOSE
Settings allow to change colors used in emails (primary and secondary colors). Those are used for headers and buttons. They are currently shared with colors used for documents and reporting: changing email colors change documents colors, which is not expected nor clearly indicated.
SPECIFICATIONS
Split configuration: colors used in documents may differ from colors used in emails. Duplicate color fields (primary and secondary). To ease setup when updating documents colors, update mail colors accordingly. Inverse is not true as we consider documents being the main configuration, and emails a more fine-grain configuration.
Task-3346388
closesodoo/odoo#123678
Related: odoo/upgrade#4735
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
PURPOSE
Settings allow to change colors used in emails (primary and secondary colors).
Those are used for headers and buttons. They are currently shared with colors
used for base documents and reports layout: changing email colors change
documents colors, which is not expected nor clearly indicated.
SPECIFICATIONS
Split configuration: colors used in documents may differ from colors used in
emails. Duplicate color fields (primary and secondary). To ease setup when
updating documents colors, update mail colors accordingly. Inverse is not
true as we consider documents being the main configuration, and emails a
more fine-grain configuration.
Task-3346388
Part-of: odoo/odoo#123678
Purpose of this commit is to regroup some tests, or rename some too specific
files in order to avoid explosion of files, making tests hard to find when
looking for feature-specific tests.
Task-3346388
Part-of: odoo/odoo#123678
The website frontend apps menu list is not working when the user has a
`Home Action` defined on his user.
The `Home Action` is meant to redirect to the defined action whenever
that user is login in.
But since the backend menu links on the website have most of the time
no `action` defined but just a `menu_id` defined, the `Home Action` will
kick in and take over the redirection, the same way as if the user just
type `/web` without any params.
To solve that, we simply force the `action` of those links (if they
don't already have one).
This will make sure that the redirect is working as it should for users
having a `Home Action` set.
Step to reproduce:
- Set a Home Action for any user, like "Contacts"
- Go to the website frontend, eg on `/`.
- Click on the top left button to show the backend app menus list
- Click on any menu (CRM, Invoicing, Calendar..)
-> Most of those menu will not redirect you were you are supposed to be
but on your Home Action instead.
You can figure which one will be buggy or not by just mouseovering
the link and see if the URL param `action` is set to something or
not.
--- Technical hints ---
There is multiple methods to get the list of menus in Odoo:
- `load_web_menus`: called by the web client rpc, calling `load_menus`.
If a top/app menu has no action defined on it, it sets the first found
action of their children menus to it.
It returns the full (flat) list of menus, not only the top/app ones.
This method is not ormcached but is calling an ormcached method and
just doing some tiny work on the data.
- `load_menus_root`: called only by website backend template to add the
app list on the website (in the frontend) to jump to the backend.
It does not force the action if a menu has no action set on it.
It returns only the top/app menus.
This method is ormcached.
Note that this method seems only used by the website module.
- `load_menus`: returns the full (flat) list of menus without a force
action
This method is ormcached.
Fixes https://github.com/odoo/odoo/issues/119971
task-3378963
closesodoo/odoo#127840
X-original-commit: f28a349aa40b2ea48ef8f2b71e806b965777014f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Backport of `_get_guest_from_context`.
Prevent crash when unexpected (not recordset) values are in the context.
Ensure the mere existence of a value (example integer) does not lead to
executing flows where an actual guest is expected.
task-2819597
closesodoo/odoo#127831
X-original-commit: 3d1890e88b99f059377d8b227b56d77798157397
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Prior to this commit, the translate button was in uppercase.
To maintain consistency with other buttons, this commit changes the
button to lowercase.
task-3414983
Part of task-3326263
closesodoo/odoo#127828
X-original-commit: 52f0bf2f2581b77a32d5e92fe1ae03d9787db5b4
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit reduces the vertical padding of `.o_kanban_header` to
display more kanban cards at a time in the view vertically
part of task-3326263
closesodoo/odoo#127827
X-original-commit: dc5f4f7cef67b256eb50cb15e1ae1f22aa124966
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
When converting a row with items that are supposed to be stretch-aligned
we need to set each of its column's height. However this failed when
the row contained less than two columns.
opw-3371134
closesodoo/odoo#127813
X-original-commit: 7df4cc0d9aaccf0dabcc4a7863549b276efaa403
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
If user tries to publish or unpublish the forum post from forum posts list view,
a traceback will appear.
Steps to reproduce the issue:
- Install website_forum
- Configure website
- Go to Website -> site -> Forum Posts
- Select any post -> Action -> 'Publish' or 'Unpublish'
Error: A traceback appears:
"ValueError: Invalid field 'is_published' on model 'forum.post'"
https://github.com/odoo/odoo/blob/551685368971161975d64f480e9bec326db8931e/
addons/website/static/src/components/views/page_list.js#L69
Here we will receive 'forum.post' in this.props.resModel.
is_published field is not present in the 'forum.post' model,
So it will lead to above traceback.
sentry-4256037237
closesodoo/odoo#127476
X-original-commit: 16943c482c9ba8e12eab697ceb48a3ef6ee6c2fb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Renilkumar Kajavadra (reka) <reka@odoo.com>
In the translation PR (#111044), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
closesodoo/odoo#125017
Task: 3369579
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
In the translation PR (odoo#115968), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#108954), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#109494), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#110661), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#110938), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#109147), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Also in this commit i've redone the taxonomy that has been overwritten by another
PR.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#110986), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#112160), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#111656), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (#110930), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#106324), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#106324), we translated the tax group and
invoice label but for the invoice label we didn't added to translation it needed
to have. This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#109504), we translated the tax group and invoice
label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017
In the translation PR (odoo#111107), we translated the tax group and invoice
label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.
Task: 3369579
Part-of: odoo/odoo#125017