Skip to content

[pull] master from odoo:master #1186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1,998 commits into
base: master
Choose a base branch
from
Open

[pull] master from odoo:master #1186

wants to merge 1,998 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 31, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added 👽 merge-conflict Resolve conflicts manually labels Mar 31, 2025
tsm-odoo and others added 28 commits May 12, 2025 17:32
This commit optimizes the channel report query by replacing inefficient
CTEs with lateral joins. The previous CTE implementation lacked initial
filtering, processing all rows. This change introduces lateral joins,
enabling efficient filtering: first for live chat channels and, for
the default report, focusing on the significantly smaller dataset of
last month's live chats. This significantly improves efficiency.

Testing on a large dataset (1.6M+ channels, 600K+ live chats, ~20M messages)
shows a significant speedup, from approximately 30 seconds down to around
2 seconds after refactoring.

closes #209385

X-original-commit: 054d82e
Related: odoo/enterprise#85227
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
The aim of this commit is adding a new props for the chatter
component.
By adding this props, the parent view will be reloaded when an
activity is added, modified or deleted in the chatter.
This change is necessary for the bank reconciliation widget where
we want to update a specific record when a user adds a new
activity in the chatter.

no task id

closes #209373

X-original-commit: ac3e909
Related: odoo/enterprise#85221
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
These modules are specialized and are not necessary when just importing
basic tools.

Part-of: #207479
Related: odoo/enterprise#84134
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Barcode parsing is used only in a few modules. We do not need to load
them at every startup.

Part-of: #207479
Related: odoo/enterprise#84134
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
The loaded `PIL` module is quite big and we can just skip it when
importing basic tooling.

closes #207479

Related: odoo/enterprise#84134
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
This commit introduces support for paynow as a payment method in the Razorpay.

task-4364947

closes #197434

Related: odoo/upgrade#7207
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
After [this commit][1], a warning message was added when trying to
submit a survey. However, its content was not translated because the
`survey` module didn't load its translations on the frontend.

This fix makes the translations available in the frontend.

Another bug we encountered is that the regex to determine a survey
frontend URL (added in [this commit][2]) did not take into account all
possible language codes in Odoo. Therefore, some languages resulted in a
404 page when trying to use them.

This fix adapts the regex to support all language codes in Odoo.

[1]: d8ba701
[2]: 4b4bf6a

opw-4747797

closes #209439

X-original-commit: 08f9acd
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
…d company

Currently, when we are accessing the `parent_ids` of an archived company
with code `company.sudo().parent_ids`, it will return an empty record, and an
error will be generated when code tries to access `max()` from that empty
record at code line [1].

```bash
  >>> company = self.env['res.company'].browse(2)
  >>> company
  res.company(2,)
  >>> company.active
  False
  >>> company.sudo().parent_ids
  res.company()
  >>> max(c.hard_lock_date or date.min for c in company.sudo().parent_ids)
  Traceback (most recent call last):
    File "/usr/lib/python3.12/code.py", line 90, in runcode
      exec(code, self.locals)
    File "<console>", line 1, in <module>
  ValueError: max() iterable argument is empty
  >>> max(c.hard_lock_date or date.min for c in
  company.sudo().with_context(active_test=False).parent_ids)
  datetime.date(1, 1, 1)
  >>>
  >>>
```
This commit fixes the above issue by setting `active_test=False`, which
allows access to `archived (inactive)` parent companies, ensuring that
`company.sudo().parent_ids` includes them and avoids passing an empty
sequence to max()

[1] - https://github.com/odoo/odoo/blob/ac3924508016178427c7962fa3b8e645e7e03835/addons/account/models/company.py#L393

sentry-6581609140

closes #209411

X-original-commit: e550f0a
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: ANSARI MAHAMADASIF (maan) <maan@odoo.com>
…anifest

Any modules (most notably Knowledge) can register new html_editor versions. To
ensure the version consistency no matter if the Knowledge module is installed or
not, every version should be registered in the `html_editor` manifest, even if
they do not apply any change in the `html_editor` itself.

task-4718129

closes #209239

X-original-commit: 574c4f7
Related: odoo/enterprise#85112
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
Prior to this commit, if an inline embedded component block was put as a direct
child of the editable, it was removed during `initElementForEdition`, because
`isVisible` returned false. However at that point, the
`embedded_component_plugin` did not yet have the opportunity to fill that
embedded component.

Therefore, as a prevention measure, all elements with `data-embedded` attribute
will always be considered `visible`, as their removal should be at the
discretion of the `embedded_component_plugin`.

If they happen to have an `inline` style and they are direct children of the
editable, they should be wrapped in a baseContainer `div` or `p`, but never
removed.

Issues of the type were observed when loading a Knowledge template containing a
`div` with `data-embedded="file"` since embedded files have since been
refactored to use an `inline-block` display style which made them eligible to be
removed by `initElementForEdition` prior to the changes introduced in this
commit.

task-4745902

X-original-commit: 434b7b1
Part-of: #209372
Related: odoo/enterprise#85220
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
Issue:

Some embedded files (i.e. for article demo data) were not accessible anymore, as
they were only defined by a non-standard URL. This commit allow embedded url
files without a specified `id` to use their url property as their `urlRoute` for
preview/download.

Technical explanation:

The `FileModel` `urlRoute` property is used to download and preview a file in
the `FileViewer`. It only returns files from either `/web/image/{id}` or
`/web/content/{id}`.

To allow demo files for demo articles, and to support old files that were
converted from an earlier implementation in Knowledge, the `StateFileModel` used
for embedded file should still be allowed to use the `url` property as its
`urlRoute`, as it was done prior to [this commit].

[this commit]: 5515764

task-4745902

closes #209372

X-original-commit: d5ee37f
Related: odoo/enterprise#85220
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
Somehow, translations files were lacking for this module.

Done by Larissa (lman)

closes #209441

X-original-commit: 7d83106
Signed-off-by: Ruben Gomes (rugo) <rugo@odoo.com>
Signed-off-by: Josse Colpaert (jco) <jco@odoo.com>
closes #209452

X-original-commit: f59afe4
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
This commit adds a filter for ongoing livechats in the session search

task-4776141

closes #209163

X-original-commit: 493a2fb
Signed-off-by: Kevin Gerard (kege) <kege@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit removes the props canSearchMore on Many2One and noSearchMore
on Many2XAutocomplete. We don't want to prevent the user to open the
SelectCreateDialog and make a more accurate search.

task-4661781

closes #202935

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Remove module `test_exceptions` as it is not used.

closes #205535

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Before this commit, if the generic manufacture route was in a different company, the user won't be able to create a new warehouse.

Steps to reproduce
-----
1. Set the company of the Manufacture route to company A
2. Switch to company B
3. Create a new warehouse
4. Access Error
`Due to security restrictions, you are not allowed to access 'Inventory Routes' (stock.route) records.`

Cause
-----
There is an if-statement to check if the found global route is of the same company.
https://github.com/odoo/odoo/blob/856409a1fb35c6c49fe4c404931587a95d99d370/addons/stock/models/stock_warehouse.py#L385
But this conditional is likely to raise an access error if the route is in a different company,
since we don't have read access to `route`.

Solution
-----
Use `route.sudo()` to read the route without an access error.

closes #209377

X-original-commit: fed35e2
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Junqi Wu (juwu) <juwu@odoo.com>
Avoid having all notified external people put in the 'To' of outgoing
emails, as it may bloat the header. Indeed in those modules we may
have a lot of people to notify.

Task-4787149

closes #209460

X-original-commit: c95ae3d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
During `retrying` method we still don't have any uid on the
current env (the authentification is inside the `func` ->
`_serve_ir_http`). If there is an Integrity Error coming from the
method/controller called, the error is catch by `retrying` and call
`_sql_error_to_message` leading to a traceback:

...
File "/home/odoo/src/odoo/saas-18.2/odoo/http.py", line 2016, in _transactioning
  return service_model.retrying(func, env=self.env)
File "/home/odoo/src/odoo/saas-18.2/odoo/service/model.py", line 186, in retrying
  message = env._("The operation cannot be completed: %s", model._sql_error_to_message(exc))
File "/home/odoo/src/odoo/saas-18.2/odoo/orm/models.py", line 2916, in _sql_error_to_message
  cons_rec = self.env['ir.model.constraint'].search_fetch([
File "/home/odoo/src/odoo/saas-18.2/odoo/orm/models.py", line 1390, in search_fetch
  query = self._search(domain, offset=offset, limit=limit, order=order or self._order)
File "/home/odoo/src/odoo/saas-18.2/odoo/orm/models.py", line 4993, in _search
  self.browse().check_access('read')
File "/home/odoo/src/odoo/saas-18.2/odoo/orm/models.py", line 3719, in check_access
  if not self.env.su and (result := self._check_access(operation)):
File "/home/odoo/src/odoo/saas-18.2/odoo/orm/models.py", line 3752, in _check_access
  if not Access.check(self._name, operation, raise_exception=False):
File "/home/odoo/src/odoo/saas-18.2/odoo/addons/base/models/ir_model.py", line 2051, in check
  has_access = model in self._get_allowed_models(mode)
File "decorator.py", line 232, in fun
  return caller(func, *(extras + args), **kw)
File "/home/odoo/src/odoo/saas-18.2/odoo/tools/cache.py", line 125, in lookup
  value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/saas-18.2/odoo/addons/base/models/ir_model.py", line 2023, in _get_allowed_models
  group_ids = self.env.user._get_group_ids()
File "decorator.py", line 232, in fun
  return caller(func, *(extras + args), **kw)
File "/home/odoo/src/odoo/saas-18.2/odoo/tools/cache.py", line 125, in lookup
  value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/saas-18.2/odoo/addons/base/models/res_users.py", line 1026, in _get_group_ids
  self.ensure_one()
File "/home/odoo/src/odoo/saas-18.2/odoo/orm/models.py", line 5497, in ensure_one
  raise ValueError("Expected singleton: %s" % self)

It actually hides the legit constraint message error.

Fix it by adding a sudo() to the constraint search, since whatever the
user (public or not), the error message should be accessible and
returned.

closes #207868

X-original-commit: a4cd73f
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Before this commit:

- Clicking the reset color button did not remove the applied gradient color.

After this commit:

- The reset color button now correctly removes the gradient color when clicked.

closes #207869

Task: 4735054
X-original-commit: ed76ab9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When an image is added in a website page by using the `/image` command
of the Powerbox or using the image icon of the side-panel toolbar, it
is not optimized like when the media dialog is used to replace an image.
Also, when an image is replaced, the auto-optimization is not always
included in the last history step - which makes operations like
inserting a new paragraph remove the optimization.

This commit makes sure that the `image_changed` event is:
- triggered after the new image is inside the DOM
- completed before considering we are done
- included in the same history step that applied the media dialog's
  change.

Steps to reproduce:

Scenario 1:
- Drop a three columns snippet
- Put your cursor after "Feature 1"
- Press ENTER
- Use the "/image" Powerbox command to add an image that should be
resized by the auto-optimization

=> Image was the original uploaded image.

Scenario 2:
- Drop a three columns snippet
- Double click on an image
- Upload/select an image that will be resized by the auto-optimization
- Put your cursor after "Feature 1"
- Press ENTER

=> Image's optimization was lost because it happened after the history
step was completed.

task-4129429

closes #205642

X-original-commit: b4c6d3b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit removes the z-index priority of kanban groups, headers and
quick create over the no-content helper since it became useless with
#148138 and can now cause display issues
when these elements are on top of each other (which can happen with the
quick create column).

task-4778356

closes #209437

X-original-commit: 0d39653
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
Before this commit, the write_date field was not loaded for
restaurant.order.course, which caused issues during the loading.

opw-4779831

closes #209201

X-original-commit: 899e775
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Issue
-----
For subcontracted services, branch companies don't have taxes on PO lines when
it is created by a SO.

Steps to reproduce
-----
- Install MRP, Sale, Purchase apps
- Create a branch company and switch to the branch
- In the settings, enable subcontracting
- Create a product
    - Type: service
    - Add a vendor for the product, with some tax applied
    - Tick the "Subcontract Service" box
- Create & confirm a sale for the product
- Open the linked PO

-> The PO doesn't have the tax specified on the product page

Cause
-----
The tax is defined in the parent, but when applied to the POL it is matched to
the PO's company.

-----
Ticket:
opw-4619035

closes #209431

X-original-commit: dd16951
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: David Van Droogenbroeck (drod) <drod@odoo.com>
The formatted display_name feature introduced in [1] used `<tab>`
and `<br>` as "indent 4 spaces" and newline identifiers. Commit [2]
then changed those two identifiers into `\t` and `\n`. This commit
adapts an override of `_compute_display_name` that had been
forgotten, but also the docstring of the function to apply the
formatting.

[1] #206217
[2] #207672

Followup of 4749554

closes #209455

X-original-commit: c737212
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
The end goal of Logistics tests refactoring is to use dedicated
resources (companies, users, warehouses etc.) in all stock tests. This
is part 1 of these changes, focusing on a dedicated warehouse, but also
introducting some small improvements.

After this PR is merged, we will:
* use a dedicated warehouse in all stock tests
* use locations, picking types, routes etc. associated with that warehouse, instead of global ones
* consistently use test resources naming convention:
  * StockLocationObj -> the Odoo Model
  * stock_location -> a specific instance
  * stock_location.id -> the ID of that instance
* use Command class instead of command triple
* fix a few typos

Please note that not all tests in stock module (and related ones) have
been updated. The main reason is that not all of stock tests inherit
from TestStockCommon. This will be changed in the future.

closes #195192

Related: odoo/enterprise#77828
Signed-off-by: Steve Van Essche <svs@odoo.com>
…ption

Before this commit, an external collaborator is not able to edit a task
description inside a project in which he has the edit access. The reason
is because the `html_history_field` is not accessible to the user.

This commit makes sure that external collaborator can edit task
description as before. To do that, the description field is updated in
sudo to make sure the history is correctly updated even if the user has
no access to the history.

Steps to reproduce the issue
----------------------------
0. Install project app
1. Create a project and share it to a portal user with edit access
2. Create a task inside that project
2. Log in as portal user
3. Go to the project shared and select the task created
4. Edit the description field and save the form view.

Expected behavior
-----------------

The task form view should be saved without any issue.

Current behavior
----------------

The task form view stays unsaved and an error in the console is
displayed saying the portal user has no access to html_history_field

task-4782302

X-original-commit: d66a3c8
Part-of: #209454
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, the portal user with edit access to a project can no
longer create a task inside that project due to access error during the
tracking process of fields edited.

This commit disables the tracking during the creation of task by
external collaborators since the tracking is only really useful when
the user updates the data.

task-4782302

closes #209454

X-original-commit: 5407dfd
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
kmagusiak and others added 30 commits May 17, 2025 16:53
Imports are direct and we don't need to bloat the namespace.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Move the constant HOURS_PER_DAY back to where it was before, it is
business dependent and is not needed in tools.
Additionally, ROUNDING_FACTOR is never used.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
These are simple one-lines with low usage. Even more, no conversion to
string is needed where it was used.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Instead of mutating intervals, create new ones.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Any set can be used in Intervals as the payload for the interval.
We make the implementation more generic for this purpose.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
This just duplicates the whole implementation of Intervals. Here we just
add a boolean flag to the implementation to change its behaviour.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Conversion from and to a number of hours. This belongs with other
date_utils.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
`make_aware` does two things and sometimes we need just one of them.

- `localized` makes sure a datetime is timezone-aware
- `to_timezone` return a function that sets a given tzinfo

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Whether intervals overlap works for all types, not just datetimes.
The called can ensure that both dates are either naive or time-aware.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Introduced in #182082 (version 18.3), this removes that module entirely
from Odoo after having refactored it.

Part-of: #207882
Related: odoo/enterprise#84380
Related: odoo/upgrade#7627
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Updating `odoo.tools.date_utils` with code introduced in #182082 (version 18.3).
- Moving and refactoring date-related functions from date_intervals to date_utils.
- Move back HOURS_PER_DAY into module (not a tool and business-related)
- Do not export date_utils directly inside tools.
- `odoo.tools.intervals` is a generalization of existing `Intervals` class (works with datetimes, but not only). Integrating `WorkIntervals` to avoid code duplication.

odoo/enterprise#84380
odoo/upgrade#7627

closes #207882

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
**Problem:**
The problem happens when a product can be sold by a packaging
where the UOM of the packaging is not a reference unit (it depends
from another unit, for instance a packaging of 33kg where the UOM
is kg which depends from g) and the product price is based on the
UOM of the packaging (in the exemple: kg).
When in the point of sale app, if we scan the barcode of this packaging
for the product, the quantity sold will be computed as if it was sold
in the reference unit (here as 33kg is 33.000 g, the quantity will be
33.000, even though we sell the product by kg so we expected a quantity
of 33).

**Steps to reproduce:**
- Open Sale/Configuration/Products/Units&Packagings
- Create a New record, set the quantity to 33kg and set a name
- Check the "Group Products in POS" option
- Go to Point of Sale/products and create a new product
- Check the Sales and Point of Sale boxes
- In general information in the "Sale Price" field select kg as the unit
- In the Sales tab, in the packagings field select the packaging you just
created
- click on the tag of this packaging and write a barcode for it.
- Open a shop in point of sale
- Click on the three horizontal lines on the top right of the screen
- Select Debug Window, write the barcode of your packaging
- Click on scan

**Current behavior:**
The quantity of your product in order is 33.000

**Expected behavior:**
The quantity should be 33

**Cause of the issue:**
When the quantity sold is computed it's computed by taking the factor
of the packaging which is the number of reference unit of this packaging.
https://github.com/odoo/odoo/blob/9354163d9fe45a34e7c3686f2c88cb9e3d4fbfc2/addons/point_of_sale/static/src/app/models/pos_order_line.js#L55
Here the reference unit is g so the factor is 33.000.
But the product is sold in kg so the quantity should be 33.

**Fix:**
The quantity sold should be the factor of the packaging divided by the
factor UOM in which the product is sold (here : 33000/1000 = 33)

opw-4652869

closes #210334

X-original-commit: 9372e3f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pierre-Louis Hance (plha) <plha@odoo.com>
Task-4675784

closes #209639

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit refines the UI of list headers by replacing caret icons with
clearer fa-sort, fa-sort-asc and fa-sort-desc icons. It also removes the
background color change on sorted headers, as the new icons provide
sufficient visual indication on their own.

task-4730251

closes #207280

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Help the users by creating filters automatically depending on the
hierarchy of analytic plans.
This allows to open any standard view (list/pivot/graph) by level of
hierarchies.

One usecase is, for a plan about localisation:
* Main plan: City (i.e. Brussels, New York, Los Angeles)
* Level 1 sub plan: Country (i.e. Belgium, USA)
* Level 2 sub plan: Continent (i.e. Europe, America)

This will generate (or delete) automatically new fields depending on the
various levels in the hierarchy being created or deleted.

When the feature is in use, the group by widget becomes a drop-down
similar to the groupby selector of dates, allowing to select either the
year/month/...

task-4763892

closes #207789

Related: odoo/enterprise#84438
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
This shows the price subtotal in the companys currency if the invoice is in another currency.

this change is done to accomodate for the FTA rule, where every amount payable must be expressed in AEDs.

task-4636082

closes #210284

X-original-commit: fe68fa3
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Fix 1: In tax `0% EXEMPT` (Purchase), remove the fiscal position AR Domestic
from the field Fiscal Position. This causes the tax to appear on vendor bills
using “AR Domestic”, even when not applicable.

Fix 2: In fiscal position `AR Domestic`, clear the field AFIP Responsibility
Type. It should not include `Cliente del exterior`. This value is incorrect for
domestic fiscal position and should be removed.

Task-4794985

closes #210426

X-original-commit: 648cdc2
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
* When checking model coherency for sms, if choose transient model ->
raise ValidationError message but the message seem not follow with the
code so much

closes #210362

X-original-commit: 9ac4049
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The partner `name` field is not technically required. Following
refactoring in 29f747543758, ensure that we don't crash
when computing display name for such partner (where name is empty,
i.e equal to `False`)

closes #210427

X-original-commit: ee173ea
Signed-off-by: Chong Wang (cwg) <cwg@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
*: l10n_account_edi_ubl_cii_tests

AttachedDocuments are a wrapper filetype in the UBL 2.0/2.1
specification that allows for multiple documents to be bundled together.
Colombia uses it as a way to return back values from the EDI but it is
in the standard and can therefore be used by any UBL 2.0/2.1 compliant
system.

To be able to parse the documents inside correctly, we must obtain the
original record which is stored in the outermost Attachment node either
under the EmbeddedDocumentBinaryObject element or the
ExternalReference/Description node. Once we find it we send it to the
normal decoder process.

Specification: https://docs.oasis-open.org/ubl/os-UBL-2.1/mod/summary/reports/UBL-AttachedDocument-2.1.html

task-4299222

closes #210444

X-original-commit: c84f53b
Related: odoo/enterprise#85797
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
Signed-off-by: Andrew Gavgavian (andg) <andg@odoo.com>
moving it to the module mrp_subcontracting_purchase is the correct module,
as it depends on the override of _get_resupply_availability happening in mrp_subcontracting_purchase module accorinding to this PR (https://github.com/odoo/odoo/pull/144702/files#diff-54bc40f604ca24cec75d6f7473d21d1d2d0300576456026fe63164daf7cd5149)  and fails as a
single app test in  mrp_subcontracting

build_error-163126

closes #210450

X-original-commit: a49240e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Omar Sherif Ali Hassan (osah) <osah@odoo.com>
Repro steps:
1. Install l10n_jo_edi module
2. Enter debug mode
3. Inside an invoice form view, attempt to view the raw record data

Issue cause:
The function _compute_l10n_jo_edi_computed_xml makes a call to _get_payment_method_code
then an error would occur because l10n_jo_edi_taxpayer_type was not set

This commit solves this issue by using dict get() instead of square brackets to avoid this error
It also solves the issue of having empty fields (with value False) being used with `replace()` method

task-4752035
build_error-161152

X-original-commit: be421d4
Part-of: #210477
Signed-off-by: Josse Colpaert (jco) <jco@odoo.com>
Signed-off-by: Hesham Saleh (hsal) <hsal@odoo.com>
Because the l10n_jo_edi_state can be changed by the users, to tackle timeout scenarios,
it should not be hidden in case it's empty (because the user can unset it by mistake
then they would lose the access to it forever).
This commit makes the state visible only for Jordanian companies, and it also makes the
field trackable so that the users can clearly see when it changes.
Finally, it makes the state readonly if the invoice has a JoFotara QR code,
because then the state of the invoice is sent, and it should never change.

task-4752035

closes #210477

X-original-commit: 1aaa3fc
Signed-off-by: Josse Colpaert (jco) <jco@odoo.com>
Signed-off-by: Hesham Saleh (hsal) <hsal@odoo.com>
Complement of #209902 which only fixed the "Exception received after
termination", I missed that we had two sites: the other being "Error
received after termination" and is in fact the more common of the
two.

For this case, downgrade the message to `logging.RUNBOT` for now so it
remains visible in the *extremely* unlikely case someone would see it
and want to do something about it instead of just ignoring it entirely.

X-original-commit: 40c19c2
Part-of: #210407
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This occurred in build 80487871 so it does happen.

But I don't understand how the sequence can occur: per the log, we hit

    Terminating chrome headless

then there's a `ConnectionResetError` following which `ws.connected` is
still set so we try to `set_exception` which fails.

But "Terminating chrome headless" follows "Closing websocket
connection" which should mark the call of `ws.close()`, which sets
`self.connected = False` as basically its first action. So the only
way for `connected` to be set after "Terminating chrome headless" is
for `self.connected = False` itself to raise (in which case it's
caught by a big try/except which suppresses it and closes the socket
without doing all the nice websocket things). And this is not an
"outdated version" question either, this code was not functionally
updated in the last decade (the flag at the top of `close` was set in
websocket-client/websocket-client@3940044
and since then it was just moved around and reindented a bit).

Obviously in other languages we could say things like "oh the flag is
not protected so there's no consistency requirements" but the GIL
should do that for us: in order for the receiver thread to process
messages (including an error) it has to acquire the GIL, which means
the main thread released the GIL, after having closed the ws, so after
having set the flag.

Anyway if we get a connection reset error *and* the test is done,
consider that the websocket is fucked and just bail. Apparently *that*
information is visible enough...

closes #210407

X-original-commit: 11cfe42
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
…ll cases

PR #189568 removes the focus from the project sharing composer by setting the
`inFrontendPortalChatter` to true, which goes against the whole idea of having
this parameter. The correct fix is to remove the `autofocus` (prop) from the
composer, because it was only there to keep the focus on the project sharing
composer.
This commit undoes the change in the mentioned PR and removes the `autofocus`
from the portal chatter composer.
Consequently, the composer placeholder in project sharing becomes the one
related to `note`, so this commit adds `type="'message'"` to the composer to
ensure consistency with the backend when sending a message.

closes #210506

X-original-commit: 5071c52
Signed-off-by: Maryam Kia (maki) <maki@odoo.com>
When reconciling an invoice and payment in foreign currency on different
dates, an exchange rate difference line is added. This results in more
than one value in `reconciled_lines_ids`, and `moveData()` no longer
resolves a link to the move, so the bank statement is shown instead.

This commit introduces a non-stored computed field to filter out
exchange difference lines from `reconciled_lines_ids`. The kanban now
uses this filtered field as a fallback when the reconciled lines are
ambiguous.

Steps to reproduce:
1. Enable a foreign currency and create two rates on different dates.
2. Create an invoice on one of the dates and a transaction to pay it on
the other.
3. Reconcile them.

task-4749264

closes #210492

X-original-commit: 4147760
Related: odoo/enterprise#85819
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
closes #208375

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👽 merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.