Commit Graph
132196 Commits
Author SHA1 Message Date
jvm-odoo 5ff3bec51b [FIX] sale_crm: fix crm quotation context
Reproduce the issue

    - Install CRM & sale_crm
    - Create an opportunity
    - Create a quotation from the opportunity

    The name of the draft is the opportunity's name instead of "New"

    - Add a "Storage Box" to the quotation, for instance
    - Confirm the quotation
    - Check the delivery note

    The name of the delivery note is the opportunity's name instead of
    WH/OUT/...

Cause

    This issue is caused by 4c9c249c. It seems that we pass an extra
    default_name in the context.

This commit removes the extra default_name from the context.

OPW-2122928

closes odoo/odoo#40943

X-original-commit: e8d91e4a7037d6c05991debb91072de162f0cf56
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-11-22 08:00:23 +00:00
Kevin Baptiste 82df1dfccc [IMP] fleet: model cleanup, dashboard
Purpose
=======

It is currently difficult to know exactly what is used for costs
and services on the contracts.

Hence it make it difficult to evolve the fleet application
We should clean the models in order to have something that is clearer

Specification
=============

Cleanup of models: removed Fuel and Cost. Contract and Services are no
longer inheriting Cost and are seperate models simplifying the use of
Fleet. A contract now has included services and they are no longer
generating cost.

closes odoo/odoo#34090

Taskid: 1931775
Related: odoo/enterprise#4572
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-27 11:54:51 +00:00
Victor Feyens c5398bd4bc [IMP] doc : group_operator field attribute
closes odoo/odoo#40944

X-original-commit: 7cbad14e28c50d51c14683d2548ea32ebc58907f
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-27 10:06:36 +00:00
Xavier Morel 7b75571fe8 [FIX] crm: remove onchange domain
closes odoo/odoo#40939

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 09:59:57 +00:00
Xavier Morel 17ad6be46a [FIX] base: returning a domain from an onchange
Turns out we've got an operator just for the pattern of "match value
if there's one, otherwise match everything".

Also remove an example of domain in onchange doc.

closes odoo/odoo#40938

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 09:59:51 +00:00
Laurent Smet 5426960e54 [FIX] account: Fix reconciliation access rights with Invoicing
As the group_account_invoice doesn't have the access rights to unlink the
account.partial.reconcile/account.full.reconcile, there was impossible for
the user to undo a reconciliation.

closes odoo/odoo#40934

X-original-commit: 0288adb0c315a1da63fe7e2d9b1f586ad6c9555b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-27 08:16:57 +00:00
Nicolas Martinelli e3954db697 [FIX] stock: confusing error message
In case of a picking type where stock move lines are not shown, clicking
on 'Put in Pack' without 'Done' quantitites set shows a confusing error
message.

closes odoo/odoo#40928

X-original-commit: 76b72ab5953c1fc72e3c06464fd1c65e6420a4b3
Related: odoo/enterprise#6906
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-27 07:52:58 +00:00
Nicolas Martinelli 4dfa4e2c06 [FIX] stock_barcode: put in pack in receipt
- Activate product packing
- Create a PO for a stockable product, validate
- In the barcode interface, go to the created picking
- Set the product quantity
- Click on 'Put in Pack'

An error is raised: 'All the products currently reserved in the picking
are already in a pack...'

In the regular interface, the procedure is to create the move lines
manually, therefore setting a quantity done. However, this is not
possible in the barcode, and `move_line_nosuggest_ids` is always empty.

We introduce a special use case to bypass this in the case of the
barcode view.

opw-2127637

X-original-commit: d3a7b0e1b1dffd73b9ff31f1ec9fa4f6bbf478d2
2019-11-27 07:02:11 +00:00
Nans Lefebvre f3dec5d0ae [FIX] hr_holidays: allow request unlink because of typo in group name
opw 2144639

closes odoo/odoo#40927

X-original-commit: 82de73f421885e76aae81e2e6d8ec7bb585ad3f4
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-11-26 12:52:33 +00:00
Lucas Lefèvre b51be7fa02 [FIX] lunch: Disable vendor creation from grouped products
fixes #38014

closes odoo/odoo#40926

X-original-commit: dbd532894783fc8aeb0b5c72b2dd88d8afdb1ccb
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2019-11-26 08:27:49 +00:00
qsm-odoo fbdc541f9c [FIX] web_editor: read both color and bg-color to find custom ones
This was broken during the recent colorpicker refactoring.

closes odoo/odoo#40925

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-27 09:36:27 +00:00
Lucas Lefèvre 25dc18bb09 [IMP] hr: Add empty header for view inheritance
Some modules might want to add buttons in the form header of the employee public
(e.g. hr_appraisal).
This commit adds an empty header to easily allow view inheritance.

Note: this empty header is not displayed if no buttons are indide.

Task 2028794
PR odoo/enterprise#6495

closes odoo/odoo#39565

Related: odoo/enterprise#6495
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-25 15:46:38 +00:00
Nicolas Lempereur 1c47f2070b [FIX] web_editor: update attribute of edition container
In most use case, when we edit the website we have a situation such as:

```
<div id="wrap" branding-attributes="...">
    <section class="mycontent">hi!</section>
</div>
```

When we modify a part, we replace all child nodes of the branded
element.

But if we had more complex content such as:

```
<div id="wrap">
    <section class="mycontent" branding-attributes="...">ho!</section>
    <t t-call-assets="web.assets_common" t-js="false" t-css="false"/>
</div>
```

we have a t-call inside the div#wrap, so branding is distributed to
child that could have attribute modified (eg. changing background).

Then if `<section/>` node is saved, the possibly modified attributes
are lost.

Without the change, the added test fails with:

 '<div class="nice">hoi</div>' not found in '...<div>hoi</div>...' :
 saved element attributes are saved excluding branding ones

opw-2122947
closes #40345

closes odoo/odoo#40830

X-original-commit: 71b20a24c40ae9daa10076ab0fd656b043819cff
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-25 18:10:30 +00:00
Nicolas Martinelli 70d856f2c7 [FIX] hr_recruitment: newly hired
The current 'Newly Hired' filter is incorrect in several ways:
- the compute method doesn't assign the value correctly
- the search method mixes `hr.applicant` IDs with `hr.employee` IDs

Moreover, it relies on the fact that the job position is closed. Some
positions might always be opened, so the result is inaccurate.

We make the simpler assumption that the newly hired people are employees
created less than 90 days ago.

opw-2125861

closes odoo/odoo#40899

X-original-commit: ee928babbe433285883f1e878d83392d7199a37d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-26 11:54:15 +00:00
Victor Feyens 4f226e7893 [FIX] base: consider advanced cases for automatic check_company domain.
Those cases are already checked in models._check_company() but not considered
when defining the default domain on `check_company=True` fields.

* Consider res_users relational field
	Companies allowed for user = user.company_ids
* Consider company-dependent fields
	Companies allowed = self.env.company

closes odoo/odoo#40906

X-original-commit: a8de9509823c213dad2f5e8ff44ceb670f81ea70
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-26 15:39:13 +00:00
Victor Feyens 7d9136185b [FIX] base: a user needs to have allowed companies set.
X-original-commit: 4205cb2728041487bd026bf5c6bac590e0ace1e9
2019-11-26 15:39:13 +00:00
Nicolas Lempereur 31a18fa6ea [FIX] crm,hr_recruitment: highlight and show others
When clicking on stat button "Meetings" on a partner, just highlight the
partner meetings as is done for similar stat button instead of having
a domain that hides other event (so when creating meeting, we can take
into account other existing meetings).

A similar change with same reasoning has been done for "Meetings" stat
button of hr.applicant records.

opw-2131494
closes #40812

closes odoo/odoo#40900

X-original-commit: 957e7eb77ed18e4a1c14ef4ef55bd54503c56f44
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-25 16:59:46 +00:00
Damien 8eb4c0d20f [CLA] signature for Kontrolix
closes odoo/odoo#40905

X-original-commit: 1b2df29ed43b1ab465eec6c579e926804b950338
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-26 12:49:27 +00:00
Yenthe666 d05e5bef32 [FIX] lunch: fix typo in widget definition
closes odoo/odoo#40902

X-original-commit: cf7017ea92c34a98bc670860ba89677bb8697c0b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-26 13:50:13 +00:00
pawa2007 f9412ef3c0 [FIX] doc: update URL to the right article
A second edition is being written but not published yet

closes odoo/odoo#40405

X-Forwardport-of 2b99e0cb59616a0006ef615bbfbc

closes odoo/odoo#40901

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-26 16:30:50 +00:00
Laurent Smet 2dc2c20fe5 [FIX] account: Fix missing dependencies of _check_duplicate_supplier_reference
- Create a vendor bill for partner A with reference 'AAAAA'
- Create another vendor bill for partner A with the same reference:
=> Constraint is triggered.
- Create another vendor bill without partner with the same reference.
- Edit the vendor bill and set a partner:
=> Constraint not triggered.

closes odoo/odoo#40897

X-original-commit: 3f6254c8faa7dfb2484f4ac18d4c0fd717149e4b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-26 09:54:17 +00:00
Kishan Gajjar c428e0aa68 [FIX] website_mass_mailing: restore newsletter subscribe notification
closes odoo/odoo#40888

X-original-commit: fcbe95642850ccda049ef504fb41c45b45c7597a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-26 12:17:39 +00:00
Jeremy Kersten 56b4764b18 [IMP] website: allow to don't show specific view in name
and uses it in customize_show.

closes odoo/odoo#40887

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-26 14:39:28 +00:00
David Beguin 1832d17d21 [FIX] im_livechat, website_livechat: fix use visitor name in livechat session
im_livechat main controller was referring to website.visitor but this module is
not depending on website. The usage of website visitor's name should have been
done in website_livechat module.

This commit fix this issue.

Task ID: 2116715
PR #40732

closes odoo/odoo#40884

X-original-commit: defb98c1083e55ff02f290c3c6257a4ca8dc7d1f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-22 16:32:19 +00:00
wan 2106dd3cd1 [IMP] account: clean entry/move reversal
Task 2085023
* Add a field that replaces the context to get the ids of the
entries/invoices
* Remove move_id, we can use move_ids instead
* Add text to explain invioces/bills will create refunds

closes odoo/odoo#38857

Related: odoo/enterprise#6263
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-11-15 14:05:30 +00:00
Varun Raval 3fe9402de4 [IMP] im_livechat: improve demo data for livechat summary for digest statistics
In order to see the added value of digest in demo mode some demo data about
livechat conversations are added. Rating is also added.

Task ID 1883428
closes #29764

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-26 14:24:49 +00:00
Varun Raval 72f907f32a [IMP] im_livechat: add livechat summary in digest
Purpose of the task is to add a Live Chat section in the weekly digest email
template. Following value related to livechat are therefore added in digest
emails:

  * hit % of ratings;
  * amount of conversations he handled;
  * hit time to answer;

Task ID 1883428
closes #29764
2019-11-26 14:21:45 +00:00
Xavier Morel 6044782aef [IMP] base: logging conf & logging of partner merge wizard
* root the base.partner.merge wizard's logger in odoo.addons so the
  "odoo" logger configuration properly applies to it
* update the default logging configuration to set the root logger
  rather than independently set the odoo and werkzeug loggers

closes odoo/odoo#40872

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-26 12:48:05 +00:00
Aurélien Warnon 34b1ceb942 [FIX] website_slides: fix slide.slide statistics compute method triggers
The slide.slide "_compute_slides_statistics" method is missing the 'slide_ids.sequence' trigger.
It should be specified for cases when one of the slide_ids changes category (determined by the
sequence).

This can cause some CacheMiss and seem related to nondeterministic errors on the runbot.

PR #40705
Task#2123711
Runbot build error ID 247

closes odoo/odoo#40867

X-original-commit: 1994f544694051a767ecda88a12dee5c5579add2
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2019-11-25 08:38:03 +00:00
fw-bot a561e4cb56 [FIX] web_unsplash: traceback on saving the product
before this commit:
when creating a product from frontend and editing the product and
delete image, it doesn't get any url thus generating the traceback.

after this commit: if url is not defined then return None from
ir.qweb.field.image field converter

task-2063293

closes odoo/odoo#40866

X-original-commit: 2efad751e66931fd25a41c1b7d46865bccbc774a
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-22 09:19:35 +00:00
Barad Mahendra 525ed1125f [FIX] digest: force recompute of all kpis each time-based run
Before this commit, the computation of kpi for last week, last 30 days and
previous period comparison was wrong due to cache. Indeed as first value
was in cache, other values were taken directly from cache itself instead
of recomputing each value based on start_date and end_date of the computation
timeframe.

As digest fields are computed fields used a bit off-side, let us manually
invalidate the cache before computing a kpi so that it correctly computes
the timeframe values.

Task ID 1883428

closes odoo/odoo#40861

Closes: #40834
X-original-commit: 2966ee59cabc2bbae91e4ac4701fc393bc3770ae
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-26 09:32:09 +00:00
mightyjol (jhk) 74111d1fbf [FIX]product:change pricelist fixed_price field from float to monetary
steps to reproduce:
-change decimal accuracy for "Product Price"
-create a price list with fixed price
-the fixed price field does not takes the decimal accuracy into account

this was working in V11 and V12
fixed_price was a float field like other price fields

previous behavior:
fixed_price is a monetary field
when setting up a fixed price for a pricelist, it takes into account
the precision from the current currency

current behavior:
fixed_price is a float field
when setting up a fixed price for a pricelist, it takes into account
the proper decimal accuracy setting ("Product Price")

opw-2121964

closes odoo/odoo#40807

X-original-commit: 27b90fc7389cfc7fe4a9f4f17dea74283a45af44
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-11-25 12:44:05 +00:00
Mohammed Shekha 7291021152 [FIX] web_editor: traceback on saving the product
before this commit: when creating a product from frontend and editing
the product and delete image and save edition, it throws traceback,
because ir.qweb.field.image doesn't get any url and due to which it
throws traceback.

after this commit: if url is not defined in ir.qweb.field.image field
converter then return None

task-2063293

closes odoo/odoo#40638

X-original-commit: 896127a6528fa59f7f385019e296acd5db585321
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-26 05:11:50 +00:00
Nicolas Martinelli b15b6e30e1 [FIX] sale_timesheet: remove group_by
- Group the SO list view by Analytic Account
- Go to a SO
- Click on the stat button 'Timesheets'

Traceback because the field `analytic_account_id` is not on Timesheets.

opw-2124539

closes odoo/odoo#40840

X-original-commit: 3f17dd36e8369c21e55009e5492438cb9f9ea53d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-26 07:11:27 +00:00
Julien Castiaux 3460b3ca15 [IMP] base_import: support multiple xlsx sheets
Excel can store data in multiple tables, each is called a sheet. Odoo
was only importing the first sheet making the process to import a file
containing multiple sheets cumbersome.

It is now possible to select the sheet in the import options. By default
the first sheet is selected.

closes odoo/odoo#40728

Task: 2043768
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-26 09:26:01 +00:00
Pierre Masereel 1bfcbe4b3c [FIX] point_of_sale: duplicate orders
When you create a pos order, it is possible that the request timeout or
the client loose the connection with the server, that will lead to not
have the server_id of the order sent to the server. So when the client
will try to synchronize the order again, it'll not send the server_id to
the server, and the server will create a new order which is a duplicate
of the one created when the client lost the connection.

To avoid this duplication, we are using the pos_reference to find if
there is an existing order like in 12.0 to avoid duplication.

closes odoo/odoo#40837

Task-id: 2127656
X-original-commit: cddf29e70008dc1fcb6ec41b4dfc739d4d06cf6d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-21 13:40:18 +00:00
Goffin Simon 5a72faf721 [FIX] hr_holidays: Impossible to allocate future leave type
Steps to reproduce the bug:

- Let's consider Today = 21/11/2019 and Employee E
- Create a new hr.leave.type LT and set a validity from 01/01/2020 to 31/12/2020
- Set mode = Free Allocation Request and Validation = No Validation
- Try to create leave allocations for LT

Bug:

It was impossible to create a leave allocation for LT because Today < 01/01/2020
So it was impossible to allocate future leave.
We had to wait the 01/01/2020 to make the allocation of LT leaves

opw:2126300

closes odoo/odoo#40815

X-original-commit: 2b1810daeb13bba8405b663cf401ffab6eba5e24
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-11-25 12:18:17 +00:00
Haresh Shyara a0e8135449 [IMP] l10n_nz: added GST101A tax return report
closes odoo/odoo#35373

Task: 2129257
Closes: 35373
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-26 06:38:07 +00:00
oco-odoo 382fe942dd [IMP] account: tax audit string: remove useless dependency to journal_id
closes odoo/odoo#40805

X-original-commit: c0f261fd241db628da2760423c08777393abfad7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-19 14:07:12 +00:00
shivam shah 92cf2474a2 [IMP] base_automation,sms: Improve the interface of automated action
Below points are improved in automated action
- Set no_create on model_id, crud_model_id, partner_ids, and channel_ids
- Set widget many2many tags and change string for trigger_field_ids
- Rename 'Trigger Condition' to 'Trigger'
- Change on_change_fields into a many2many to ir.model.fields
- Set 'Hours' as default of field trg_date_range_time
- Rename label of crud_model_id to 'Target Model'
- Rename label of sms_mass_keep_log to 'Log as Note'
- On creation of template set the default model
- Hide the 'Security' tab
- Set no_create on fields resource_ref and col1
- Make 'value' readonly when col1 is not set
- Rename 'Link using field' to 'Link Field'

Task-2082503

closes odoo/odoo#39622

Closes: #39622
Related: odoo/enterprise#6515
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-11-26 07:35:34 +00:00
Nicolas Martinelli 22c7dc99f8 [FIX] stock: create lot in tree view
- Create a product tracked by lot
- Create a delivery picking

You are allowed to create a new lot for the product although the picking
type doesn't allow it.

This is because of the missing context key `active_picking_id` on which
`_check_create` relies:

https://github.com/odoo/odoo/blob/e5ee5e5b65f85d66c8d59594ead9eece172c4282/addons/stock/models/stock_production_lot.py#L50

opw-2128497

closes odoo/odoo#40813

X-original-commit: 6dd176cc585def93760bead364e23fa09cac72e1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-26 07:15:29 +00:00
jvm-odoo ee0199cac4 [FIX] website_sale: removing invalid product from the cart
Reproduce the issue:
- Install eCommerce app
- Publish a product to your website
- Add the product in your cart
- Unpublish/make unsellable/archive the product

The product is still in the cart and the checkout process can be done.

Cause: There is no check for invalid products before displaying the cart

This commit remove the invalid products while loading the cart.

OPW-2092541

closes odoo/odoo#40241

X-original-commit: ab9290e39c2d2b9eb6d6f9972c1c8b546263edfd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-14 09:11:26 +00:00
67044d64cd [FIX] web_tour: consume tip with drag and drop
After the rainbowMan issue was fixed here: e5bc2e7, steps were consumed
on 'click' events. This caused an issue with the drag and drop event
(which breaks tour, because it is expecting a click event). If the user
dragged an element, thetip was not getting consumed as no click event
was triggered.

closes odoo/odoo#40819

X-original-commit: 3f458fe06e6a629edc72428eab749068c2eba1ba
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
2019-11-25 13:58:22 +00:00
fw-bot 441c8b0e0d [FIX] website_blog: fix link addable on blog cover
A customer reported an issue when he tried to add a link on the
blog covers of his blog. The link is displayed as text and it's added
to all the covers.

![links on all covers](i.imgur.com/fuFu6op.jpg)

According to SBU, the user should not do this.

This commit prevents the user from editing a blog cover.

OPW-2119924

closes odoo/odoo#40816

X-original-commit: 576fe145941add48481ebbb066cd9715dc83fb55
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-25 14:31:41 +00:00
helly kapatel 355f99069a [FIX] mail: do not mention on archive users
Archived users are inactive, so we shouldn't be able to ping them.

Task-2046885

closes odoo/odoo#40814

X-original-commit: 8169e34a2230b9a2aff359dc6a69b59c04fc9908
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-11-25 13:02:10 +00:00
Nicolas Lempereur 7dcab8a08c [FIX] point_of_sale: pos order -> count of order
In the pivot view of report.pos.order that is a view mainly over
pos.order, the "Count" measure is a little rubish giving more or less
the number of different products in the grouped order lines.

With this changeset, we have the field "Order" as measure that allow us
to know the number of orders a grouping is corresponding to.

opw-2127275
closes #40723

closes odoo/odoo#40804

X-original-commit: 431114d4f574d0fe9df745a7696f73f941c42ad3
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-22 15:42:02 +00:00
Victor Feyens 600d0707ae [IMP] *: use get_fiscal_position and not property_account_position_id.
And adapt to get_fiscal_position changes

closes odoo/odoo#40336

Related: odoo/enterprise#6840
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-11-20 14:42:07 +00:00
Victor Feyens 81245528d1 [IMP] account: get_fiscal_position returns a recordset 2019-11-20 14:42:07 +00:00
Victor Feyens 1197821583 [IMP] account: fiscal position little cleanup
* No api model for methods using self
* Use new orm abilities to cleanup map_tax method
2019-11-20 11:40:28 +00:00
Barad Mahendra 802817c925 [FIX] hr_holidays: consecutive leave date on out of office message
Before this commit, when a user was on leave, the out of office
message displayed the current leave-in-progress date-to.
This information was misleading when the user on leave used different
types of leaves, because other users would expect their colleague to
come back from vacation sooner.

For instance, suppose that user is on vacation on October from 18-22
(included), and from 25-28 (incl.), with a week-end from 23-24:

    +--------------------------------------+
    |          OCTOBER calendar            |
    +--------------------------------------+
    |   Mo.  Tu.  We.  Th.  Fr.  Sa.  Su.  |
    |                                      |
    |                                      |
    |          on-leave          week-end  |
    |   <-------------------->   <------>  |
    |   18   19   20   21   22   23   24   |
    |                                      |
    |        on-leave                      |
    |   <--------------->                  |
    |   25   26   27   28   29   30   31   |
    +--------------------------------------+

On November 20, other users would see "On leave until _November
22_ included", instead of _November 28_.

This commit fixes the issue by taking into account consecutive
holidays to compute the actual end date of vacation.

Task-2002525

closes odoo/odoo#38388

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-11-25 15:59:03 +00:00