Commit Graph
161605 Commits
Author SHA1 Message Date
Antoine Dupuis (andu) 25cfb97f7e [FIX] l10n_it_edi: Generate correct XML for negative invoice lines
When creating an invoice with a positive line and a negative line, with
different taxes, the DatiRiepilogo node for the tax of the negative
line contained positive amounts when they should be negative.

This is because we were applying `abs()` too naively in the XML template
and in the code of _l10n_it_edi_prepare_fatturapa_tax_details.

This bugfix commit changes the logic to no longer use abs().

opw-3316300

closes odoo/odoo#122982

X-original-commit: 0241e96fe12401f0891efc00f840e03d0c0219fd
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-05-30 23:51:41 +02:00
Trịnh Ngọc Hưng 2fab3af4ff [FIX] account: Domain fields transfer_account_id with deprecated is
False

closes odoo/odoo#122978

X-original-commit: cff6ce2b7a69ca38e3de0e613e5d19163fb1ec8b
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-30 22:45:32 +02:00
Florian Charlier 466ab1eee6 [IMP] gamification, *: imp selection of cron-updated goals
*: base

In the cron updating challenges goals, we were historically filtering
in records of users that logged in since the last update. This doesn't
work because sessions can last a long time, so users are active between
cron runs but their goals are not updated and stale reports were sent.

We temporarily fixed this in v14.0 by updating all goals for internal
users, but this can lead to unnecessary computations too, and still
misses goals of active portal users.

Instead, we are here using the `bus.presence` records to track user
activity, combining it with the session lifetime to avoid indefinitely
fetching old goals that couldn't need an update.
This works for both internal and portal users.

Note: we update stale base comments in favor of exposing bus.presence
to guide developers.

Task-3148858

closes odoo/odoo#121763

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-30 19:09:55 +02:00
Damien Raquet 76a6a0d2ec [IMP] sale_project: allow the creation of new records from the SO
view

The goal of these changes is to make it easier for the user to manage
their SO. They can create new tickets/timesheets/etc without being
forced to leave the application to open the one they need, nor do they
need to manually link the new record to the SO

task-2954409

closes odoo/odoo#100300

Related: odoo/enterprise#31391
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-30 19:09:53 +02:00
Đào Nam 57168aa648 [REF] account: Create function _get_aml_default_display_map to allow other modules to inherit and add new key pairs
closes odoo/odoo#122738

X-original-commit: 98cda20c332f65578ff2c2257b25fbb048dfae77
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-30 18:03:59 +02:00
Anita (anko) 3c9c848e55 [FIX] payment: fix multicompany payment confirmation onboarding step
User was not able to go through onboarding if they switched company.
By default it tried to edit default payment provider that was conected
to the main company so other companies were recieving Access Error.

opw-3281770

closes odoo/odoo#122590

X-original-commit: ffda55101739f9a99cabd6caee52dcb8d18d8fed
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-05-30 18:03:53 +02:00
Aurelien van Delft (avd) 89b4ccd3ae [FIX] base: speedup res_partner's _compute_avatar
Group the res_partners in self by placeholder_path value before
calling __setitem__ on each group. Because placeholders are
independent from the recordset, we can set the value
of res_partner[avatar_field] to a placeholder for a recordset
of partners. When self contains lots of partners without
image_field value, this speeds up the _compute_avatar function
noticeably. This in turn speeds up stuff like loading
the Contacts KanbanView (search_read on res_partner).

Example speedup: In a database without any image for the partners,
search_read for avatar_128 with limit=80: 609ms -> 64ms.

opw-3128771

closes odoo/odoo#122884

X-original-commit: 34e97b4c65b7392576d94b870e22e74df14f9dd2
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-05-30 15:39:55 +02:00
Nishant Jain (niai) 4a935d3937 [IMP] l10n_in: audit trail improvement
With this commit, Made the tree line clickable instead of clicking View Related
Document Button. Updated the description, to be similar to chatter in audit trail
tree view. Also Updated error message while deleting entries once it's posted for
Indian Company.

closes odoo/odoo#122566

X-original-commit: 8833329191acc56468a62b3f00171c14d0252eb7
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nishant Jain(niai) <niai@odoo.com>
2023-05-30 15:39:50 +02:00
Zeel Patel baef8c5322 [FIX] account: prevent trackback when installing stock_account after uninstall any l10n
Before commit
1. install the localisation module
2. uninstall that module
3. try to install stock
   - traceback is generated - https://pastebin.com/eGGYZ1k1
After commit
applying this commit will fix this issue

sentry - 4184561125

closes odoo/odoo#122556

X-original-commit: 95a67a24870f7ca0e9d9f865ce0279aca9fa2699
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-30 15:39:48 +02:00
Kevin Baptiste 9af60a5092 [FIX] hr_recruitment: separate contacts for employees
The fix introduced in odoo/odoo#114903 created another issue: changing
the work email would change the private email also, breaking the
seperation of the contacts for the employee.

The initial behavior was correct:
 - a res.partner for the work details (email, phone, etc.)
 - a res.partner (of type private) for the personal details of the
employee.

task-3284664

closes odoo/odoo#122880

X-original-commit: 290465e57dfcb8503e382a418e0ba4498ea5693b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-30 14:17:04 +02:00
Matheus Leal Viana (malv) 5b206c1c57 [IMP] sale_stock: test propagation of incoterm on down-payment
Ensure that, when creating a down-payment invoice for a SO with an incoterm, this invoice should have the same incoterm as the SO.

Steps:
1. Create a SO with an incoterm
2. Create a down-payment invoice for this SO
3. The new invoice should have the same incoterm as the SO

closes odoo/odoo#122770

Opw: 3284556
X-original-commit: d854045c4d25216394a834e44f9948303529c302
Signed-off-by: malv-odoo <malv@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-05-30 14:16:59 +02:00
FrancoisGe 7c3a3c6b70 [FIX] web: multi sources definitions in kanban
Before this commit, in a kanban view with a properties field, if the
records have multiple sources for their properties then the view crashes.

Why?
The kanban record tries to make properties accessible from record in the
kanban card. This is not useful, we don't want to be able to do "record.properties.hd32ndls".

Solution:
Properties must not be accessible from records in the kanban card.

How do we reproduce?
    - Go to a kanban view with a properties field
    - Have a record with property A of type integer and another record which
    has no property

Before the commit:
The view crashes because we're trying to format the value of the second
record for property A, which it doesn't know.

After the commit:
The view is displayed correctly.

closes odoo/odoo#122833

X-original-commit: 735f34f29150ab1782f68d77c993dbe3227f998b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-05-30 13:03:45 +02:00
Louis (loco) 9578b2bbd6 [FIX] website: enable to use quotation mark for field labels of form
Steps to reproduce the bug:
- Drop the "Form" snippet on the website.
- Add a new field.
- Replace the field label by two quotation marks (`""`).
=> Traceback appears.

Since [1], it is possible for the user to create forms whose fields can
have a conditional visibility, meaning that the field is only visible if
another field in the form meets certain conditions. Due to that, there
is a mechanism that verifies if a condition on a field should be updated
when the user modifies the label of a field. To do so, a `querySelector`
is searching for an element that has a `data-visibility-dependency` set
to the previous field name by doing a querySelector of type
`querySelectorAll('.s_website_form_field[data-visibility-dependency="${previousInputName}"]')`.
Because `previousInputName` is set to `"`, it is not considered as a
character and an error is thrown.
To resolve this problem, strings that are stored in `name`, `data-name`
and `data-visibility-dependency` are encoded: All the occurrences of `"`
are replaced by `&quot;`, all the occurrences of `'` are replaced by
`&apos;` and all the occurrences of ``` ` ``` are replaced by `&lsquo;`.

[1]: https://github.com/odoo/odoo/commit/2dcbfecf3c10687a2cd3af36335d5be70c904fce

opw-3246341

closes odoo/odoo#122782

X-original-commit: ccaf4f1e52f10308ef507059316732c02ad6e6e4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: loco-odoo <loco@odoo.com>
2023-05-30 13:03:42 +02:00
Louis (loco) cd82c87159 [FIX] website: enable to use addCustomField function with more types
The goal of this commit is to be able to use the `addCustomField`
function with a `type` argument that is different of `checkbox`,
`radio` or `select`.

opw-3246341

X-original-commit: 34b3770ad1ee9c872acaf4f82ac3c6cf52d5d333
Part-of: odoo/odoo#122782
2023-05-30 13:03:42 +02:00
Adrien Widart (awt) 2dac9e6851 [FIX] stock: ensure the product policy of a storage category
When processing several SMLs at once, the 'same product' policy of a
storage category is not respected

To reproduce the issue:
1. In Settings, enable:
   - Multi-Step Routes
   - Storage Categories
   - Packages
2. Create a Storage Category SC:
   - Allow New Product: same
3. Create two locations L1, L2:
   - Parent: WH/Stock
   - Type: Internal
   - Storage Category: SC
4. Create a putaway rule:
   - When in: WH/Stock
   - Package type: Pallet
   - Store to: WH/Stock
   - Having Category: SC
5. Edit the warehouse:
   - Incoming Shipments: 2 steps
6. Create two products P01, P02:
   - Type: Storable
7. Create a planned receipt R:
   - To: WH/Input
   - Operations:
     - 1 x P01
     - 1 x P02
8. Mark R as Todo
9. Create two packages:
   - 1 x P01 in PK01 (! PK01 must be a Pallet)
   - 1 x P02 in PK02 (! PK02 must be a Pallet)
10. Validate R
11. Open the related internal transfer

Error: Both packages are redirected to L1. Considering the product
policy of SC, one line should be redirected to L1 and the second one
to L2

To apply the product policy, the code looks at the quants of each
location. But it does not consider the incoming SMLs. Therefore, when
applying the putaway rule to the first SML, it selects L1 (which
makes sense). Then, for the second SML, because it does not see the
first one, it considers that L1 is empty and can be selected, hence
the error.

OPW-3204924

closes odoo/odoo#122767

X-original-commit: 8bde894638838b449d097e7d75092aa15c646c74
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-05-30 13:03:39 +02:00
Alexandre Kühn 6ead25b236 [FIX] web: make disabled date visible in dark theme
Before this commit, calendar view in dark theme did not visually
show the disabled date, such as weekends.

In white theme it's fine because bg-view is white, so gray-200 on
white is visible. In dark theme, however, bg-view is identical to
gray-200, so it's not visible.

This commit fixes the issue specifically in dark theme by showing
disabled dates with gray-300.

closes odoo/odoo#122753

X-original-commit: 968b4a284acab3f67f192f1029abbbd1edb2b442
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-30 13:03:36 +02:00
Adrien Widart (awt) 8ff484574a [FIX] stock, *: write on WH with deleted routes
*: mrp{,_subcontracting{,_dropshipping}}, purchase_stock

When a route is deleted, it is no more possible to write on a warehouse

To reproduce the issue:
1. In Settings, enable "Multi Steps Route"
2. Delete the route "Buy"
3. Edit the warehouse:
   - Receipt: 3 steps

Error: a UserError is displayed because of the missing buy route,
which does not make sense, the warehouse receipt should be updated

Even worse: step 3, try to install `mrp_subcontracting` and it will
lead to a parse error. It comes from:
https://github.com/odoo/odoo/blob/3f389b4769d947b52985c0a15eae5be59b1e28f7/addons/mrp_subcontracting/data/mrp_subcontracting_data.xml#L10-L13
Again, we try to write on the warehouse -> not possible

When writing on a warehouse, we will check if we have to
create/update some rules:
https://github.com/odoo/odoo/blob/3b801a6d48f1feffd1b87a7d54731ab58e8d63e9/addons/stock/models/stock_warehouse.py#L202-L206
We will then try to get the buy route
https://github.com/odoo/odoo/blob/1b525febfab839fdb9d6ff66107a9c0c833b92be/addons/purchase_stock/models/stock.py#L35
Which will lead to the user error
https://github.com/odoo/odoo/blob/3b801a6d48f1feffd1b87a7d54731ab58e8d63e9/addons/stock/models/stock_warehouse.py#L379

sentry-4128085959

closes odoo/odoo#122743

X-original-commit: 4323e2ec5d316fe83a0184c97230d21ea122ef99
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-05-30 13:03:33 +02:00
uso-odoo 113d9f1d8d [FIX] stock_account: getting value from context in stock valuation layer
Attribute Error: 'frozendict' object has no attribute 'default_product_id'
traceback that occurs in stock/stock_quant: action_inventory_at_date
was caught by a sentry.

steps to produce:-

- Install inventory module
- Select any product from the menu item/reporting/stock
- Click replenish button & from that replenish wizard, select the product again
- Then click the forecasted stat button and in forecast click the On Hand button
- Then click Inventory At Date.

At this moment you find a traceback.

Because default_product_id is not getting from the context in inventory.

Applying these changes will resolve this issue.

sentry:-4148733813

closes odoo/odoo#122741

X-original-commit: ca58b13d63702ac2ec8d74b855b90058bf18eb7b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-30 13:03:31 +02:00
Benjamin Vray 5fd185ef85 [FIX] website: fix adding same font family twice
Steps to reproduce the bug :

- Add the same google font twice with the font family selector in the
option tab of the editor panel.
- The font will be displayed only once in the font selector menu but 2
trash icons will be added, one for the added font and one for the font
that was already there.

This commit fix this and allows now the user to add the same font twice,
but only to replace a served font by a local font. The opposite does not
make sense, but if the user really wants to replace a local font with a
served, it is always possible by deleting the locale beforehand.

In addition, this commit adds a cloud icon next to the default fonts of
the theme. Since these fonts are served by Google, it is logical to have
the cloud icon. This is consistent with the cloud icon that is present
when the user adds a font served by Google.

task-2998689

closes odoo/odoo#122652

X-original-commit: 948ff01e64e5d71d60d209d074dd6be6510fe794
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-05-30 13:03:28 +02:00
Jeremy Kersten a89af09120 [FIX] http_routing, utm, website: set expiration date on some cookies
The 'frontend_lang' cookie is used to 'cache' the user's preferred lang.
We want to make sure that this language preference is preserved for a
longer period of time than just the life of the browser. This means that
even if you quit your browser and come back into the year, your
preferred language will be used, until you choose to remove your cookies.

The 'utm_*' cookies are used to 'track' where you are coming from on the
instance. The purpose of these cookies is to know the tracking value
to improve the overall user experience or compute the profitability of
some campaigns. Now we keep these cookies for 1 month.

closes odoo/odoo#122573

X-original-commit: 058e0abcf621796bf23d8dcaaf3b2297f632b5fd
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2023-05-30 13:03:25 +02:00
William Henrotin 6e23e879f9 [FIX] stock: hide detailed operation in draft
The draft state should only allows setting the initial demand
This commit also allow editing the reserve quantity at the move line
creation

closes odoo/odoo#122445

Task: 3256447
Related: odoo/enterprise#41548
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-30 13:03:20 +02:00
Arnold Moyaux e650d20e4d [FIX] stock: don't set draft move with 0 quantity
Usecase:
- Create a picking and a move without quantity
- Click or the show detail or save

The picking goes into the state draft while it shouldn't.
It happens because when a quantity done is set, it will
goes to process_increase that will assign the move. With
0 qty, it's not assign and stay in draft (default value)
The picking state is then computed based on the move state.

To fix it, force the state to assign on stock.move in immediate
transfer without quantity.

Part-of: odoo/odoo#122445
2023-05-30 13:03:20 +02:00
William Henrotin 71711f864e [FIX] stock: adds package and owner in quant display name
In case package and consignment settings are activated, choosing a
quant to create a move line is easier if the package/owner is in the
quant name.

Task: 3256447
Part-of: odoo/odoo#122445
2023-05-30 13:03:20 +02:00
William Henrotin 4d904c0dc4 [FIX] stock: hide quants for consumable
In the detailled operation view, hide the `quant_id` column for
consumable products as they have no quant

Task: 3256447
Part-of: odoo/odoo#122445
2023-05-30 13:03:19 +02:00
William Henrotin 8ca098480a [FIX] stock: display quant with no data
Give a proper string to quant with no data to display

Task: 3256447
Part-of: odoo/odoo#122445
2023-05-30 13:03:19 +02:00
William Henrotin fddf06f5a3 [FIX] stock: autofill quantity
Creating a stock move line from a stock quant should prefill the
quantity done up to the initial demand

Task: 3256447
Part-of: odoo/odoo#122445
2023-05-30 13:03:19 +02:00
William Henrotin 233ebddef7 [FIX] stock: open stock quant form view to create move Lines
If no stock quant are founded in the list when adding a new move line in
the detailed operation. The `new` button opened a form view on
stock.move.line model instead of stock quant.

Task: 3256447
Part-of: odoo/odoo#122445
2023-05-30 13:03:19 +02:00
William Henrotin 1a61dc03d9 [FIX] stock: use simplified quant list view
This commit change the quant list view displayed in the detailed
operation view to remove unecessary buttons

Task: 3256447
Part-of: odoo/odoo#122445
2023-05-30 13:03:18 +02:00
Noe Antoine 311f53b154 [IMP] website_event_booth{_exhibitor}{_sale}: add chevrons to booth process
CHEVRONS

Add chevrons to the event booth front-end process. A template is added
to be called in booth choice and form views, and the one called from js
is also updated with chevrons. The code is minimized, and fits for the
three current steps only.
- Booth Selection
- Contact Details
- Confirmed / Payment

CLICKABLE + REMEMBER BOOTH CHOICE

To ease the process of changing booth / booking another one, the
"Booth Selection" chevron is clickable and highlighted on hovering.
Also, it will keep booth_ids and booth_category_id url parameters.
From that, the category will be selected and the booth_ids checked
(if available), the first time the selection screen is loaded (once
the user goes between booth categories, it will not remember booths
any more and not preselect any) In order to do so, the arguments are
added to the appropriate methods in controller (and overrides), with
particular attention to match format. (string vs int...)

SCSS

Styling is added in website_event_booth.scss. Cautions are taken to
ensure proper chevrons coloring even with edited theme colors.

DYNAMIC WORDING

Instead of 'confirmed', 'payment' is used in chevrons, and "Go to
payment" instead of "Book my Booths" in the contact details form,
if one of the following is true (~ new boolean value 'use_payment_step'):
- In selection screen: at least one category is not free
- In Contact Details screen: the chosen booth is not free
- In both Selection and Contact screens: if cart has non null total
amount. (this is the current logic used to redirect to payment)

CONTROLLER REORGANIZATION

In order to add the "use_payment_step" to the rendering values,
the routes of those views now have their value preparation methods,
making them easily overriden (done while maintaining guidelines)

OTHER CHANGES

- Some wording on the form
- Hide sponsors in the booth booking flow
- All views have the same space between chevrons and content (48px)
- Tour is updated to match new wording.
- New map icon and simple link button to display the map of booths.
- No more justify content for display of booth categories
- unglue the rows of booths vertically
- Remove the use of jquery where possible in worked areas.
- Rename activeType to clearer activeBoothCategoryId in JS

Task-2821962

closes odoo/odoo#114052

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-05-30 13:03:00 +02:00
Xavier Luyckx (xlu) 0b6caafb7e [FIX] web: pivotView empty header cell background, adapt for milk
Adjust pivot view to match new web client redesign: Set top-left empty
header cell background-color to match view background (+ borders).

task-3329794
part of task-3326263

closes odoo/odoo#122750

X-original-commit: 34f001e119c873272f9c4c90b1128f02c8ef88d0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-30 11:46:47 +02:00
Achraf 1f8d14f8e1 [FIX] mass_mailing_*: Improve error handling for missing redirect URL
Handling of 'None' return value from 'get_url_from_code' to
prevent crashes in 'request.redirect'

https://github.com/odoo/odoo/blob/05fc9a67335d5a96752d828defa066d4fdabe301/addons/link_tracker/models/link_tracker.py#L248-L255

Apply same logic as

https://github.com/odoo/odoo/blob/c46f4b908a73658ce2aa7fd9987fbac76a0dda00/addons/link_tracker/controller/main.py#L21-L24

sentry-4183731887

closes odoo/odoo#122679

X-original-commit: d41684023c3845659ed2d96dd235128f4a12bdae
Signed-off-by: Achraf (abz) <abz@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-30 11:46:44 +02:00
Claire Bretton (clbr) b58babe25d [FIX] account: sign error in reconciliation
Fix a sign error in reconciliation that happened when
reconciling items in foreign currency and a not fully
matched credit, causing inconsistent partial amounts.

closes odoo/odoo#122674

X-original-commit: 8cdc874b4a826b022930ef8e03bda1afae4e4ba6
Related: odoo/enterprise#41580
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
2023-05-30 11:46:39 +02:00
niyasraphy 18881dc0f8 [FIX] account: traceback on creating payment method
before this commit, on creating a new payment method
will show traceback.

* using studio add a menu for payment method
* create a payment method and hit on create
* traceback is shown

after this commit, no traceback wont be shown.

closes odoo/odoo#122181

X-original-commit: f8918c9ea14fc35a5baf0824bd320c749d881fc6
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-05-30 10:31:50 +02:00
Odoo's Mergebot b052894bd2 [IMP] website_(crm_partner_assign/customer): improve layout
The goal of this PR is to improve the structure (alignments, font sizes...) of the two modules as it was clumsy and not appealing.

A specific mobile view for the filters was implemented off canvas as the current one was not optimized.

All these changes were made to make these modules more consistent with the rest of the front-end modules.

task-3083706
upgrade pr : **https://github.com/odoo/upgrade/pull/4690**

closes odoo/odoo#109752

Related: odoo/upgrade#4690
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-30 10:31:44 +02:00
Antoine (anso) f6c3ed0c51 [IMP] ir_qweb_widget_templates: display country without the city
Adding an option to display the country without the city when using the
contact widget

task-3083706

Part-of: odoo/odoo#109752
2023-05-30 10:31:43 +02:00
Antoine (anso) 8ec12c2e14 [IMP] website: unify offcanvas scss
This commit:

- Unifies the SCSS code for the off canvas filters used in
website_sale and website_crm_partner_assign

- Removes the custom width of 80% on small devices that made it
possible for the user to click outside of the `.offcanvas` to close it

- Adds a close button in the website_sale `offcanvas` as the default
`.offcanvas` width is 100% on small devices and the user needs an exit
button as he can't click outside of the canvas anymore

task-3083706

Part-of: odoo/odoo#109752
2023-05-30 10:31:43 +02:00
Antoine (anso) 1efdb96227 [IMP] website_customer: layout improvements
The structure of this module was adapted
as it was broken and not appealing:

- Text alignments and font sizes were improved
- Card structure instead of a list
- Filters and search are now grouped on top and take less space in
the page

A specific mobile view for the filters was implemented off canvas as
the current one was not optimized.

All these changes were made to make this module more consistent with
the rest of the front-end modules.

The option to show the map is now visible/not visible depending on if
the database contains a google maps API

task-3083706

Part-of: odoo/odoo#109752
2023-05-30 10:31:43 +02:00
Antoine (anso) f894094359 [IMP] website_crm_partner_assign, portal: layout improvements
This commit:

- Improves the structure of this module as it was broken and
not appealing:

* Text alignments and font sizes were improved
* Card structure instead of a list
* Filters and search are now grouped on top and take less space in
the page

- Adds a specific mobile view for the filters was implemented offcanvas
as the current mobile filtering was not optimized.

- Adds an option to show/hide address in the resellers/partners list

- Makes the option to show the map visible/not visible depending if the
database contains a google maps API

- Makes this module more consistent with the rest of the front-end
modules.

task-3083706

Part-of: odoo/odoo#109752
2023-05-30 10:31:43 +02:00
PNO 179b37a6cf [FIX] mrp: compute interval duration with multiple loss_id
When working on an operation in workcenter that requires login, we can add multiple timers.
However, if multiple timers do not have an `end_date` and have different `loss_id`, we will get a traceback (expected singleton) when computing the interval duration.
After this fix, `_convert_to_duration` can be called with multiple productivity loss.

OPW-3292374

closes odoo/odoo#122740

X-original-commit: d9fa0d1554ad51128b33ceae5b43f4c521ff6e11
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Nogueira Cabaço Pedro Filipe (pno) <pno@odoo.com>
2023-05-30 08:41:06 +02:00
qdp-odoo 999c9cdd79 [FIX] purchase: don't track_qty_received on PO when doing accrued expense entry
Failing use case: While having purchase_stock installed, create and confirm a request for quotation, received some products but no bill for it. Now select the PO is the list, click on 'Action > Accrued Expense Entry'. Make sure the wizard will effectively create an accrued expense entry (it should be the case if you have some product received and not billed).
Upon confirmation of the wizard, the system will recompute the received quantity on the original PO, logging notes that pollutes, confuses and spams its followers.

The reason is that we use a new record to compute the difference between the received and billed quantities at a given date in the past, and even if track_qty_received is called on a newid, it will find back the original PO where doing line.order_id.

The solution is to check in the context if we're in such use case before logging, because we know that calling the accrued expense entry wizard aims not to change the received quantity in any wase

closes odoo/odoo#122720

X-original-commit: b31f1ad789e92c84f85654b67e6730e413f0e06b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-05-30 08:41:03 +02:00
Tiffany Chang (tic) 7a4c3a0bf8 [REM] base: remove unnecessary datamatrix code
Followup cleanup of https://github.com/odoo/odoo/pull/106620 where
Datamatrix of pylibdmtx was replaced with built-in reportlab
ECC200DataMatrix option. For stable compatibility, some parts could
only be deleted in master, so let's delete them now.

closes odoo/odoo#122704

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-05-30 08:41:01 +02:00
Thomas Lefebvre (thle) 2742b90238 [FIX] hr_holidays: correct the timezone for Public Time Off
When we create a public time off,
we save the start date and the end date in utc.
Unfortunately, to calculate the utc, we don't use
the calendar timezone linked to these public time off.

Issue:
For example, with the "timesheet_grid" module,
the timesheets created for these time offs
will not be correct for employees who have a calendar
in a different timezone than the user who creates the public time off.

Solution:
Convert the dates received in the calendar timezone.

opw-3302925

closes odoo/odoo#122755

X-original-commit: 63688d31c036a7d1421444134169681924f8a12a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-30 07:33:07 +02:00
Ali Alfie (alal) 2b9587aad6 [FIX] account delay draft opening entry
Before: in the accounting dashboard setup, an opening move was created in step 1 (accounting periods) and step 4 (chart of accounts)

Now: the opening move is only created in step 4 only when a first opening debit/credit is entered manually by our user.

Task-ID #3177315

closes odoo/odoo#122818

X-original-commit: c3793357d823273cb4297b0eb31308ad73a9dff8
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-05-29 14:51:55 +02:00
Habib (ayh) aa128cfd50 [FIX] account: bank transaction foreign currency compute
The foreign currency should not be computed if it has already been set.
In cases where the transactions were imported with a foreign currency amount, it should not be changed when the user modifies the date.

Fix for
Task-3338560

closes odoo/odoo#122780

X-original-commit: c31af99542493ca10604688dc2782a0aa41f5294
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-29 13:38:58 +02:00
Renilkumar Kajavadra 8d8478b49a [FIX] point_of_sale: fix expected singleton in pos sales details
If applied, this commit will solve the expected singleton error when the product
has multiple taxes, and the user tries to print sales details in point of sale.

To reproduce this error, follow the steps:
- Open point of sale.
- Products > Open any product > Add multiple customer taxes
- Open Session > make the order for that product with discount > Validate
  > Close Session
- Reporting > Sales details > Print

sentry - 4148645094

closes odoo/odoo#122182

X-original-commit: 2d58de7adcae9b035607ff6a2ca59fc46ce32506
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Renilkumar Kajavadra (reka) <reka@odoo.com>
2023-05-29 11:32:02 +02:00
Guillaume (gdi) df77914d27 [FIX] website: prevent traceback in pages kanban view
Since [this other commit], a traceback is displayed when the user wants
to see the pages of his site when he has only one site. Steps to
reproduce the bug fixed by this commit:
- Launch Odoo without any app installed and without demo data
- Connect to the DB
- Activate the Website module
- Skip the configurator
- Choose a theme
- Discard edit mode
- Go to Site > Pages
- Go to kanban view

=> An error is displayed because the record has no website_id.

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

task-3316267

closes odoo/odoo#122754

X-original-commit: 322f0882e9fc0b33c90a2e22fdffa01b5d4345e4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-05-26 22:23:41 +02:00
Benjamin Vray 3074c1c428 [FIX] website: fix map snippet saved
This commit fixes the issue of having duplicate iframes when dropping a
custom "s_map" snippet that has been saved by the user.

This issue was introduced by this commit [1].

Steps to reproduce the bug:
- Drag and drop a "s_map" snippet onto the page.
- Save this "s_map" snippet by clicking on the custom snippet "save"
button.
- Drag and drop the saved snippet onto the page.
- Observe that a duplicate iframe is created in the snippet.

This commit adds a check to verify if an iframe already exists before
adding it when dropping a "s_map" snippet.

[1]: https://github.com/odoo/odoo/commit/88194dd94182ad1bbdcb9aa8f855f30f6369d148

task-3340644

closes odoo/odoo#122739

X-original-commit: 34b8c2e0578b56b87c50c222564582ed4fa7051f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-05-26 21:16:31 +02:00
Laurent Smet 6b51c8b6ed [FIX] account: Prevent exchange diff entry with full refund
- create an invoice with a CABA tax
- full refund it using 'add credit note', 'cancel' mode.
=> No CABA entry generated but an exchange difference journal entry
has been created.

This is because the CABA entry is not generated in case of full refund
thanks to the 'move_reverse_cancel' context key. However, this key is not
preventing the generation of the exchange journal entry for CABA.

opw-3321897

X-original-commit: 01799569bb3d450719968c77c1d4bb4c9ff31fdb

[FIX] account: Fix 'reverse_move_cancel' context key in reversal wizard

When reversing an invoice using the reversal wizard, the reverse_move_cancel is not passed to
the reconciliation and then, we are not able to prevent the generation of the cash basis entry.
This is because the reversal wizard 1) posts the credit note and 2) reconcile it with the invoice.
However, the reconciliation is done directly during the post but forcing the 'reverse_move_cancel'
key to 'False'. Then, at step 2), there is nothing left to reconcile.
So the reconciliation is never called using the 'reverse_move_cancel' context key set to true.

closes odoo/odoo#122732

X-original-commit: 42a8b091c4085c5caa97c838342a1ca0748c403c
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-05-26 21:16:28 +02:00
zel-odoo 15f1913225 [IMP] mail: visual update on avatar in member list
- rounded avatar in member list and invitation link
- improved color in selectable users in invitation link
- show "Add Users" action in DM chat window
- no border on panels in chat windows
- slight header style adjusments on emoji picker
- improved borders on chat window (shared between content and header)

closes odoo/odoo#122731

X-original-commit: 0f7f858514126a6898c01bb6a8389d0b066b8a3f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-26 20:12:28 +02:00
Chrysanthe (chgo) f062b8239e [FIX] website, hr_*: fix some squished buttons
=== ISSUE ===

With the new Milk design, we introduced `.border-radius` on buttons.
Most of the time the render looks great, but in some cases, it would break
the layout.

This is due to the fact that old design sometimes used two buttons
next to each other.

This worked fine because they did not have any radius but now it looks
like they are compressed and squished.

=== AFTER ===

This commit tracks some of these cases to improve the global render
of these buttons.

task-3329612
part of task-332626

closes odoo/odoo#122705

X-original-commit: 90c2ba3eb0bf74d675c574b13cedb90235398773
Related: odoo/enterprise#41590
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-26 18:41:40 +02:00