Commit Graph
166881 Commits
Author SHA1 Message Date
Damien Bouvy e17f06baea [IMP] web: new size option for badge_selection field
When you have more 3-4 options, it quickly takes a *lot* of space.

This commit allows you to set the size to 'sm' (if you have many
options) or 'lg' (if you want super extra big buttons).

Task-3450200

Part-of: odoo/odoo#138804
2023-10-26 13:41:07 +00:00
Damien Bouvy 203af43784 [IMP] base,base_automation,mail,sms: server action UX
- Slight reword of the 'type/state' field labels for server actions
- Re-ordering of 'type/state' values
- Form view changes
- Allow hiding model in display_name of ir.model.fields base on context
  key (avoid technical details when they are not needed)

Task-3450200

Part-of: odoo/odoo#138804
2023-10-26 13:41:07 +00:00
Damien Bouvy 278dece52f [IMP] base_automation: use animation as no-content helper
Task-3450200

Part-of: odoo/odoo#138804
2023-10-26 13:41:07 +00:00
Bastien Fafchamps (bafa) 37ab6ff1b5 [IMP] web: Company service refactor and improved ease of understanding
This commit improves the company service to be more readable. Variables
have been renamed to better indicate what they represent. Jsdoc has
also been added to further improve the ease of understanding of the service.

The following have been renamed:

- `allowedCompanies` -> `activeCompanies`
- `nextCompanies` -> `selectedCompanies`
- `logNextCompanies` -> `applySelectedCompanies`

The SwitchMenu & SwitchMenuItem components have also been simplified by
making use of useState on the company service itself.

Indent has aslo been added to SwitchMenuItem on mobile to display the
hierachy of companies.

closes odoo/odoo#138521

Related: odoo/enterprise#48862
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-26 13:41:05 +00:00
vifo adaf5b2873 [IMP] iot: Enable multiple printing per report via WebSocket
-Implemented a WebSocket service to facilitate communication with the IoT box. This enables printing reports on a network different from the browser. Before it was a long polling connection
-Implemented the ability to link multiple printers to a single report. Before it was possible to link only one printer er report
-When multiple printers are linked, a pop-up will prompt the user to select the preferred printers.
-The user's printer selection will be stored in the browser's local storage.
-Additionally, a reset button has been added to clear the printer selection.

task-3193258

closes odoo/odoo#129164

Related: odoo/enterprise#44398
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-10-26 13:41:03 +00:00
Martin Maes eb213f91bf [FIX] mrp: remove set quantities & validate
In the subcontracting portal,
set quantities & validate button has to be removed -> invisible.

task-3201527

closes odoo/odoo#127409

Sub-task: none
Related: odoo/upgrade#5201
Related: odoo/enterprise#43685
Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-10-26 13:41:01 +00:00
Arnold Moyaux 28d238b578 [IMP] stock: product label layout base on move
Since we use it now on batch and operation rename the selection field

task-3201527

Sub-task: 10
Part-of: odoo/odoo#127409
2023-10-26 13:41:01 +00:00
Martin Maes 86ec5b68c9 [IMP] mrp: add print label button
task-3201527

Sub-task: 10
Part-of: odoo/odoo#127409
2023-10-26 13:41:01 +00:00
Martin Maes d811e1af5b [IMP] mrp: manufacturing order tree view availability check
task-3201527

Sub-task: 4
Part-of: odoo/odoo#127409
2023-10-26 13:41:01 +00:00
Martin Maes 9d62430c89 [FIX] mrp: show workorder by date
In the overview of mrp, workorders were sorted by creation date,
not by planned date

task-3201527

Sub-task: 7
Part-of: odoo/odoo#127409
2023-10-26 13:41:01 +00:00
Martin Maes 7e4dba6ec6 [FIX] sale: Use of the Tab key
In the quotation, using the tab key when the qty at date widget
is invisible was not working as the tabindex was invisible as well.

task-3201527

Sub-task: 8
Part-of: odoo/odoo#127409
2023-10-26 13:41:01 +00:00
Martin Maes a934cc4376 [FIX] mrp: add breadcrumbs on the subcontracting portal
task-3201527

Sub-task: 3
Part-of: odoo/odoo#127409
2023-10-26 13:41:01 +00:00
Martin Maes a250b8e058 [FIX] mrp: remove production capacity from view
Removal of the production capacity from split window.

task-3201527

Sub-task: 11
Part-of: odoo/odoo#127409
2023-10-26 13:41:01 +00:00
MélanieandXavier Bol 4959d47b70 [IMP] * : redesign employee kanban card (master version)
* = hr, hr_holidays, hr_homeworking

Changes the hover on plane icon for leave. In public employee the hover is : "on leave" and in private employee the hover is the name of type's leave

task : 3527398

closes odoo/odoo#137741

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Co-authored-by: Xavier Bol <xbo@odoo.com>
2023-10-26 12:10:14 +00:00
Sven Fuehr 6e230629c0 [FIX] l10n_at: translate accounts, tax report to English
Currently the accounts and tax report are still defined directly in German.
This commit translates them to English and uses the appropriate
translation mechanism for the translation into German.

task-3354661

closes odoo/odoo#135485

Related: odoo/enterprise#47405
Related: odoo/documentation#5859
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-10-26 12:10:11 +00:00
Sven Fuehr d19600b7d0 [IMP] l10n_at: add external / SAF-T tags to accounts
The Austrian SAF-T specification defines a chart of accounts (CoA).
All accounts that are "exported" in the SAF-T document have to be
annotated with their corresponding account in the SAF-T CoA.

This commit introduces tags to associate individual accounts with a code that
should be used for external reports.
For now they will be used to map the company's CoA to the SAF-T CoA.

task-3354661

Part-of: odoo/odoo#135485
2023-10-26 12:10:11 +00:00
Sven Fuehr 715d1eb1a1 [IMP] l10n_at: update CoA; i.e. prepare for SAF-T export
This commit adapts the default chart of accounts to be compatible with
the SAF-T chart of accounts.

In other commits new tags will be added to each account that map our
CoA into the SAF-T CoA (and the account names will be translated).
To make it easier to review the CoA changes the changes are kept separate in this commit.

The account "2600 eigene Anteile" was moved and made into an equity
account since as of today they are part of the equity section of the balance
sheet (by law).

task-3354661

Part-of: odoo/odoo#135485
2023-10-26 12:10:11 +00:00
Sven Fuehr 10b7ffeaf2 [IMP] l10n_at: add country to tags
Previously the tags had no country information.
This commit adds it; they all belong to Austria.

Part-of: odoo/odoo#135485
2023-10-26 12:10:11 +00:00
Damien Bouvy 6bab7a6ae5 [IMP] base: reflect html sanitization attributes
Up until this commit, HTML fields created from the UI or via data
modules or via Studio where alway sanitized, without any possibility of
control by the developper or db admin.

This commit makes it possible to override these attributes for
data-defined fields (python-defined fields cannot be overriden).

This makes it possible to create fields that can e.g. be used as 'block
targets' in the website editor for data modules.

closes odoo/odoo#130544

Related: odoo/enterprise#47116
Related: odoo/upgrade#5290
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-10-26 12:10:08 +00:00
198e226f5b [IMP] website: Expose models on the website
This commit implements a way to expose any model publicly on the website. Both manual and
existing models can create such pages called 'Model Pages'.
A manual model is a model that has been created by the user at runtime, via the technical menu,
via studio, or with an xml declaration.

The main interface to easily create such page is in Studio, in the tab Website Integration. But a
partner or developer could easily import those without studio installed. That's the reason most of
the code to handle the display of such pages is present in the website module directly.

The listing can handle two display modes (Grid or List). Once the user changes the display mode,
the latest value is set in the session to be remembered for the next visit of the page.
A default_layout can be set and is customizable in the website editor or from the backend of Website.
This value is linked to the page to display, so each listing page can use a different layout by default.

The route on which the models are exposed is:
"/model/<string:page_name_slugified>",

With the derived routes:
"/model/<string:page_name_slugified>/page/<int:page_number>",
"/model/<string:page_name_slugified>/<string:record_slug>"

task-id-3231144

Part-of: odoo/odoo#130544
Co-authored-by: Florent Dardenne (dafl) <dafl@odoo.com>
Co-authored-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-10-26 12:10:08 +00:00
flvr-odoo 8d18978b05 [FIX] website: quick fix for install without demo data
Fix crash at install without demo data

closes odoo/odoo#139817

Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-10-26 08:46:01 +00:00
Adrien Dieudonné e6c747b43b [REF] *: keyboard: replace deprecated charCode, keyCode and which properties
These properties are deprecated.

We should consider to use `KeyboardEvent.key` or `KeyboardEvent.code` for new code.
Note that we prefer to use the `key` property as multiple physical keys
can send the same value (e.g. Enter can also be sent by the numeric pad).
We should only use `code` when we explicitly want to target a single physical
key on the keyboard.

By doing this, we can now remove the dependency of `jQuery.ui.keyCode`
that was used as mapping of key code descriptions to their numeric values.

References:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/charCode (deprecated)
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode (deprecated)
https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/which (deprecated)

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key

https://api.jqueryui.com/1.12/jQuery.ui.keyCode/

Some links that helps:
https://w3c.github.io/uievents/tools/key-event-viewer.html
https://www.toptal.com/developers/keycode/table

closes odoo/odoo#139809

Related: odoo/enterprise#49591
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-10-26 08:46:00 +00:00
Nicolas Viseur (vin) 5dc625fada [IMP] l10n_au: Remittance Advice
In AU, it is customary to name proof of payments document
with different headers if the partner is a customer or a
supplier.

If the partner is a customer, the current "Payment Receipt"
is expected.
If the partner is a supplier, "Remittance Advice" is expected.

This change will bring this to the payment receipt report
if:
- the australian localisation is installed
- either the company or the partner are from Australia

Task id # 3465257

closes odoo/odoo#139543

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-26 08:45:57 +00:00
anhe-odoo 33e00d1c13 [IMP] spreadsheet: allow to download a shared dashboard
Task Description

The aim of this PR is to be able to download a shared dashboard.
This is done by adding a "Download" button on the shared dashboard
(next to the frozen date), which allow to export the dashboard as
an .xlsx file.

Related Task

closes odoo/odoo#139426

Task: 3512907
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-26 08:45:56 +00:00
svs-odoo 28a9fba05f [IMP] product,purchase: compute price with discount
Add two computed fields, `price_discounted` on `product.supplierinfo`
and `price_unit_discounted` on `purchase.order.line`, to get more
precise price.
For the vendor pricelist, it's useful to get the actual lower price (a
vendor price can be lower than another one but the result can be
different if the discount is take in account).
For the purchase order line, it's useful to get the right price in the
products catalog.

task-3373589

closes odoo/odoo#135502

Related: odoo/upgrade#5223
Related: odoo/enterprise#48375
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-26 07:22:56 +00:00
svs-odoo bc01c7bcec [IMP] product,purchase,sale,*: product catalog
This commit makes two major things:

1. Move the product catalog from `sale` to `product`.
It moves the product catalog's code from `sale` to `product` module in
order to be able to use it in other modules.
A mixin, `product.catalog.mixin`, was created for to make other models
catalog compatible.

2. It enables the product's catalog in `purchase`.
In `purchase`, the catalog differs a little bit from `sale`:
- If Unit of Measure is enable, the UoM for each product will appear in
  the catalog;
- If the product purchase's UoM or the purchase order line's UoM is
  different than the default product's UoM, the former one will be
  displayed (in bold so the user can know it's the UoM to refer);
- When opening the product's catalog from a purchase order, the products
  will be filtered by the PO's vendor;
- Some data from the vendor list will be used if appliant: the minimum
  quantity and the price;
- If there is at least one product's packaging, a button will be
  displayed to increase the qty by the packaging's one. If a packaging
  is set on the purchase order line, this one will be used.

task-3373589

Part-of: odoo/odoo#135502
2023-10-26 07:22:56 +00:00
svs-odoo 0a80dbd643 [FIX] purchase(_stock): check style corrections
Part-of: odoo/odoo#135502
2023-10-26 07:22:56 +00:00
svs-odoo aabcdd2bc6 [MOV] purchase(_stock): separate PO & PO line
Separates the file `model/purchase.py` into two files:
- `model/purchase_order.py`
- `model/purchase_order_line.py`

Since every model should have their own file, `purchase.order` and
`purchase.order.line` have it now.

Part-of: odoo/odoo#135502
2023-10-26 07:22:56 +00:00
svs-odoo 500c837f55 [FIX] stock: clean product's views indentation
Part-of: odoo/odoo#135502
2023-10-26 07:22:56 +00:00
Pierre Paridans 963842381e [IMP] web,*: replace ClipboardJS with Web API and homebrew polyfill
*: auth_totp_portal, mrp_subcontracting, project, survey, web_editor,
   website, website_links, website_sale_loyalty, website_slides, test_lint,
   spreadsheet

Implements missing `clipboard.write()` and `ClipboardItem` ; targets
only Firefox (which partially implements Clipboard API, features hidden
behind a preference flag).

Supported browsers: Chromium 76+, Safari 13.1+, Firefox 63+, Safari iOS
13.4+.

This allows to replace ClipboardJS by the native Clipboard Web API.

Reference:
https://caniuse.com/?search=clipboard
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API
https://w3c.github.io/clipboard-apis/

task-3439226

closes odoo/odoo#134881

Related: odoo/enterprise#47154
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-10-26 07:22:54 +00:00
jorv 54dcdda950 [FIX] mail: Make flanker log message more general
The `flanker` python library can be installed to implement optional
email address validation.
Nevertheless, it is not fully supported in python 3 (see https://github.com/mailgun/flanker).

Recent issues point to the fact that the latest pip release version 0.9.11
does not work under python 3.10.
This can lead to features, using the email validation, creating blocking
behavior due to error tracebacks.

As this is more of an issue on flanker's side than Odoo's, we remove the
`pip install` instruction. It can be assumed that someone wanting to go
out of their way to install flanker, should be proficient enough to either
make sure the python <3.10 is running or install one of the Github repo tagged
versions.

After this change, we still inform the user of the optional feature, but do not directly
incite them to pip install it, which should prevent normal users from
inadvertently blocking parts of their Odoo database.

opw-3562596

closes odoo/odoo#139800

X-original-commit: 637e60cb9687e9859d081f7367717c84d29fb82a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-26 06:16:16 +00:00
Sanchit Gupta 22619de8b5 [FIX] tools: Wrong Translation in default language
[Here](https://github.com/odoo/odoo/blob/a277faa2ffab7559fcbad95fcc1e8fd6a26d756b/odoo/tools/translate.py#L1645) If 'en_US' is exist in new_values then as a default language 'en_US' translations are loading due to that translation of default language gone lost

OPW -3482255

original translation look like this
![translate](https://github.com/odoo/odoo/assets/127722128/5c788ace-fcec-4783-b036-c6b77bea3083)

 if default language is dutch for example then instead of dutch language english's translations are there
```
en_US : <t t-name="website.test">
  <t t-call="website.layout">
          <p class="o_default_snippet_text">I transalted to english</p>
  </t>
</t>
fr_BE : <t t-name="website.test">
  <t t-call="website.layout">
          <p class="o_default_snippet_text">this french</p>
  </t>
</t>
nl_NL : <t t-name="website.test">
  <t t-call="website.layout">
          <p class="o_default_snippet_text">I transalted to english</p>
  </t>
</t>
```
 arch_db look like this
```
en_US : <t t-name="website.test">
  <t t-call="website.layout">
          <p class="o_default_snippet_text">I transalted to english</p>
  </t>
</t>
fr_BE : <t t-name="website.test">
  <t t-call="website.layout">
          <p class="o_default_snippet_text">this french</p>
  </t>
</t>
nl_NL : <t t-name="website.test">
  <t t-call="website.layout">
          <p class="o_default_snippet_text">this dutch</p>
  </t>
</t>
```

closes odoo/odoo#139111

X-original-commit: 542851c50182f32327f9cd3607081515899ddb76
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Sanchit Gupta (sagu) <sagu@odoo.com>
2023-10-26 06:16:14 +00:00
Martin Trigaux 1e06577306 [FIX] mass_mailing: don't show inactive mailing lists
Those are no longer used and should never be displayed

Source: feedback of users that were wondering why they are subscribed
to very old unrelated mailing lists while those are all inactive

closes odoo/odoo#139442

X-original-commit: 35203a93dbb002e2e8c6943073c14acdfc5f90f1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-10-26 05:13:31 +00:00
Thomas Becquevort (thbe) f25ede851e [IMP] account: easier payment registration for bills
Description of the issue/feature this commit addresses:

Currently, the payment registration for vendor bills is kinda hard to figure.
Noticing which bills are overdue, which require a payment is not made so easy
by the interface and could be improved. Also there is no way to register a
payment for multiple lines at a time which could improve the UX.

Desired behavior after the commit is merged :

The buttons "Bills to Pay" and "Late Bills" redirect to a Journal Items view
called Payment Items with specific filters to show only the necessary lines.

The order of the columns in the Journal Items has been changed and their
visibility has been changed too.

The default filters of the Journal Items when coming from the dashboard buttons
has been changed. Payable has been replaced by Purchases.

Filters, Group by and Search by options have been added for the Due Date
and the Discount Date fields in the Journal Items.

task-3516496

closes odoo/odoo#138188

Related: odoo/enterprise#48679
Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-25 22:14:51 +00:00
Florian Damhaut 060e13ad6d [IMP] sale: Allow override line editability in portal
Add function to allow line editability to be overriden.

task-id : 3186629

closes odoo/odoo#137563

Related: odoo/upgrade#5312
Related: odoo/enterprise#48394
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-10-25 22:14:48 +00:00
Florian Damhaut 730c6c3011 [IMP] sale: Portal View generic IMP
Refactor the "details" part of the portal view to unify with subscription
as well as add different id "hooks" for inheritance.

task-id : 3186629

Part-of: odoo/odoo#137563
2023-10-25 22:14:48 +00:00
Antoine (ande) a4600f2790 [FIX] account: cannot make branch with generic coa
Current behaviour:
When your current company is South Korean,
The chart of account is generic.
If you try to create a South Korean company
branch, you'll get an error message:
The Currency of a subsidiary must be the same as its root company.

Steps to reproduce:
1. Install account_accountant
2. Go to Settings
3. Go to Users & Companies > Companies
4. Create a new company
5. Country: South Korea
6. Currency: KRW
7. Switch into the new company (top right)
8. Go to Accounting
9. Go to Configuration > Settings
10. Fiscal Localization: Generic Chart Template
11. Save the changes
12. Fiscal Country: South Korea
13. Main currency: KRW
14. Save the changes
15. Go to Settings
16. Go to Users & Companies > Companies
17. Select the Korean company
18. Create a new branch
19. Country: South Korea
20. The Currency of a subsidiary must be the same as it's root company.

Cause of the issue:
The generic chart of account's currency is USD

opw-3537346

closes odoo/odoo#139796

X-original-commit: 303fde24a62269159def12760e438997f6c6f147
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-10-25 20:56:17 +00:00
roen-odoo 160b404fa9 [FIX] point_of_sale: correctly delete sequences when uninstalling PoS
Current behavior:
After uninstalling the PoS module, if you try to install it again, you
get a traceback because Odoo is trying to create a sequence that already
exists.

Steps to reproduce:
- install PoS
- uninstall PoS
- install PoS
- you get a traceback

opw-3515647

closes odoo/odoo#139767

X-original-commit: c57bb574721a3610f66320dacdc703abc490d5d4
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-25 20:56:17 +00:00
Aman Patel a56dfd43a2 [FIX] fleet: change Co2 text to CO2
Steps:
- Install fleet.
- Create new. Select a car.
- Goto `Model` page.
- Below CO2 Emissions string there is Co2 Standard string.

Issue:
- In the Engine section, there is a `CO2 Emissions` and a `Co2 Standard` field.
If these are both referring to carbon dioxide, then they should be written
consistently in the same format (CO2). Currently, one has a lowercase `o` while
the other (correct) one has a capital `O`.

Fix:
We are adding the necessary string.

task-3498197

closes odoo/odoo#139761

X-original-commit: 8b4a22baa92f196361f1ef622b55312015cf8128
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-25 20:56:16 +00:00
Nicolas Viseur (vin) 451f4cea3e [IMP] l10n_id_efaktur: do not consume numbers if no taxes
At the moment, the efaktur system will consume a number even
for invoices not using any taxes.
This change will try to avoid that by not consuming numbers
for invoices when no lines has a tax_ids set.

task id #3130665

closes odoo/odoo#139757

X-original-commit: 59c434773c17f81d3a1c160407e8b4533f48e911
Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-25 20:56:15 +00:00
Arnaud Baes c159385502 [IMP] pos_restaurant: Make Restaurant a standalone app.
People must be able to install `point_of_sale` without `pos_restaurant`
if they don't need it. But in order to let users know that they can
install `pos_restaurant` directly, we make it an app, that will also be
selectable from the Start Trial page.

closes odoo/odoo#139733

X-original-commit: 2d9d8ea78f71669486644bdb599d2b4a5cc7a5c8
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-10-25 20:56:13 +00:00
Yannick Tivisse 7ebafb1eb7 [IMP] base: Remove manager rights to user demo
closes odoo/odoo#139731

Related: odoo/enterprise#49562
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-25 20:56:11 +00:00
Yannick Tivisse 4396f05296 [FIX] base: Allow saving My Profile if not group on field
Purpose
=======

Cannot currently save My Profile due to those 2 fields
- attendance_manager_id (allowed for groups 'Attendances / Administrator')
- employee_cars_count (allowed for groups 'Fleet / Administrator')

They are in the SELF_READABLE_FIELDS property, but the method
check_field_access_rights is not taking that information into account.

Part-of: odoo/odoo#139731
2023-10-25 20:56:11 +00:00
Julien Carion (juca) 1693fee3db [REF] web: remove orm service nameGet
This commit removes all usages of the nameGet method of the orm service
following changes introduced by https://github.com/odoo/odoo/pull/122085

task-3377209

closes odoo/odoo#139727

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-10-25 20:56:10 +00:00
Pierre Masereel 92565aae27 [IMP] base_import_module: add fields for industry modules
closes odoo/odoo#139726

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-10-25 20:56:09 +00:00
Gabriel de Paula Felix (gdpf) a2993fc85d [FIX] microsoft_calendar: limit events request range to calendar view
Before this commit, a time window of two years was being used for requesting events occurrences from Microsoft Graph API. This way, events that were not being visualized in the calendar view were being fetched from the API many times, wasting requests and decreasing the calendar app's performance.

After this commit, this time window is limited to the range being shown in the calendar view to avoid fetching events not being visualized and then increase performance.

closes odoo/odoo#139721

Task-id: 3525764
X-original-commit: ceab3ee21d3e6eb4cfcf0a0cd8df40873744beaa
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-10-25 20:56:08 +00:00
Gabriel de Paula Felix (gdpf) 30132c02ef [FIX] microsoft_calendar: performance issue with a lot of recurring events
Before this commit, crap sql query were performed with a lot of recurring events were searched:

```
bad query: SELECT "calendar_recurrence".id FROM "calendar_recurrence" WHERE (((((([...]
((((((("calendar_recurrence"."microsoft_id"::text like '%:XX0') OR (
"calendar_recurrence"."microsoft_id"::text like '%:XX1'))
OR ("calendar_recurrence"."microsoft_id"::text like '%:XX2')) OR ("calendar_recurr [...]
```

After this commit, the search method was replaced for a SQL query, thus not exceeding memory limit anymore when receiving many records from Outlook.

Task-id: 3525764
X-original-commit: 2b089ce43a6290865699c3b9167edc9eb9648a3d
Part-of: odoo/odoo#139721
2023-10-25 20:56:08 +00:00
aliya c2ef126948 [FIX] account_peppol: remove inactive canceled edi users
- If an edi user needs cancellation before they were registered on the SMP,
we should let them cancel and return to the very first step.
We don't need the edi user anymore in that case (no messages could've been
received or sent) so we can safely unlink.
Same is done on the proxy side.
- With that, reopening the registration is no longer needed,
as we currently don't let users reopen their application when they're rejected.

closes odoo/odoo#139718

Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-10-25 20:56:05 +00:00
aliya d5a2a802c9 [FIX] account_peppol: hide peppol_move_state on vendor bills, refunds
- `peppol_move_state` is only useful when sending an invoice/credit note.
  Hide this field from the form view and the tree view for vendor bills and refunds
- when getting new documents from the IAP, ignore messages with peppol state
  `error` as these are not useful for the users.
  Also, if there is an error when creating an invoice from the attachment,
  the vendor bill should still have `peppol_move_state` set to `done`,
  because we have received the vendor bill after all.
  Users can fill out missing details if necessary, by looking at the attachment.

Part-of: odoo/odoo#139718
2023-10-25 20:56:05 +00:00
zel-odoo 8bea49fef6 [FIX] mail:Remove duplicate autofocus code
closes odoo/odoo#139717

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-25 20:56:04 +00:00