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
closesodoo/odoo#82496
X-original-commit: 16459957d23f4bdfddfe96d72ef96cbdc6fec539
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
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
closesodoo/odoo#81973
X-original-commit: bd4db173284aa45d141cc3736ecef511738dd8e3
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
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
closesodoo/odoo#80774
X-original-commit: cb998c804a0e7b14393637f372f1f32051fd548d
Signed-off-by: Olivier Colson <oco@odoo.com>
Simple users lost the ability to read their own paid expenses due to
missing access rights on account.move.
closesodoo/odoo#80646
Taskid: 2698791
X-original-commit: f164967c1eef731e92f41945b9a9fa05099950d9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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
closesodoo/odoo#80250
X-original-commit: a3daaf4d3a22e403ca891a1d396380e118020164
Signed-off-by: Laurent Smet <las@openerp.com>
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
closesodoo/odoo#79915
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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>
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
closesodoo/odoo#79514
X-original-commit: e7cbced2ffff189f6aed9ce0b0ab8eb819dbd088
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The field `payment_credit_account_id` on `account.journal` has been
removed by 04522f01e6closesodoo/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>
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'.
closesodoo/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>
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
closesodoo/odoo#77729
X-original-commit: cfe95a0e3781a23be73541cdae4393b8507cf9c1
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
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)
closesodoo/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>
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
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.
closesodoo/odoo#67762
Related: odoo/enterprise#17313
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
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
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.
closesodoo/odoo#74981
Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#75212
X-original-commit: e7299b7d0f081fa861d4b25cc76d5b0d5dab4b73
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
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
closesodoo/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>
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
closesodoo/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>
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.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
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
closesodoo/odoo#73275
Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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.
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
closesodoo/odoo#73715
X-original-commit: 3add44d462deebb2b7600d0bd2d86a4af8b2ab4e
Signed-off-by: William André (wan) <wan@odoo.com>
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 #2573145closesodoo/odoo#73596
X-original-commit: 9122b367baea10e59b66e45bf7c458a6f1e82efb
Related: odoo/enterprise#19623
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
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
closesodoo/odoo#72951
Related: odoo/upgrade#2602
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
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.
closesodoo/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>
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
closesodoo/odoo#71367
Related: odoo/enterprise#18587
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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 #2414749closesodoo/odoo#67331
Related: odoo/upgrade#2500
Related: odoo/enterprise#17258
Signed-off-by: William André (wan) <wan@odoo.com>
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
closesodoo/odoo#71627
X-original-commit: 25ac51e01a2084afd7a4d5e9c4c87a50ea787b93
Signed-off-by: William André (wan) <wan@odoo.com>
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.
closesodoo/odoo#69819
Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose
=======
When you archive an employee, if he's the manager/coach of someone else, the link is not removed.
closesodoo/odoo#71368
Taskid: 2536219
Related: odoo/enterprise#18588
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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.
closesodoo/odoo#71222
Taskid: 2491238
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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.
closesodoo/odoo#68955
Task-id: 2491238
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#68387
Related: odoo/enterprise#17316
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>