Commit Graph
157231 Commits
Author SHA1 Message Date
Julien Castiaux 3d1f486bcc [IMP] *: update modules to use the new geoip API
request.geoip is no more a dictionnary cached in the session. It is now
a full blown object with lazy and smart geolocalisation capabilities.

Among other things, the previous dictionnary API is now deprecated. The
changes are:

* `request.geoip['country_name']` -> `request.geoip.country_name`
* `request.geoip['country_code']` -> `request.geoip.country_code`
* `request.geoip['city']` -> `request.geoip.city.name`
* `request.geoip['latitude']` -> `request.geoip.location.latitude`
* `request.geoip['longitude']` -> `request.geoip.location.longitude`
* `request.geoip['region']` -> `(request.geoip.subdivisions[0].iso_code if request.geoip.subdivisions else None)`
* `request.geoip['time_zone']` -> `request.geoip.location.time_zone`

It is safe to access all the attributes. Doing `request.geoip.city.name`
when the geolocalization failed (missing db, invalid address, ...)
evaluates to None. It does not raise an AttributeError.

Task: 2848206
Part-of: odoo/odoo#91337
2023-01-03 13:16:02 +01:00
Julien Castiaux c59750d824 [IMP] core: smarter geoip
Maxmind offers multiple ip-geolocalization databases, historically we
have been using the City database which contains records on a
city-basis. Many years later it turns out we are primary using geoip to
know the country of the user. Geolocalization in the City database is
considered slow by our standard and we have been clever in order not to
geolocate each request by saving the info in the session.

On the other hand, the Country database that is offered by Maxmind is
much more lightweight and geoip using that country is considered a fast
operation by our standard.

In this work we make Odoo compatible with both the City and the Country
databases. Using multiple database at the same time, we can be smart and
only query each of the two on-demand. If a user ask for its country,
we'll use the fast Country db. If a user ask for its city/timezone we'll
use the slower City db.

By default it loads both database from the `/usr/share/GeoIP/` folder,
respectively the files `GeoLite2-City.mmdb` and `GeoLite2-Country.mmdb`,
you can provide alternative paths using the `--geoip-city-db` and
`--geoip-country-db` CLI options.

In the same mindset as #86015, geoip is still lazy. It is done on-demand
and the result is cached on the current request. The different with the
related PR is that as we know consider geoip to be fast, we no longer
cache the result in the session.

Task: 2848206
Part-of: odoo/odoo#91337
2023-01-03 13:16:02 +01:00
Prakash Prajapati 9f2d9c3143 [FIX] payment_razorpay: sanitize the partner phone numbers in RazorPay
Currently, when the partner phone has space, Razorpay throws an invalid phone exception error.
 In this commit we sanitize the partner phone.

Case 1:
 If partner phone is empty then validation error will be arrived. 'Phone number is required'.

Case 2:
     If partner phone is not sanitized then validation error will be arrived. 'Incorrect phone number'.

 EX: (+91 96385 44240) -> (+919638544240)

task-3113199

closes odoo/odoo#108969

X-original-commit: 38af5ee6a4feba802d50305fab8c001494f4e538
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-03 12:19:20 +01:00
Damien Bouvy b6f2beb943 [IMP] web: list aggregate tooltip positioning
This commit moves the tooltip from the parent element of the list
aggregate to the value itself to avoid having a tooltip that is
not connected to its intended target (here the tootlip's arrow does
not point at the value at all before this commit).

Task-3106190

closes odoo/odoo#108894

Related: odoo/enterprise#35351
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-03 09:52:41 +01:00
niyasraphy b4388a9206 [IMP] spreadsheet_dashboard: translatable name field
before this commit the name field in spreadsheet.dashboard.group and spreadsheet.dashboard is not translatable, and it always appears in english in the dashboard.

after this commit, the name will be translatable and values will be shown in users language in the dashboard.

closes odoo/odoo#108972

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-03 08:54:52 +01:00
smdc-odoo d98ff179d5 [IMP] l10n_sg: Change the Goods and Service tax rate
Starting from 1 January 2023, the Goods and Services Tax rate (GST) will
change and go from 7% to 8%

task-3098705

closes odoo/odoo#108964

X-original-commit: 9b039531bd0073f8abe1e6e949c2031615aa15a3
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Simon Morais Da Cunha (smdc) <smdc@odoo.com>
2023-01-03 08:54:50 +01:00
Jorge Pinna Puissant 3aa417039e [FIX] spreadsheet: time dependant test
Before this commit, the test "field matching is removed when filter is
deleted" failed on 2022 to 2033 year's transition.

Now a patch date is added to avoid the test to be time dependent.

closes odoo/odoo#108947

X-original-commit: 9d08a20d4c84c45799f766529d054b7df8fe0d66
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-01-03 08:54:47 +01:00
Jorge Pinna PuissantandBruno Boi fc47ddc2f2 [FIX] web: invalid datetime range/domain in mockReadGroup
The mock server's mockReadGroup function would not properly compute the
range and domain of the returned groups for datetime fields with groupby
hour.
The year of the range/domain should be the same as the record and not
the current year.

Consider the following:
- a record with a datetime field of value "2016-12-14 12:34:56".
- a read_group with groupby "['datetime:hour']"

The corresponding group would have had the following metadata (considering current year is 2022):
- value: `"13:00 14 Dec"`
- domain: `[["datetime", ">=", "2022-12-14 12:00:00"], ["datetime", "<", "2022-12-14 13:00:00"]]`
- range: `{ from: "2022-12-14 12:00:00", to: "2022-12-14 13:00:00" }`

It now has the following valid metadata:
- value: `"13:00 14 Dec"`
- domain: `[["datetime", ">=", "2016-12-14 12:00:00"], ["datetime", "<", "2016-12-14 13:00:00"]]`
- range: `{ from: "2016-12-14 12:00:00", to: "2016-12-14 13:00:00" }`

X-original-commit: cca1fad650efc13cd1695acb723b9aa9a54ba184
Part-of: odoo/odoo#108947
Co-authored-by: Bruno Boi <boi@odoo.com>
2023-01-03 08:54:47 +01:00
Merel Geens (mege) f9a5020094 [FIX] point_of_sale: fallback to standard price
When creating the POS journal entry for a POS session (or one of its
orders when realtime inventory management is enabled), it's possible for
the stock picking to fail if a product requires a serial number or lot
id and none was provided. After the POS session is closed, this stock
picking can be corrected and the accompanying inventory valuation
entries will be created. However, when using anglo-saxon accounting, the
amount on the COGS line in the POS journal entry will be 0. That's
because the current implementation sums up the values from the stock
valuation layers to determine this amount. If the stock picking failed,
there will be no stock valuation layers so the result is 0.

In other workflows in Odoo like creating an invoice from a sales order
before the delivery is validated, the implementation deals with this
case by falling back to the standard price if no stock valuation layers
are available. This fix does the same for the POS journal entries.

opw-2988701

closes odoo/odoo#108966

X-original-commit: 4aeed49d86b0dfb8e2d1555384458eb6e3358d67
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Merel Geens <mege@odoo.com>
2023-01-03 07:58:52 +01:00
Demesmaeker 7bb0f1f80f [FIX] payment: improve UI of the message in the transaction
closes odoo/odoo#108955

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-02 20:39:56 +01:00
Jinjiu Liu b5e8f85eaa [FIX] *: missing date filter for stat button
Reproduction:
1. Install Sale, Inventory
2. Go to Sale->products, search for “Customizable Desk”
3. Hover the cursor on the stat button “Sold”, from its definition, the
analysis should show the sold items in last 365 days
4. Click on the “Sold” button, no filter for “Order Date”

Reason: in V14, the “time_ranges” feature is removed. Thus using it in
the context won’t create any filter for searching

Fix: We use a custom filter to replace the time range "last_365_days".
We also make sure that the domain produced by that filter is the same as
the one used to compute the button count server side (this was not the
case in Odoo 13 when "last_365_days" was used). Similar fix is also done
in mrp and l10n_ar. Mind the utc convert for correct results.

opw-3000595

Related commits:
Removal of time_ranges: https://github.com/odoo-dev/odoo/commit/be5a51a345b8986da0e19627260f64f984e11ae9
Date filter fix: https://github.com/odoo/enterprise/pull/10938

closes odoo/odoo#108951

X-original-commit: 03057029b210a59f3d7012aeea66cfa95790a8c8
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2023-01-02 20:39:53 +01:00
Thomas Lefebvre (thle) f100decbf4 [FIX] web: set loadIrFilters to true
Steps to reproduce:
- install "sale_management" module;
- create a quotation;
- add a product;
- click on "Search More...";
- create a favorite filter;
- leave and return to the Dialog window.

Issue:
No previously saved filter appears.

Cause:
The `loadIrFilters` parameter has a default value equal to `false`.

Solution:
Set the value of the `loadIrFilters` parameter to `true`.

opw-3105096

closes odoo/odoo#108946

X-original-commit: 7b60ee37e31d92d79108bd4e472553a452c2b0be
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-01-02 20:39:51 +01:00
Nshimiyimana Séna 3aeed55764 [FIX] tools: recognize SVG with explicit namespace
Currently, odoo's mimetype guesser does not recognize SVGs with explicit
namespace.

closes odoo/odoo#108938

X-original-commit: a1257cad9d5a63d940da041f355c13ea3eba90ce
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-01-02 20:39:49 +01:00
Nshimiyimana Séna 824d0c0cc4 [FIX] website_sale: show correct pre-discount price on website
# Steps to reproduce

* install eCommerce and Sales
* go to settings and activate `Discounts`, `Pricelists` and
   set `Display Product Prices`  to `Tax Included`.
* create a pricelist with a discount, making sure to set (in the
  configuration tab):
  * `Discount Policy` to `Show public price & discount to the customer`
  * `Selectable` to `true`
* go to a product's page, select the pricelist you made and add the product
  to the cart.
* go to the shopping cart

# The Issue

On the shopping cart page, the pre-discount price should be tax-included
,but it is not.

opw-3112462

closes odoo/odoo#108935

X-original-commit: f4095614e8a875d66efbbb8c579c73c52b8a1c1c
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-02 20:39:46 +01:00
Lucas Vermeulen (luve) 6be2f70759 [FIX] e-commerce : pricefilter activated only when needed
In the website edition mode, the pricefilter option was displayed even if the attributes were not (top and left). The pricefilter was also depended on the fact that the user was displaying categories or not. After improvement, the pricefilter only depends on the attributes display (top or/and left).

Also, if the attributes are activated and only displayed on the top part of the website, then the pricefilter (if activated) should also be displayed only on the top part, and not on the left anymore.

task-3092992

closes odoo/odoo#108934

X-original-commit: b4c3548736f6c19d10a3fc4f358e7303f02d8a81
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-02 20:39:44 +01:00
Nicolas Bayet 7e0395feb1 [FIX] web_editor: prevent collaboration to restart
When a record gets deleted, there is no more collaborationResId.
If there is no collaborationResId, prevent the collaboration to
restart, otherwise it will try to subscribe to a channel.
When trying to connect to a channel without record, there
is a cache miss being logged.

Task-3045910

closes odoo/odoo#108933

X-original-commit: e15e8fa1b039cb200686cf49f49075ec7d5486d4
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-02 20:39:39 +01:00
Lucas Vermeulen (luve) 7f0d0486c4 [IMP] e-commerce : click and drag for the category filmstrip
In order to display all the category of the filmstrip, It was possible to use either the small bar by clicking on it and dragging, or to use the sliding move on the track pad. Since the bar to be dragged is very small, it was difficult to use it. Being able to click and drag everywhere on the filmstrip makes the move easier for the user.

task-3056398

closes odoo/odoo#106795

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-02 20:39:31 +01:00
PoMa 1b0fdb8471 [IMP] l10n_tr: Make account names translatable
closes odoo/odoo#86872

Related: odoo/enterprise#35238
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-02 20:39:27 +01:00
Ivàn Todorovich 2524d7bb3a [IMP] product: Use a subquery to search on product.template barcode field
closes odoo/odoo#77088

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-02 20:39:22 +01:00
Ivàn Todorovich 87bdc87d92 [IMP] product: Improve search on product.template standard_price
There's no need to use a secondary search. We can directly search on the
one2many field instead.

Part-of: odoo/odoo#77088
2023-01-02 20:39:22 +01:00
Ivàn Todorovich 0730514697 [IMP] product: Add helper methods to compute and set variant fields.
Part-of: odoo/odoo#77088
2023-01-02 20:39:22 +01:00
lejeune quentin cf63e07263 [FIX] hw_drivers: do not rename IoT in Windows
If we use the token to connect a IoT in Windows
We execute the file rename_iot.sh

So with this commit we give the ability to rename
the IoT only in Linux (with a raspberry)

closes odoo/odoo#108922

X-original-commit: a2bf3c7576f63eb037440c7bf076f5c0b50109d8
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-01-02 19:38:44 +01:00
niyasraphy 2a32cdc3cf [IMP] base: add form view for ir.actions.client model
before this commit, there is no form view defined for the ir.actions.client model, so opening the form view of this model returns the odoo auto created form view, which is not looking good in ui.

the form can be opened by clicking on Edit Action button in the debug tool from a client action menu like Discuss

closes odoo/odoo#108829

Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-01-02 17:48:44 +01:00
hapa-odoo a73b925fdd [FIX] l10n_in: fix invoice PDF report
Unable to print the customer address on invoice report while the company country is INDIA and bill to ship to address is different.

To reproduce the issue:
Step 1: Create an Indian company
Step 2: Activate Customer Addresses from setting
Step 3: Create an invoice with a different Bill to Ship to address
Step 4: Print the invoice
boom! The customer's address is not there!!

Origin from: https://github.com/odoo/odoo/commit/eb23c0c9d513bdefba20f523e70a807f9a634c57

closes odoo/odoo#108908

X-original-commit: 2a83bb3079462bda720935f05dd46241ccae5996
Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-02 13:55:53 +01:00
Hubert Van de Walle (huvw) c5e324cbe4 [FIX] web: attach_document widget now works when triggered from a dropdown
Steps to reproduce
==================

- Use a mobile viewport
- Go to Expenses
- Create a record
- Enter a description and a category
- Click on Action
- Click on Attach Receipt
-> Nothing happens

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

When the button is clicked, the dropdown is closed. This means that the
AttachDocumentWidget and FileInput Components are both destroyed.

Solution
========

Instead of using the FileInput Component, use an input element outside
the DOM.

We also use `this.env.services.orm` instead of `useService("orm")`
because the last one does nothing when the widget is destroyed

opw-3065590

closes odoo/odoo#108897

X-original-commit: 84d50b40f150f251a81e128fa9645d7fcc729dab
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-01-02 13:55:50 +01:00
Benoit Socias 638d0e875d [FIX] web_editor: prevent dropping form fields outside of their form
Drop zones are available outside form when dragging form fields.
This leads to errors whenever the field is dropped outside a form.

This commit removes all drop zones outside the form when a field is
dragged.

Steps to reproduce:
- Edit Contact Us form.
- Drag'n'drop a field to the footer.
=> Error popup (should not be allowed in the first place)

task-2855670

closes odoo/odoo#108863

X-original-commit: 31aec4f89eea5f6095e420137c9603732674901c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-01-02 13:55:48 +01:00
Michael (mcm) 50d23d6253 [FIX] web: support multi select in domain selector
Before this commit, domain selector did not support
selection field with "in/not in" operator because the
field does not accept these operators.
This commit adds the support as the operators can still be used.

closes odoo/odoo#108628

X-original-commit: 8ddd5e60f34f2ae9ca52fe936dc8da7054d1dc5e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-02 13:55:45 +01:00
Michael (mcm) 4d520d1679 [FIX] web: show correct domain operator
Before this commit, the domain selector did not list the
operator if it is not accepted by the field
i.e. [['state', 'in', ['draft']]] is not listed in the domain
selector because "in" is not accepted by a selection field.

Now, the domain selector shows the operator even if it
is not accepted by the field.

X-original-commit: 2ae3adbce8cae17116f96f0a86296e41faf55246
Part-of: odoo/odoo#108628
2023-01-02 13:55:45 +01:00
Chong Wang (cwg) 956cdd8a22 [FIX] web: fix translation dialog alignment
before this commit,
in the translation dialog for a model_terms translated field, English term and
translated terms are shown in different rows

after this commit,
An English term and its translated term are in the same row.

opw-3086352

closes odoo/odoo#108900

X-original-commit: 6cfede8c9b7ac317a602d36a227d7809c3b21964
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
2023-01-02 12:56:35 +01:00
niyasraphy 64135d90ad [FIX] spreadsheet_dashboard_{}: remove gantt, map and cohort views from action
before this commit, on clicking the dashboard from community edition the message is shown that "No default view of type 'gantt' could be found !". similarly for cohort and map views also.

as gantt,map and cohort view is part of enterprise edition, removing it from actions.

closes odoo/odoo#108899

X-original-commit: 6729613b5aef8eaaa62b5f76165fafbb46b94be5
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-01-02 12:56:33 +01:00
Hubert Van de Walle (huvw) d918d27ede [FIX] hr_expense: mobile app link now working
Steps to reproduce
==================

- Go to Expense
- Type some random string in the search bar in order to have no match
- Click on one off the app button
-> An error occurs

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

The QRModal was not ported to owl

opw-3070434

closes odoo/odoo#108898

X-original-commit: d3b3e6ebb228453938aeac8286f7e3a916b6a027
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-02 12:56:28 +01:00
Joanna 4d01681b31 [FIX] point_of_sale: pos_session_check_product_wizard layout
utilize the full width and fix the typo

closes odoo/odoo#108896

X-original-commit: f5d700f33a97014c79f93a9415ce51bf7c77d6be
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-02 12:56:25 +01:00
Pratik Raval a0a6171378 [IMP] event*: move event type data to demo
* = event, event_booth, website_event_questions

We used to provide data for the event templates (event.type) to provide a basic
configuration to play with. However, they are not much helpful, and sometimes
can confuse the users.

This commit removes the data records for the event templates, and on the
m2o field on event, now we let users create/edit them on the fly so that
they can explore the feature by themselves.

We have also added demo data to the 'Exhibition' and 'Sport' templates,
having booths and questions, respectively. Along with that, we have added
relevant data to the demo events where both templates were used; and set
auto-confirm to be false by default when creating a new event template.

taskID-2854123

closes odoo/odoo#99421

Related: odoo/upgrade#3849
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-02 12:56:21 +01:00
Alexandre Kühn 732bb71628 [FIX] mail: improve add in model sorted field
Before this commit, processing of pinned channels during
init_messaging was slow due to sorting them in sidebar
of discuss.

This commit improves the sort so that we do a binary insertion
on add rather than push + quick-sort.

Before what took 2.2 seconds now takes around 0.6 seconds.

closes odoo/odoo#108839

X-original-commit: dd4c3c0a8e38147065980cf2c431b056a5253255
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-01-02 11:53:21 +01:00
Valentin Vallaeys (vava) 705e1fb902 [FIX] payment: test now uses currency of the provider
closes odoo/odoo#108561

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-02 11:53:16 +01:00
Lucas Vermeulen (luve) 1618791762 [IMP] e-commerce : added custom fields to product creation modal
Some basic fields were missing in the front-end product creation modal (i.e. the sales price).

task-3093208

closes odoo/odoo#107420

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-02 11:53:11 +01:00
Danial Sheikhani 21a40421ca [IMP] website_sale: make compare_list_price visible in comparison
Compare list price as base price or list price in comparison or comparison preview

task-2795129

closes odoo/odoo#87134

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-02 11:53:08 +01:00
niyasraphy 123912784b [IMP] snailmail: add missing value to selection field
From _snailmail_create function the value passed to error_code selection field
is ATTACHMENT_ERROR. However it is not existing the selection field.

In this commit we add the missing value to selection field.

closes odoo/odoo#108226

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-02 10:53:54 +01:00
Rodopho Cammarosano de Lima (rcdl) e9dfb08021 [IMP] web_editor: clean buttons from icon toolbar
Some buttons/actions were unsuitable for icons (were made for images).
fa-icon for toggle icon spin was misleading ("refresh").

task#2737569

closes odoo/odoo#104163

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-02 10:53:51 +01:00
Romain Derie ebfa84d8e3 [FIX] test_website: add test for duplicate sitemap URL fix
See previous commit, it fixes duplicate URLs from sitemap.
It appears when there is a custom defined sitemap method on a route
defined with multiple endpoints.
There will be as many duplicates as there is endpoint.

closes odoo/odoo#108670

X-original-commit: 9ca24c3020d98dcd6e9266ae76adb13afbf1bd40
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2023-01-02 09:54:12 +01:00
Jeremy Kersten d335cb59dd [FIX] website: avoid duplicate in _enumerate_pages
Before this commit, we have redundant loc in sitemap.
When we iter the rules from the routing map, the comparison between
two same endpoints are not equal since httpocalypse.

After this commit we compare the function of the endpoint to know if we
have already processed it or not.

X-original-commit: c408de398c6b4e59cd9a233df251147d8750b9f2
Part-of: odoo/odoo#108670
2023-01-02 09:54:12 +01:00
vishal padhiyar b589c95ed9 [FIX] web_editor: mailto in footer not working
Before this commit:

While creating a website: in the footer, when trying to edit the link mailto:
there is an "https://" added and preventing the link to work successfully.

After this commit:

- Whenever we try to edit mailto link and save it then in _parse(node) function
  it will set link label as new URL.

- For that we add condition by which it will avoid further operations and Now
  when we try to edit link mailto then there is no "https://" added and link
  works successfully.

Task-2977682

closes odoo/odoo#108639

X-original-commit: 680a204b952e6281d7e1bcdfe0730688ee698a9d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-02 09:54:09 +01:00
Nicolas Bayet 544afd6de9 [FIX] web_editor: prevent error on font-size change
Before this commit, changing the font size of an element with one
ancestor having the same font size could trigger a traceback. For fixing
that issue some code has to be refactored to handle the setFontSize case
in formatSelection. As a side effect of this refactoring, nested
font-size is now properly handled (see added tests).

task-3086301

closes odoo/odoo#108633

X-original-commit: d003b82043468bcf609006c5910ac8fc9520e136
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-02 09:54:07 +01:00
niyasraphy 7bf3502c02 [IMP] account: hide field reversed_entry_id when no value
the readonly field reversed_entry_id in account.move model is always visible in the form view in the journal entry screen. adding the invisible condition to hide the field when the field doesnt have value in it.

closes odoo/odoo#108006

Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-02 09:54:02 +01:00
bat-odoo a634aafe4d [REM] l10n_in*: removed multi GSTIN
In this commit, we have removed the multi-GSTIN feature from the journal.

Multi-unit is created if there is a different branch with the same GSTIN(vat) so
now we decided to create a multi-company instead of this.

because functionally we discuss with Indian CA and we find out that it's good
practice if we create a different company.

The main problem is one company and the same Bank account but we also find a
functional solution using a transfer balance to another company.

so we remove this so our other integrations do not have complexity
like E-invoice, E-waybill, GST E-filing

TaskID - 2723109

closes odoo/odoo#107234

Related: odoo/upgrade#4107
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-02 09:53:57 +01:00
Xavier-Do 52afc50881 [FIX] web: disable time dependant tests
Breaking on 2022->2033 transition
Those tests should be adapted to work without hardcoded dates.

closes odoo/odoo#108884

X-original-commit: 6945966b49a58ce3c0976dce37e324b37af8367a
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-01-01 20:14:49 +01:00
Xavier-Do 930c3c8f69 [FIX] hr_contract: fix demo contract starting
With the new year transition, some demo data relative to the current
time are now inconsistent with each others:

- Some payslips starts 2 mount before now.
- the contract starts this year, first January.

This means that
- the contract starts 2023-01-01
- the payslips ends 2022-12-01

Leading to an error
"The following employees have a contract outside of the payslip period"

Note that it looks like there is a also a demo/admin inconsistency
in data but this is out of the scope of this fix.

X-original-commit: ae259f93b6ccaaec17a8d32df6282278e015c395
Part-of: odoo/odoo#108884
2023-01-01 20:14:49 +01:00
roen-odoo efe52d50bb [FIX] point_of_sale: correctly compute cash profit for closing popup
Current behavior:
If you add cash at the opening of a session that already has cash in the
cash register; the closing popup will show a negative profit (loss) for
the cash payment method.

Steps to reproduce:
- Open a POS session
- Add cash to the cash register (50€)
- Close the session
- Open a new session
- The popup show that there is already 50€ in the cash register, add
  cash to the cash register (100€)
- Close the session, the closing popup will show a loss of 50€ for the
  cash payment method. Wich is not true, it's a profit of 50€.

opw-3101297

closes odoo/odoo#108870

X-original-commit: d881de9079bc9d8cab6811872eaa2c2138f6612d
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-12-31 02:16:42 +01:00
Loan (LSE) fd0d077a7a [FIX] pos_stripe: use payment provider method for payment capture
Before this commit:
 If you make a PoS payment using a Stripe terminal, you will have
 the following JS Traceback:
 ```js
 TypeError: Cannot read properties of undefined (reading 'data')
    at Proxy.captureAfterPayment
 ```

 This happens on the line:
 `capturePayment.charges.data[0].payment_method_details.card_present.brand;`
 It occurs as Stripe API most recent version does not provide the
 `charges` value anymore.
 > The charges property on PaymentIntent has been removed
 source:
 https://stripe.com/docs/upgrades#2022-11-15

After this commit:
 We skip the data if not mentioned on the JS side.
 In addition of that, we use the `_stripe_make_request`
 method of the Stripe payment provider as it
 force in its header to use a certain Stripe API version
 compatible with the features that we are looking for.

opw-3097460

closes odoo/odoo#108851

X-original-commit: 6a6057caf63d7e6a60dac190b2ea1ebb954d8f6a
Signed-off-by: Loan (LSE) <lse@odoo.com>
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-12-30 17:24:49 +01:00
Nicolas Lempereur d040a518bc [FIX] l10n_eg_edi_eta: connect ETA server w/openssl 3.0
The eta.gov.eg production servers can't be connected using OpenSSL 3.0.

This is happening because of the change in:

https://github.com/openssl/openssl/commit/72d2670bd21becfa6a64bb03fa55ad82d6d0c0f3

that now by default prevent unsafe legacy renegotiation that eta.gov.eg
is using.

To prevent this issue, we add the SSL_OP_LEGACY_SERVER_CONNECT option to
ssl context of queries to the eta.gov.eg servers.

SSL_OP_LEGACY_SERVER_CONNECT is not available before python 3.12, so
the value is hardcoded in Odoo.

opw-3102485

closes odoo/odoo#108848

X-original-commit: 0ae8c55ff2db8810a990407e706c4c86b221d4c4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-12-30 14:14:04 +01:00