Commit Graph
167823 Commits
Author SHA1 Message Date
Kenneth Hansen 2dad97a4f5 [FIX] Update taxes and CoA
This commit updates the localization to be compliant with
the new Danish Bookkeeping Act.

The chart of accounts has been adjusted to strictly comply with the standardized chart of accounts provided by the Danish government

The taxes have been completely reworked, but still re-use the existing tax grids as they are unchanged.

Part-of: odoo/odoo#143820
2023-11-28 21:20:49 +00:00
Tom De Caluwé 48634a2adf [FIX] web: avoid week number calculation errors
When opening the calendar view in, for example, the timesheets app, the first
day of the week used for the number calculation is provided by the localization
service, which in turn requests it from the database. Because the first day of
the week is stored as a number between 1 and 7 in the res.lang model and a
value between 0 and 6 is expected by the DateEnv, offset errors can occur.

The error is fixed in various components (for example, the CalendarDatePicker
and CalendarCommonRenderer) but not in others (CalendarYearRenderer). Instead
of patching each component separately, a better solution is to require the
CalendarModel to expose a 0 to 6 firstDayOfWeek value as part of its public
interface.

opw-3389617

closes odoo/odoo#142056

X-original-commit: aea22a46515304df41dfaf427f5955824fe342f5
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-11-28 21:20:48 +00:00
Rémi Rahir (rar) daa1b46608 [FIX] spreadsheet: reset selected datasource upon its deletion
closes odoo/odoo#140355

Task: 3551443
X-original-commit: e68f9fd312f0eeac45530920974c417db2098cb0
Related: odoo/enterprise#49866
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-11-28 21:20:46 +00:00
nikj-odoo bcc42d4a8a [IMP] sale,sale_management: improve quotation template form view
With this commit, we have improved the UI for the Prepayment amount field
in both the quotation template form view and the Sale order form view.
The changes have made it easier for users to input and review information.

task-3546106

closes odoo/odoo#139461

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-28 21:20:45 +00:00
sesn-odoo 8a18f27ee1 [FIX] l10n_din5008: alignment fixes
Steps to reproduce
---------
* install the German localization
* create and print an invoice

You should see that the 'total' block and payment reference are not
correctly aligned

opw-3524254

closes odoo/odoo#143830

X-original-commit: da1de44392fb5ffe07bc5ee7244538d5a3056596
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
2023-11-28 16:16:06 +00:00
Xavier-Do ad993e673d [FIX] base: avoid no autoinstall propagation
A custom script is modifying the output of
load_information_from_description_file to disable the
auto-install of modules during local testing. It was naively adapted for
v16.0 by replacing the corresponding methods. Since a lru cache was added
(nice optimization in most cases) this is an issue because running lint
test afterward will get the cached value with an incorrect autoinstall
value. It makes sens to avoid reading the file on the filesystem each
time, but making a deepcopy looks like an acceptable safeguard to avoid
hard to debug behaviors.

closes odoo/odoo#143628

X-original-commit: ad10ff4410ccf7c38f6154480484495bb57c53ff
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-11-28 06:19:55 +00:00
Yosua Nicolaus fbfbd1b3f6 [FIX] l10n_es: ignore DUA (-100%) line on tax report
add l10n_es_type 'ignore' on Subtract Base (DUA) -100% tax so that it
can be ignored when creating Libros export

closes odoo/odoo#143314

Task-id: 3604971
Related: odoo/enterprise#51366
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-11-28 04:16:53 +00:00
Olivier Monnom (mool) c23ff3a833 [FIX] uom, website_sale_stock: added lituanian translation
Before: No lituanian translation was created for this version about
the number of remaining products in stock on website ecommerce page.

Step to reproduce:
- Create a db with the website_sale_stock module
- Configure a product in sales tab: active Show available qty with
only if below 1000
- Add lituanian language
- Go on the product page on the website and change the
lanuage in lituanian

Now: Translation added

opw-3560842

closes odoo/odoo#142995

X-original-commit: 02cab20ab526d5ca6bd85bb4fa44278814968390
Signed-off-by: Olivier Monnom (mool) <mool@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-11-28 02:54:57 +00:00
Walid 390807c494 [FIX] project: check company
Steps to reproduce:
- Install Stock and Project
- Create a new proect with current company as customer
(3 dots menu on project overview to the customer)
- Create a new warehouse for the current company
- Error pops

Bug:
since commit[1] check company is enforced on the project_id field of
partners in bothways
when creating a new warehouse CheckCompany fields are editted on the
partner if set (property_stock_customer/supplier) the issue is if
the partner's company_id is False while project belongs to company
"_check_company" fails

Fix:
Remove check company on project_ids from the partner's side and
implement it as python constraint

opw-3507952
[1]:https://github.com/odoo/odoo/pull/109464

closes odoo/odoo#143679

X-original-commit: 3741557dc4b5e84876247db851e9d2c862fcb93b
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-27 21:39:18 +00:00
Moens Alexandre ef5afda076 [FIX] pos_viva_wallet: neutralize
This commit adds the missing neutralisation necessary for the `pos_viva_wallet`
module introduced in [1]

The purpose of the standard neutralisation framework is to allow us to
create database copies that will not interract with external systems in
ways that could impact the production database (or if it is not possible
to prevent the interractions, make sure that they are benign or wont
result in actual changes), or impact the customers of the operator of
the production database.

This is mainly useful to allow safe support investigation on database
duplicates.

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

closes odoo/odoo#143741

Signed-off-by: Alexandre Moens (mao) <mao@odoo.com>
2023-11-27 12:39:58 +00:00
Nicolas Lempereur 7c7f927bef [FIX] core,account: no join for grouping by m2o id
When using account.root (through account.account().root_id or
account.move.line().account_root_id) in read_group, we can have
inconsistent results because of how account.root is defined.

account_root is a view with the id field computed out of account codes,
but there can be the same account for several companies, so we can have
several same ID for different rows => this is not expected by the ORM
who expects one record by ID => in result, we get for example the values
in the pivot table of journal items be multiplied by the number of
companies if we group by "Account Root".

With this changeset, we add a small optimisation in ORM so if a group by
is ordered by a many2one, if the order of the many2one is "id" we don't
add a left join for ordering.

note: without the change, the added tests failed:

- in account, with 1000 as balance, and 2 as number of root with id=90090
- in test_read_group with a query containing a left join to o2m table
- in test_new_api with a query containing a left join to o2m table

opw-2282699
opw-2289440
opw-3288390

closes odoo/odoo#143257

X-original-commit: 674bdd1ac2cf9a4a3748b85f71ebbd01137485ce
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-11-27 12:39:55 +00:00
Robin Lejeune (role) 9e9b9aa941 [FIX] website: fix email sharing subject format
Steps to reproduce:
- Drop a "Share" snippet anywhere on the page and save.
- Click on the email icon.
- Your default email client should open with, as a subject line, the
title of the page where spaces are replaced by +.
=> This should not be the case, spaces should show as spaces.

Since the sharer refactoring in [1], the title of a page used in share
buttons of the `s_share` snippet is encoded as a `URLSearchParams()`,
which encodes spaces as "+" characters (see the specs [2] of the
built-in method). This works fine for most share buttons, but not for
email clients, which do not properly parse the "+". Typically, that
means that the subject line of the mailto link is something like
"Home+%7C+My+Website", which renders as "Home+|+My+Website" in a mail
client, instead of showing spaces.

This commit uses another way to encode the title parameter, so that it
works for every share button. It also replaces a space that was encoded
twice for Whatsapp.

[1]: https://github.com/odoo/odoo/commit/5297388cd2aa1f693b04538c846c7025e243b09d
[2]: https://url.spec.whatwg.org/#ref-for-urlsearchparams%E2%91%A4

task-3603556

closes odoo/odoo#142876

Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
2023-11-27 12:39:53 +00:00
sabr a652bb86cf [FIX] account: missing the argument while make payment
This issue occur When the customer tries to make a payment from Accounting
Dashboard of account module,at that time the error will be generated.

step to reproduce:
- install the `Accounting`.
- open the `Accounting`.
- go to `Accounting  Dashboard`
- click on this `⋮` of bank (Right side of top)
- click on the payment of view
- the error will be generated.

error- TypeError
       account_journal.open_payments_action() missing 1 required positional
       argument: 'payment_type'

(1) -  https://github.com/odoo/enterprise/pull/49762

accounting to this (1) PR, One link to "Payments" is enough (rather than
customer,Payments, Vendor Payments, Internal Transfers) > Those filters exist
in the list view of payments

after this commit ,The customer will see "account all payments" if they click on
the payment screen.

sentry-4620831582

closes odoo/odoo#142649

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-11-27 12:39:52 +00:00
Chong Wang (cwg) 9e32ac4292 [IMP] core: support field.export_string_translation
Some auto-generated field labels don't make sense for translators. For example
field: needed_terms_dirty label: "Needed Terms Dirty"

After this commit, if the field.export_string_translation is False, we don't
export their labels when export translations.

closes odoo/odoo#142329

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-11-27 12:39:51 +00:00
Chong Wang (cwg) 09a4762be4 [IMP] test_translation_import: support testing exported pot files
test exported pot files

Part-of: odoo/odoo#142329
2023-11-27 12:39:51 +00:00
Adrien Guilliams (adgu) d2f560535f [FIX] point_of_sale: restore payment method in invoice
Accounting moved the logic of _get_reconciled_vals
into _compute_payments_widget_reconciled_info but did not made the
change in point_of_sale.
This commit resolve this by putting the logic of the previous
_get_reconciled_vals into an override of the
_compute_payments_widget_reconciled_info method.
This is done because this is a legal requirement in France to have and
maybe in other countries.

closes odoo/odoo#139979

X-original-commit: ad7d4b68b539ad37431734eca3fe59a908cf4e34
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-11-27 12:39:49 +00:00
Pierre Rousseau 0828bd1239 [FIX] board: do not give form view to children views
Before this commit, the form view of the board action is given to the
children views. This can lead to some issues, for exemple in the
following case:

- Add a pivot view to a board
- Click on a cell to open the list view
- Click on a record of the list view to open the form view

=> The form view used is the one of board, which lead to an empty view.

opw-3598945

closes odoo/odoo#143756

X-original-commit: f65efabb938bf5643754c426ad3db813d9eff581
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-11-27 11:20:10 +00:00
Andrea Grazioso (agr-odoo) 162c479ce3 [FIX] l10n_sa_edi: B2C QRCode IssueTime Warning
Have an Invoice partner with type Individual
Create an invoice with said customer confirm.
ZATCA invoice has warning "invoiceTimeStamp_QRCODE_INVALID".
```
{"type":"WARNING",
"code":"invoiceTimeStamp_QRCODE_INVALID",
"category":"QRCODE_VALIDATION",
"message":"Time on QR Code does not match with Invoice Issue Time (KSA-25).
           If ZATCA's SDK was used to generate QR Code, kindly use the
           latest version of SDK",
"status":"WARNING"}
```

This occurs because when the Invoice partner is an Individual
the validation requires an additional QR code enclosing invoice information
that needs to match the xml content.

In this case the IssueTime of the invoice was not matching because the
QR is manually formatted with a wrong 'Z' at the end, while its timezone
is, correctly, Asia/Riyadh

opw-3586326

closes odoo/odoo#143697

X-original-commit: da50d78ee73661cb2af599e0f4276f3d9a891e16
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-11-27 11:20:08 +00:00
sabr ad5839990b [FIX] mrp: prevent traceback if expected duration is zero
This issue occurs when the customer creates an operation with a 0.0 expected
duration fields. An error is then generated when the customer creates a
manufacturing order and selects that operation due to expected duration fields
is set zero.

step to reproduce -
- Install the `Manufacturing`
- Click on  `Configuration > Operations `
- Create New  Operations.
   - Select the Bill of Material (ex - [FURN_8621] Plastic Laminate)
   - Default Duration fields must be 0.0
- click on `Operations  > Manufacturing Orders`
- Create New Manufacturing Orders.
- Select the Product (select the product which you selects while creating
                      operation ex. FURN_8621] Plastic Laminate)
- Click on the `Overview` button.

https://github.com/odoo/odoo/blob/17.0/addons/mrp/report/mrp_report_mo_overview.py#L268

after this commit, the customer will be able to set 0.0 in expected duration.

sentry-4657725988

closes odoo/odoo#143490

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-27 11:20:07 +00:00
Anh Thao Pham (pta) c61f9d86fc [FIX] account_edi_ubl_cii: no rounding for unit price amount
Steps to reproduce:
- Install l10n_sa_edi
- Switch to a SA company
- Create a 15% INCLUDED tax
- Create an invoice:
  * Customer: [any]
  * Invoice Lines:
    - Product: [any]
    - Quantity: 90
    - Price: 200.00
    - Taxes: [the 15% INCLUDED tax]
- Confirm the invoice and process it by ZATCA service
=> The invoice is accepted by ZATCA, but there is the following warning:
"BR-KSA-EN16931-11 :
 Invoice line net amount (BT-131) must equal (Invoiced quantity (BT-129)
 * (Item net price (BT-146) / item price base quantity (BT-149)))
 + Sum of invoice line charge amount (BT-141) - Sum of invoice line allowance amount (BT-136)"

Cause:
The net unit price (200 / 1.15) has more than 2 decimals but its value is rounded
to the decimal accuracy of "Product Price" (2 digits by default) in the generated
EDI document.
When multiplying its rounded value with the quantity, the result is not equal to
the invoice line subtotal, which is triggering the warning.

Solution:
Remove the rounding for unit price amount as there is no restriction on its number of decimals.

Reference:
- https://docs.peppol.eu/poacc/billing/3.0/bis/#_unit_price_amount
- https://zatca.gov.sa/ar/E-Invoicing/SystemsDevelopers/Documents/20230519_ZATCA_Electronic_Invoice_XML_Implementation_Standard_%20vTrack.pdf

opw-3509940

closes odoo/odoo#143348

X-original-commit: 48a78bed9ad0c10e510b2c3e48e53c4c82ce5761
Related: odoo/enterprise#51469
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-11-27 11:20:05 +00:00
Josse Colpaert 729fe5dcb4 [FIX] l10n_es: exempt taxes that are not art.21-24 should be reported to 303|60
closes odoo/odoo#142027

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-11-27 11:20:04 +00:00
Loan (LSE) 4fb7fa53a2 [IMP] hw_posbox_homepage: Change logger level
Add the possibility to dynamically change the logger level of Odoo and
per IoT handler (drivers and interfaces).
This will be done through the "Handler List" page.

This will be useful to troubleshoot purposes.
In particular when it happens on a specific handler.

The level set should persist on shutdown as saved in Odoo's configuration
using the `--log-handler` parameter, see:
https://www.odoo.com/documentation/16.0/developer/reference/cli.html#cmdoption-odoo-bin-log-handler

Notes:
 - When changing Odoo's level, `werkzeug` logger will change to the same
 level automatically (except in `debug` on which `werkzeug` will be set
 to `info`)
 - `--log-level` Odoo config wasn't used as it has unintended side
 effects when dynamically switching to this level
 - `load_iot_handlers` was modified as otherwise the loggers `__name__`
 could be wrong and inconsistent on which several logger for a handler
 exists. For example: `PrinterInterface.py` and
 `odoo.addons.hw_drivers.iot_handlers.interfaces.PrinterInterface`. In
 this situation `_logger` can be different from one used in the class.
 In addition, of that, the parent logger for the different loggers could
 be different (root and Odoo generally)

opw-3493585

closes odoo/odoo#139970

X-original-commit: 931456fed24c0d7700defd7672157d8bc54c3fe5
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2023-11-27 11:20:02 +00:00
Kartik Chavda 20ddb74a8a [FIX] mail: fix activity view domain on reload
Steps:
- Install project app.
- Go to task view from specific project.
- Open activity view.
- Set an activity on any task.
- Click on "Schedule Activity" button.

Issue:
- User able to select all tasks instead of tasks from
that specific project as it is working for first time
user opens that view.

Cause:
- Domain of `SelectCreateDialog` became empty when
load calls from other activity view actions.

Fix:
- Pass props in load method call to have default data as
it is when calling load method.

task-3293310

closes odoo/odoo#143721

X-original-commit: fd96a43af96ef6706680a97d19a184c6e4aad6fb
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Kartik Chavda (kcv) <kcv@odoo.com>
2023-11-27 09:51:12 +00:00
Mathieu Duckerts-Antoine 2b80c8e647 [FIX] web: pivot: clear sortedKeys when pruning
Due a typo, sortedKeys were not always cleared when pruning the
new trees after an update. Consequently the method _getTableRows could be
called on a inexisting sub tree. Here we simply fix the typo and a test.

opw-3584675

closes odoo/odoo#143714

X-original-commit: 3fa2d6e418daa2b1fa0df3c8d1ca643fac4cbaa2
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-11-27 09:51:11 +00:00
Julien (jula) 458d80b721 [FIX] website: perform _search_exact before _search_with_fuzzy
__Current behavior before commit:__
When searching for an **Internal Reference** of a product variant on the
website shop, the fuzzy search is likely to return a wrong result.

If the **Internal Reference** of a product template resembles the
searched term, it will take it as a fuzzy term and will not even search
for product variants internal references.

This is because the method `_basic_enumerate_words` only parses the
fields of the model considered but not the "subfields", in this case the
`product_variant_ids.default_code`.

__Description of the fix:__
Run `_search_exact` in any case and only then, if no result is found,
run a fuzzy search.

__To reproduce on runbot 15.0:__
In the website shop, search *FURN_0096*. Although there is a variant
of *Customizable Desk* that has this exact **Internal Reference**, the
search will only return *Office Chair Black* because this product
template has a **default_code** set (*FURN_0269*).

opw-3476643

closes odoo/odoo#143635

X-original-commit: 5887b4f7246dac734f192025404d65002fff6f20
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-11-27 09:51:09 +00:00
Joseph Caburnay d8fc625931 [FIX] pos_restaurant: hide badge when floor edit mode
closes odoo/odoo#143515

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-11-27 09:51:05 +00:00
Joseph Caburnay 1d515d27c5 [IMP] pos_restaurant: new white color for floor background
The white color for floor background is changed to "rgb(249, 250, 251)" instead
of the original "rgb(255, 255, 255)" (pure white). This new white is used as
color of the demo "Main Floor".

Part-of: odoo/odoo#143515
2023-11-27 09:51:05 +00:00
Guillaume-gdi 2eb769efff [FIX] web_editor: prevent fail of link tools tour
Since [this other commit], the `link_tools` tour is failing because the
`_syncContent` between url and link text is not working anymore. This is
due to the ZWS that are added to the link to permit the user to select
edges of the link.

[this other commit]: https://github.com/odoo/odoo/commit/ab40f484d55e151e175ccf9d6b3ea3bf34c56b35

runbot-18747

closes odoo/odoo#143728

X-original-commit: 1afd1ca1539dc61ddb12345160bb82957efae143
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-11-27 08:39:50 +00:00
tsm-odoo 8e52f40f59 [FIX] test_discuss_full, *: decouple tests from demo data dependency
*: website_livechat.

closes odoo/odoo#143645

X-original-commit: 9643717d911c31f150adab5b699ec7b9219f8981
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-11-27 08:39:49 +00:00
Nicolas Viseur (vin) 33e837d429 [FIX] account_payment: Better uninstallation
Improve the uninstallation of payment providers by allowing to
uninstall payment providers which have a payment method line on
a journal but no payment yet.

Task id #3595006

closes odoo/odoo#142112

Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-11-27 08:39:47 +00:00
Sébastien Geelen (sge)andqsm-odoo 04e121644a [FIX] web_editor: remove o_editable as a marker
This revert some changes introduced in [1]. The o_editable class already
has its own behaviors, which would be in conflict with making it a
marker for adding `contenteditable="true"`.

Also this found that commit [2] stop using the "web_editor.banner"
template but did not remove it. Will be removed in master.

[1]: https://github.com/odoo/odoo/commit/17ee75a84d00eedb1778edcdbd541025e8473ef0
[2]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997#diff-aa4686cd9f6a0d50e1040ba3dda0b29e9898e7cc31a47f1f02b46a2c4c047a72R2223

See https://github.com/odoo/odoo/pull/137373#issuecomment-1816509437
Related to task-2782426

closes odoo/odoo#143669

X-original-commit: 7f1021b8484cbc17f922c0e69d160a6ff672e7dc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-11-26 20:49:05 +00:00
Wolfgang Taferner 398e99b52e [FIX] purchase_stock: do not try to manipulate done or scrapped moves
In case of chained stock moves, we need to consider that
a purchase order might be linked to other orders which
are already fulfilled differently on the same order line,
so we filter for those which are still relevant for propagation
or change in procure method.

closes odoo/odoo#143338

X-original-commit: 468fc94afe4e2776abb526a67cc3785d903f088a
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-26 19:02:46 +00:00
Odoo Translation Bot 3ffba892de [I18N] Update translation terms from Transifex 2023-11-26 00:20:02 +01:00
Julien Van Roy ab2ba10d46 [IMP] account_edi_ubl_cii: prevent negative unit prices for bis 3
The unit prices should always be positives in the Peppol Bis 3 xml,
otherwise, a validator will raise "[BR-27]-The Item net price (BT-146)
shall NOT be negative.". Add a constraint in the code to ensure this.

task-3607341

closes odoo/odoo#143648

X-original-commit: db52055f72ce5d9b1667ee89c55301756a0fabab
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-11-25 07:49:10 +00:00
Raphael Collet 425a6054ec [FIX] core: modified() for context-dependent non-stored recursive fields
When recursing on non-stored recursive fields, modified() only considers
the records that have some value in cache.  But when fields are context-
dependent, we may miss some records because we look up for cache values
in the wrong context.  Instead, consider cache values in all contexts
for that matter.

closes odoo/odoo#143644

X-original-commit: f19732c199e6bb2b8bdd55808658cb82c8cd44b4
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-11-25 06:43:38 +00:00
Raphael Collet 232f34d226 [FIX] core: modified() on recursive fields before unlink()
The following situation happened with module industry_fsm, when trying
to delete a cancelled sales order corresponding to a task.  When doing
so, the server crashes with error "Could not find all values of X to
flush them", which means that a dirty field (pending update) has lost
its value from cache.

The issue is related to recursive computed fields.  Before deleting a
record, method unlink() invokes modified(), which determines all the
fields that depend on the record to be deleted, and marks them to
recompute.  Those fields should be recomputed after the record is
deleted, and not before.  We found out that the recursive call to
modified() made for recursive fields can force the recomputation of the
recursive field itself before the record is deleted, which causes
unlink() to crash.

The fix consists in marking the fields for recomputation at the very end
of method modified(), after all the fields to recompute have been
determined.  This ensures that the processing of recursive fields always
uses the current value of the field instead of its recomputed value.

X-original-commit: 1f5293bc63ae7b06fd0df8d509dc7fafaa016a22
Part-of: odoo/odoo#143644
2023-11-25 06:43:38 +00:00
vava-odoo 4ae385e06c [FIX] sale_loyalty: prevent partial rewards with points
Since odoo/odoo@b3a2fb51bc, it is not possible to use partial
points rewards. However this commit only fixes the behavior for loyalty
cards, where it should be applied to many other program types.

closes odoo/odoo#143643

X-original-commit: 64ebec5c7db88c247f3dafbeecbd2ae2b9ee4238
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-11-25 06:43:37 +00:00
Valentin Vallaeys (vava) 3735f6c961 [FIX] website_sale(_*): fix zero price sale
* product_configurator, comparison, stock(_wishlist)

Before this commit, the option "Prevent Sale of Zero Price Product"
would still allow some free products to be added to the cart (accessory,
optional and alternative products).

This commit makes sure no free product can be added to cart if this
option is activated.

Also, this option was conflicting with some other options and not well
handled in bridge modules. This commit improves the UX when this option
is activated.

task-2983615

closes odoo/odoo#143626

X-original-commit: 158f622f00bad7f3b24b81cfa715601f5ff7022a
Part-of: odoo/odoo#143504
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-11-25 06:43:36 +00:00
Atul Patel b578521324 [FIX] stock: avoid duplicating sequence for new picking type
During upgrade, it try to create picking type if not exist
like pos type and everytime will create new sequence too
for that picking type. during the creation of picking type
there is python constraints that raised if
same sequence name with same company exist.
so to avoid that will check before creating new sequence
if already same company sequence exist then update the
sequence name with id using copy prefix to easily identify
as copy name.

closes odoo/odoo#143609

X-original-commit: e16c15b5306f841d8da6ec3e951aff606e377134
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-25 06:43:35 +00:00
Andrea Grazioso (agr-odoo) 60a160efb8 [FIX] account: pivot view expand by Date>Month
Accounting > Reporting > Invoice Analysis
Open Pivot View
Collapse column group, expand by Date>Month

StopInteration traceback will raise
line: column = self._read_group_postprocess_aggregate(spec, next(column_iterator))

The error is caused by a missing interval attribute on the group by
pivot view default search.
This will make the view call `read_group` with a wrong groupby list
['invoice_date', 'invoice_date:month'], that will cause the error raise

opw-3603433

closes odoo/odoo#143595

Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-11-25 05:41:46 +00:00
Samuel Degueldre eb1d96e011 [FIX] web: correctly display module errors in the qunit suite
Since the module loader rewrite, it now reports errors directly in the
DOM. The error alert also has the class "modal" so that in case a tour
comes accross a page with module loading errors, it will only look for
elements inside it and fail. But in the QUnit test suite, modals are
invisible by default, causing the page to be blank in those cases.

This commit adds a css rule to make sure that this error alert is shown,
and updates the code that was previously used to report these errors in
the qunit suite to instead simply check for errors reported by the
module loader.

closes odoo/odoo#143589

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-25 05:41:45 +00:00
Lucas Lefèvre (lul) d27d9a4757 [FIX] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/7346d0af9 [REL] 17.0.4
https://github.com/odoo/o-spreadsheet/commit/661e290f4 [FIX] sheet: remove zombie code
https://github.com/odoo/o-spreadsheet/commit/7362fc105 [FIX] sheet: remove rows faster
https://github.com/odoo/o-spreadsheet/commit/dcaa1ab0c [FIX] tokenizer: faster current char lookup
https://github.com/odoo/o-spreadsheet/commit/0448b26f5 [FIX] tokenize: replace special chars faster
https://github.com/odoo/o-spreadsheet/commit/88a57c6be [FIX] icons: use correct comment syntax in xml files
https://github.com/odoo/o-spreadsheet/commit/cf8194df2 [FIX] clipboard: fix array formula copy
https://github.com/odoo/o-spreadsheet/commit/ca24d7e8c [FIX] evaluation: faster range matrix
https://github.com/odoo/o-spreadsheet/commit/a13ff80b3 [FIX] clipboard: traceback on paste from copy after deleting that sheet
https://github.com/odoo/o-spreadsheet/commit/eaa0dca12 [FIX] evaluation: cache range references values Task: 3588401
https://github.com/odoo/o-spreadsheet/commit/cdeb716c3 [REF] evaluation: group compilation parameters
https://github.com/odoo/o-spreadsheet/commit/943a7e7f8 [FIX] lookup: cache string normalization Task: 3588401
https://github.com/odoo/o-spreadsheet/commit/0330db03c [FIX] cells,borders: cancel useless commands Task: 3603259
https://github.com/odoo/o-spreadsheet/commit/38d77fe89 [FIX] cells: faster getter to get cell Task: 3588401
https://github.com/odoo/o-spreadsheet/commit/15bdafc80 [FIX] model: don't flatten command result

closes odoo/odoo#143587

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-11-25 05:41:44 +00:00
Mahdi Cheikh Rouhou (macr) 2a84495a47 [FIX] website_sale_loyalty: add product when exists as reward in cart
Issue:
======
When we have a product as a free product reward in cart and we want to
add the same product from the shop nothing will happen and the cart
stays the same.

Steps to reproduce the issue:
=============================
- Create a loyalty program with the following options:
type: pormotions
rule: minimum quantity :1 , gran 1, minimum purchase 0, per order,
product:  select anyone
reward: type : free product , quantity rewarded : 1, product : select
any other product
- Go to website and add the product from the rule to cart
- Go to cart and claim reward
- Go back to shop and add the product from the reward to cart
- Go to cart
- The cart stays the same

Issue:
======
When searching for the `line` it doesn't consider if the line is a
reward or not.

Solution:
=========
We filter the reward lines if `line_id=False`

opw-3550585

closes odoo/odoo#143581

X-original-commit: 2b97bb83b312f553d3ec1b6e96a74c744955aed6
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-11-25 05:41:43 +00:00
JuMiSanAr bab7119b70 [FIX] stock: export StockReschedulingPopover
closes odoo/odoo#143573

X-original-commit: 03b7e17faef4075dbbb805bca4e7f40f7fbcc988
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-25 05:41:42 +00:00
Mahdi Cheikh Rouhou (macr) 96645bd31b [FIX] pos_sale: not pos_groupable uom with float quantity pos sale
Issue:
======
When we settle an order that has a product with uom not pos_groupable
and quantity isn't an integer for example 3.5 it will add 4 lines each
with quantity = 1 which is not correct.

Steps to reproduce the issue:
=============================
- Create a product with a not pos_groupable uom (kg for example)
- Create a sale order with that prouct and add a not integer quantity
- Go to pos and settle the order
- You will have 4 lines added each with quantity = 1

Origin of the issue:
====================
The quantity was hardcoded = 1

Solution:
=========
I addeed order lines equal to the integer part of quantity and one last
order line that have the rest quantity.

opw-3579225

closes odoo/odoo#143566

X-original-commit: 3db0515959861e65f05b572d4827692ed00a1925
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-11-25 05:41:41 +00:00
aliya 9224c42487 [FIX] account_peppol: disable peppol for certain edi formats
If the format set on a partner does not work for our peppol implementation, `enable_peppol` should be `False` and the checkbox should be hidden.
This commit checks invalid partners when computing `enable_peppol` on account_move_send wizard.
Since we hide the checkbox in this case, we don't need to show the peppol warning when opening send&print to such partners.

closes odoo/odoo#143565

Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-11-25 05:41:40 +00:00
aliya 9a3450d396 [FIX] account_peppol: shorten cron interval
Update participant status every 6 hours instead of once a day. Once a day is too slow for users and it looks like as if something went wrong.

Part-of: odoo/odoo#143565
2023-11-25 05:41:40 +00:00
vava-odoo 2794f32ff7 [IMP] test_sale_product_configurators: test that additional line remains
The additional lines originating from the product configurator are
sometimes not well handled by the framework. With this additional steps
in the test, we ensure the line remains after selecting it without
editing anything, a case that was broken several times already.

closes odoo/odoo#143554

X-original-commit: ce9251badd8cc01edfb2f83fd192f7328d48e7f0
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-11-25 04:36:04 +00:00
Florent de Labarreandvava-odoo 1c91d51445 [FIX] delivery: prevent useless write
Before this commit when you unlink a sale.order.line the field carrier_id of sale.order is set False for each delivery line.

This commit prevent also serialisation failure on ecommerce.

closes odoo/odoo#143533

X-original-commit: c9fe8d113deb8103ad531d999f75f74c5475f46e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: vava-odoo <112173839+vava-odoo@users.noreply.github.com>
2023-11-25 04:36:01 +00:00
Damien Decleire (deda) eec7d8b787 [FIX] partner_autocomplete : Suggestions available in tax field for GST
Suggestions can now be accessed by entering a GST number in the Tax
ID field of the contact form.

Add the option of allowing completion even with an 'insufficient
credit' error.

closes odoo/odoo#143532

X-original-commit: 2e47f94eba7a6c9df278c887f879fffeb8552706
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2023-11-25 04:36:00 +00:00