Commit Graph
156836 Commits
Author SHA1 Message Date
Pierre-Yves Dufays 33d23cc246 [IMP] crm: improve lead searching and duplicate detection
Accelerate duplicate lead detection by adding indexes on field involved in the
search.

In this commit we add trigram indexes on email_normalized, partner_name and
contact_name that are used a lot for searching and finding leads.

Task-3007714

Part-of: odoo/odoo#105873
2022-12-12 13:18:46 +01:00
Alexandre de Pape (alpa) 181eabbe58 [IMP] website_sale_product_configurator: add to cart animation
This commit adds an animation when clicking on `Continue Shopping` on the product configurator modal.

closes odoo/odoo#100582

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-12-12 13:18:35 +01:00
Kshitij Nariya d242a07397 [FIX] base: fix website menu to backend when a root doesn't have a xid
When website resolves its menu to the backend, it calls
`load_menus_root`. Unlike `load_menus`, that does not nicely handle
missing menuitems, so *if* one of the root menus was created manually
(hence doesn't have a xid) the website will crash either immediately
or when trying to open the backend menu (depending on version).

Fix by adding a similar fallback to that of `load_menus`.

closes odoo/odoo#107580

X-original-commit: 3a682650cfc96bae0ce4f44a041713a8174a02fc
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-12-12 12:18:46 +01:00
Denis Ledoux 15948702e5 [IMP] tools: locate_node, remove useless code
`if isinstance(node, SKIPPED_ELEMENT_TYPES):`
---------------------------------------------

It has been added in
https://github.com/odoo/odoo/commit/31b9bee00676e179c124f3d42539103305cf7423

It's hard to tell why it has been added. Though it seems not useful:
- Has we iter the nodes using the tag of the specification,
  `arch.iter(spec.tag)`,
  this is normally impossible to iter on a node type from that
  SKIPPED_ELEMENT_TYPES node type list
  (`etree._Comment, etree._ProcessingInstruction, etree.CommentBase, etree.PIBase, etree._Entity`),
  as those node types do not have a tag (`spec.tag`).
  In addition, in the place calling `locate_node`,
  we already do this same check on the specification node:
  https://github.com/odoo/odoo/blob/48109c15d319ae69a8fcdd4a6c3b19172a2de6d9/odoo/tools/template_inheritance.py#L144-L150

Version spec should match parent's root element's version
---------------------------------------------------------

It has also been added in the same revision:
https://github.com/odoo/odoo/commit/31b9bee00676e179c124f3d42539103305cf7423

This has been added in 7.0 to handle `version="7.0"` in xml views.

However, these `version="7.0"` have been removed in 8.0, in revision
odoo/odoo@faa09da325
After the above revision, there were still some leftovers,
but which have all been removed in 11.0 in revision
odoo/odoo@70942e4cfb
during an improvement of the RNG validator.

This is therefore enough evidence to say this code
checking for the `version` attribute in `locate_node`
is no longer useful since a quite long time now.
It can therefore be removed.

closes odoo/odoo#107340

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-12-12 11:22:32 +01:00
Romain Estievenart 36f2d1688f [ADD] web: Android mobile app feature detection
This commit adds a proper way to detect the Android OdooMobile app using
the User-Agent.

closes odoo/odoo#107392

Related: odoo/enterprise#34088
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-12-11 17:42:57 +01:00
Shawcker 6826fa3ed2 [FIX] account: 'Browse available countries' link style
Currently, the style for the link 'Browse available countries' you have on the accounting dashboard when no chart of accounts is installed for your company has no link style. This means it has the same styling as any other text, and makes it hard to actually know it's a link.

This commit adds a class to this link to give it a distinct style.

Task id=3094593

closes odoo/odoo#107653

X-original-commit: cc431997944ba90f61e543c73caaac5aeeb6f5c1
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-12-09 22:05:57 +01:00
Arnaud Baes 436b82d86c [IMP] website: Allow override on FeatureSelectionScreen
Needed for task-3046679

closes odoo/odoo#107654

X-original-commit: 82c8638251bf90d21eb335ec2013c0c9ef0ad355
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-09 21:00:57 +01:00
Lucas Lefèvre 5265c5a046 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/1419e570 [FIX] collaborative: don't endlessly dispatch new revision
https://github.com/odoo/o-spreadsheet/commit/45bf0472 [FIX] renderer: overflowing cell in Y have wrong overflowing background
https://github.com/odoo/o-spreadsheet/commit/3ce6151f [FIX] renderer: correct separator of overflowing cells

closes odoo/odoo#107645

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-12-09 19:45:55 +01:00
Ricardo Gomes Rodrigues (rigr) 4884445c19 [FIX] l10n_multilang: write access error when translating the CoA
To reproduce the bug:
1. Create two Belgian companies
2. Load the Belgian CoA for both of them
3. Go to the translation settings and add the French language
4. Access error

This is because we translate all the CoAs of all the companies, and not just the current company's COA. Therefore an access error is thrown because we modify the CoA of another company.
We can bypass this error by using sudo such that we translate every CoA and not just the one of the current company.

closes odoo/odoo#107643

X-original-commit: aac37b0de831e9d3b1ec8d4cead58c975bf06c5c
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
2022-12-09 19:45:52 +01:00
Benoit Socias 63bb3cb16a [FIX] base: avoid concurrent deletes when generating assets
Since [1] when website was moved to the backend, the `DELETE` SQL
statement introduced in [2] can fail in situations where it happens in
several workers at the same time.

To avoid this, this commit filters the deleted ids to only keep the
ones that are not locked.

Steps to reproduce:
- Revert commit [3]. (It avoids this scenario by returning to the root page.)
- Start with only `website` installed.
- Access a non-existing page. (e.g. `/@/a`)
- Click on "+New".
- Click on "Blog Post".
- Click on "Install".
=> Popup with traceback when reloading the page.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/0b22f4deee3129a84daa7113393da6e7200de6ff
[3]: https://github.com/odoo/odoo/commit/886900c33d18f647016e596ba41c193f5fcf8a43

closes odoo/odoo#107635

X-original-commit: 5390199b1b3dcee1cbfb28ea9bbdeba0469a75d2
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-09 19:45:50 +01:00
Olivier Dony 4fb4964fc3 [FIX] web, website: /web/login should simulate auth=public
The /web/login route is historically defined to be auth=none, which
means that it is available even when no database is selected (yet), and
no db_filter is set to automatically select one.
This is done mainly to be able to redirect users to the database
selection screen (cfr ensure_db()) instead of showing them a 404 until
they manually go to the /web/database/selector page.

The conversion of this mechanism in odoo/odoo#87571 can cause
problems because the user environment used to render the login page uses
the superuser ID. In certain configurations of installed modules, it was
possible to have the /web/login page showing "OdooBot" as the logged in
user, despite no user being actually logged in at all.

To fix this, we override the env that was set by auth=none:
- with the current session user, if there is one (like `/web` does)
- with the public user otherwise (as auth=public would do)

closes odoo/odoo#107613

X-original-commit: 6e42a07d7637070d45be81dcbf7261eda08425b4
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-09 19:45:47 +01:00
pedrambiria ccaecba252 [FIX] delivery: accept regex in the zip prefixes field
In the country of Bahrain, they have 3 and 4-digit zip codes. With the
current implementation of the delivery module, they can not add 3-digit
zip codes because they will be matched with some 4-digit zip codes,
which is incorrect.

For example, consider '101' and '1011' as two different zip codes related to
two separate zones. If you add '101' to a delivery method, it would also
accept '1011'.

The solution is to accept regular expression to allow them to use $ to
define the end of the zip code.

opw-3072592

closes odoo/odoo#107636

X-original-commit: 0a68d171af2645d3047d561acb354730aebfa753
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-12-09 18:37:50 +01:00
Romain Derie 206f7e79d0 [FIX] website: prevent error to be raised instead of warning logging
There is no method attribute, it was replaced by original_endpoint since
httpocalypse at [1].
So entering this `if` condition will actually crash as the logger won't
be able to find what it needs.

[1]: https://github.com/odoo/odoo/commit/c3714eafbd07f7c7b98ff98bc604d76db4fe1c7b#diff-5f1b777eb0bc30f3f494ffe3e1522524cd0822f6c94c8644070a6db7c40b9c34L905

closes odoo/odoo#107629

X-original-commit: fd84ad8b262ddbee50b93481aa5c5ff11a4eb6f7
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 18:37:48 +01:00
Adrien Minne f043908df8 [FIX] spreadsheet_dashboard_*: fix dashboards
Update dashboard with latest version.

closes odoo/odoo#107512

X-original-commit: bd116406002f9d0a196141fe742de36ac6dbaa55
Related: odoo/enterprise#34815
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-12-09 16:41:01 +01:00
niyasraphy 999043b36c [IMP] *: change leave string's to time off
update various string/labels contains "Leave" in hr_holidays, hr_work_entry_contract, resource, test_resource and project_timesheet_holidays modules to "Time Off"

closes odoo/odoo#107504

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-09 16:40:58 +01:00
Antoine Guenet edd48fc799 [FIX] web_editor: properly handle selection in nested table
Custom table selections going through nested tables weren't working as
expected.

closes odoo/odoo#107624

X-original-commit: 670b27d4f8b99a9650cf915025ccf304a095d7de
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-09 15:12:53 +01:00
Romain Derie 7c07b8ee96 [FIX] website: make sidebar menu visible on safari on mac
For some reason, safari on mac is not showing the sidebar menu content
at all. It remains a white div without content.

Seems like a bad implementation of that browser for this case, or at
least an implementation which is not shared by all other browsers.

Note that removing `z-index`, `position:absolute` or `overflow` css
property from the `wrapwrap` will make the menu appear.
!!! Also note that having a non scrollable page (not enough content),
like an empty homepage, will make the menu appear too. !!!

As this issue is quite critical:
- All mac/safari users are not seeing your website menu..
- And the admin don't event know it most of the time (as not on mac)
And since:
- It's been going for months without someone finding a proper fix
- It's hard to investigate as devs generally don't have mac to
  investigate and have to use browserstack which is really bad for such
  work

Step to reproduce:
- Select the sidebar header template
- Visit the website on safari
-> The menu will be invisible, like if the navbar was empty

opw-2984536
opw-2896939

closes odoo/odoo#107616

X-original-commit: ffa34d840a07efbbec3b180839d7cbf64787e4ef
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 15:12:50 +01:00
Pierre Rousseau 6d4f36961c [REF] spreadsheet: remove useless plugin mode
closes odoo/odoo#106392

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-12-09 15:12:48 +01:00
Thomas Lefebvre (thle) 34ed6e2266 [FIX] hr_holidays: apply timezone to leave statistics
Context:
    In some companies, we want to give employees a day off.
    Unfortunately, their working hours do not correspond to those of the company.
    To remedy this, we set the work hours at: 00:00 until 23:59.

Steps to reproduce:
    - set work hours to 00:00 until 23h59;
    - give one day off to a department;
    - view statistics on a employee (who belongs to the department).

Issue:
    We notice that in the statistics, the dates are wrong.
   Indeed, it is indicated that the leave is over two days.

Cause:
    When we receive the dates via the rpc call to display them, they are character strings.
    The browser interprets them with the computer's timezone (even if it is UTC).
    The hours of work being at the limit of the day, we overflow on a second day.

Solution:
    As we know that the timezone used to store dates in the database is UTC, we can calculate an offset and apply it before displaying the result.

opw-3063177

closes odoo/odoo#107614

X-original-commit: 31dda867957c8083177f7e2776fa461786c2bff3
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-09 14:08:07 +01:00
Shawcker 7705690621 [IMP] l10n_es: add new taxes and associated tax tags
Two taxes are not available in Odoo, and are currently supposed to be filled manually in the tax report.
This commit adds those two taxes, with their associated tax tags.
odoo/enterprise#34607 modifies the tax report in order to take them into account.

Task id=3085288

closes odoo/odoo#107602

X-original-commit: fe7cfbebdf0d7ad2c06955042e2f751f55395468
Related: odoo/enterprise#34846
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Popeler Antoine (anpp) <anpp@odoo.com>
2022-12-09 13:03:38 +01:00
Antoine Guenet 7c19e7389e [ADD] web_editor: multiline tab and shift+tab
This adds the possibility to remove leading tabulations with shift+tab,
as well as supporting tabulation and untabulation over multiple blocks.

task-2792099

closes odoo/odoo#100386

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-09 13:03:33 +01:00
Benoit Socias 55339cd6a7 [FIX] web_editor: prevent putting a table of content inside another one
Dropping a table of content inside another table of content triggers an
infinite loop of generated menu content updates.

This commit prevents dropping a table of content into another table of
content, be it from its thumbnail or from a previous location inside the
page.

task-2752391

closes odoo/odoo#107586

X-original-commit: 69ab750127ac65a24106deb47de3e4d2bf0cd0f5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-09 11:49:01 +01:00
xO-Tx 8e12c0b19f [IMP] website_sale, *: follow-up of "site" menu restructure
*: website_sale_comparison

The goal of this commit is to add the following tweaks on website menus
(after the "Site" menu updates done in [1]):

- Use kanban view by default for products in "eCommerce" menu.
- Use list view by default for the product list in "site" menu.
- Add a placeholder text when there are no attribute categories defined.
- Move 'Attribute Categories' to debug mode.

[1]: https://github.com/odoo/odoo/pull/98937

task-2973149

closes odoo/odoo#107583

X-original-commit: 82e9afeff8bb4bd64c5f0fb95af4f4b7a66e722d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 11:48:58 +01:00
Arthur Detroux (ard) ddfb9c2186 [FIX] website: prevent tb when using a background video as cover
Prior to this commit, when using a background video on the cover of the
website_slides homepage (/slides), after saving, a traceback would
occur and the video would not be displayed.

Steps to reproduce:
- Install website_slide
- Go to /slides
- Enter edit mode
- Change the cover of the page by a video
- Save
- Traceback

The reason for that is that the cover snippet used on the homepage of
elearning is the root of an XPath instead of its own oe_structure. (This
was changed in 16.0)
[1] made it so that the style and class attributes are saved but did not
save any data attributes needed for the background-video widget to work.

This commit adds those data attributes.

[1]: https://github.com/odoo/odoo/commit/5b252215dc375526af87c31a32256dd1a9582f02

opw-3063043

closes odoo/odoo#107577

X-original-commit: 86dc4d4349d033c95c0e04e8c173f63e5e2044ed
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 11:48:56 +01:00
Soukéina Bojabza 6bd580f353 [IMP] web_editor: make the background grid visible on dark backgrounds
Before this commit, when dragging/resizing a grid item, the background
grid that appears was not clearly visible if the background color was
dark.

This commit adds a light line next to the dark background grid lines in
order to make them always visible. It also moves the CSS rule about the
grid cell inside the background grid rule, as it is more correct
like this.

task-3060593

closes odoo/odoo#107576

X-original-commit: 1aa81243b7c80069c576381e2f3b04281455794f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 11:48:53 +01:00
niyasraphy 89c95544d6 [FIX] *: make some user errors translatable
*: base, account_payment, l10n_ar, mrp_subcontracting, point_of_sale, pos_restaurant, purchase, sale

closes odoo/odoo#107264

X-original-commit: edd928cd0c63a01d1ee8b28ed344f61e9b6d0b54
Related: odoo/enterprise#34676
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-09 11:48:50 +01:00
Ricardo Gomes Rodrigues (rigr) 6b396c84e5 [IMP] account,l10n_*: clean country-specific fields from views
Many country-specific fields were displayed while a company with another country was selected (in case of a multi-company environment).

These country-specific fields are now visible only if one of the selected companies with said country is selected.

closes odoo/odoo#106221

Related: odoo/enterprise#34226
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-12-09 11:48:42 +01:00
Ricardo Gomes Rodrigues (rigr) 5376b60af0 [IMP] base, web: add not like and not ilike operators for the JS Odoo domain
Currently the `not like` and `not ilike` operators are available for the Odoo domain in Python but not in JS.

This commit adds these two operators in the JS Odoo domain too for better code clarity. For instance:
`[('fiscal_country_codes', 'not like', 'AR')]`
instead of
`['|', ('fiscal_country_codes', 'like', 'AR')]`

Part-of: odoo/odoo#106221
2022-12-09 11:48:42 +01:00
Pierre Rousseau 092ca864db [FIX] spreadsheet: preload currency fields of list
Before this revision, the currency fields of monetary fields of a list
were not preloaded when the list was loaded. This was causing a double
rpc, a first one to get the list data, and a second one to get the
currency data.

With this revision, we preload the currency fields of monetary fields
of a list.

task-id 3095937

closes odoo/odoo#107591

X-original-commit: a2d5fc517d460ccf5c17611de023a219dfadf7ad
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-12-09 10:45:13 +01:00
niyasraphy 044231fb10 [FIX] hr_skills, hr_skills_{}: fix typo
closes odoo/odoo#107513

X-original-commit: 641571c27a2c8cfb4da243977ddec512dea11587
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-09 10:45:02 +01:00
niyasraphy d91fa0c405 [IMP] hr_recruitment_{}: improve user error message
in the model/view the name of the field is Applicant's Name and in the user error message the warning is shown as Contact Name, improving the message for easy and better understanding for the end user

closes odoo/odoo#107498

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-09 10:44:59 +01:00
Nicolas Bayet 34b1f71491 [FIX] web_editor: spellcheck properly on Safari
Before this commit, when using the spellcheck of safari, the selected
word was interpreted as the text "#" by the editor.

task-3093997

closes odoo/odoo#107563

X-original-commit: b8d1ff6bc39530e601baa29971bca720e2dd06cf
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-09 09:44:25 +01:00
Sébastien Geelen (sge) 9d1422f9d5 [FIX] web_editor: better command condition
Improve a condition to be more inclusive
and be truthy in some rare cases.

closes odoo/odoo#107545

X-original-commit: 51e37c00c749e6bf033317c612856d15daf6c39d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-09 09:44:23 +01:00
niyasraphy 81a31d547c [FIX] point_of_sale: pos report wizard o2m tree width
in the wizard of sales report in point of sale module, the one2many tree's width is more than the screen size due to given col=4 and scrolling option is shown.

Point Of Sale -> Reporting -> Sales Details

closes odoo/odoo#107241

X-original-commit: b1e1ae315e7ff3e22e7533a602cea0e150eafb75
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-09 09:44:20 +01:00
Nshimiyimana Séna bbca44b1a3 [FIX] web: make list view table borders visible in Firefox
## Steps to reproduce
* Using Firefox, Go to Accounting > Invoices > create a new invoice.
* Add a line to the invoice and remove the label.

You should see that there's no indication that the label field is
required. (It works well in Chrome)

## Cause
This is happening because the table borders (that become red when a
field fails validation) are not displayed in Firefox.

opw-3040299

closes odoo/odoo#107564

X-original-commit: 74726c649fa5bddec30573c18acd11020302d093
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2022-12-09 08:46:10 +01:00
xO-Tx 3eebf5e384 [FIX] web: properly handle RTL direction for autoMoreMenu
Issue:

1. Install eCommerce + set up "Contact" header (there are probably other
   configurations where this bug occurs but this one fails for sure).
2. Go to website in english version (with few menu items on header)
3. Switch language to Arabic
=> The "+" dropdown appears on the header even when there is enough
   space for other menu items.

Explanation:

The 'AutoMoreMenu' option is used on website menu to auto adapt the
header layout so that elements are not wrapped on a new line (and sets
a "+" dropdown that contains the overflowing menu items).

When the language is switched to Arabic (or any RTL language), the
current code ('computeFloatOuterWidthWithMargins()' method) won't be
able to compute the reversed margins correctly for "unfoldable" items:

For example, if we want to compute the width (including margins) of the
"user dropdown":

============================================
IW -> Initial width value (without margins)
LR -> Left margin computing
RM -> Right margin computing
============================================

A- On English version (LTR):

1- LM: item has left auto margin class -> left margin won't be added.
2- RM: item has no right auto margin class -> right margin added (=== 0)
3- The final width is the same as the initial value (IW).

B- On Arabic version (RTL):

1- LM: item has left auto margin class -> left margin won't be added.
2- RM: item has no right auto margin class -> right margin added (> 0).
The right margin value added here is just the left auto margin
reversed because of direction. The code will return a final width > IW
and since the item is "unfoldable", its width will reduce the available
space for foldable items.

Solution:

The goal of this commit is to make the code smart enough to avoid adding
wrong right/left margin value caused by left/right auto margin class
on 'RTL' direction.

opw-2963123

closes odoo/odoo#107573

X-original-commit: 8a4a59389338ad1f50c08df3d55c267ca4d830da
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-08 19:59:17 +01:00
Kevin Baptiste 270b9aa7c3 [FIX] hr_org_chart: don't loop when own manager
When an employee was their own manager, the org chart would be filled
with their own name.

task-3093917

closes odoo/odoo#107546

X-original-commit: 53f9359d84a6bb500db693298a12608964a0a118
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-08 18:00:29 +01:00
Antoine Guenet afbe0de46f [FIX] web_editor: paste a full table after copying custom-selected table
With the tables' custom selection in the editor, copy-pasting from a
table became awkward. This ensures that copying (from) a table in the
editor guarantees a valid table on paste.

task-3061274

closes odoo/odoo#107544

X-original-commit: 9730a1f1e0053cc9633faaf0ffb424ae373bbc38
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2022-12-08 18:00:24 +01:00
yhu-odoo 603b0ee228 [FIX] purchase,sale: Error when no partner_ids
Since #106658,
https://github.com/odoo/odoo/blob/348265db3ddb90a982b0fb60f2d8b1085ceaaf2a/addons/purchase/models/purchase.py#L338
https://github.com/odoo/odoo/blob/348265db3ddb90a982b0fb60f2d8b1085ceaaf2a/addons/sale/models/sale_order.py#L1198
trigger error when no partner_ids in kwargs.
Fix them.

closes odoo/odoo#107521

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-08 18:00:21 +01:00
Bastien (bvdn) 65893b50fa [IMP] project: change stage_display string in 'My/All Tasks' list view
Small fixup for already merged PR: 103318
stage_display column should have 'Stage' as a header, not 'Stage Display'
added the stage_display field to 'All Tasks' list view

Task-3024152

closes odoo/odoo#107407

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-08 18:00:18 +01:00
Nikunj Ladava 3abc5097f2 [FIX] event_sale: show correct amount in printed ticket
As multiple tickets can be sold in a single sale order line, we should not
display the line total amount on printed tickets but the unit price instead.

Task-3078743

closes odoo/odoo#107530

X-original-commit: 63d786e67006405140e3198543640edf4b4edb1b
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-12-08 16:58:58 +01:00
Hugo Carlier (Huca) 27e64cf856 [IMP] sale_project: modify fields order in form view of tasks
- project.task form view - the fields
'planned_date_begin' and 'planned_date_end' are displayed after the
customer field (or after the SOL field if it exists)

Task-3046210

closes odoo/odoo#107502

Related: odoo/enterprise#34782
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-08 16:58:55 +01:00
Thomas Lefebvre (thle) 29ec845109 [FIX] onboarding: modify access rights for onboarding model
Steps to reproduce:
    - install Calendar and Appointments apps;
    - give "Access Rights" for administration to a user;
    - go to calendar app with this user.

Issue:
    The user does not have access to the calendar.

Cause:
    The user has no access rights for the onboarding model.

Solution:
    Check that the user belongs to the "group_system" group in the onboarding model controller.

opw-3083014

closes odoo/odoo#107514

X-original-commit: fa7dc387154c65ef07af1f903fa25ca5d2e890f9
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-12-08 15:51:31 +01:00
Guillaume (gdi) f7311cf3db [FIX] website: prevent console errors when changing connectors type
Since [this commit], a new option is available on the steps block to
change the style of the connectors. Unfortunately this was causing
errors in the console. This commit makes sure that we don't have these
errors in the console anymore.

Steps to reproduce the issue:
- Drop a steps block on a page
- Change the type of the connectors

=> Errors are displayed in the developer console.

[this commit]: https://github.com/odoo/odoo/commit/aba31e9f2d8a44ce1586403f2a621a6caeed57b4

task-3069766

closes odoo/odoo#107511

X-original-commit: c1805fc5d3c3eeaa5c2edca69a6b9375f4ea1a39
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2022-12-08 15:51:21 +01:00
Victor Feyens 6e11f14970 [MOV] sale: merge sale & sale_enterprise
Now that dashboard views have been removed, there is no reason
to keep a dedicated module with 2 custom fields that could be
in community.

* Move sale.report fields:
  * invoice_status field is simply moved as is
  * avg_days_to_confirm is removed, as it was only used and meaningful in the dasbhoard view
* Merge views content inside the parent view

Task-3011195

closes odoo/odoo#104920

Related: odoo/enterprise#33588
Related: odoo/upgrade#4010
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-08 15:51:16 +01:00
Ricardo Gomes Rodrigues (rigr) 6db6eb60e6 [FIX] l10n_multilang: CoA not translated if the language is installed after the CoA
Currently there is a bug where the Chart of Accounts is not translated if the language is installed after the CoA.

Steps to reproduce:
1. Create a CA company (where both French and English are used)
2. Set the CA Chart of Accounts
3. Go to the general settings
4. Add the French language and switch to it
5. Go back to the CoA
6. The CoA is not translated

This is because the variable `installed` is wrongfully placed in the code. In the current flow, we install the new language, then we check the installed language, therefore the new language is marked as an already installed language. Therfore the `to_install` variable will always be empty.
This commit fixes this by first storing the already installed languages, then installing the new one, and then compute the ones to install making sure that the newly installed one will be used afterwards to translate the Chart of Accounts.

task-id 3091315

closes odoo/odoo#107500

X-original-commit: a3c3c3ccfc8e769ce39dbf38263f92e449b44abb
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
2022-12-08 14:44:20 +01:00
Jérémy Hennecart (jeh) 348265db3d [FIX] mass_mailing: send at least one a/b test if possible
When there is not enough recipients for the A/B testing percentage,
we pick a minimum of one recipients (if there is at least one) to
avoid sending a/b test to no one.

task-2713198

closes odoo/odoo#107488

X-original-commit: e1fa7b10250efc790452f02490ab84d2183698ff
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-12-08 13:38:25 +01:00
dht-odoo 6bfe126313 [FIX] mass_mailing{_sms}: respect mailing_type when comparing a/b mailings
Before this commit
- When we were comparing versions, there was no such filter as
  mailing type. Due to this it will display both SMS and mail
  type records in it.

With this commit
- We have added '('mailing_type', '=', self.mailing_type)' in domain
  of compare version.

TaskId-2713198

X-original-commit: e8542e24597ad25b68104c03d4d4ed41e1efac82
Part-of: odoo/odoo#107488
2022-12-08 13:38:24 +01:00
dht-odoo 91a223bd52 [FIX] mass_mailing: disable A/B testing cron by default
Before this commit, the A/B testing cron was active by default.
It doesn't matter if A/B testing is true or false in settings.
So, with this commit, we set active equals to false by default
in the A/B testing cron. It will be active when the user sets
`group_mass_mailing_campaign` to True.

TaskId-2713198

X-original-commit: b348f8658f87c15d0fe4ee72888e99da2a529700
Part-of: odoo/odoo#107488
2022-12-08 13:38:24 +01:00
Nicolas Bayet 569407d1a0 [FIX] web_editor: replaceMedia on contenteeditable
In website, clicking on the snippet option action "Relpace" did
not work for an icon inside s_social_media as s_social_media is
contenteditable false.

The code was simulating a double click on the icon to open the media
dialog but in the double click handler, a check is made to prevent
the media dialog to be shown if the contenteditable is false. This
is important for the knowledge app to prevent changing a button inside
a knowledge view.

task-3086881

closes odoo/odoo#107487

X-original-commit: 3339c50fbebca8a6d419df4ab14ef03952ea6635
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-08 13:38:19 +01:00