Commit Graph
151539 Commits
Author SHA1 Message Date
Romain Derie dcf79f01b3 [IMP] website_sale: add name to template for enterprise xpath
See enterprise counterpart, we need a way to extend this template.

closes odoo/odoo#92808

Related: odoo/enterprise#27911
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-06-02 18:58:44 +02:00
Nemael 9830406020 [IMP] mail: introduce EmojiView model
Task-2365687

closes odoo/odoo#92485

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:36 +02:00
Nemael 03dc1bed08 [IMP] mail: introduce Emoji model
Task-2365687

Part-of: odoo/odoo#92485
2022-06-02 18:58:36 +02:00
Alexandre Kühn 299138350d [IMP] mail: introduce ChannelMemberListCategoryView
Task-2831082

closes odoo/odoo#91699

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:31 +02:00
Sébastien Theys 22f52f3700 [IMP] mail: avoid storing model manager in scope that are not cleaned
This will reduce memory leak size in tests. But the proper fix should be lower
level in the code (probably in Owl according to the stack) to ensure unnecessary
references aren't kept anymore.

Part of task-2850875

closes odoo/odoo#90934

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 18:58:27 +02:00
Sébastien Theys 44c4e5b3d0 [IMP] mail: properly destroy bus and messaging service in tests
This will reduce memory leaks in tests.
Indeed `destroy` is not a standard service method, it must be called manually.

And references to messaging service were unnecessarily kept in env.

Note: ideally everything should be cleaned this way, not just messaging code.
In other words, env itself should have no retainers at the end of each test, but
completely removing all of them is a much bigger work that is outside of the
scope of this PR.

Part of task-2850875

Part-of: odoo/odoo#90934
2022-06-02 18:58:27 +02:00
Sébastien Theys 094df7528e [IMP] mail: completely clean records after deletion
This will reduce memory leaks.

Side-effect of this PR:

Accessing a field after the record is deleting is no longer supported. It was
never meant to be, but some async code relied on this behavior to check the
(non-)existence of relation fields, with an implicit check on the current record
existence.

-> After this PR, the existence check of current record needs to be explicit,
before accessing any field.

Part of task-2850875

Part-of: odoo/odoo#90934
2022-06-02 18:58:27 +02:00
Raouf 83760b9f10 [IMP] project: improve ux
Before this committ:
- Stats buttons were hidden when records are zero
- Some wordings were insignificant
- Existing filters don't allow us to check blocked, blocking and tasks soon in overtime and some other information
- Product form fields need some changes in their order

After this commit:
- All stats button are displayed when records are zero
- Wordings fixed
- New filters added to check blocked, blocking tasks and tasks in overtime soon
- Fields were rearanged

task-2726465

closes odoo/odoo#82253

Related: odoo/enterprise#23257
Related: odoo/upgrade#3185
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-02 18:58:14 +02:00
Eleftherios Kritsotakis ca200e2ba5 [IMP] point_of_sale: disable backend querying when all items loaded
In this commit, we improve the load-in-the-background
feature of partners/products.

If there are items that are not loaded yet, (either because the
background loading is still running or because the user did not
want to load any prodcts at all at the start of the session)
the option to fetch items from the database is enabled: every
time the user interacts with the search bar (pressing "Enter",
"Search database" or the "Search" icon at the search bar) the
backend is queried and new items (products/partners) are fetched
and added to the frontend. Before the fetching of products from
the backend was done using the "database" icon / "Load Customers"
button which are now dropped.

In this commit, the feature of querrying the database
is automatically disabled once all the partners or
products (available_in_pos) have been loaded in PoS.
Then, the querying of the backend stops.

task-2755384

closes odoo/odoo#81226

Related: odoo/enterprise#23544
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-06-02 18:58:07 +02:00
Eleftherios Kritsotakis 4dd7416ab8 [FIX] point_of_sale: center align Notification for all screens
Before this commit, the toast Notification would apprear
center aligned only for some screen sizes. In this commit
we adjust it so that is displays properly for any screen
size.

task-2669747

Part-of: odoo/odoo#81226
2022-06-02 18:58:07 +02:00
Eleftherios Kritsotakis 4f9ef9f0bd [IMP] point_of_sale: resize info icon
In this commit we enlarge the info button
on the top left corner of a product item
so that we make it more usable for small
screens.

task-2669747

Part-of: odoo/odoo#81226
2022-06-02 18:58:07 +02:00
Eleftherios Kritsotakis 91dff63948 [IMP] point_of_sale: design and intuitivity of search bars
In this commit we make the search bars of the
PartnerListScreen and the ProductScreen more
usable, taking into account their external
layout in desktop & mobile version alike.

In detail, we find a way to better expose the functionality
of fetching from the backend using the "Search" icon of the
search bar. This was previously exposed by the "db" icon at the
product search bar and "Load Customer" button at the
PartnerListScreen which are both dropped in the current
commit. The new way of interacting with the search bars includes:

  A) click "Search" icon (previously idle): "deep" search,
     query the backend db and fetch results (if not all products
     /partners are already loaded).

  B) click "Cross" icon: clear the search input/text.

To facilitate the user interaction with the search bars,
we implement proper messaging that is displayed to the
user: Product <prodcutName> was not found .etc.
Also, we add a highlighed button "Search database"
that is conditionally displayed and prompts the user
to search the database for more results (if applicable).

Previously the automatic selection of a partner/product
when it was the only search result happened when the user
pressed "Enter" and was considered to be a "hidden" feature.
Now, insted of selecting automatically we diplay a toast notification
to notify the user about the newly fetched results from the database.
With these changes we improve the intuitivity. We also drop the error
message when the search result is empty. That was very nerve-racking
feature for the user.

task-2755384

Part-of: odoo/odoo#81226
2022-06-02 18:58:06 +02:00
Eleftherios Kritsotakis 798861c068 [IMP] point_of_sale: usability of CashMovePopup
Before, the cash move popup was overlapping with
the virtual keyboard in some devices. In this
commit we address the above issue by displaying it
higher at the screen.

Added to this, we make the popup more usable by changing
the order of the confirm and cancel buttons. Confirm
button goes to the left (to comply with Odoo standards)
and is marked as primary (green). We also make the
"Cash out" button red, just to make it more distinctive
for the user.

In addition, we add 2 features to make the use of the
popup more intuitive:

1) when the user selects the "Cash out" option,
the input is prefixed with a '-' sign. When the user
selects the "Cash in" option the '-' sign disappears.

2) when the user presses '-' from the keyboard we
toggle the state of the popup from "Cash in" to
"Cash out" and vice versa.

Finally, we make it simpler for the user by
making it not draggable.

task-2669747

Part-of: odoo/odoo#81226
2022-06-02 18:58:06 +02:00
Eleftherios Kritsotakis 33b59fd616 [IMP] point_of_sale: automatically refresh amount due
Before, when the amount due of a customer changed, the user
had to press the "rotating arrows" icon at the client list
screen in order for the the updated quantity to be displayed
properly.

This icon was confusing for the user and was burdening the UI
with not frequently used behaviour. Instead, in this commit,
we incorporate the `refreshTotalDue` logic in the payment
workflow so that it is updated automatically when the total
due of a client changes.

task-2669747

Part-of: odoo/odoo#81226
2022-06-02 18:58:06 +02:00
Eleftherios Kritsotakis 3e8ae40d05 [IMP] point_of_sale: simplify PartnerListScreen
In this commit we follow a set of changes to
simplify the view of PartnerListScreen.This includes:
- directly select a parnter by clicking on them
- rename "EDIT" to "DETAILS" and display always
- use short address
- add company name below the partner name (if any)
- searching by company name is possible
- merge phone and e-mail in one column
- merge loyalty points and total due in one column
- save automatically selects the partner
- header buttons are reordered
- selected partner is displayed first
- selecter partner has an "unselect" tag
- visual imporovements (lowlighting etc.)
- move "settle due" button and "more info" link
into details edit

These changes expose less info to the user and
take some burden off the UI. Also, by selecting
a partner directly when clicking on them we follow
the "make the common case fast" design principle.
This way, the main action of the screen is accomplished
in 1 click instead of 2.

task-2669747

Part-of: odoo/odoo#81226
2022-06-02 18:58:05 +02:00
Florian Damhaut 2ae58e7741 [IMP] sale_management: update quotation template layout
- Create a tab for Terms and Conditions
- Rename `Quotation expires after` to `Quotation Validity`

taskid-2831317

closes odoo/odoo#91896

Related: odoo/enterprise#27714
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-06-02 17:58:47 +02:00
Patrick Hoste 312c4a5218 [FIX] event: fix address search
Fix commit : https://github.com/odoo/odoo/commit/b309200de582b388b35314512b4cbcd5316760c0
by changing address_seach field from related to computed.

Task-2810400

closes odoo/odoo#92789

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-02 16:54:37 +02:00
Josse Colpaert 16227a15c8 [FIX] l10n_ec,pe,ar,cl: when installing demo data, use the fiscal country instead
Because of the change in order of operations, for the main company
when we install e.g. l10n_ec, the CoA installed is the Ecuadorian
one, which makes the fiscal country EC, but the country_id still US.

We suspect https://github.com/odoo/odoo/blob/7cb109e7b0ee2e46cef79ec7d3076d16715567f9/addons/account/models/chart_template.py#L278
for the change in behaviour as the generic coa does not have US as
company anymore and that somehow led for the sales journal to
require to use document types.  (there we use the fiscal country which
is set to Ecuador)

The solution anyhow here, is that for the demo data, we should
use the fiscal country as well to see if we need to add the
document type to the demo invoices or not.

closes odoo/odoo#92772

X-original-commit: 40dab08559d5b4c837589ce96d6d7ce23f14fd98
Signed-off-by: William André (wan) <wan@odoo.com>
2022-06-02 16:54:33 +02:00
Lucas Perais (lpe) b7ce395a47 [IMP] web: qunit: debug doesn't completely finishes the test
Added debugTestId url searchParam that executes that test in debug mode.

While in debug mode, one can fully interact with it, and the console logs
the test's internal state.

closes odoo/odoo#92770

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-06-02 16:54:30 +02:00
Hubert Van de Walle (huvw) a499263dd3 [FIX] web: mail.MessagingMenu isn't always added in the systray
Steps to follow

  - Use chrome
  - Connect to a runbot with the demo account
  - After a couple refreshes, the mail.MessagingMenu isn't displayed

Cause of the issue

  The navbar should be updated when there is a new item added to the systray registry.
  For that, the navbar listen to the update event with the `useBus` function.
  `useBus` itself uses `useEffect` which only starts listening after a component has been mounted/patched.
  -> The update callback is never called in this case because new items are added before the callback is registered.

opw-2801467

closes odoo/odoo#92768

X-original-commit: c2fd26881ceae95417e2a0afc71fdf8567e3b8c0
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-06-02 16:54:25 +02:00
sofiagvaladze cef01fa521 [IMP] mail, hr_expense: show expense attachments on sheet
Purpose: Before it was hard to view expense attachments from sheet record.
To do so, the user should have gone through clicking on each expense first and
checking attachments, or could have clicked on a attachments smart button on embedded
expense table, which is redirecting to another view that only displays attachments for the one expense only.
Thus, checking all the attachments from sheet was an tedious task.

After this commit, the user can see in the sheet attachment preview all the associated expenses' attachments.

To make it possible, we ovveride 'mail.thread' method that is called to
fetch the data for the chatter. In the override, we fetch extra, associated expenses' attachments.

task - 2320177

closes odoo/odoo#92724

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-02 16:54:22 +02:00
Nicolas Bayet 2712e0d1ca [REF] web_editor: adapt editor tests to use triggerEvent
A new method `triggerEvent` has been introduced in order to simplify
event creation. This commit adapt the tests to use that method.

closes odoo/odoo#92653

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-06-02 16:54:12 +02:00
Nicolas Bayet a88bb2250a [FIX] web_editor: convert link only a space after it
Before this commit, when adding a space anywhere in the a text node,
a plain text link gets transformed into a proper link.

It might be an undesired behavior as we could want to manually remove
the link but it will be re-transformed when completing a paragraph.

task-2795019

X-original-commit: 76b5ecc88001ae9decaf3943550ecb4ddb874599
Part-of: odoo/odoo#92653
2022-06-02 16:54:11 +02:00
Ivan Yelizariev 7db57de5d8 [FIX] pos_hr: update order's cashier on validation
Module `pos_hr` allows to switch between cashiers (`hr.employee`) during the
same POS session. The current cashier is printed on receipt and saved in
backend. The story becomes more complicated if order is created by one
cashier (e.g. Mitchel Admin), but validated by another (e.g. Mark Demo). In that
case both receipt and backend must show the cashier who validated the
order (i.e. Mark Demo). However, it wasn't the case before this patch: the receipt got Mark
Demo as cashier and Mitchel Admin was saved in backend.

Fix it by updating employee value on order validation.

opw-2855234

closes odoo/odoo#92549

X-original-commit: b06c9793e13570bc84b1ddb52051e9fb039bc2c8
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-06-02 16:54:06 +02:00
Zelong Lin ef573c692d [IMP] mail: tracking_val changed display on systray
Display the content of the tracked changes that generate a notification under the systray

task-2369610

closes odoo/odoo#86437

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 16:53:59 +02:00
sofiagvaladze be3d76a95a [FIX] hr_expense: fix 'hr.expense' has no attribute 'attach_document'​
In case hr_expense_extract is not installed and we click
'Attach Receipt' on hr_expense form view, we get a traceback.

task - 2870500

closes odoo/odoo#92761

X-original-commit: 8593decb2fe6820cfc6f043cb3458f43dd635c87
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-02 15:51:04 +02:00
Victor Feyens 4f2894efbb [FIX] sale_product_configurator: do not allow template change in wizard
Since #73086, product configurator flow uses one single wizard popup
for both product configuration and optional products choice.

Nevertheless, the modal to only customize the product still exists,
and is shown when the user clicks on the pencil icon next to the product,
to edit the product configuration.

It has been recently spotted that this modal behaves strangely and closes
directly when another template is chosen in the dedicated field.

Considering that the correct behavior when choosing another template is to
either make a new line or to change the product directly on the SO line,
this commit makes the field readonly.

This way, when you choose another template with optional products, those
optional products will still be shown correctly (which didn't happen if
you chose another template in the modal to edit the configuration).

closes odoo/odoo#92579

X-original-commit: 249b6444fd6238428907fc59d008bd22d480da64
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-02 14:43:57 +02:00
Sébastien Theys d4ad6b9ec1 [IMP] mail: adapt message tests to use real parent (discuss/chatter)
closes odoo/odoo#92327

Related: odoo/enterprise#27976
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-02 14:43:52 +02:00
Touati Djamel (otd) 0a75501e5a [FIX] l10n_din5008_purchase: print correct order date
Steps to reproduce the bug:
- Set the "external_layout_din5008` in the layout field
- Go to any confirmed PO
- Print the purchase order
- Check the Order date

Problem:
The deadline order date is printed instead of the approved date

Solution:
The order date on the Purchase Order report should be the confirmation
date if available, in case it's unavailable print the order deadline.

FYI: https://github.com/odoo/odoo/commit/9255d3d7d9bddf52d48df0ec81ac6bdeddbfec29

opw-2857216

closes odoo/odoo#92752

X-original-commit: 0fbd1d234b8b31f8c68915dbafa3cd9e45dc55ab
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-06-02 13:12:56 +02:00
Nemael 48fd3538fe [IMP] im_livechat, *: split public livechat templates per widget
*: website_livechat

The goal is to split the public_livechat.xml file into multiple parts,
and move each template into its own file located in
`im_livechat/static/src/legacy/widgets/`

Task-2825235

closes odoo/odoo#92671

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-02 12:05:16 +02:00
Nicolas (vin) f5541768a6 [IMP] account: new journals audit report
Improvement in two ways:

- Implement a new, accounting report version of the existing journals audit
pdf report, and remove the old journal audit report (PDF only).
- Remove the menu items in "accounting" that opens the group by view of journal
items with different filters. Now, these will be linked to actions on lines in
the different reports available to the user.
Also render the "journal items" menu visible without debug mode.

Task id #2838182

closes odoo/odoo#92438

Related: odoo/upgrade#3560
Related: odoo/enterprise#27840
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-06-02 12:05:07 +02:00
lejeune quentin 143f632d96 [ADD] pos_stripe: Add the possibility to pay with Stripe in the POS
Add a stripe payment provider to the POS

To be able to use this payment provider, you must have configured Stripe in Odoo

closes odoo/odoo#92421

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-06-02 12:05:00 +02:00
João Marques ba7cddb6fc [IMP] Allow to force a colored output even if not in a tty enabled terminal
Check the PY_COLORS env variable and force colored output even if the
is_a_tty is no true

TT24972

closes odoo/odoo#71685

Signed-off-by: Olivier Dony <odo@odoo.com>
2022-06-02 12:04:51 +02:00
Stanislas Sobieski 652571a7fa [FIX] point_of_sale: add index on order_id of pos.order.line
closes odoo/odoo#92714

X-original-commit: 7c2cd8ff5ea8f4c137f574aedc6fc7a190b81c15
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-06-02 10:56:28 +02:00
Touati Djamel (otd) ca5b12b07c [FIX] mrp_plm: compare the difference between two BOMs
Steps to reproduce the product:
- Enable “Work Orders” option in MRP settings
- Create a storable product “P1” with BOM:
    - BOM type: Manufacture this product
    - operations: “OP1”
    - Components: product “C1” consumed in the operation “OP1

- Create an ECO for “P1”:
    - Type: New Product Introduction
    - Apply on; Bill Of materials
    - Click on “Start Revision”

Problem:
A BOM change will be created for the component “C1” where it will be added and removed.

When creating an ECO, a copy of the original BOM will be created,
and then we compare the BOM lines of the two BOMs if they are identical (product, qty and operation)
but as the operation has been duplicated therefore created with a different ID,
the two lines will not be identical and a distorted change in the BOM will be detected

Solution:
It is better to compare the fields of the operations instead of their ID to detect if a change has been made in the BOM

opw-2823253
opw-2809586
opw-2833083

closes odoo/odoo#92670

X-original-commit: 5c16aa22c70f8a0a377a55b912307ab07222c643
Related: odoo/enterprise#27943
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-06-02 10:56:21 +02:00
aliya c11e0a431a [IMP] purchase,sale: add a smart button to view source SO/PO
Task 2833338

Add a smart button to show origin SO/PO on invoices and vendor bills.

closes odoo/odoo#90664

Signed-off-by: Steve Van Essche <svs@odoo.com>
2022-06-02 10:56:15 +02:00
Adrien Minet 92bd5d161d [FIX] account: account_id must be editable in mobile view
How to reproduce ?

- Change dimensions of the browser view to mobile view.
- Install the account app
- Create a new invoice
- Click on Add to add an item to the invoice
- On the ne dialog fram, select a product to add

What is the bug ?

If you use the account app on a large screen where you can add items
directly on the invoice, you can modify the account journal of the item.
However, when you use the mobile version of a small screen where you
have to add products through a dialog frame, the account journal of the
item cannot be modified.

opw-2850587

closes odoo/odoo#92721

X-original-commit: 93520cc291ffb76dd1425e413f29653df37b4062
Signed-off-by: Adrien Minet <admi@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Minet Adrien (admi) <admi@odoo.com>
2022-06-02 09:52:45 +02:00
MerlinGuillaume e7e15aafef [FIX] product_margin: show product margin graph
The graph view of product margins cannot be displayed because it raises
an error

Steps to reproduce:
1. Install Accounting
2. Go to settings and enable Margin Analysis
3. Go to Accounting > Reporting > Management > Product Margins
4. Go to the graph view
5. A User Error is thrown

Solution:
Remove the `:sum` operators for non-stored fields in read_group

Problem:
The graph view tries to sum up the total_margin with `total_margin:sum`
but as the field is not stored, it is not possible to compute it and it
raises the error

opw-2738456

closes odoo/odoo#92719

X-original-commit: fbaedeb18e49e5ed055c597cab33061153aaf1da
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-06-02 08:58:04 +02:00
Adrien Widart 064ce8dcfe [FIX] stock_account: create AML for SML owned by company
If a picking is owned by the company and if the user receives a FIFO
product, a SVL will be created without any journal entry

To reproduce the issue:
(Need account_accountant)
1. In Settings, enable "Consignment"
2. Create a product category PC:
    - Costing Method: FIFO
    - Inventory Valuation: Automated
3. Create a product P:
    - Type: Storable
    - Category: PC
    - Cost: 1
4. Create and validate a receipt:
    - Owner: <The company of the picking>
    - With: 1 x P
5. Open the generated SVL

Error: There isn't any journal entry associated with the SVL

When validating the picking, a method filters the SML that will be
considered during the SVL creation process. This method filters out the
SML that has an owner and if this owner is not the company:
https://github.com/odoo/odoo/blob/f8e2f2a4836d23fe507cad3bd5cac92d41ca91a3/addons/stock_account/models/stock_move.py#L69-L70

However, the filter in the journal entries creation is not that accurate
and does not correspond to its comment line:
https://github.com/odoo/odoo/blob/f8e2f2a4836d23fe507cad3bd5cac92d41ca91a3/addons/stock_account/models/stock_move.py#L475-L476

OPW-2859144

closes odoo/odoo#92716

X-original-commit: 13d4963d10e14c0295a1c7abeefd52b070cd4a58
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-06-02 08:57:59 +02:00
Merlin (megu) ed586dfc68 [FIX] account: prevent draft entry for reconciled statement
Journal entries of a bank statement can be reset to draft even if the
bank statement has been validated

Steps to reproduce:
1. Install Accounting
2. Go to Accounting dashboard, click on the 3 dots of Bank and go to
View > Statements
3. Create a new statement with a transaction of 100, correctly set the
ending balance, save and post
4. Click on reconcile then validate the reconciliation
5. Go back to the statement and validate it
6. Open the journal entry of the statement
7. You can reset it to draft but you shouldn't be able to

Solution:
Prevent the user from resetting a journal entry to draft if the
statement has been confirmed

opw-2827117

closes odoo/odoo#92713

X-original-commit: 5622bc103e063d62f75625ca413a06aa7395d654
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-06-02 08:57:56 +02:00
Ricardo Gomes Rodrigues (rigr) c0cf6d79de [IMP] l10n_be: update taxes in Belgium
This commit updates the taxes in Belgium.

- Tax names will use the following nomenclature
Rate (Territory) (Scope).(Special)

- Label on Invoices should not mention TVA, only the rate

closes odoo/odoo#92711

X-original-commit: b06b7c8be812f1e920703b55f0c9185976c6c769
Related: odoo/enterprise#27960
Signed-off-by: William André (wan) <wan@odoo.com>
2022-06-02 08:57:49 +02:00
Dossogne Bertrand 921dd26ba8 [IMP] hr_holidays: automatic time-off recovery after public holiday edit
If a public holiday is created, modified or deleted,
all declared (non-refused) leaves related to that period will have
their duration re-evaluated and individual remaining time offs will
be computed accordingly.
If the duration of the leave is evaluated at 0 after the creation
of the public holiday, the leave will be set as cancelled.

task-2636215 [Time Off]Grant back time off when public day off is created

closes odoo/odoo#81225

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-02 08:57:40 +02:00
sofiagvaladze d70000bf21 [IMP] hr_expense/sale_expense: allow splitting an expense
Purpose: Sometimes, taxes are distinct on parts of the expense
(for example alcohol and food).
Therefore the expense should be split in two.

In order to split the expense, we added an wizard.
When creating a new expense from the split, we also
copy the attachments.

'hr.expense.split' has to have the similar logic and dependencies between
the fields as 'hr.expense' does. For example, in case we change the
product_id to the product that has cost defined on it, it should have
the same behavior as expense has. In particular, the 'total_price'
will be set and the user should not be able to modify the amount.

Similarly, if we change the product_id to the one that has no tax defined
on it, then split tax_ids should be cleared out and be set to readonly.
Similar logic goes to sale_order_id (Customer to Reinvoice'),
we should not be able to set it, in case the product can not be re-invoiced.

All of the above constraints leads to the amount of similar code to to the 'hr.expense.split' side.
But it could not have been avoided, if we want the smooth flow.

task - 2831024

closes odoo/odoo#90770

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-02 08:02:04 +02:00
sofiagvaladze 09609889e3 [FIX] hr_expense: fix updating the unit amount on the expense form
The unit_amount should be updated when product changes, in case the product
has price defined on it.

task - 2831024

Part-of: odoo/odoo#90770
2022-06-02 08:02:04 +02:00
Christophe Monniez 80c2204e20 [FIX] tests: increase navigation timeout
When instrumenting the Chrome Browser and asking to navigate to a
location, it happens that the 10 seconds timeout is exceeded.

This happens particularly when executing qunit tests by navigating to
`/web/tests`. This route has an average loading time around 7 seconds
but when the runbot is loaded, it can exceed 10 seconds.

With this commit, the timeout is set to 15s. It would be better to split
the qunit tests by module in order to avoid the huge assets bundle
generation.

closes odoo/odoo#92699

X-original-commit: 6c0fa6b72bf5d15e8323b81cf930a01d4c0f3291
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-06-01 21:28:46 +02:00
Ricardo Gomes Rodrigues (rigr) c56c137f53 [IMP] account: improve tax name search
This commit improves tax name search by ignoring punctuation and spaces.
This allows faster searching for taxes (while editing an invoice line or
while configuring them)

Example:
Searching for `21M` should match `21% M.` , `21% EU M.` and `21% M.Cocont`.
Searching for `0EUT` should match `0% EU T`.

Task id: 2851341

closes odoo/odoo#92683

Signed-off-by: William André (wan) <wan@odoo.com>
2022-06-01 18:34:56 +02:00
Odoo's Mergebot 3ba7cf26ef [MERGE] project: link milestones in tasks
Purpose
=======

The goal of this PR is to create a link between milestones and tasks. Indeed, milestones usually contain a set of tasks. Once all of these tasks are done, the milestone can be considered as reached. This link would help users organize their projects more efficiently and have a better overview of what needs to be done when.

## Implementation details

- A new many2one field is added in the `project.task` called `milestone_id` to link a milestone to tasks.
- Add `Milestones` as global setting and project setting. It means the user will can globally enable the feature and choose in which project he wants to use the feature.
- In the form view of milestone, a stat button is added to display the tasks linked to current milestone.
- Add `Late Milestone` filter in tasks, when this filter is applied the user will see the tasks linked to a milestone with a deadline in the past. This filter is also added in the Burndown chart and Tasks analysis report.
- When the user set a milestone on a task and no SOL is found in the project and/or parent task related then set the SOL of the milestone as a default SOL for the task.
- Display in green the milestone in project update view if all tasks linked to that milestone are in a closed stage.
- When a user changes a stage of a task to a closed stage, a wizard will be displayed if the task is linked to a milestone and all others tasks are in a closed stage too. This wizard will allow the user to reach the milestone since all tasks linked to that milestone are considered as finished.
- Remove `delivered_milestone` option in the `invoice_policy` selection field in `product.template` model when the Milestones feature is globally disabled. If some products are milestone one than they will be converted into a manual service ones to allow the user to manually set the quantity delivered for those products.
- Display the milestone field in task in Project Sharing feature.

task-2829542

closes odoo/odoo#90972

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-01 18:34:46 +02:00
Fabio Barbero 7ec3a50aa6 [IMP] website_event(_sale): improve event confirmation page
Purpose
=======
Avoid having "dead-ends" when registering to an event.

Specifications
=============
Add link to event to registration confirmation for free events.
Display list of each bought event on the confirmation page for paid
events.

PR: odoo/odoo/pull/78599
Task-2657635

closes odoo/odoo#78599

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-01 18:34:42 +02:00
Nikunj Ladava 0d83e4a66a [FIX] mass_mailing: fix emoji widget position
Before this commit, in the editable form view of mass mailing, the
emoji widget is outside of the subject field, which is not optimum.
This issue was re-spawned after a recent commit that enabled saving
the mailing as a template, which changed the layout to add a star
next to the subject field.

With this commit, emoji widget is now inside the subject field.

task-2826521

closes odoo/odoo#92672

X-original-commit: 09991b477353e6167d576779b7364408b2109cd6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-01 17:36:52 +02:00
Jordi Ballester aba7ffc38d [FIX] product: Only trigger unlink when there are records to unlink
closes odoo/odoo#92663

X-original-commit: 9039380f74984878f95a4dcf9cf425a855330a38
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-01 17:36:45 +02:00