Commit Graph
157735 Commits
Author SHA1 Message Date
Đặng Văn Lộc 40affecb62 [IMP] base: translate report header
Closes odoo/odoo#107376

closes odoo/odoo#110441

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-19 18:50:06 +01:00
payen000 4d254ba1eb [CLA] Update Vauxoo's Contributor CLA
closes odoo/odoo#110438

X-original-commit: 8825d12f9035fa6cb167ab1a7933ea96bffbe6eb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-19 18:50:03 +01:00
aliya e76d6dc88c [FIX] account_edi_ubl_cii: fix invoice import
Sometimes the invoice import fails, because `payment_terms_node.text` can be None and we're trying to concatenate it with a string.
This commit makes sure that `payment_terms_node.text` is there first.

task-3132980

closes odoo/odoo#110430

X-original-commit: 3a3c83b90ed1bdedc2bb6aca59928225e3fdb55d
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-01-19 18:49:56 +01:00
roen-odoo c00efede3b [FIX] pos_sale_margin: correctly compute margin when no cost is set
Current behavior:
If there was no cost set on a product, the margin couldn't be calculated
for the PoS sale report.

Steps to reproduce:
- Install PoS and Sales
- Create a product with no cost
- Open a session and make an order with this item
- Close the session and go to the PoS sale report
- Add the margin measure to the report, and show the stats by product
- The new product does not have any margin.

opw-3120208

closes odoo/odoo#110429

X-original-commit: 9105f803095d7ddb07bc62ec1e2f2982215e273e
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-01-19 18:49:53 +01:00
William Henrotin a26db9a3a7 [FIX] stock,mrp: kanban-menu specific to picking type
Since 5b68871097, the scrollable menu of
the picking type kanban card (`kanban-menu`) is the mrp one even for
stock picking type. The inherited view replace the template without
testing the picking type code as it was done before.

This commit adds a `t-if` for stock picking types and another for mrp
one to makes sure the two template are mutually exclusives

closes odoo/odoo#110412

X-original-commit: c7f49d1381ab1bf3dd7ed42436d0c881d7bab27d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 17:49:20 +01:00
bat-odoo 4223162905 [IMP] l10n_in_edi: remove duplicate field in settings view
In this commit, we remove the duplicate `Indian EDI Testing Environment` field
from the settings form view.

closes odoo/odoo#110411

X-original-commit: 5a6930e2ed54dc9c0ae6eb38b4b5546d27ec1816
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Bhavin Patel (bat) <bat@odoo.com>
2023-01-19 17:49:17 +01:00
Lucas Perais 8306e82a00 [FIX] web: one2many: field in list and not in form
Have a one2many that defines a list arch.
The list should not be editable, precisely, when adding a record, it should go through
a form view.

Define a standard form view in DB, not in the main arch, that doesn't have
at least one of the field that the list arch has.

Create a record in the one2many list, change a field in order to trigger an onchange.

Before this commit, there was a crash, because the onchange asked for the field present in the list
and the ones present in the form, but there was a description (the result of fields_get) only
for the fields present in the form.

After this commit, this is solved.

closes odoo/odoo#109749

closes odoo/odoo#110410

X-original-commit: c6897e1e1e5bcf3378bddeb58393baa7426b64c7
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 17:49:14 +01:00
aliya 6278eaeb32 [FIX] l10n_fr_fec: fix unaffected earnings account check
Before account types refactoring, fec wizard would check whether company has accounts for unaffected earnings and only call `_do_query_unaffected_earnings` in that case. Now it would always call it.
This commit adds a check for `equity_unaffected` accounts back

closes odoo/odoo#110408

X-original-commit: f9bdc589450514c3e240efb2297ded1f1a4c5879
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-01-19 17:49:11 +01:00
Walid HANNICHE (waha) 823abebe83 [FIX] stock: Serial number attribution
Steps to reproduce:
- create a storable product with serial_number tracking
- create an confirm a PO that porduct
- recieve the product
- add serial_numbers to the list view and enter a number
- validate the reciept
- an error pops up (You need to supply a Lot/Serial Number for product)

Bug:
entering a serial_number creates a new stock_move_line with qty_done
while also setting qty_done of the already exising line

Fix:
If a stock move line already exists to reserve the product
use the existing line instead of creating a new one

opw-3060668

closes odoo/odoo#110407

X-original-commit: f1541c62b099ab40c295c60e86094232f5c51a2c
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-19 17:49:09 +01:00
Lucas Lefèvre 22d4a260ec [FIX] spreadsheet: load data in background
When the data takes longer to load, the UI is blocked with the loading
overlay.

Now the data is loaded in the background and we can still navigate
in the spreadsheet.

Note: I moved the `.silent` upper in the call chain. Lower level structures
such as ServerData, DataSources, MetadataRepository don't need to know.

closes odoo/odoo#110387

X-original-commit: 8b09c7347ebeffa7059ed0ccc63f73e3559b7712
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-19 17:49:06 +01:00
FrancoisGe d84cfbf9a8 [FIX] web: click on "Search More..." with a search_default_...
Before this commit, in a form view, from the second opening of a
selection dialog by clicking on the "Search More..." button of a
many2one with a "search_default_..." in its context opened the selection
view without the filter corresponding to the "search_default_...".

Why:
The search model removes the "search_default_..." keys from the context
it is given.

Solution:
Clone the received context so as not to modify it.

How to reproduce:
- Go to a form view with a many2one field having in its context "search_default_..."
- Click on the m2o
- Click on "Search More..."
The search dialog opens with the filter corresponding to "search_more_..."

- Close the dialog
- Click on the m2o
- Click on "Search More..."

Before this commit:
The search dialog opens without the filter corresponding to "search_more_..."

After this commit:
The search dialog opens with the filter corresponding to "search_more_..."

closes odoo/odoo#110342

X-original-commit: 82293c5f4d0955c4688a619bf69e3f0049f10fb6
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-01-19 17:49:02 +01:00
Noe Antoine 2bcad32549 [IMP] web: reintroduce the border for last kanban example page
This is cleaner and allows a more obvious line between the page
and the contents, especially since there will be a weird spacing
below the last element of the page list. This styling (vertical
notebook) is only used for the kanban example dialog and has a
limited impact.

The border was removed in the following commit:
16ddf96e0f

task-3113972

closes odoo/odoo#109105

Related: odoo/enterprise#35438
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-19 17:48:56 +01:00
Noe Antoine 2eedf2f6a5 [IMP] utm: add avatar widget to utm campaign
Add the widget to the kanban quick create view,
and to the form view, to the user_id field.

task-3113972

Part-of: odoo/odoo#109105
2023-01-19 17:48:56 +01:00
Andro Gvivradze 9b5173fd9c [IMP] survey: show images in result page
With this commit we add images to the answers in result page.
when clicking on the image, we open a survey_image_zoomer widget.
We also add "Responsible" filter on survey.survey view

task-3092439

closes odoo/odoo#108430

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-19 17:48:50 +01:00
Adrien Widart (awt) e39af99476 [FIX] mrp_subcontracting_dropshipping,*: dropship valued product
*:purchase_stock,stock_account

To reproduce the issue:
1. In Settings, enable 'Multi-Step Routes'
2. Create a product category PC:
   - Method: FIFO
   - Valuation: Auto
3. Create two products P_compo, P_finished
   - Both:
     - Type: Storable
     - Category: PC
     - With a positive cost
   - P_finished:
     - Vendors: a new vendor V
4. Create and confirm a SO with one order line:
   - Product: P_finished
   - Route: Dropship
5. Confirm the PO and process the dropship
6. Accounting > Accounting > Miscellaneous > Journal Items

Error: There are a lot of lines and most are incorrect

When marking the dropship SM as done, we check how we should
value it:
https://github.com/odoo/odoo/blob/18450973eaf3ca048cdcd2046a8cba5f5c0f98b0/addons/stock_account/models/stock_move.py#L244-L252
Here is one issue: `_is_dropshipped` returns `True`, which is
correct because the source is the subcontractor location and the
destination a customer:
https://github.com/odoo/odoo/blob/8276a9b51b7c5fc0ae6dd557ae88a9c31f1d1962/addons/mrp_subcontracting_dropshipping/models/stock_move.py#L14-L20
However, `_is_out` will return `True` too. To get this value, we
check if the source and destination locations have to be valued:
https://github.com/odoo/odoo/blob/18450973eaf3ca048cdcd2046a8cba5f5c0f98b0/addons/stock_account/models/stock_move.py#L99-L100
Again, since the source location is the subcontractor one (which is
an internal one) and the destination location is the customer one,
we will consider that we have to value this SM. As a result, we will
apply `_create_out_svl` and `_create_dropshipped_svl` on the same SM
(this explains some incorrect AMLs are generated).

Then, there is another issue. In `_create_dropshipped_svl`, we
create an in-SVL and an out-SVL for P_finished. However, when
processing the MO, an in-SVL will also be generated for P_finished.
The issue comes from `_create_dropshipped_svl`: it creates an in-SVL
but the source location is not outside from the company, so it
should not create the incoming layer.

Finally, when creating the SVL in `_create_dropshipped_svl`, we use
the unit price of the SM to define the value of the SVL. This is an
issue: suppose the unit price of the POL is $10 and the costs of
P_compo is $1, the unit price of the SM is then $10 (and so does the
value of the SVL) but the actual value of the delivered P_finished
is $11. Howver, when calling `_action_done` on a SM, we first
process it and only then we will process the MO:
https://github.com/odoo/odoo/blob/829369d3ca0530f1aad0599fbb1598810a928cc3/addons/mrp_subcontracting/models/stock_picking.py#L33-L36
So, in `_create_dropshipped_svl`, we can't know the actual cost of
P_finished. This is the reason why we have to create a compensation
layer once the MO is processed (i.e. in the override from
`mrp_subcontracting_dropshipping`)

Similar issues will happen if we return the
dropshipped/subcontracted product.

OPW-3078499

closes odoo/odoo#110390

X-original-commit: 200aac56771fd1ef759f73b277a6808d96ee5f31
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-01-19 14:01:27 +01:00
bat-odoo 39d2723b84 [IMP] base: update vat string based on company country vat label
In this commit, we update the vat string based on the company country vat label.

TaskID - 47184

closes odoo/odoo#110373

X-original-commit: e5e29b7c40282a2e4ca2da841d9f8aebe6c17992
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Signed-off-by: Bhavin Patel (bat) <bat@odoo.com>
2023-01-19 12:31:05 +01:00
William Henrotin c1ff654875 [FIX] mrp: print “BOM structure & cost” with dynamic variants
Steps to reproduce the bug:
- Create an attribute with "Variant Creation Mode" = Dynamically
- In a product template, add the attributes and some values
- Create a new BoM for this product
- Click on "Stucture&Cost" smart button

Problem:
A traceback is raise, because the `_match_all_variant_values` function
is called but without the product, while it takes at least one:
https://github.com/odoo/odoo/blob/15.0/addons/mrp/models/mrp_bom.py# L456
https://github.com/odoo/odoo/blob/15.0/addons/mrp/models/product.py#L286

As the variant creation mode is set “dynamically”, the object must be a
`product.template` model and not `product.product` so the first
condition should be `True` and return a `false` value:
https://github.com/odoo/odoo/blob/5c16aa22c70f8a0a377a55b912307ab07222c643/addons/mrp/models/mrp_bom.py#L453-L454

Therefore, if the product has no variant, we have to use the
`product_template` and set it in the `_get_bom` function, but from this
commit:
odoo@ca3dfec

If there is no variant product, the template is no longer set:
odoo@ca3dfec#diff-e8f576a790cd7f3f0976358b9b07f63cee0c6f05b0ba6203fc7bcf91af3ad283L107

The change in this commit from line 107 to line 118 is useless because
it does not change any behavior and does not improve the code, the only
change is that the product_template is no longer set. So it makes sense
to revert this part of change

opw-3008838

closes odoo/odoo#110341

X-original-commit: 1d830b5080e4d05dc1ac6fbd4c435af532443f88
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:31:03 +01:00
niyasraphy 9a3a41202a [FIX] purchase_requisition, stock: improve usererror to show allowed stages
in purchase_requisition and stock module, when deleting a requisition and move, the raised warning says,the deletion can be done only in draft moves, where us the deletion is allowed for the cancelled records also.

improving the user error message to include the cancelled records in the message.

closes odoo/odoo#110340

X-original-commit: b71d298dabb4436182c0eb516d5a7b7e76fca437
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:30:59 +01:00
niyasraphy 81363f103b [FIX] stock: show uom only when multi uom is activated
before this commit, in the storage categories form view, the product uom is shown even if the multi uom feature is not activated in the settings.

  * from inventory settings, enable storage categories
  * inventory -> configuration -> warehouse management -> storage categories

after this commit, the uom will be shown only when multi uom is activated in storage categories view.

closes odoo/odoo#110327

X-original-commit: fa42ee1a161578028986caa2a60e0735d79b2734
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:30:56 +01:00
Katherine Zaoral 7c7ea74fcb [FIX] sale_stock: invoice reporte lot_values
Before this change, the lots info of the products that are shown in the
invoice report were always computed, no matter if they were printed or
not. It is always computing the lots information, no matter if it will
be printed or not

With this change, the lost info only is computed when is actually used
and will be printed: that is when the user has the
sale_stock.group_lot_on_invoice group.

closes odoo/odoo#110326

X-original-commit: 28778f93dd92d1e460f1d816323b57792907f7c3
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:30:53 +01:00
Arnold Moyaux fe03a58e62 [FIX] stock: be able to have infinite forecast in replenishment
Currently if you require internal transit pickings between warehouse,
it's not possible to use security days in order to plan them and
receive products on time (e.g the second warehouse need times to
manufacture them).

Also the deadline are impacted by security days, so it's hard to
do at the same time replenish on order an use the orderpoints.
(either you see them late in orderpoints or they are plan way to
early in replenish on order process)

To avoid this kind of issue this PR introduces a visibility days
global on the orderpoint. It's call `stock.visibility_days`.
It will add the number of days in the orderpoint forecast date but
it doesn't impact the documents (PO, MO) planned dates.

It could for example always show the quantity in 1 years if people
don't need the just in time feature and don't care to store for a
long period of time.

closes odoo/odoo#110303

X-original-commit: 24816bfee9825fecd60bd24a92d1496f30522b8e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-19 12:30:50 +01:00
tsm-odoo c40320eb15 [IMP] bus, *: remove bus service legacy session dependency
*: calendar, im_livechat, mail.

Before this commit, the legacy session was a dependency for the bus
service. This was problematic since one would need to import a bunch
of legacy files to fulfill this dependency in order to use it.

This commit removes this dependency. In order to pass parameters to
the `bus_service`, the `bus_parameters` service is now used.

closes odoo/odoo#110247

Related: odoo/enterprise#35974
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-01-19 12:30:44 +01:00
fdardenne 82e47bc547 [REV] web: list view: make the scrollbar above the thead in safari
The purpose of #109773 was to fix the scrollbar that appeared behind
the sticky thead in Safari.
This commit introduced a bug where elements like the dropdown,
the draggable records, creation of reacord are misaligned.

As I don't find a quick fix for the scrollbar issue on Safari, this
commit reverts #109773 .

closes odoo/odoo#110367

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 11:21:55 +01:00
f1deb8a457 [FIX] web: switch view position on small screen
Before this commit, the switch view was in the middle of the CP instead
of the right. This was due to the customizations of the form control
panel, this commit scopes these customizations to the form only.

Steps to reproduce:

* On mobile device, open "Project"
* The view switch is not correctly aligned to the right and not all the
  views are visible in the popover

closes odoo/odoo#110343

X-original-commit: baddfad44c34d36f26defda8fb8378003d4de4a3
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Co-authored-by: Adrien Dieudonne <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2023-01-19 10:15:34 +01:00
Adrien Guilliams (adgu) 38171c8aa1 [FIX] point_of_sale: Correct bad syntax in PaymentScreen.xml
This commit aims at correcting a syntax error in PaymentScreen.xml
of the point_of_sale module introducted by the "Ship Later" feature.
A closing tag "/span" was previously written "span/".

closes odoo/odoo#110320

X-original-commit: 4b5ac464cfbe10ee96ae15b91dac0b58de0cd7e0
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-19 10:15:31 +01:00
Aaron Bohy af948c6acf [FIX] board: better display graphs in dashboard
In the legacy implementation of the dashboard action, there was a
scss rule that set the height of the canvas of graph views inside
the dashboard to 300px. During the conversion to owl, this rule has
been lost. As a consequence, graphs in the dashboard look squashed.
This commit restores the scss rule to fix the issue.

Bug reported in the feedback pad after migrating odoo.com to 16.0.

closes odoo/odoo#110352

X-original-commit: 833f7394ecd88825990eb7d1b338e21bfbab55b5
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 09:13:17 +01:00
Aaron Bohy 942ef925b9 [FIX] web: list: display sort icon when grouped and sorted
In a grouped list view, click on the header of a column for a
sortable field. The record rows inside opened groups are correctly
sorted. However, before this commit, the icon indicating that the
column is sorted wasn't displayed. It worked fine if the list
wasn't grouped. This commit fixes that issue. It also adds a 1s
delay before opening the header tooltips (1s is the delay we have
for the other tooltips in the list view).

Issue reported in the feedback pad after migrating odoo.com to 16.0.

closes odoo/odoo#110351

X-original-commit: e68e13cfce8eb82248336361998b873f26096634
Signed-off-by: Georis François (fge) <fge@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 09:13:15 +01:00
Aaron Bohy 9b7fcb72d0 [FIX] mail: Schedule Activity: fix recommended activities layout
Before this commit, in the form view to schedule an activity, the
"Recommended Activities" were displayed as a column, one per line.
With this commit, recommended activities are displayed on the same
line.

To open the Schedule Activity form view, open a project task, and
click on the tab Activities in the chatter (for instance).

Bug reported on the feedback pad after migrating odoo.com to 16.0.

closes odoo/odoo#110350

X-original-commit: cc82ccb94a8b52f09e797fc0645da32bc7481126
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-19 09:13:12 +01:00
Aaron Bohy cd00f242c7 [FIX] web: list/kanban: remove count limit if total clicked
Commit [1] adds a limit on the search_count done to get the total
number of records matching the domain in a list or kanban view
(displayed in the pager).
When the limit is reached (10000), a `10000+` is displayed as
total. Clicking on it performs a search_count to get the actual
number of records.

Before this commit, from that point, the count limit was set to the
total number of records. It means that if a record was created or
modified to match the domain in the meantime, and the user clicked
on the pager to see the next page (for instance), a `+` was again
displayed next to the previously fetched search_count, which looks
like a bug.

To prevent this from happening, this commit simply removes the
count limit once the user has clicked on the total.

[1] 6acfad2651

closes odoo/odoo#110348

X-original-commit: 9aab36bcfb682865b615c8fbbc107afeee3a24f4
Related: odoo/enterprise#36001
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-01-19 09:13:09 +01:00
Julien Van Roy b5c0c48ad9 [FIX] l10n_mx: revert the account.tag names in Spanish
Since the account.tags names have been converted from Spanish to English
(see
https://github.com/odoo/odoo/commit/84be7372de41ba8bf9075f34cbd0b812eadbc2b3),
the function `get_tax_cfdi_name` is no longer able to deduce the tax
code (the 'Impuesto' field with possible values: 001, 002 or 003)
Revert the 3 important account.tags names in Spanish.

closes odoo/odoo#110322

X-original-commit: 1705f785091e8b80ea57da439befce4a041744e4
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-01-19 09:13:03 +01:00
Mathieu Duckerts-Antoine 9e3afe6d83 [REV] web: revert "[REF] web: sample server: _mockReadGroup"
This reverts commit 8d437bf.

Because of the above commit, the sample server did not correctly group
the records when a date/datetime field was used as a groupby.

We revert id and add a test.

closes odoo/odoo#110321

X-original-commit: 1a0c688aee7682919b66492636f46eff481abd29
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-01-19 08:07:53 +01:00
Laurent Smet 88c5a37178 [FIX] account: Fix missing where clause on constraint
Introduced by: https://github.com/odoo/odoo/commit/f9500ca4c898cd86681cc2e48ec2c66cf5670917

closes odoo/odoo#110140

X-original-commit: ab8e35411789e0e49d2c194867120205ba96d3c6
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-19 07:11:44 +01:00
Laurent Smet 32fd54f945 [FIX] account: Fix dashboard traceback with journal without account
Traceback when opening the accounting dashboard with a journal having no default_account_id.

default_account_id = false

...is not a valid sql where_clause

closes odoo/odoo#110098

X-original-commit: ae71a4c255e995b5d232cb837e2879454bf30a52
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-19 07:11:42 +01:00
Habib (ayh) 280a43bf20 [FIX] account: reorder section and notes bug
With PR odoo/odoo#109461, the drag and drop of lines in a section_and_note field causes a traceback. This is because the cells and headers do not align perfectly for section and note lines. To solve this, an override of sortStart method is added which takes into account the colspan.

Additionally, the word-wrap of section and notes is enabled, and tests are improved.

fixes #109934
task-3136580

closes odoo/odoo#110349

X-original-commit: 4894f6eac7aead113049be99fcb1cad3d75c3325
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-18 23:02:14 +01:00
Demesmaeker 83c52575d0 [REF] product,repair,(*_)sale(_*): unrequired pricelist
Removes the constraint of using a pricelist and makes all sales flows
rely on the currency of the sale order (or repair order)

task-2735672

closes odoo/odoo#84920

Related: odoo/enterprise#24716
Related: odoo/upgrade#3642
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-01-18 21:08:52 +01:00
Paolo Gatti 50f99e3617 [FIX] l10n_it_edi: fix buyers' codice fiscale in the template
Just like the seller's codice fiscale is always shown in the FatturaPA
XML if present on the partner, so should be the one from the buyer.

If it's not, then when a company is a part of a fiscal group sharing
the same VAT number and different Tax Codes, the SDI will reject the
XML because the VAT number won't be enough for the Tax Agency
to identify the company.

There is no damage in showing the Codice Fiscale when the VAT is also
there.

opw-3114115

closes odoo/odoo#110307

X-original-commit: db5ce853e15b5003771c4811302dbff6e3cc054b
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2023-01-18 20:04:13 +01:00
Thibault Delavallée 6876a19cb9 [FIX] mail: fix 'composition_batch' composer triggers
'res_domain' field is used but was missing in triggers.

Followup of odoo/odoo#99482

closes odoo/odoo#110293

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-18 17:38:35 +01:00
Thibault Delavallée ec6635defe [FIX] account: fix composer res_ids field usage
A missing 'res_id' is still used where it should be 'res_ids'.

Followup of odoo/odoo#99482

Part-of: odoo/odoo#110293
2023-01-18 17:38:35 +01:00
Hubert Van de Walle (huvw) 38fbdec503 [FIX] web: restore drag&drop in Firefox
Steps to reproduce
==================

- Go to a kanban view
- Drag a card by the title to another column
-> The record is opened instead of being moved

Cause of the issue
==================

The `.o_kanban_record_headings` elements have a `overflow: hidden` rule
There is a bug [0][1] in firefox from 17 years ago were the
mouse{enter,leave} events are not fired in that case.

Solution
========

The previous attempt [2] to fix the issue is not working (anymore ?)

Thanks to a comment in the issue, we know that we can call
`.preventDefault` on the mousedown event.

[0]: https://bugzilla.mozilla.org/show_bug.cgi?id=339293
[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1352061
[2]: https://github.com/odoo/odoo/pull/104128

opw-3120973
opw-3121312

closes odoo/odoo#110282

X-original-commit: 713026806fa712afd85cb2530006f0f880dfa240
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-01-18 17:38:31 +01:00
Aaron Bohy 25d1209cf0 [FIX] web: pager: race condition when paging and fetching count
Have a list or kanban view with 10k+ records (or manually change
`WEB_SEARCH_READ_COUNT_LIMIT` in the code). On a slow network,
click on the pager to go to the next page and click on `10OOO+` to
fetch the total number of records.

Before this commit, this might lead to a race condition where the
total number of records displayed in the pager is incorrect (if the
search_count returned before the web_search_read).

This commit fixes the issue at the pager level. We already disabled
it when clicking on next/previous or editing it. However, this
didn't prevent from fetching the count. Moreover, fetching the
count didn't disable the other features either. With this commit,
the pager is fully disabled when the user interacted with it, until
the view is reloaded.

closes odoo/odoo#110265

X-original-commit: 0ac84bda8de0c1a620d05469562932c0d04e8c3f
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 17:38:29 +01:00
Nicolas Bayet d51e62c6ae [FIX] web_editor: prevent nbsp convesion in html_sanitize
The fix #14569 was not complete. This fix solve the issue explained in
that PR.

The lxml cleaner transform any utf8 character `U+00A0` to a string
`&nbsp;`. This cause a comparison in the editor to be erroneous
inside `HtmlFieldWysiwygAdapterComponent.updateWidget` when comparing
a value coming from the server with the value coming from the editor.

task-3138358

closes odoo/odoo#110264

X-original-commit: 05e0f65c4120ec7e1420dacab8dc678b8a30f70a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-18 17:38:26 +01:00
Michael (mcm) 28df053a51 [FIX] web: don't add hotkey if readonly statusbar
Before this commit, the statusbar added a hotkey even if
it was readonly or non clickable.
Because of this, the user could change the status with a hotkey.

Now, if the statusbar is readonly or non clickable then
the hotkey won't be available.

closes odoo/odoo#110262

X-original-commit: 9569b4f463b6e82df3c8eafb8bd4329faac871b1
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-01-18 17:38:23 +01:00
Jorge Pinna Puissant 67c3a3ad9c [FIX] web: correctly center the no content helper in settings
Before this commit, the no content helper was not centered in the
settings view.

After this commit, the no content helper is centered in the settings

closes odoo/odoo#110261

X-original-commit: 7abf27a71d72dcece05a45345a81ce1dbece817e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-01-18 17:38:20 +01:00
aliya efed212889 [FIX] account: fix name split
Currently, if someone tries to create an account with an account name that contains a number in the first word, it overwrites the account code if it's provided.

For example:
code: 123456
name: CO2-bijdragen

Would end up as:
code: CO2-bijdragen
name:

With this commit the account code won't be overwritten.
Also, tests are added to test different account creation scenarios.

closes odoo/odoo#110217

X-original-commit: d2342d81c305753ea1dd7dbaf43ff0c11df6ec4c
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-01-18 17:38:14 +01:00
std-odoo 3140afff79 [FIX] web: fix the properties field in dark mode
Purpose
=======
Fix the properties types image that should be light and not dark
in dark mode. Fix the background color of the selection options.

Change the background image used for property types to a real image tag,
so we can apply a CSS filter on it for the dark mode (instead of
duplicating all images).

Task-3117416
See odoo/enterprise/pull/35408

closes odoo/odoo#110203

X-original-commit: 4982735c5a28b6f4a2d870eb679f9b8f2bfdb5d4
Related: odoo/enterprise#35941
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-18 17:38:09 +01:00
det c95011ce6d [IMP] account_edi_ubl_cii: l10n_fr requires delivery address if present
Update the logic so that if there is a delivery address present
we add it in EDI.

This is the behavior of ubl2 which was erased in ubl3 overwrite.

task-id: 3098587
[community](https://github.com/odoo/odoo/pull/110118)

closes odoo/odoo#110118

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-18 17:38:01 +01:00
gawa-odoo 36d7d4b956 [IMP] l10n_pl: translation and clean tax tag name
Translated in English and added .po for Polish translation.
Cleaned tax names to make them more in line with new taxonomy.
Tax tag names have been changed to avoid long sentences as names.

closes odoo/odoo#109611

Related: odoo/enterprise#35651
Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-18 17:37:44 +01:00
Aaron Bohy d0101c104a [FIX] mail,web: keep changes when changing followers/activities
Before this commit, all pending changes in a form view were lost
when the user added/removed/edited followers or created/edited
activities. In these cases, we want to reload the record, but we
also want to keep local changes. This commit restores the behavior
of previous versions.

Task 3132939

closes odoo/odoo#110246

X-original-commit: f3697e71c2d14e66509ab04bdccf3ef656cd9c8f
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 16:19:34 +01:00
Aaron Bohy 5dcd1db351 [FIX] web: list: correctly evaluate dynamic expand attribute
The `expand` attribute in list views can be dynamic (e.g.
`context.get("some_val_from_ctx", False)`). Before this commit, it
wasn't evaluated, so a dynamic value would always result as true,
as it isn't "O", "false" or "False". To instance, go to Invoices
and add a group by. This commit fixes that issue.

Task 3130159

closes odoo/odoo#110235

X-original-commit: 1072c4880fdd2835b0711869da06681dab20d33c
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-18 16:19:28 +01:00
Jorge Pinna PuissantandAaron Bohy f56a2b4129 [FIX] web: keep filter when leaving a kanban view and coming back
- Open a kanban view;
- Select a progress bar filter;
- Open a record;
- Came back to kanban using the breadcrumb.

Before this commit, the progress bar is selected, but the records aren't
filtered.

Now, the kanban is exactly the same as it was when we click on the
record, the progress bar is selected and the records filtered.

closes odoo/odoo#110224

X-original-commit: ca864d7e6d510ef6410898099364d854a15150d7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2023-01-18 16:19:25 +01:00