Commit Graph
163215 Commits
Author SHA1 Message Date
William Henrotin 859c24528e [FIX] mrp: do not recompute duration expected
Since 2515482d5a70, the duration expected of a workorder was always set
to the real duration at the validation of the workorder. This commit
ensure the duration expected is left unchanged even if the
date_planned_finished is updated.

closes odoo/odoo#108233

X-original-commit: 46e1ae4d9918de1aaf6b4a7565dba422b03fcb36
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-12-19 10:31:00 +01:00
Josse Colpaert 0a4d45a242 [IMP] l10n_it, l10n_it_edi: several improvements
- [IMP] l10n_it_edi: Tax exemption kind N7 description

New specs from October 1st 2022:
https://www.doxee.com/it/blog/fatturazione-elettronica/nuove-specifiche-tecniche-per-la-fattura-elettronica-2022-in-vigore-dal-1-ottobre/

The description of Tax Exemption kind N7 is changed to:
"IVA assolta in altro stato UE (prestazione di servizi
di telecomunicazioni, tele-radiodiffusione ed elettronici
ex art. 7-octies, comma 1 lett. a, b, art. 74-sexies DPR 633/72)"

Courtesy of Tony Mascii

- [FIX] l10n_it_edi: San Marino self-invoice from paper

San Marino is a very small country completely enclosed in Italy.
That country has special agreements with Italian as far as
e-invoicing is concerned.
When a paper invoice is received from San Marino, any Italian
company has the responsability to submit that invoice integrated
with Italian tax information to the Tax Agency, indicating in the
e-invoice filling the Document Type field with the special value 'TD28'.

- [IMP] l10n_it: Round globally by default in Italian CoA

The Italian Tax Agency (and therefore any business in Italy)
makes it mandatory to compute roundings based on a Round Globally policy.
Invoices not rounded globally are refused by Italian EDI.

- [IMP] l10n_it, l10n_it_edi, l10n_it_stock_ddt: Deferred invoice

Context:
The Italian State allows making one invoice per month
to recurrent clients buying goods several times a month.
This process is called "Deferred invoice" (Fattura differita)
in contrast to Direct invoice (Fattura immediata).

To enable this, the vendor must issue one Transport Document
per client delivery. The Document is attached to the goods themselves.
Many Transport Documents (DDTs) delivered can then be invoiced together
in a single invoice up to the 15th day of the following month.

This task allows the Italian EDI to correctly communicate
the Deferred invoices data to the Tax Authority

An export test has been added.

Official FAQ (n.21) - https://www.agenziaentrate.gov.it/portale/documents/20143/287582/15+Tutte+le+faq+%28aggiornate+al+11+maggio+2021%29+.pdf/2db944b9-22c3-fa80-7c14-dfa0bcbbd65e
Reference task link: https://www.odoo.com/web#model=project.task&id=1914640

closes odoo/odoo#108230

X-original-commit: 87dd99e8abd8281fd81164d1f007ceaff3123834
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-12-19 10:30:57 +01:00
Hugo Carlier (Huca) 9bd19eec50 [FIX] project: deal with corner case in domain_remove_leaf
The method domain_remove_leaf is used to remove leaves from a domain
corresponding to given fields. The particular case ['|', leaf_to_remove,
leaf_to_remove] is replaced by [true_leaf] however the check of the
second element of this subdomain was incorrectly done. This fix
addresses this issue.

Fixes https://github.com/odoo/odoo/pull/93225

closes odoo/odoo#108188

X-original-commit: 44578077b16b540a0270ea7257f902a2e917f79c
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-19 09:28:21 +01:00
Xavier BOL (xbo) d339af5cfe [FIX] sale_{project,timesheet}: translate service policy selection
Before this commit, the values of selection `service_policy` field are
given with a function and so the choices are dynamically given according
to the modules installed and the project settings. The problem is the
string for those values are not translated because the ORM cannot do
it automatically since the values are dynamically given and so
those string should be translated with `_` function.

This commit translates the string of those values with `_` function to
be sure the strings are translated in the language of the current user.

closes odoo/odoo#108154

X-original-commit: 90cf43789d849df3908f4636228cb643a005427f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-19 09:28:19 +01:00
Mahamadasif Ansari 51ac493044 [IMP] note: add default random color in tag
Currently, when we creating a tag, it does not appear in the Kanban
view because the tag does not have a default color. 

This commit solve above problem by adding default random color in tag.

task-3089296

closes odoo/odoo#107800

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-19 09:28:13 +01:00
Benoit SociasandYounn Olivier ae0253da40 [FIX] web_editor, website: fix form custom fields starting with numbers
Before this commit, following this flow:
- Add a form
- Add a selection field
- Add an option starting with a number
- Save
=> The created form's option value is only the number

From the website_form options, the options HTMLElement of a form field
are generated using the field's records ids for their html element value
attribute (see FormEditor._renderField).

When [1] refactored the website_form options to use a generic
ListUserValueWidget, the list records id computation changed to use
parseInt instead of strings.

This commit changes the detection of parsable int to match only strings
that are made only of digits, and less than 16 of them so that their
value is not lost.

[1]: https://github.com/odoo/odoo/commit/9304f8fa7bb94f21dd4caa83f9679ffd1642691b

opw-2980760

closes odoo/odoo#108248

X-original-commit: 166f4aa4d23a01901585b60d69fac47fe70b7ebe
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
2022-12-19 08:20:02 +01:00
Abdelouahab (abla) e8d4c06300 [FIX] web: add ar-sy to arab numbering system
To Reproduce
============
- change language to Arabic Syria
- go to any form that has a Date field and try to change the date
the Date won't change

Problem
=======
the default numbering system of Arabic Syria is not defined so we take the default one
which is `latn`, when parsing dates using this numbering system we got a parsing error
because `latn` is not compatible with Arabic Date.

Solution
========
Numbers in Arabic Syria have the same format as the numbers in Arabic (Default one),
so we add Arabic Syria to the pattern.

opw-3081285

closes odoo/odoo#108247

X-original-commit: 8c50eb447da41a3ae0186d99972dd7e56d12cd23
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-12-19 00:15:54 +01:00
qsm-odoo 9776ff0bd2 [FIX] web_editor: review two pairs of shape junctions
As the previous commit explained, there is sometimes a gap between two
shapes due to some browser rounding errors, especially when using
browser zoom. However, there are also some things we can do in our
shapes themselves to decrease this problem.

This commit fixes two pairs of shapes which were easily fixed by
reviewing the rounding of one path and making the viewBox a square
(making a viewBox a square is known to solve issues). However:
- The first pair is not entirely fixed, the error is just reduced.
- The second pair is fixed... but the shapes actually do not join very
  well (somehow the linear gradients do not seem to join properly)...
  but still better than a white line between the two.

Reminder: several commits had attempted to fix this before ([1], [2],
[3], [4]) (and this commit's parent). But that wasn't enough to stop it
happening. Some shapes still need to be fixed although that will likely
be done in future versions.

[1]: https://github.com/odoo/odoo/commit/c0f62593a4da37e8404dddc0a5762879a5ebbf7f
[2]: https://github.com/odoo/odoo/commit/ac82407b259eab929486bf0a333a48bc507efa60
[3]: https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
[4]: https://github.com/odoo/odoo/commit/e386f318f5cff50901dba3db8a2587911ba02a6e

task-2824607
opw-3069213
opw-3057533

closes odoo/odoo#108228

X-original-commit: 52e5afaa10ca7f2b3183bf6359b42929a9b3704a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-18 23:16:58 +01:00
Benjamin Vray e13743ff2e [FIX] web_editor, website: mitigate line between shapes issues
This commit mitigates an issue with shape elements sometimes having tiny
spacing on their top or bottom edge.

This issue is mainly on Chrome when the user has changed the page zoom.
When the page is zoomed the elements can have a width value with a
decimal part. Because of it, the size of the SVG background images are
not correctly rounded compared to their container and therefore leaves a
visible space.

Steps to reproduce the bug:

- On Chrome, add several shapes on a website page.
- Change the zoom of the page and change the window width.
- At some points, the gap will appear.

The least bad solution we found to fix this is to ensure that the width
of the shape elements is always as close to an integer as possible.

Reminder: several commits had attempted to fix this before ([1], [2],
[3], [4]). But that wasn't enough to stop it happening. Some shapes
still need to be fixed although that will likely be done in future
versions.

[1]: https://github.com/odoo/odoo/commit/c0f62593a4da37e8404dddc0a5762879a5ebbf7f
[2]: https://github.com/odoo/odoo/commit/ac82407b259eab929486bf0a333a48bc507efa60
[3]: https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
[4]: https://github.com/odoo/odoo/commit/e386f318f5cff50901dba3db8a2587911ba02a6e

task-2824607
opw-3069213
opw-3057533

X-original-commit: 623db525e18931a4dd5794da78be840afc34991a
Part-of: odoo/odoo#108228
2022-12-18 23:16:57 +01:00
Romain Derie 8850e98233 [FIX] website: prevent upsert crash if GEOIP country not found in odoo
It was reported the following error:
```
psycopg2.errors.DatatypeMismatch: column "country_id" is of type integer
                                  but expression is of type boolean
LINE 9:                 false, 1, NULL, 4, 4,
```

The root cause is unknown, it's not yet sure how this is happening
exactly.
This commit is then fixing naively the consequence.

Somehow, GEOIP is returning a country code which does not exists in Odoo
for this error to appear. It's normally not possible.

There is multiple possible cases that would lead to this error:
- The user modified the `code` field of a country in his DB (unlikely)
- The user deleted a country in his DB (unlikely)
- The GEOIP database is returning a country which does not exists in
  Odoo. This is the most probably case, even if the latest up to date
  `GeoLite 2 City` seems to have the exact same country code list as in
  Odoo 16.0 (250 exact same ones).

Moving the country_id search directly in the query will prevent the
issue and is better anyway to avoid an useless query everytime when
GEOIP is enabled.
Perf wise, it doesn't seems to alter at all the query speed.

closes odoo/odoo#108232

X-original-commit: 42fe2540620b7529d9a848c4570290cbf64a4f48
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-18 22:27:46 +01:00
Solan Delvenne (sode) 2f384e0172 [FIX] snailmail: Fix a CSS selector
One of the selector didn't work due to a space before the classes and
prevented the fix from working. This fixes it in my tests.

closes odoo/odoo#108244

X-original-commit: 334c79409a02beedb317d132f76005521e407bc7
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
2022-12-17 17:09:10 +01:00
Benjamin Vray c54826be4b [FIX] web_editor: fix resizing columns out of parent
Before this commit, it was possible to resize a column so that it
overflows the right border of the row.

Steps to reproduce the bug:
  1. In website edit mode, drop a `media list` snippet in the page.
  2. Select a column.
  3. Resize the column by dragging its left side to the right to make it
  smaller.
  4. Drag its right side to make it bigger and go until the edge of the
  editor => The column overflows and ends outside of the content zone.

This commit prevents the column from overflowing when it has an offset.

task-2837361

closes odoo/odoo#108218

X-original-commit: 1759079cbb084acac0616abfab84b83b1e62ae61
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2022-12-16 20:38:26 +01:00
Xavier-Do f842ae07d2 [IMP] tests: make python version accessible without importing sys
closes odoo/odoo#108202

X-original-commit: 27575ed59476238c76d40143d81f6975f1934f7c
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-12-16 19:37:53 +01:00
Xavier-Do e583a1f8f4 [FIX] tests: better test traceback
The motivation of this commit is to get a correct pathname on an
ir_logging when a test fail .

The main issue comes from subtest since an exception inside a subtest
will have only a partial traceback, not containing the line triggering
the error in the test method.

This can also affect debugging since a part of the stack is missing.

See pull request for more informations

X-original-commit: 2b6a8bc79529578ecd21bbb0fd4fe452f28d7cd7
Part-of: odoo/odoo#108202
2022-12-16 19:37:52 +01:00
Touati Djamel (otd) 5c69db2220 [FIX] mrp_subcontracting: convert supplier price into company currency
Steps to reproduce the bug:
- Enable “subcontracting” in the mrp settings
- Create a storable product “P1”:
    - Add a vendor:
        - supplier: “Azure interior”
        - currency: euro
        - price: 20
     - Add a BoM:
        - Type: subcontracting
        - add any product as component
        - Save

- Check that the currency of the company is in dollars
- Click on BoM overview

Problem:
The seller's price is displayed with the dollar symbol, but it is not
converted into dollars

opw-3085392

closes odoo/odoo#108187

X-original-commit: 05a8abde43ef6870d9494e34810632b9b2091e63
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-12-16 19:37:49 +01:00
Antoine Guenet f45db48f6b [FIX] web_editor: ensure correct root for wysiwyg in iframe
Since the migration to Owl, the root of wysiwyg has been wrongly set.
First, in renderElement, wysiwyg creates an editable element, which it
sets as its $root and $el elements. Then in startEdition, wysiwyg_iframe
creates a new editable element that it puts in an iframe appended to the
$el element. It then failed to change the $root element to that new
editable instead. Since we have a new editable element, the old one
should also not be contenteditable=true.

Because the $root element was wrong (and outside the iframe), all
listeners on it failed, with the effect that at least the link tools and
link popover were broken.

closes odoo/odoo#108186

X-original-commit: 86a8b31879b153bb53249fabfab47d254159effa
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-16 19:37:47 +01:00
FrancoisGe 1f0e840238 [IMP] *: converting custom list views adding a doAction button
In this commit, we will convert all the customisations of the list view
consist in adding an always present button in the control panel that
performs an action/calls a model's method.

To do this, we will use the new display="always" parameter applicable
to buttons in the header of list views. This allows us to define a
button that is always visible in a list view.

closes odoo/odoo#106519

Taskid: 3082303
Related: odoo/enterprise#34387
Related: odoo/documentation#3044
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-16 18:39:56 +01:00
FrancoisGe ce30c50e8d [IMP] web: add buttons in control panel without selection in list
This commit adds the possibility to define buttons that are always
present in the arch of a list view.

Purpose:
Several customisations of the list view consist in adding an always
present button in the control panel that performs an action/calls a
model's method.
We want to support this feature directly in the framework to remove
these customisations.

Solution:
Add a "display" option that lets you know when to display a button.
The different values that can be assigned to "display":
- "selection": the button is only displayed if at least one record is selected.
- "always": the button is always displayed.
The default value of "display" is "selection".

Exemple:
<tree>
    <header>
        <button name="to_do" type="object" string="Do" display="always"/>
    </header>
</tree>

Taskid: 3082303
Part-of: odoo/odoo#106519
2022-12-16 18:39:56 +01:00
Prakash Prajapati 875be3bc0c [FIX] hr: fix the detailed reason width in Employee Termination wizard
Currently, the detailed reason appears too large (200%). In this commit I update the width
to 100% instead of 200%.

closes odoo/odoo#108178

X-original-commit: 1c8411ecb7ee6aa67ea8facd43fa579ead4ac5a5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-16 17:20:06 +01:00
Ricardo Gomes Rodrigues (rigr) 987ffe4f69 [FIX] account: aml's partner_id modified after the move has been posted when using the hash
Steps to reproduce:
1. Activate the hash mode on a journal
2. Create an account move
3. Choose a customer who is not a commercial partner (e.g. Brandon Freeman from Azure Interior)
4. Post the move
5. Error saying that we cannot modify the `partner_id` because the move has already been posted

This is because currently we first post the move and then we modify the `partner_id` of the lines whose `partner_id` is different from the account's `commercial_partner_id`. We can easily fix this by posting the move after the lines'`partner_id` have been modified.

closes odoo/odoo#108177

X-original-commit: 1036134a2f0d921fd6a659b4951e5fa63975b78d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
2022-12-16 17:20:03 +01:00
Victor Piryns (pivi) 9ed8db4f6e [FIX] project: account invoices/bills in project update dashboard
Current behaviour:
In the project update dashboard, invoices and bills that are created
directly (without sales order or purchase order) are not taken into account
in the calculations for profits/costs.

Expected behaviour:
They should be taken into account, as long as the line on them has the
analytic account line on it.

Steps to reproduce:
- Install Project, Sales, Purchase, Accounting
- Activate "Analytic Accounting" in Settings
- Create a new Project and create a new analytic account for the project
- Create a Bill with a product (storable/consumable) and the analytic account
on the line
- Post the bill
- Go to your project update dashboard and notice the cost of the bill
is not taken into account, but we do have a smart button that goes to the bills

Reason for the problem:
Profits/Costs calculations are done based on the sales/purchase orders,
missing the "orphaned" invoices and bills. A side effect of this problem,
storable products on sales are also not taken into account, since Sales Orders
don't have an analytic account per line before version 16, unless that product
is a service (all services intrinsically have an analytic account)

Fix:
Get all invoices/bills that have lines with the project's analytic account,
and removing from those the lines that were already accounted for.

Affected versions:
- saas-15.3
- 16.0
- master

opw-3058198

closes odoo/odoo#108176

X-original-commit: 3d3f4109a06445b6ce9606770085c763ea206b35
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2022-12-16 17:20:00 +01:00
aath-odoo 1aad11b0bf [FIX] web_editor: command prompt not displaying on focus
Before this commit:

command prompt is not displayed when html field has placeholder.

After this commit:

placeholder is replaced with command prompt when focused.

Task-2881079

closes odoo/odoo#108175

X-original-commit: 16cb4af921fec5483e366ea0a1b402631a7e28f3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-16 17:19:58 +01:00
xO-Tx 641eb6daf6 [I18N] website_sale_comparison: add source terms for view placeholder
The goal of this commit is to add some missing translation source terms
for "Attribute Categories" view placeholder (added in [1]).

[1]: https://github.com/odoo/odoo/commit/82e9afeff8bb4bd64c5f0fb95af4f4b7a66e722d

task-2973149

closes odoo/odoo#108174

X-original-commit: fae1d2c3d0014c310d2fbda033028a9f7fbac1ae
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-16 17:19:55 +01:00
william-andre 1aa35de41a [FIX] account: required default account on journal
The default account was marked as required in the view (bold underline)
but the validation didn't happen. This made it possible to set up
journals without that required field.
Since owl, only the last `required` attribute is remembered, so we need
to define it at least correctly on the last field declaration.

Related:
48ef812a63
bd6b98a65f

opw-3061073

closes odoo/odoo#108173

X-original-commit: 7628888d61843ed9e9b76039884572e923ba382f
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-12-16 16:17:51 +01:00
Alexandre Kühn 9e2b2aad7c [FIX] website_livechat:tests: fix chatbot flow step "Hello! I'm a bot"
Before this commit, website_livechat_chatbot_flow_tour failed
frequently and non-deterministically at 1st step "Hello! I'm a bot".

This happens because the tour starts on url `/`, then reload the url
`/`. The livechat button is configured in `auto_popup` mode, which
could let chatbot starts running before the 2nd url that must precede
the steps.

The 2nd url reload is actually useless, and removing it also fixes
the issue.

closes odoo/odoo#108160

X-original-commit: 402b6e98009017e04245d92cabcc35184014b280
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-12-16 16:17:49 +01:00
Louis (loco) 378fe2c350 [FIX] website: enable the use of the save option only on snippets
Steps to reproduce the bug:
- Add a "Table of Content" on the website.
- Try to save a "Block" of the table.
- 14.0: you get an error message.
- 15.0: it keeps loading forever.
- 16.0: you get a white page.

Users should not have the possibility to save part of a snippet. The
goal of this commit is to ensure that the save option applies on a
snippet. If it is the case, the user has the possibility to save it. If
not, the user does not have the opportunity to save it.

opw-3056913

closes odoo/odoo#108002

X-original-commit: 5f28c7d9a04c46d570b13766eaaa90e755008623
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-16 16:17:46 +01:00
Victor Feyens 13ccd9cee4 [IMP] test_lint: detect useless manifest content
Keep the manifests as light as possible, to easily see custom behavior/content.
Complete the work of previous commits cleaning the manifests content:

* 42bad1a6d2
* ef7005f524

and make sure this kind of cleanup commit is not necessary in the future
because it is now automatically verified by a dedicated test.

closes odoo/odoo#107735

Related: odoo/enterprise#34903
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-16 16:17:41 +01:00
Abdelouahab (abla) 608aa8ca88 [FIX] payment_stripe: use idempotency key only when offline
To Reproduce
============
- on a db with sales, website and Stripe payment aquirer activated
- on the portal of a user add two payment methods, an expired card
and a valid one
- create a SO and generate its payment link
- try to pay with the invalid card first -> and error (card was declined)
- try to pay with the valid card -> error (same idempotency key)

Problem
=======
the generation of the idempotency key is based only on dbuuid, transaction's
reference and the scope. So in this use case it will generate the same key.

Solution
========
The idempotency key prevents issues where the customer is charged twice for
the same thing. In this case, we don't want to prevent anything since the
customer is on the page. It's suggested to use idempotency keys only for offline
payment when the customer is not in front of the payment page (e.g. when the cron
charges the customer for his subscription)

opw-3091354

closes odoo/odoo#108163

X-original-commit: 089387087010ae917494d5072f00d72c572b7d09
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-12-16 14:49:58 +01:00
Sébastien Geelen (sge) 13f31d046c [FIX] web_editor: prevent html in odoo field
Prevent the editor to inserting html during pasting or dropping
in editable zone that will not support the html content received.

task-2990147

closes odoo/odoo#108162

X-original-commit: 107ebb1db00a4f5a0fc6f64b76f00b040310e432
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-16 13:48:39 +01:00
Pierre-Yves Dufays e1082af5be [FIX] note: support link in note created from the systray
The URLs in notes created from the systray were not transformed into links.
This solves the problem.

Task-3052952

closes odoo/odoo#108147

X-original-commit: 00fbfab9b7dedc2b5917e7807d8abd2995253919
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-16 13:48:34 +01:00
Walid HANNICHE (waha) 8704ebf5f9 [FIX] auth_signup: fix password reset
Steps to reproduce:
- generate password reset link
- access the link
- the page redirects to login

Bug:
password reset and new account creation share the same path
this commit [1] made it so when you click on the new account link after
it was activated you are redirected to login

Fix:
the distinction between both scenarios is made using the presence of
'signup_email' in the query.
only add signup_email when creating a new account

opw-3068790
[1]:https://github.com/odoo/odoo/commit/97658791306349456761ba4c18d504f861e3bb98

closes odoo/odoo#108093

X-original-commit: 3ba02fbeb54afc0ebd5ab434cdf921159646e9d0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-12-16 13:48:28 +01:00
niyasraphy 4c43882f30 [FIX] base: prevent uninstalling of web module
closes odoo/odoo#108088

X-original-commit: 688acadeec159d713f75384d35d22e6c88f4b00a
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-16 13:48:25 +01:00
Kartik Chavda 7e23c6866e [FIX] account: fix account domain leaf issue
Issue:
- clicking on various account field gives traceback because
of invalid domain.

Cause:
- https://github.com/odoo/odoo/pull/105131 PR remove a leaf
from account domain but forgot to remove '&' operator.

Fix:
- removes '&' operator from account domain.

task-3099758

closes odoo/odoo#107914

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-12-16 13:48:23 +01:00
Ivan Yelizariev 4c396b1db2 [FIX] website_sale: show empty cart icon before starting animation
On clicking "add to cart" button, there is a simple animation of product image
moving to the cart icon. However, if the cart icon is hidden because of disabled
option "Show Empty Cart", the animation is broken: the image is moving to left
corner of the navbar.

Fix it by showing cart icon before starting the animation.

opw-3078396

closes odoo/odoo#107760

X-original-commit: 6110b993ce63356e1b5b900f7bacb2afa648f6ad
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-12-16 13:48:20 +01:00
Valentin Chevalier 76425a588d [IMP] sale: add the possibility to mass cancel SOs
For a lot of clients, the number of quotations is big, and canceling
them one by one is time-consuming.

task-2991744

closes odoo/odoo#104531

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-16 13:48:17 +01:00
fkramer 0810921fed [CLA] Updating CLA initos.md
closes odoo/odoo#108100

X-original-commit: 6957808a4440bd78b7276a08c30abc8facad7530
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-12-16 12:45:42 +01:00
niyasraphy 1b767908dd [FIX] l10n_ph: moves_to_export field alignment
install l10n_ph module and open any vendor bill, click on action button and click Download BIR 2307 XLS, in the opening wizard, the one2many field moves_to_export is not aligned well in the form due to missing colspan and currently the field is too compact in the form.

closes odoo/odoo#108094

X-original-commit: 53ffdccc0310c32980297d5dcc3f6a24fa852a8c
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-12-16 12:45:40 +01:00
Patrick Hoste 0e92916a45 [IMP] event: add avatar widget to responsible
This commit adds the avatar widget to the responsible
field in the event form view.

Task-3100951

closes odoo/odoo#107927

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-16 10:28:44 +01:00
Morgane (morm) a25a3847b6 [FIX] mrp: kanban card settings fix
Prior to this commit, the layout of the settings in the kanban card was
broken

closes odoo/odoo#107895

X-original-commit: 922029c2197145d555b65becd7210c4d7a13d439
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-12-16 10:28:42 +01:00
Benjamin Vray 648def9058 [FIX] portal: fix user dropdown in boxed header template
Since this commit [1], the "avatar" image of the logged user is no
longer displayed on the "boxed" header template.

This is due to the "t-nocache" attribute which was forgotten for the
"_avatar" parameter in the "user_dropdown" template.

[1]: https://github.com/odoo/odoo/commit/b0a2a41d78292cb8b9e53788d40c6dc5915a466d

task-3063878

closes odoo/odoo#107861

X-original-commit: 484f0acade527e38e9569fc066b4647a8d70e397
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2022-12-16 10:28:39 +01:00
Kevin Baptiste 52728a2f90 [FIX] hr_recruitment: show properly message field in Send Email
The field was not taking the full size it was allowed to, hence it was
not possible to write the content.

task-3087717

closes odoo/odoo#108102

X-original-commit: eefdd43b24cc4edc0ea9167f1f017c3297c83d21
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-16 08:45:47 +01:00
abd-msyukyu-odoo 11916032c7 [FIX] web_editor: html_field should use newProps as newRecordInfo
Sometimes, there is a crash when uploading a file when loading an article for
the first time.

Impacted versions:
16.0+

How to reproduce:
- open the odoo home page (module menu) and CTRL+f5 (force reload)

- go to the knowledge app

- switch to another article than the first loaded one

- in that article, put the cursor somewhere and type ENTER to create a new line

- type the /file command in that line

- try to upload a file

- traceback (if it does not happen, try again from the first step, it is not
  always consistent)

Explanation:
html_field onWillUpdateProps was using the wrong "new" values to update the
currentEditingValue, which sometimes induced a rerendering of the html_field
during a 'blur' event when it should not have (because it seemed that the value
had changed when it did not), which could cause a crash when it occured after
the editor saved nodes with `preserveCursor` to recover the cursor position.
(i.e. when opening the mediaDialog to upload/select a file for insertion in the
editor).

Task-3086694

closes odoo/odoo#108125

X-original-commit: fc9ac0bec8377a2804892cdfe07629c44283c679
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Abeloos Damien (abd) <abd@odoo.com>
2022-12-15 22:57:27 +01:00
qdp-odoo 997a6d3e27 [FW][FIX] account: sequence mismatch handling
Removed annoying error raised onchange of the date/name if they don't match anymore. This was done during the update, which was dumb since it was popping in case you wanted to change both the date and the name. It now only relies on the constraint that is verified upon posting the invoice. Onchange warning is kept only for the format change.

Ensure the date constraint is always verified no matter if the invoice was already posted before, or if we're in quick edit mode: the date's info located in the name must always match the accounting date. This is ensured when posted.

task-2976499

closes odoo/odoo#108116

Forward-port-of: odoo/odoo#107867
Signed-off-by: William André (wan) <wan@odoo.com>
2022-12-15 21:18:59 +01:00
Walid HANNICHE (waha) e99772d834 [FIX] web_editor: editor overwrites hotkeys
Steps to reproduce:
- edit some text on the website
- select a part of the text then press (alt+s)

Bug:
the selected text is deleted before the save

Fix:
if "alt" key is pressed don't execute the editor listener
(except for Mac OS)

opw-2996264

closes odoo/odoo#108103

X-original-commit: 1cd0b4396699513c80bafc2f052d373f9ef9f55e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-12-15 21:18:54 +01:00
Paolo Gatti 9000c01f82 [FIX] account: Currency field if no accounting is set on the user
The currency field shows as a badly aligned "in USD".
This PR adds a proper handling of the combinations
of accounting and multi_currency groups.

Original PR in v15: https://github.com/odoo/odoo/pull/104013

closes odoo/odoo#108101

X-original-commit: d2363794411bbc9147b8ff0d519d588a3814e582
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-12-15 21:18:51 +01:00
Jorge Pinna Puissant 016864ce6b [FIX] base: standardize modifiers received by the JS Framework
Before this commit, the JS Framework receives different types of modifiers:

- List: used for domains.
- String: used for the dynamic domains and boolean values ('1' or '0');
- Integer: used for boolean values (1 or 0);
- Boolean: used for boolean values (True or False);

The issue with this, is that the JS Framework needed to manage the 3
different possibles ways to have a boolean modifier (1, '1', True).

Now, only three types are sent to the JS Framework:

- List: used for domains.
- String: used for the dynamic domains and boolean values ('1' or '0');
- Boolean: used for boolean values (True or False).

The boolean usually sent in a Number (1 or 0) will be transformed into
proper Boolean types (True or False).\

Note that, the 'falsy' modifiers are not sent to the JS Framework.

closes odoo/odoo#108095

X-original-commit: faddb53f30b94ac47ffd7b3b1af36f094f3a60f6
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-12-15 21:18:49 +01:00
FrancoisGe 8e3de77042 [IMP] tools: adds the dependencies in the odoo.define
After this commit, the transpiler will add the dependencies of a file
to the second argument of the odoo.define(...).

For example:
odoo.define("@test/test", ['@test/dep1', '@test/dep2'], async function (require)

With this change, the code for the module system in the browser will get
directly the dependencies instead of having to stringify the function
defining a module, and grep inside for the "require" words.

closes odoo/odoo#105651

Taskid: 3062390
Related: odoo/enterprise#34895
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-12-15 16:47:05 +01:00
Julien Van Roy e34712d7b5 [FIX] l10n_au: fix traceback when printing a pdf
When installing l10n_au, printing a PDF from any invoice will raise a UserError
(this one: https://github.com/odoo/odoo/blob/16.0/odoo/addons/base/models/ir_actions_report.py#L699).

Indeed, the content of the PDF is empty. Because no qweb report is called since on line
https://github.com/odoo/odoo/blob/16.0/addons/account/views/report_invoice.xml#L335, the t-if is falsy.
Indeed, the `o._get_name_invoice_report()` returns `l10n_au.report_invoice_document` since the l10n_au
was made primary in https://github.com/odoo/odoo/commit/5079ace74958d4acd54d24a95579289a2eda92f1.

To solve that, we need to inherit the `report_invoice_with_payments` template in l10n_au, change the name
in the `t-if` and call the `l10n_au` report.

closes odoo/odoo#108081

X-original-commit: ab221bccc8cc7484efb56d3b1f620031b120f193
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-12-15 15:45:21 +01:00
Bruno Boi ff619c4761 [FIX] web: repair keynav in dropdowns
- Before this commit
Keyboard navigation in dropdowns lead to a traceback

- Explanation
The traceback happens in the bootstrap library.
When upgrading to bootstrap v5.1.3 (see c48f57e), a fix done in the
previous bootstrap version was lost (see 78f85f2).
This previous fix also added a test but it was not enough to
detect the issue when the bootstrap lib was upgraded.

- After this commit
This commit reintroduce the same previous fix and adapts the test,
hoping it would be enough for future changes to not break further
the expected behavior.

closes odoo/odoo#108080

X-original-commit: daca8fe4e3da4a5ad5fabf3730496a3919af8abc
Signed-off-by: Georis François (fge) <fge@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-12-15 15:45:18 +01:00
Rodopho Cammarosano de Lima (rcdl) 701c29ed35 [FIX] web_editor: allow text node at editable root
An option to disable the automatic wrapping of inline nodes into p at
editable root is needed by Studio's report editor.

task #2995601

closes odoo/odoo#108068

X-original-commit: 9cae999d413a71f3591fcbbadeefea1509778c76
Related: odoo/enterprise#35013
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-15 15:45:13 +01:00