Commit Graph
2844 Commits
Author SHA1 Message Date
roen-odoo ca6cd0362e [FIX] hr_expense: Expense not cancelled
Current behavior:
When cancelling an expense payment, the expense state was not modified and was still 'paid' when it should be 'refused'.

Steps to reproduce:
- Create an expense and post the expense and register a payment for the expense.
- Then go the vendor payments and cancel the associated vendor payment.
- The expense still shows as paid in the expenses page.

opw-2711383

closes odoo/odoo#82496

X-original-commit: 16459957d23f4bdfddfe96d72ef96cbdc6fec539
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-11 16:18:49 +00:00
Florian Damhaut 8fee5cc6ef [FIX] hr_expense: error on duplication with uom
Step to reproduce:
- Duplicate expense with a uom != of Unit

Current behaviour :
- Error telling that the unit is not correctly chosen

Behaviour After PR:
- The uom is copied on duplication and no error

opw-2714136

closes odoo/odoo#81973

X-original-commit: bd4db173284aa45d141cc3736ecef511738dd8e3
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2022-01-03 12:34:01 +00:00
Victor Feyens 15eb4d8795 [FIX] hr_expense: compute price unit in correct currency 2021-12-23 15:30:24 +01:00
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
Merlin (megu) 711780944a [FIX] hr_expense: use contact bank account for employee expense
Steps to reproduce:
1. Install the Expenses and Contacts Apps
2. Go to the Contacts App
3. Add a bank account to the private address linked to a specific employee
4. Go to the Expenses App
5. Create an expense for the employee and try to register the payment
6. The bank account will not show up

Solution:
If the employee doesn't have a bank account selected in the Employee form, we select the first bank account of his private address

OPW-2655450

closes odoo/odoo#80774

X-original-commit: cb998c804a0e7b14393637f372f1f32051fd548d
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-12-03 09:43:54 +00:00
Kevin Baptiste 82803328b2 [FIX] hr_expense: allow users to read paid expenses
Simple users lost the ability to read their own paid expenses due to
missing access rights on account.move.

closes odoo/odoo#80646

Taskid: 2698791
X-original-commit: f164967c1eef731e92f41945b9a9fa05099950d9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-01 07:18:10 +00:00
Goffin Simon 7a5466a8ec [FIX] hr_expense: Wrong tax in multi companies
Steps to reproduce the bug:

- Let's consider two companies C1 and C2 where C1 is the parent of C2
- Let's consider an expense product P with T1 as tax in C1 and T2 as tax in C2
- Let's consider an expense alias A defned for C1 and C2
- Let's consider an employee E in C2 with work email address W
- Send from W to A an email with subject [internal reference of P] Test Expense 1000€

Bug:

An expense is created in C2 with T1 and T2 as supplier taxes instead of only T2

Inspired from function _compute_tax_id defined in model sale.order and purchase.order

opw:2507162

closes odoo/odoo#80250

X-original-commit: a3daaf4d3a22e403ca891a1d396380e118020164
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-24 07:56:13 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
anhe-odoo 2a0ef92a1e [FIX] hr_expense: Make expense lines readonly on report
Expected Behaviour

When creating a journal entry for an expense, the journal
shouldn't be editable once it has been submitted for approval.

Observed Behaviour

Even when the journal entry has been validated by the manager,
the list of expenses is still editable, which can cause serious
trouble.

Reproducibility

This bug can be reproduced following these steps:
- Create a new expense
- Create the related journal entry (Create report)
- Submit the report for approval
- Validate the report
- Try to edit the expenses list

Problem Root Cause

As it can be seen in the PR, this issue came from the fact the
expense list isn't in read-only mode

Related Issue(s)

opw-2659436

closes odoo/odoo#79915

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-17 10:44:40 +00:00
Aktiv Software 744db253c5 [FIX] hr_expense: Error when create new expense product.
When create expense product, it raise validation error.
The issue was mandatory field of product was not available on form view.

This PR contains madatory field mandatory field as invisible in form view.

closes odoo/odoo#79754

Fixes: #78498
X-original-commit: b087a3133fa54c10ad0f87a6a83f3c714ee707af
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-15 16:41:10 +00:00
Pierre Paridans 42838b5609 [FIX] hr_expense: QR code shouldn't be shown on tablet
On tablet, the call-to-action to install the app shouldn't show the QR
code... to be scanned by the tablet itself.

This commit fixes it by using the platform detection instead of the
screen size.

Steps to reproduce:
- Open "Expenses" on tablet
- ensure no records are listed (use filters if needed)
- click on the call-to-action to one of the app store
=> opens the QR code's modal instead of going directly to the store

task-2349194

closes odoo/odoo#79514

X-original-commit: e7cbced2ffff189f6aed9ce0b0ab8eb819dbd088
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-11-08 14:08:50 +00:00
william-andre 01f85bda3a [FIX] hr_expense: bad forward port of 25ac51e01a2084afd7a4d5e9c4c87a50ea787b93
The field `payment_credit_account_id` on `account.journal` has been
removed by 04522f01e6

closes odoo/odoo#79203

X-original-commit: a5e5110b9a1cc85e76cb6a29de6e3bef9658d405
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-29 13:22:49 +00:00
Kevin Baptiste cbea9f5c56 [FIX] hr_expense: allow to create Expense Products
Since commit `37eb0dfbb54` it was no longer possible to create Expense
Products. The field `detailed_type` was not present in the view hence it
didn't get its default value of 'service'.

closes odoo/odoo#79148

Taskid: 2678961
X-original-commit: 31b527b3309c99863d2eb848e3145574bed8f338
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-28 14:37:49 +00:00
Kevin Baptiste 60d62a1d9d [REF] hr*: misc cleanup
*: hr_expense, hr_holidays, hr_work_entry_holidays

- Remove unused template;
- Remove unused fields (hr_expense);
- Rename group_days_allocation to convey proper meaning;
- Remove deprecated method.

closes odoo/odoo#78128

Related: odoo/upgrade#2907
Taskid: 2665866
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-20 15:15:03 +00:00
wan 9b0baa3aa4 [FIX] *: product back2basics post-freeze fixes
This should have been a fixup of 37eb0dfbb54db1c062276cd8c172bf8dac9e557b but we needed
to freeze 🤷‍♂️

closes odoo/odoo#77344

closes odoo/odoo#77876

Related: odoo/enterprise#21425
Related: odoo/enterprise#21467
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-11 10:15:49 +00:00
Florian Damhaut b10eb19327 [FIX] hr_expense: Expense is refused when account move is cancelled
Description of the issue/feature this PR addresses:

When an expense was accepted and then the account move related to the expense was reset to draft/cancelled, the expense's state stayed as payed.

Current behavior before PR:
The expense's state stayed as payed.

Desired behavior after PR is merged:

Change the expense's state to refused with the reason 'Payment Cancelled'.

opw-2559225

closes odoo/odoo#77729

X-original-commit: cfe95a0e3781a23be73541cdae4393b8507cf9c1
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-10-11 09:02:14 +00:00
b63ee52552 [FIX] *: remove scss 'extend' from dropdown components
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.

Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.

In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.

Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.

// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
  <button class="dropdown-item" type="button">Action</button>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
  <li class="o_dropdown_item">
     <span>Action</span>
  </li>
  <li class="o_dropdown_item">
     <a href="#">Another action</a>
  </li>
</ul>

// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
  <span class="dropdown-item">Action</span>
  <a class="dropdown-item" href="#">Another action</a>
</div>

// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)

closes odoo/odoo#77649

X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2021-10-04 07:57:00 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
2021-09-07 15:50:14 +00:00
wan fa034b2a64 [IMP] *: product back2basics 15.0
Rework the whole view, generally.

task-2605931

Part-of: odoo/odoo#75862
2021-09-07 15:50:00 +00:00
Julien Castiaux b8b89bf47d [FIX] core: prevent redundant default on related
Setting a default value on a readonly related field without an inverse
method is nonsense.  We log some warning when it happens.

We also fixed other cases where a related field has a default value
that overrides the target field's value.

closes odoo/odoo#67762

Related: odoo/enterprise#17313
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-09-07 15:49:48 +00:00
d1e227b07b [IMP] web,*: new PivotView component
Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-09-07 10:04:38 +00:00
Quentin Wolfs 45afa9243b [IMP] hr_expense: set expense demo products as services
Set expense demo products as 'service' instead of 'consumables' so they
are not shown anymore in inventory products.

Task-2428819

Part-of: odoo/odoo#74364
2021-08-31 23:35:17 +00:00
Martin Trigaux d9e3aab69b [FIX] mail: convert res_model_id to selection
Following the removal of read access on ir.model (odoo/odoo#69120),
the mail.activity.type model was not accessible to non-admin users due
to the res_model_id many2one field.

Before this commit, a project user could not access the Activity Type
menu.

Convert it to a selection field with the selection values being
computed in sudo.

closes odoo/odoo#74981

Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-23 06:56:00 +00:00
Adrien Widart 4a54a0dcb5 [FIX] hr_expense: convert base amount if different currency
In a multi-currencies environment, if the user creates an expense with a
different currency than the company's, one of the associated account
move lines will have an incorrect base amount.

To reproduce the issue:
(Need account_accountant. Let USD be the company's currency)
1. In Settings, enable "Multi-Currencies"
2. Edit the currency rates:
    - EUR: 2
    - USD: 1
3. Create an expense:
    - Currency: EUR
    - Unit Price: 700
    - tax: 15%
4. Create Report, Submit, Approve, Post Journal Entries
5. Accounting > Reporting > Tax Report, This Financial Year
6. Audit of "Tax 15.00%"

Error: Base amount of the expense is $700, which is incorrect. It should
be either 700€ or $350

OPW-2613547

closes odoo/odoo#75264

X-original-commit: d6fd7301291dfe3ffd58d33edb3f2c4270e3b8a1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-08-18 15:14:08 +00:00
Touati Djamel (otd) 32d883987a [FIX] hr_expense: fix the approval of multiple expense sheet
Steps to reproduce the bug:
- Go to Expenses > Expense Reports to approve
- Select expense reports with different managers
- Click on the Action drop-down button > Approve report

Problem:
Traceback is triggered because we try to access `"self.user_id"` (manager) of expenses as a single element,
While we have several `”user_id”`

Solution:
- Filter the `"hr.expense.sheet"` which must be approved
- Approve each expense separately

opw-2622837

closes odoo/odoo#75212

X-original-commit: e7299b7d0f081fa861d4b25cc76d5b0d5dab4b73
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-08-18 12:54:45 +00:00
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02:00
Florian Gilbert 061a811aff [IMP] expense: Add smart button on expense connected to his entry.
Task ID: #2464735

closes odoo/odoo#69020

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-05-03 06:06:10 +00:00
Nasreddin Boulif (bon) 2ee1f7798a [FIX] hr_expense: don't submit expense report on creation
Steps to reproduce:

  - Install Expenses module
  - Go to Expenses (list view)
  - Select multiple expense in `To Submit` stage
  - Click on Action -> Create report

Issue:

  Report is directly in Submitted stage.

Cause:

  Submitting report on creation.

Solution:

  Do not set 'sumbit' satge on report creation.

opw-2586184

closes odoo/odoo#74615

X-original-commit: 7cb6cfad0dc8254c3668f6d3c5a0be1a85051ab3
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-08-03 10:15:20 +00:00
Touati Djamel (otd) 8f6e85f752 [FIX] account, hr_expense: fix reconciliation function
Steps to reproduce the bug:
- Install Accounting and Expense app
- Go to accounting settings > enable cash basis option
- Go to accounting > configuration > accounting > taxes
- Create a new tax or choose an existing one e.g “Tax abc”:
Tax Computation = `”Percentage of Price”`
Tax Type = `”Purchases”`
Choose any value for amount
Select "Based on Payment" in tax due
choose an account with the "Allow Reconciliation" option activated in the Cash Basis Transition Account field
Save

- Go to expenses > Expense Reports > All reports > Create a new one :
	- Add 2 expense and for both set up the taxes to "Tax abc" and unit price > 0
- Submit to manager
- Approve
- Post journal entries
- Register a payment

Problem:
A user error with the following message is triggered: “You are trying to reconcile some entries that are already reconciled”

In the use case we have two expenses and for each, an `" account.partial.reconcile "` will be created,
so we will loop twice and therefore add twice all the `”account.move.line”` linked to the taxes
in the dict `" to_reconcile_after "`: https://github.com/odoo/odoo/blob/beccf82e09d536255d9d9cb9bfe58ebae2559843/addons/account/models/account_partial_reconcile.py#L585

Then we loop to reconcile all the `" account.move.line "` which are in the dict `" to_reconcile_after "`,
but since we added them all twice, at each turn of the loop we give them all as a parameter
of the “reconcile” function without checking whether they are already reconciled or not.

opw-2565934

closes odoo/odoo#74432

X-original-commit: fb2b1482f5d3dec924b08e08dc915d6608c7d6b3
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-07-29 16:04:32 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Xavier Morel 0e552b96da [FIX] *: convert tip contents to t-out
Requires markup every markup-using tip content as Markup. Would be a
nice occasion to migrate everything to a markup-safe markdown I think,
especially if we could migrate the translations so we don't lose them.
2021-07-20 05:40:55 +00:00
Goffin Simon b36fef7185 [FIX] hr_expense: Wrong journal entries
Steps to reproduce the bug:

- Let's consider an expense E paid by the company
- Validate E and post journal entries

Bug:

Two journal entries were created:

1. Outstanding payments (debit) / Account Payable (credit) as draft
2. Expense (debit) / Outstanding payments (credit) as posted

With the this fix:

Only the second entry is created and posted

This reverts commit 25ac51e01a2084afd7a4d5e9c4c87a50ea787b93.

opw:2510663

closes odoo/odoo#73715

X-original-commit: 3add44d462deebb2b7600d0bd2d86a4af8b2ab4e
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-14 12:51:33 +00:00
Nicolas (vin) c1693581d7 [IMP] account: payment method improvements
To improve the payment method system, proceed to a few changes
such as changing the view a bit, making sure payment acquirers are not
linked to a journal by default and that only the manual payment method
type can be used multiple times in a single journal.

Task id #2573145

closes odoo/odoo#73596

X-original-commit: 9122b367baea10e59b66e45bf7c458a6f1e82efb
Related: odoo/enterprise#19623
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-12 18:10:36 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
William Braeckman 409cf08a84 [IMP] hr_expense: force margin for upload button
Force a small margin to the left of the upload button in the expense
list view.
Previously the create and upload button would be stuck to each other.

Task ID: 2582448

closes odoo/odoo#72951

Related: odoo/upgrade#2602
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-07-08 12:00:59 +00:00
Fabien Pinckaers a65f6a5872 [IMP] various: clean most urls to odoo's website
Pages changed on odoo.com so let's update links.

closes odoo/odoo#72707

Related: odoo/enterprise#19239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 15:14:29 +00:00
bit-odoo 800f9c499a [FW][FIX] mail, various: show only my activities shown through systray
Before this commit, suppose we have a scenario like below

  Task-A:
    Activity-1:
      name: Email ( Today )
      Assigned to: User-1
  Task-B:
    Activity-1:
      name: Email ( Today )
      assigned to: User-2
    Activity-2:
      name: Call ( Due in 3 Days )
      assigned to: User-1

When User-1 goes through the systray 'Today' filter shortcut he gets both
Task-A and Task-B in the list instead of only Task-A. Indeed currently
activities are not filtered based on current user with its deadlines.

However purpose of systray is to indicate activities current user has to
perform instead of global activities.

After this commit activities will be filtered based on deadlines as well as the
current user. In order to achieve this behavior we needed to pass a domain like
[
   ('activity_ids.date_deadline','=', fields.Date.today()),
   ('activity_ids.user_id','=', 1)
]

And for that purpose we introduced a non-stored compute field with a search
method.

Task ID-2438822
COM PR odoo/odoo#72219

X-original-commit: f4eaf4d8fb2f97240201104dcd4fc7e2674bce02
2021-06-21 07:51:00 +00:00
stefanorigano (SRI) 1fb2cd9af7 [FIX] web, *: drop o_dropdown_toggler_btnclasses
Drop `o_dropdown_toggler_btn` class in favor of `o_dropdown_toggler`.
o_dropdown_toggler_btn was initially introduced in ~13.3, but it's now
obsolete.
2021-06-18 21:31:32 +02:00
alt-odoo 58ca0422b9 [IMP] hr_expense: use bank account defined on employee in payment
When registering a payment on an expense, we are currently using the first
bank account set on the partner if no account is set on the account move.
We should use the bank account defined on the employee instead, and
fallback on the partner only if it is not set.

closes odoo/odoo#72077

X-original-commit: e0335a71afbeb34c5fad9a71bd1b53d5d88d6fa6
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2021-06-11 17:15:48 +00:00
Munaf Khan 20955462f0 [IMP] various: beautify list-views using decoration
Currently, to identify records based on state, in most of the list views we
use 'badge' widget on 'state' fields which can be decorated as needed.

However, for the list views, best approach would be to also add list
decoration along with 'badge' widget so that the whole line is colored
and it's easy for user to 'scan' the information

This commit improves the behavior adding decorations to several list-views.
To check the list of changes, kindly see the task specification

Apart from that, this commit also improves label of the module state from
'Not Installed' to 'Uninstalled'.

TaskID-2527119

closes odoo/odoo#71367

Related: odoo/enterprise#18587
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-03 09:24:13 +00:00
Nicolas (vin) 04522f01e6 [IMP] account: allows multiple payment acquirers on a journal.
Users may want to be able to have transactions coming from multiple
payment acquirers to be registered in the same journal.

This will allows that.

Task id #2414749

closes odoo/odoo#67331

Related: odoo/upgrade#2500
Related: odoo/enterprise#17258
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-03 10:00:26 +00:00
Goffin Simon f983ba9352 [FIX] hr_expense: Wrong journal entries
Steps to reproduce the bug:

- Let's consider an expense E paid by the company
- Validate E and post journal entries

Bug:

Two journal entries were created:

1. Account Payable (debit) / Outstanding payments (credit) as draft
2. Expense (debit) / Outstanding payments (credit) as posted instead of Expense (debit) / Account Payable (credit) as draft

opw:2510663

closes odoo/odoo#71627

X-original-commit: 25ac51e01a2084afd7a4d5e9c4c87a50ea787b93
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-02 15:57:37 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Yannick Tivisse f6a77867df [IMP] hr: Remove M2O references to archived employees
Purpose
=======

When you archive an employee, if he's the manager/coach of someone else, the link is not removed.

closes odoo/odoo#71368

Taskid: 2536219
Related: odoo/enterprise#18588
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-05-28 08:04:40 +00:00
Barad Mahendra 95d0597fcc [IMP] hr_expense: expense product should not be sale or purchased
Purpose of the commit is to hide the expense product from sale and
purchase menu.

So in this commit, make the expense product as sale_ok and purchase_ok
False to make them invisible in sale or product.

closes odoo/odoo#71222

Taskid: 2491238
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-05-25 13:36:14 +00:00
Sébastien Theys c6716847aa [IMP] web, *: clean up notification API
task-2476867

closes odoo/odoo#67009

Related: odoo/enterprise#16760
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-27 13:47:23 +00:00
Kartik Chavda fe022b74a5 [IMP] (hr, sale)_expense:replace demo expense products
Currently, in the expense module, demo expense products are more
specific to the expenses and label tooltip of the cost field doesn't
convey proper difference between fixed and variable cost of
expense products.

So in this commit, replace old expense products with new expense
products and recreate expenses and reports using these
categories(products). it will provide better experience on demo.
overwrite label tooltip of cost field in expense app to convey proper
difference between fixed and variable cost of expense products.

closes odoo/odoo#68955

Task-id: 2491238
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-05-20 07:12:11 +00:00
yograj tandel e893651cec [IMP] *: remove widget='selection' from many2one fields
Currently, across Odoo, there are around 40+ many2one fields defined with a
'selection' widget. Since the many2one widget has options to limit record
creation and opening, there is no reason to define a many2one field with a
selection widget. The selection widget does not allow for searching, and is
limited to 100 records.

PURPOSE
to update the definition of any many2one on which we applied a 'selection'
 widget, and instead use the standard many2one widget with disabled
opening/creation instead.

after this commit,
for each many2one field defined with widget="selection",  widget="selection" is
replaced with options="{'no_open': True, 'no_create': True}"

Task : 2476488

closes odoo/odoo#68387

Related: odoo/enterprise#17316
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-20 11:01:28 +00:00