Commit Graph
165248 Commits
Author SHA1 Message Date
Anita (anko)andmano-odoo cf52e381bd [IMP] payment: post-process transactions immediately
Instead of monitoring a list of transactions to post-process in the
session, we now track only the last processed transaction, thus allowing
to drop the 10 min delay of the post-processing cron.

task-3125913

Part-of: odoo/odoo#119473
Co-authored-by: mano-odoo <mano@odoo.com>
2023-09-19 16:37:06 +00:00
Raphael Collet 23faf6f7ef [FIX] *: compute methods mixing stored and non-stored fields
closes odoo/odoo#98565

Related: odoo/upgrade#5158
Related: odoo/enterprise#47508
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-19 16:37:03 +00:00
Raphael Collet f012e33769 [IMP] core: warn about compute methods mixing stored and non-stored fields
We explicitly discourage a compute method used for both stored and
non-stored fields, because it may be unexpectedly update the database.
Indeed, we don't expect the computation of a non-stored field to update
the database.  Allowing this kind of compute method makes reasoning
about readonly code much more difficult, and would prevent readonly
transactions with such fields.

For instance, consider a compute method for both fields F (non-stored)
and G (stored), and assume that none of those fields are in cache.
Whenever F is accessed, the compute method is invoked, and both fields
are assigned, which potentially generates an SQL update for field G.
This is problematic if we require the current transaction to be
readonly.

Part-of: odoo/odoo#98565
2023-09-19 16:37:03 +00:00
Touati Djamel (otd) c8b919c0c2 [FIX] mrp: ignore verification for tracked product with 0 to consume qty
Steps to reproduce the bug:
- Create a storable product “P1” with BoM:
    - Add a tracked component
    - Add another component (no tracked)
- Create a MO to produce 1 unit of the product "P1":
    - Confirm
    - Unlock the MO
    - Set the "to consume" quantity of the tracked component to 0.

- Try to validate the MO

Problem:
A user error is triggered: “You need to supply Lot/Serial Number for
products:”

Solution:
If the quantity to consume is 0, ignore the serial number verification
for this move.

opw-3471256

closes odoo/odoo#135657

X-original-commit: 5e591cf36cdc6dcbdb8a5ee3753247578a771e9f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-09-19 15:21:01 +00:00
Djamel Touati 21ee079741 [FIX] repair, sale_*: set cost in SO when creating SO from repair
Steps to reproduce the bug:
- Create a storable product “P1”
    - cost= $100
- Create a repair order:
    - select any product in the product to repair
    - add “P1” as component
    - create the quotation from the repair order

Problem:
The cost is not computed correctly and is set at 0 in the
`sale.order.line`

opw-3502317

closes odoo/odoo#135822

X-original-commit: b95ed3617f465a655c8f918bee8edc673c8f202b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-09-19 08:48:38 +00:00
Pierrot (prro) 9b887cfe21 [FIX] l10n_nl: add 3bl tag on previous 3b affected lines
A previous commit made to add a new (triangular) tax introduced
a bug where the tag 3b (omzet) was archived, leading to journal items
not being picked up by the modified tax report.
This commit should add the new tag 3bl (omzet) on the items containing
the previous 3b (omzet) tag when upgrading the module.

closes odoo/odoo#135809

X-original-commit: a46bf625715a307182443328ffce155f6890bab0
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Pierre-Rodéric Roose (prro) <prro@odoo.com>
2023-09-19 08:48:36 +00:00
Om Rabara d8ce53991f [FIX] website_slides: return the record for next_category
This error occurs when user tries to click on the checkbox to 'Mark as done'.

Steps to produce:
- Install the `website_slides` module.
- Go to Website > Courses > Open a course containing one or more sections
  (e.g., 'Taking care of Trees').
- Click on the `Add Content` button located at the bottom in blue.
- Select the video option and upload two videos, one after the other.
- Now, click the 'Mark as done' checkbox for the first video.
- When attempting to click the 'Mark as done' checkbox for the second video,
  the error will occur.

Error: AttributeError: 'int' object has no attribute 'id'

To solve this issue we have returned the record for `next_category`from that it
will get the record `id`.
Previously, this code returned an integer value, see here:
https://github.com/odoo/odoo/blob/f34d87ecb7772417f1dd8f3d8836c89ddb903de8/addons/website_slides/models/slide_slide.py#L1321
here we are using that return value from the above line
https://github.com/odoo/odoo/blob/69fca30bb4fb66e6d979ce5ddc1bff4db963ca71/addons/website_slides/controllers/main.py#L1062
Previously it gets the integer and try to get id of that integer value.

sentry-4414398591

closes odoo/odoo#135805

X-original-commit: 9cc11ef9a0f2025a717602fb2087b96eda5e8218
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-09-19 08:48:35 +00:00
william-andre 59ccb80918 [FIX] account: keep receivable account on duplicate invoice
Steps to reproduce:
* create an invoice with a line
* change the receivable account
* duplicate the invoice

Result: the receivable account is recomputed to the default one.
Expected: we should keep it.

task-3504443

closes odoo/odoo#135723

X-original-commit: 1043d2b790a625590ca21f8e0d6560ceba3d6a84
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-09-19 08:48:32 +00:00
Jurgen (jugj) 28b2915cdb [FIX] hr_contract_salary: Fix Offer model bugs
- Employee smartbutton should not be displayed if contract is not double signed
- Inactive contracts should not be displayed
- Fix some translations
task-3471583

closes odoo/odoo#135689

X-original-commit: 856fbe7e180ababddab9cbd78dc9c43b749b83bd
Related: odoo/enterprise#47485
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-09-19 08:48:31 +00:00
niyasraphy 76effb5d79 [IMP] website_event: change attrs to invisible attribute
since 17.0 attrs is no more used, replacing the existing
usage with invisible attribute

closes odoo/odoo#134962

Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
2023-09-19 08:48:28 +00:00
vlst baf85a8820 [REF] point_of_sale: unify order components
At the moment, the pos displays the selected order in multiple
screens, such as the `ProductScreen`, the `TicketScreen`, the
`SplitBillScreen`, the `self_order` app, but uses completely
different implementations for each. This means that when
a change needs to be made to the one, it generally needs to be made
to the other as well, which is error-prone.

In this commit we create generic `OrderWidget` and `Orderline` components,
that have not dependencies on POS objects and we refactor the `ProductScreen`,
the `TicketScreen` and the `SplitBillScreen` to use these components.

The `OrderSummary` component was removed and it's contents are now in the
`OrderWidget`.

We also introduce a very simple new component called `CenteredIcon` that
can be used whenever we want to show an icon that fills a whole div. In this
commit we use it for showing the cart icon when the order is empty.

In a future commit, the `pos_self_order` will be refactored in order
to use the same `OrderWidget` and `Orderline` compoenents as the POS.

Task: 3470365

In addition, this commit solves the issue from the task 3491303.

closes odoo/odoo#132248

Related: odoo/enterprise#45972
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-19 08:48:25 +00:00
Rodolpho Lima 26f447a072 [FIX] web_editor: missing record info for converted images
When the Wysiwyg is used by website, multiple editable elements are
possible, and each of them carry the related record's model and id in
the element's dataset.

On the other hand, when the Wysiwyg is used by the html field, there's
only one root editable element, and such information is not present in
the editable's dataset, but in the widget's options object.

Before this commit, when saving the content of an html field, modified
images were converted to attachments without the correct reference to
the record's model and id.

This commit makes sure that such information is passed to the route that
handles attachment creation.

task-3495668

closes odoo/odoo#135806

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-09-18 23:31:39 +00:00
Rodolpho Lima 00701977ad [FIX] web_editor: skipped image conversion to attachment in HtmlField
Commit [1] added a check for the closest ".o_dirty" editable element in
order to define which editable is used for obtaining the model and id
reference from its dataset, and also to avoid multiple attachment
creation for the same image.

But such check for the closest ".o-dirty" element evaluates to null when
the Wysiwyg is used by the HtmlField component, as such class is not
added to editable when saving/committing changes. This resulted in
skipping the attachment creation for pasted, dropped or modified images.

After this commit, attachment creation for modified images is not
skipped if an element with the ".o_dirty" class does not exist.

task-3495668

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

Part-of: odoo/odoo#135806
2023-09-18 23:31:39 +00:00
Ludovic Gasc 130f94b691 [CLA] Add IBM CLA signature agreement
closes odoo/odoo#135803

X-original-commit: 0d19b9e92291bc1fd059d64406554062429797fc
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-09-18 23:31:38 +00:00
Julien Van Roy 1798eb71d1 [IMP] l10n_mx: add IEPS taxes & review existing
Add IEPS taxes and tax groups. Make sure the IEPS taxes are
`include_base_amount` and have a lower sequence than the IVA taxes.

Unify the names of the taxes and their labels on invoice.

Resequence the taxes to group them by nature.

task-3100679

closes odoo/odoo#135795

X-original-commit: d4785e5895c9befaeb1ff7d77b02f5ed7b250790
Related: odoo/enterprise#47545
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-09-18 22:17:15 +00:00
Thomas Lefebvre (thle) c32cdf0e7c [FIX] website_hr_recruitment: apply for an unpublished job internally
Issue:
------
Since the commit [^1], it was no longer possible to apply for a job
via the website if it is unpublished.
This made it impossible to apply for internal job offers.

Solution:
---------
Since the commit [^2], it is possible to distinguish
between unpublished and archived job offers.

The behavior after this commit is as follows:

- if the job is published --> everybody can apply;
- if the job is not published --> everybody can apply but the job page is hidden;
    We need to know it, i.e. for internal use only.
- if the job is archived --> nobody can apply;
    There is an error message "the job offer has been closed".

[^1]: https://github.com/odoo/odoo/commit/72072263ae01a8bea01c7fead000159ae9d060d2
[^2]: https://github.com/odoo/odoo/commit/6c5f38ae37e9c1014bfa93dd82ffc6a3b31f0bd5

opw-3508043

closes odoo/odoo#135791

X-original-commit: abb3afc0c46dd13e0ef8b10ae80d6534a938b3ad
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-09-18 22:17:15 +00:00
Leonardo Pavan Rocha e6e3722dec [FIX] web: show caret in NameAndSignature
Adds a caret to the font selection in the NameAndSignature component.
Prior to this change, the font icon was hidden without the caret.

Also, the caret direction is not being correctly updated when the target
element is closed. This commit fixes this by storing the initial direction
and forcing this direction when the dropdown is closed.

task-3431069

closes odoo/odoo#135774

X-original-commit: 7d11e281fa70a853191378bee3750d12bb76f9b9
Related: odoo/enterprise#47513
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-09-18 22:17:14 +00:00
Simon Wydooghe c3e9ed271b [FIX] mrp: properly handle subassembly production with same serial
If a subassembly was used as component in a finished good and both the
subassembly and finished good were unbuilt, the subassembly could not be
produced again with the same serial (specific use case: medical hardware
refurbishment, medical device is produced/packaged (subassembly), put as
a component into a procedure pack (finished good), both are returned and
unbuilt so the medical device can be refurbished and produced/packaged
again into a subassembly with the same serial).

The _is_finished_sn_already_produced function duplicates domain was
wrongly picking up stock move lines related to the unbuild of the
finished good, making the function wrongly returning True. This fixes
the search domain and adds a test to prevent regression.

closes odoo/odoo#135716

X-original-commit: 4f07b260807053586ac6c01cf92ac3d5e37b1041
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-09-18 22:17:12 +00:00
moerradi 360a658978 [ADD] account_bacs: Added UK BACS Direct Credit and Direct Debit
Implemented support for the BACS payment scheme as per the latest
technical specifications, enabling the processing of BACS Direct Credits
and Direct Debits. Included the mandatory requirement of a Service User
Number (SUN) for businesses conducting transactions via BACS.

closes odoo/odoo#135696

Task-id: 3326945
X-original-commit: 2e6aeffd7ae9116d3445aa53265919cc29afafc7
Related: odoo/enterprise#47487
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mohamed Erradi (moer) <moer@odoo.com>
2023-09-18 22:17:11 +00:00
moerradi 7e8185ba20 [FIX] account: Resolve foreign key constraint failure on PML deletion
- Added ondelete='cascade' to account_payment_method_line's
field definition.
- Fixes the foreign key constraint failure during module uninstallation
by automatically deleting dependent records.

task-3326945

X-original-commit: 9c10cf4dc1da36a2ef826962887a6538d0c522a2
Part-of: odoo/odoo#135696
2023-09-18 22:17:11 +00:00
Guillaume (guva) 0983809f6e [FIX] *: add access right for group_account_invoice
In https://github.com/odoo/enterprise/pull/41285
and https://github.com/odoo/odoo/pull/118701/files,
we added `group_account_readonly` but we should
add also `group_account_invoice`.

opw-3507588

closes odoo/odoo#135693

X-original-commit: d4ed80e1b991c0fe0585bae4fb378cac0c3044ed
Related: odoo/enterprise#47486
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-09-18 22:17:08 +00:00
Rémy Voet (ryv) 82b3fe05ea [FIX] mrp: fix batch version of _set_dates
`_set_dates` didn't work properly with multiple records.
In fact, it only used the `date_start` and `date_finished` of the
 first record. The assumption was that `date_start`/`date_finished`
 is always the same for each record in self, because it usually
 comes from a write call (writing the same values to a batch of
 records). But inverse methods are also called by the create
 method, and then the previous assumption isn't true anymore.

This bug leads to several inconsistencies between the `date_start`
and the `leave_id`. The `test_replan_mo_without_bom` was fixed in
the previous version, but with the new onchange, it breaks again
because of these inconsistencies.

closes odoo/odoo#135635

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-18 22:17:07 +00:00
Rémy Voet (ryv)andWilliam Henrotin a62baec7f6 [FIX] core: fix onchange first snapshot
The 'sale_ebay' module adds the `product_variant_ids` one2many field on
the `product.template` form view. The `product_variant_ids` view
contains `virtual_available` (depending on `uom_id`). When the user
changes the `uom_id` of the `product.template`, onchange is triggered,
it takes a snapshot of the previous data, and it will computes the
previous value of `virtual_available`. But the associated compute
method will fail with a traceback:

File "/data/build/odoo/addons/stock/models/product.py", line 199, in _compute_quantities_dict
res[product_id]['qty_available'] = float_round(qty_available, precision_rounding=rounding)
File "/data/build/odoo/odoo/tools/float_utils.py", line 54, in float_round
rounding_factor = _float_check_precision(precision_digits=precision_digits,
File "/data/build/odoo/odoo/tools/float_utils.py", line 29, in _float_check_precision
assert precision_rounding is None or precision_rounding > 0,\
AssertionError: precision_rounding must be positive, got 0.0

The `precision_rounding` is `0.0` because the `uom_id` of the product is
empty. It is is empty because we force the `uom_id` of the
`product.template` to be `False` in `initial_values` (before the
snapshot), and then the `uom_id` takes the value of its
`product.template` (`False`). But actually, the cache of the product
should be full with its previous values before doing the snapshot.
This was not the case because we only copy data from store fields
(see `fnames`). Then compute fields was computed after setting field
change to `False`.

opw-3334822
opw-3419392

X-original-commit: 5021e77ba52fac465a5d842ac04c0a3a22aea2dd
Part-of: odoo/odoo#135635
Co-authored-by: William Henrotin (whe) <whe@odoo.com>
2023-09-18 22:17:06 +00:00
Odoo's Mergebot 32d86f8a1c [IMP] mass_mailing: move data/demo and update demo subscriptions
Purpose is to ease tracking of data and demo through versions by avoiding
the usage of huge file. Instead split data and demo / main model in mass
mailing and mass mailing sms.

Update file naming according to model / guidelines in various mass mailing
sub-addons.

Make real subscription records for contact / list link, in order to have values
for inner model fields and ease their management / update / removal. It is
better than relying on m2m commands.

Also harmonize some xml ids names to ease future changes.

Task-2702607

closes odoo/odoo#135299

Related: odoo/upgrade#5159
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 22:17:04 +00:00
Thibault Delavallée 1f7c515086 [IMP] mass_mailing(_sms): make data subscription a real record
Make real subscription records for contact / list link, in order to have values
for inner model fields and ease their management / update / removal. It is
better than relying on m2m commands.

Also harmonize some xml ids names to ease future changes.

Task-2702607

Part-of: odoo/odoo#135299
2023-09-18 22:17:04 +00:00
Thibault Delavallée e114822875 [MOV] mass_mailing(_*): rename demo files
Just update file naming according to model / guidelines.

Task-2702607

Part-of: odoo/odoo#135299
2023-09-18 22:17:04 +00:00
Thibault Delavallée ac18b29177 [MOV] mass_mailing_sms: split data / demo into sub files
Purpose is to ease tracking of data and demo through versions by avoiding
the usage of huge file. Instead split data and demo / main model.

Task-2702607

Part-of: odoo/odoo#135299
2023-09-18 22:17:04 +00:00
Thibault Delavallée ff9c587b73 [MOV] mass_mailing: split data / demo into sub files
Purpose is to ease tracking of data and demo through versions by avoiding
the usage of huge file. Instead split data and demo / main model.

Task-2702607

Part-of: odoo/odoo#135299
2023-09-18 22:17:04 +00:00
Martin Trigaux bf81596aa7 [IMP] base: use es_419 and not es_MX as reference
And load only two languages, not three.
Faster to load and avoids ambiguity when a Mexican sees es_ES content

closes odoo/odoo#134785

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-09-18 22:17:02 +00:00
Chong Wang (cwg) 007d2bde2a [REF] translation: better get_po_paths
make the tool function get_po_paths to reduce duplicated code

Part-of: odoo/odoo#134785
2023-09-18 22:17:02 +00:00
Martin Trigaux dccc8f39d0 [ADD] base: add Spanish Latin America
Before es_MX was informally considered as the "reference spanish" as
we have an office in Mexico.
Create a new language that will be used by all the local variations of
Spanish and that we can push without overlapping with es_ES content.

Part-of: odoo/odoo#134785
2023-09-18 22:17:02 +00:00
Nishit Prajapati 9f33b498f5 [FIX] survey: resolve the traceback for matrix question type
Steps to reproduce:
- Create a survey with matrix-type questions.
- Test the survey.
- Click on the given option it gives a trackback.

Issue:
- The issue occurs because the scope of `this` keyword is unavailable.

closes odoo/odoo#134671

Task: 3485467
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 22:17:01 +00:00
Adrien Minne (adrm) feae29c4bb [FIX] spreadsheet: add missing icon for download button
The icon was missing in the download menu item for portal users that access
a shared spreadsheet.

closes odoo/odoo#134457

Task: 3495200
Related: odoo/enterprise#46977
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-09-18 22:16:59 +00:00
sankalp chhunchha (schh) 029acb256a [IMP] mail: download all files of discuss message at once
This commit introduces a new message action to download
all files of the message, when the message contains more
than a single attachment.

This commit also do not show the delete icon on a file
when it's linked to a message without any text content, and
there's only 1 file attached to this message.
This is because deleting message and deleting the file means
basically the same, as deleting the attachment would mean the
message is empty, and empty messages are considered deleted.
We only show "Delete" of the message for clarity.

Task-3340653

closes odoo/odoo#132164

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-18 22:16:58 +00:00
Maryam Kia 23394cb345 [IMP] mail: Allow screen and video sharing at the same time
Before:
- sharing the screen stops sharing video and vice versa

after:
- If user starts to share screen at the same time with video sharing, a pip of video sharing appears on the call when user focuses on the sharing screen and vice versa. This pip is draggable and depends on the nearest corner to drag situation, will be located on the corner.

Task-3374606

closes odoo/odoo#130354

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-18 22:16:57 +00:00
Renaud Thiry 79e9665a49 [IMP] mail: improve Composer duplicates check
Only duplicate emails used to be checked when sending a mass mail.

However it is possible (e.g. using templates) to send a mass mail
to the same person containing different information.

The existing functions to allow models to specify emails
processed in the past by some other means are kept.

A new check is added in the processing that checks the full contents
of the message, subject and attachment ids.

The strings are not hashed as most situations are:
- Sending the exact same mail to everyone
  -> Only need to check against one message
   -> Same complexity as hashing

- Sending all different emails
  -> Checking inequality of str is usually very fast

For attachments, as we cannot compare them easily.
They are ignored for the purpose of equating emails
whenever there are the same number of attachments
in the email values as there are on the composer.

This is because each email should receive its own copy
of the composer attachments. If they have a different
number of attachments, they were generated dynamically
through reports and we assume they are all different.

We can thus remove the 'document based' information
as it is implicitly infered from this check.

-------------------------

Test utils are also updated for two purposes:

1. Add optional body and attachment_name discriminents
assertMailMail assumed all emails could at least be
differentiated by subject. Our test breaks that
assumption, so we use body and attachment to find the
best-fitting email based on the data passed in.

2. Check email_formatted on recipients
When using assertMailMailWEmails, we first find the
email using the non-formatted email of the recipient.
This does not match assertSentMail which checks against
the raw email_to value, which would often be formatted.

Task-2826811

closes odoo/odoo#99541

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 22:16:56 +00:00
Didier (did) 8ef53019db [IMP] web: add mail types file to _jsconfig
closes odoo/odoo#135751

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-18 20:56:24 +00:00
Damien Bouvy 500a17a20a [IMP] base: correct symbol position for MVR currency
Source: http://www.mma.gov.mv/#/currency/currencysymbol

Task-3508431

closes odoo/odoo#135744

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-09-18 19:43:06 +00:00
David Monnom (moda) 4f5dd90aa7 [IMP] pos_self_order: default user for self_order mobile
Following the Odo comment https://github.com/odoo/odoo/pull/129562#discussion_r1306030434

We need to ensure that we have a default user for the mobile SelfOrder
when no session is open.

If we don't have a user, the system will be in sudo mode and the price
calculation will be erroneous because the system has chosen the wrong
taxes: it doesn't know which company to use to calculate the taxes.

We now force the setting of a default user for pos_config with mobile
selfOrder enabled, so that when no session is open, the default user
will be used.

closes odoo/odoo#134273

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-18 16:48:02 +00:00
niyasraphy e4f251f8db [IMP] purchase: merge purchase_enterprise
before this commit, purchase_enterprise module is
not adding any functionality to the system, other
than adding few demo data records and passing a
context to an existing action.

initially this module is added to bring the
dashaboard functionality to the purchase app,
but with the introduction of the spread sheet
app, the added dashboard is removed from
the purchase_enterprise app in this
commit: https://github.com/odoo/enterprise/commit/61c8314728fc99dd8c7deb3c55d15e30b4844e18

after this commit, this demo data and context
is moved to the purchase app and remove the
purchase_enterprise app.

closes odoo/odoo#132475

Related: odoo/enterprise#45986
Related: odoo/upgrade#5064
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-09-18 15:42:43 +00:00
Aaron Bohy fd757d7f29 [FIX] web: action service: sanitize action.domain
When it is unset, the domain of an action can be either false or
the empty string, which in both cases means []. Before this commit,
we didn't process the domain in thoses cases (i.e. we kept the
false or empty string value). However, having an empty string as
domain could cause issues if it is manipulated by Domain/pyutils.
In particular, in stock.picking, clicking on "Insert menu in
spreadsheet" crashed before this commit.

To prevent those issues from happening, this commit sanitizes the
domain of the action at the first entry point, such that it's
always an array (the empty array in our case).

This commit comes with a test in enterprise, which reproduces the
scenario given above, as we couldn't find framework and blackbox
scenario to highlight it.

closes odoo/odoo#135738

X-original-commit: a7c32029aaf595b9b3ae13b9c425e384ab4c8305
Related: odoo/enterprise#47500
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-18 10:14:14 +00:00
niyasraphy bf9076439e [IMP] l10n_{}: redirect to own documentation
before this commit, the website link given to
l10n module was generic link of fiscal
localization.

after this commit, on clicking website/learn more
user will be redirected to documentation of specific
country localization.

closes odoo/odoo#135725

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-09-18 10:14:12 +00:00
Victor Feyens 90796edd15 [FIX] website_sale: do not show unavailable carriers
Carriers with no/invalid/incompatible rules shouldn't
be displayed in the checkout process.

opw-3413820

closes odoo/odoo#135717

X-original-commit: 5052b9e4a15155c694cf005fdf330997770c6cac
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-18 10:14:11 +00:00
yhu-odoo 9e1a0de027 [FIX] mrp: set correct byproduct qty when update bom
When update bom for MO, we records the ratio of (qty on Bom) / (qty on
MO)
https://github.com/odoo/odoo/blob/25502b8513afc9fca0dcdef9df9e814eea2e4ae8/addons/mrp/models/mrp_production.py#L2356-L2361
so when add byproduct, it should be (qty on Bom) / ratio instead of (qty
on Bom) * ratio to get the qty for MO:
https://github.com/odoo/odoo/blob/25502b8513afc9fca0dcdef9df9e814eea2e4ae8/addons/mrp/models/mrp_production.py#L2336

closes odoo/odoo#135691

X-original-commit: 52c03ad19fc8a764cbb362528ae94537c56f2610
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-09-18 10:14:10 +00:00
yhu-odoo a7ec4d60e7 [FIX] mrp: Don't change product_qty/uom when update bom on draft MO
Fix the issue when update the bom on a draft MO, the product_qty and
product_uom_id will be reseted to 1.0 unit.
The original product_qty and product_uom_id hould be kept when update
bom.

X-original-commit: f1a397ede16c56db3410fd9c5fe387dc98c46422
Part-of: odoo/odoo#135691
2023-09-18 10:14:10 +00:00
Samuel Degueldre 4aaee61a5f [REF] website_slides: remove usage of legacy dialog to enroll
The Dialog widget is deprecated and will soon be removed, this commit
converts the usage of this dialog for the enroll buttons to use the new
dialog service.

To avoid duplicating the opening logic in the Quiz code, the selector of
the widget that opens the dialog now targets the #wrapwrap and uses
event delegation for the button, avoiding the need to manually spawn the
dialog for buttons added to the DOM after the first load.

closes odoo/odoo#135476

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-18 10:14:07 +00:00
Shubham Thanki 66e8e65682 [IMP] web: allow users to download multiple vcards at once
This commit adds a download vCard server action in the list view of contacts,
making it possible to download multiple vCards at once.

Task-3385058

closes odoo/odoo#135435

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 10:14:06 +00:00
Dawn Hwang fd1f6e1621 [FIX] base: Fix Swiss date and number formats
The fr_CH date format has been broken for years, with unnecessary spaces
after the period. This has been removed.

The de_CH thousands separator prematurely ends after the millions
because it does not loop indefinitely. This has been fixed as well.

closes odoo/odoo#135355

X-original-commit: 287a03224c9144bb547d2cf7cdc046b83b830a16
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-09-18 10:14:05 +00:00
Lucas Lefèvre (lul) 65962d09c3 [FIX] spreadsheet_edition: autofill references in pivot functions
See enterprise PR

closes odoo/odoo#135024

Task: 3458637
X-original-commit: 8bfc188ca4fb9cd8d1e351c0e6d4adbf195405fb
Related: odoo/enterprise#47224
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-09-18 10:14:05 +00:00
adsh-odoo 02720ba28c [IMP] website_event: disable register button and remove the deadcode
-> Prevent registration button activation without selected tickets.
-> Remove the deadcode which was there to append the warning when we click on
   the register button without selecting the ticket.

Task-3345854

closes odoo/odoo#131715

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 10:14:01 +00:00