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>
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>
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
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>
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>
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
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>
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>
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>
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
Social Marketing app is 25 menu away from Email Marketing, etc.
So, all menus should be reordered.
- This commit will reorder the menus of the app switcher in order to reduce
the distance between correlated applications,
and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.
PR: #69984
TASK ID: 2513082
Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, When we create expense report from expense it will
directly create a expense report record so discard button on
top is misleading.
So in this commit, when creating the expense report from the expense
it will not create an record but set the default value in editable
form view with auto computed name based on expense.
Also create report action coming to the two places
1) in top action menu
2) on tree header
So in this commit, removed 'create report' menu from top
action bar.
Added the depends on can_reset and can_approve to compute
the value for displaying the button when record is not saved
from the 'create Expense report' button and default in submit state.
also fix the attachment_number field because expense.id is
NewId_X while passing in default_get of expense_line_ids so count was
0 without saving the expense sheet.
closesodoo/odoo#65104
Taskid: 2359834
Related: odoo/upgrade#1875
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Display a confirmation dialog when a user creates duplicate expenses.
Two expenses (or more) are considered duplicates when they share the same
date, amount, product, employee, company and currency.
closesodoo/odoo#64190
Taskid: 2368636
Related: odoo/upgrade#2061
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Add "payment_status" field to be more explicit.
- Turn error message "Expenses must have an expense journal specified to
generate accounting entries." into "Specify expense journal in tab
Other Info to generate accounting entries."
closesodoo/odoo#65528
Task: 2424870
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The work location of an employee was previously a fields.Char. That was
changed to a Many2one field to a the new model called work.location.
That had some consequences in other modules that had to be slightly
adjusted. The modules impacted were hr, hr_appraisal, hr_payroll.
Task id: 2335646
closesodoo/odoo#63192
Related: odoo/enterprise#15235
Related: odoo/upgrade#2020
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* account, analytic, calendar, coupon, crm, crm_iap_lead_website,
delivery, digest, event, event_crm, fleet, gamification, hr,
hr_expense, hr_skills, im_livechat, lunch, mail, maintenance,
mass_mailing, membership, mrp, point_of_sale, pos_mercury, product,
purchase, purchase_requisition, sale_management, sales_team, sms,
stock, stock_landed_costs, survey, website_crm_partner_assign,
website_event_exhibitor, website_event_track, website_forum,
website_slides, base
This commit removes oe_edit_only labels and adds placeholder
on fields in form views from a lot of apps to minimize the
shift when switching mode.
task 2330101
In order to make the expense form more intuitive, it was necessary to distinguish between whether the product has cost different from
zero or not. Depending ot this context, some fields are shown or not. Also 'Bill Reference' is shown only to account managers.
Now the expense can be submitted in different currency and it can be reimbursed in company’s currency.
In case the latter two currencies differ from each other,
the conversion is done automatically and the rate is also displayed.
Suggestion - untaxed_amount can be removed
Task - 2366775
closesodoo/odoo#61920
Related: odoo/enterprise#14838
Related: odoo/upgrade#2028
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently at odoo we use expense product terminology just because it's
set up using product. Inside the expense app, there is no reason of
not using category instead of product
So in this commit, rename the product term into category for all expense
views.
closesodoo/odoo#62661
Taskid: 2391433
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The reconciliation between an expense and a bank statement does not
update the expense and its sheet.
To reproduce the error:
(Need account_accountant)
1. Go to Expenses
2. Create one (e.g. an expense of $20)
3. Save, Create Report, Approve, Post Journal Entries
4. Go to Accounting > Bank
5. Create a bank statement (e.g. $-20)
6. Save, Post, Reconcile
7. Select the expense, Validate
8. Go to Expense > The created expense
=> The expense's state is still 'Approved'. It should be 'Paid'.
Moreover, if you click on the associated report ("View Report"), the
same error appears: the sheet's state is 'Posted' instead of 'Paid'.
The problem was that the method 'action_invoice_paid' (deleted in this
commit) was never reached. Moreover, there was no way to get the
expense's residual amount.
OPW-2389414
closesodoo/odoo#63486
Signed-off-by: adwid <adwid@users.noreply.github.com>
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus
WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:
When saving, a read is called. By default, read has
bin_size to true to avoid performances issues.
It will return the image size instead of the content
it may lead to image dissapearing or "Incorrect padding" error
HOW:
find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
git checkout -- addons/base_setup/views/res_config_settings_views.xml
---
PR for General Settings: https://github.com/odoo/odoo/pull/47297
opw-2346644
closesodoo/odoo#61215
X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Currently, expense analysis menu have default view as list and kanban
but is should be graph,pivot,list and kanban.
Here viewmode is already in same sequence but only list and kanban
view is linked with action. graph and pivot view is not linked with
action so it will be always comes up in last in sequence.
So in this commit, Link graph and pivot with the action so it should
comes up first in expense analysis menu.
closesodoo/odoo#58582
Taskid: 2337224
X-original-commit: e273afd187edca1df6b462af42db3cce58df88d7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The kanban view was not properly using the custom javascript class.
closesodoo/odoo#58567
Taskid: 2340951
X-original-commit: dbc3785f5057a784104c434d6f0a06f2e9097208
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* calender_sms, hr_expense, sale_project
PURPOSE
Enable the framework to define some of actions in the controlpanel,
as buttons similar to the 'create/edit/discard' buttons.
SPECIFICATIONS
Replace the below-mentioned dropdown actions with controlpanel buttons
- 'send sms to attendees' in Calendar > Calendar
- 'approve report' in Expenses > Expense Reports > To approve
- 'post entries' in Expenses > Expense Reports > To post
- 'register payment' in Expenses > Expenses Reports > To pay
- 'create invoice' in Field Service > All Tasks > To Invoice
LINKS
PR https://github.com/odoo/odoo/pull/57830
Task-2300426
closesodoo/odoo#57830
Related: odoo/enterprise#13272
Related: odoo/upgrade#1785
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Expense header was displayed in all tree & kanban views.
This commit removes the header in other views than 'My Expenses' menus
because the expense header should only be visible in the 'My Expenses' menu
Task id: 2341766
closesodoo/odoo#58040
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The 'paid' ribbon should not cover the 'receipts' stat button.
It's now displayed underneath.
closesodoo/odoo#58454
Taskid: 2343742
X-original-commit: b1a37e552d6ab5504f2ef8c52a7312fd5d025c79
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
user with the 'team approver' or the 'all approver' access right levels
cannot approve his own expenses. However, the 'approve' button is still
being displayed, which is confusing and misleading, and an ugly user error
is thrown when the user tries to click on it
SPECIFICATIONS
Hide the 'approve' button on expense reports If the user has either the
'team approver' or 'all approver' access right levels and the employee_id
set on the report is linked to the current user
LINKS
Task-2323982
closesodoo/odoo#56784
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose of the task is, Remove the inconsistant behaviour of
expenses and expense report As expenses are editable in batch,
but expense reports are not
So in this commit, make the list views linked to hr.expense.sheet
multi-editable
- Following fields should not be editable in batch: employee_id,
create_date, company_id, activity_ids, total_amount, currency_id, state
- the accounting_date and sale_order_id fields should also be editable
in batch for hr.expense
closesodoo/odoo#57138
Taskid: 2323027
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose of the task is to add a 'Can be Expensed' filter on product
view from expense which should return products for which
can_be_expensed is true.
closesodoo/odoo#56950
Taskid: 2328469
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The helper message has been changed in the following menus:
-My reports
-Expense Reports To Approve
-All Expense Reports
-Expenses Analysis
Task-2320205
closesodoo/odoo#56989
Related: odoo/enterprise#12913
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the upload button was not displayed in all the tree/kanban views.
closesodoo/odoo#55867
Taskid: 2315124
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Use the one defined in the account module allowing paying multiple journal entries
and group payments together.
- Remove the hr_expense_check module that contains only duplicated features regarding the
register payment wizard.
--task: 2273528
Improve slightly the layout of some forms related to employee and contracts.
Modified modules:
hr
hr_expense
hr_holidays
timesheet_grid
hr_contract_salary
hr_payroll_account
Task ID 2277298
closesodoo/odoo#52981
Related: odoo/enterprise#11156
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
currently, the expense banner is displayed on to many menus like:
'expense report > to Pay, to Post'.
so in this commit,the banner should only be visible in the
'My Expenses' and 'My Expense Reports' menus.
and also removed some unused action from hr_expense.
closes odoo/odoo#52241
Taskid: 2267850
Closes: #52241
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit sets attribute sample="1" in a bunch of list and
kanban views, to enable the new sample data feature when views are
empty.
Task 2232801
X-original-commit: 5471309b35619f307242c2704c7681ba63d2be42