Commit Graph
55 Commits
Author SHA1 Message Date
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
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
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
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
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
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
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
Kevin Baptiste 278f5a6995 [IMP] hr_expense: show confirmation on duplicate expenses
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.

closes odoo/odoo#64190

Taskid: 2368636
Related: odoo/upgrade#2061
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-04 12:54:34 +00:00
Mohammed Shekha 905ea9bdc6 [FIX] hr_expense: scrollbar in list and kanban
In the expense list and kanban views, there is always a vertical
scrollbar. This is due to the presence of a custom statusbar
displayed above the view. This commit overrides the 'height: 100%'
and 'min-height: 100%' rules set on those views to remove the
scrollbar.

task-2334044

closes odoo/odoo#63681

X-original-commit: d544e584c38f27f8a43f8939d51118f6bf2e0bdc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-12-22 10:50:26 +00:00
shivam shah 765a4201eb [FIX] hr_expense: Fix design issue of hr expense banner
purpose of task is to solve the design issue on hr expense banner
when there is horizontal scrolling on tree view then the banner on
top will not adapt it so there is empty space at last.

So in this commit, Fix the position of the expense header so it should
not scroll with the tree.

closes odoo/odoo#60105

Taskid:  2336309
X-original-commit: 7ba0bc47d1404d5ac4bbf8cb5dcca7937558bd1a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-15 14:17:44 +00:00
Kairis 05043848a9 [FIX] expense: fix generated QRCode
When there is no expense, a messages is shown: "Did you try the mobile app?"
When clicking on the "Download on the App Store"
or on the "Get it on Google Play" buttons, generated QR codes have some invalid data before it:
- 002
- 1
- <the url>

This commit removes datas that are before the url so only the url is displayed.

closes odoo/odoo#60104

Taskid: 2326303
X-original-commit: a130784131c84326b2482ab3c4eea6e0bb3d881c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-15 14:16:53 +00:00
Kevin Baptiste 710e27c9c2 [FIX] hr_expense: should create button on kanban view
The kanban view was not properly using the custom javascript class.

closes odoo/odoo#58567

Taskid: 2340951
X-original-commit: dbc3785f5057a784104c434d6f0a06f2e9097208
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-28 10:04:46 +00:00
Giacomello Nathan (ngi) 636cd61acd [FIX] Expenses: Display headers on my expenses menu itmes
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

closes odoo/odoo#58040

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-25 06:58:29 +00:00
jbm-odoo 578ce5261b [FIX] hr_expense: Fix helper alignment
closes odoo/odoo#56735

Taskid: 2326851
X-original-commit: b9e371ff0da5a46cf7134b15d5a30f71b4a254e3
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
2020-08-28 13:25:41 +00:00
Arnaud Joset 3a2374157b [IMP] hr_expense: add upload button on list view
Before this commit, the upload button was not displayed on the list view.

taskid: 2315124
2020-08-14 06:43:20 +00:00
Yannick Tivisse a37a746b4e [IMP] hr_expense: Improve global UX (back2basics)
closes odoo/odoo#55852

Taskid: 2303951
Related: odoo/enterprise#12394
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-13 10:53:00 +00:00
Anousone Phaysomphot 356d915096 [IMP] hr_expense: add new digest tips
PURPOSE

Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.

SPECIFICATIONS

“Snap pictures of your receipts with the remote app”

See code for specifications.

LINKS

Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139

X-original-commit: 48bc75d340fa3a6d3c98bdd4b9f978036109f403
2020-08-12 12:22:59 +00:00
Yannick Tivisse d6e20b474b [IMP] hr_expense: Improve general UX (back2basics)
closes odoo/odoo#55689

Taskid: 2277338
Related: odoo/upgrade#1595
Related: odoo/enterprise#12331
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-11 09:53:00 +00:00
Nidhi Patel 0871c10717 [FIX] hr_expense: Fix traceback on access of expense view.
Currently, when a user created with default access rights,
but doesn't have employee linked with user then it will generate a
traceback because if user is not linked with employee then
it will return null so due to that while rednering the template
error was generated.

So in this commit, fix the treaceback by returning default values
if the current user had no employee

closes odoo/odoo#53161

Taskid: 2262636
Closes: #51687
X-original-commit: 96de35eda1a8e6e5086eb8221e939f3f737a9a6c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-17 13:20:30 +00:00
Kevin Baptiste 139fbf292c [IMP] hr_expense: add image on nocontent helper
The nocontent helper now shows a more descriptive image and a link to
the mobile application.

closes odoo/odoo#52972

Taskid: 2277641
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-15 12:53:24 +00:00
Julien Mougenot c4786fccfd [IMP] *: update notifications to optional title
closes odoo/odoo#52826

Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-12 09:01:50 +00:00
470fa48686 [IMP] base_import,*: move Import button to Favorite menu
*account,crm_iap_lead,hr_expense

Part of task 2234547

Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-05-04 14:31:11 +00:00
Romeo Fragomeli ab2e3fdb7d [REF] *: add tour steps utils
This commit moves some step utils in a dedicated file and add new ones.
These steps will be very useful for the Main Flow Tour to avoid
duplicated code.

To do this, we also had to transform it into functions to allow
utils to call each other. Existing one are converted for
standardization purpose.

Note that 'WEBSITE_NEW_PAGE' wasn't considered as an util.
This is a very simple step only used twice.
2020-03-11 10:10:16 +00:00
jbm-odoo b2414b118d [IMP] hr_expense: Add dashboard for My Expenses
closes odoo/odoo#45659

Taskid: 2198487
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-28 10:36:52 +00:00
Thomas Carlier 4eeeb4f172 [ADD] hr_expense : add the ability to install OCR module
- if checked in settings, OCR can be used to get infos from the attached receipt image

- set default product to EXP_GEN when created from picture

- use "register_as_main attachment" when expenses are created from receipt images

- Add the upload button to the kanban view to see it immediately in the mobile version
  and use it to create expenses from pictures. (with or without OCR installed)

closes odoo/odoo#39559

Related: odoo/enterprise#6493
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2020-01-28 14:41:37 +00:00
Barad Mahendra 5af891c490 [IMP] hr_expense: add upload button on expenses kanban view
Purpose of the task is to improve the mobile user experience of
the Expenses app by adding the upload button to the Expenses
kanban view.

Task ID: 2152155

closes odoo/odoo#41839

Closes: #41839
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-31 04:36:00 +00:00
shreya thakrar bf347e7727 [IMP] hr_expense: Improve general UX (back2basics)
For better user experience, there should be a 'UPLOAD' button on'hr.expense'
through which user can directly upload a single or multiple documents and
according to the number of documents, blank expense record with attached
document should be generated. These records should be in 'draft' state.

TaskID: 2040887

closes odoo/odoo#35400

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 15:00:13 +00:00
Romain Derie fdbf11643f [IMP] *: move test and tour files to new folder hierarchy and asset
As we now have a new debug mode 'tests' which load a new asset bundle
containing tour-test files, we moved those files to a new folder hierarchy.
That will clean the .js files trees.
Also, those files should be included in the new asset.

Basically, the .js tour files (not test) should be inside /static/src/js/tours
while .js tour test files (test=true) should be inside /static/tests/tours next
to QUnit tests, inside a tours folder.

+ test_new_api: don't run the test in debug assets

task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281
Closes #33213
2019-06-05 05:56:33 +00:00
Alexandre Kühn 38c7ed3c73 [FIX] *: adapt tours for the new community navbar
*: crm,
   hr_expense,
   hr_recruitment,
   point_of_sale,
   project,
   sale,
   stock,
   web_tour,
   test_main_flows,
   test_new_api

To sum up:
- Click on "Apps Menu" then the app item.
  (previously: click on '+' then the app item).
- Click on navbar section menu item.
  (previously: click on sidebar section menu item).
2018-09-17 16:46:53 +02:00
stefanorigano 1d9208c4fa [REF] *: improve app icons, add SVG version
- Uniform colors and design
- Replace duplicated icons (eg. sale / sale_management)
- Improve misleading icons (eg. POS)
- Add icons for new apps

Add SVG versions to lossless future editing and print/marketing use.

task-54681
2018-08-09 15:46:06 +02:00
Priyanka KakadiyaandNimesh Jethva c7eae6552e [REM] various: remove index.html for apps.
Several applications have an index.html file that is used to fill the html
description of the module. However those descriptions are generally not
up to date: they contain outdated screenshots, feature descriptions are
not maintained, ...

Instead we just rely on the discover button that redirects on the application
website. It has more chance being up to date. Moreover updating a website
is easier than updating the index.html of a module.

This commit is related to task ID 47179 and 1861544. Related PR are #22689
and #25556. First one is about classic applications while second one is about
website applications.

Co-Authored-By: Nimesh Jethva <nje@odoo.com>
2018-08-03 14:54:42 +02:00
qsm-odoo f7cee83cb8 [REF] *: BS4, 'center-block' -> 'd-block mx-auto' 2018-07-27 12:36:54 +02:00
qsm-odoo f4fbaf1efa [REF] web, *: BS4, use custom BS4 checkbox everywhere
Before this commit, Odoo used checkboxes in three different ways:

- A simple <input type="checkbox"/>, mainly in the frontend. The style
  is browser dependant.

- Same as above but with the BS3, checkbox structure. The style is still
  the same, but the alignement is supposed to be better (which is not
  always the case).

- The Odoo official structure:
	```
	<div class="o_checkbox">
	    <input type="checkbox"/>
	    <span/>
	</div>
	```
  which allows to have a cross-browser checkbox style and correct
  alignements.

The goal after this commit is to only use the BS4 *custom* checkbox
structure to achieve the same goal as our official structure (and
remove that one):

```
<div class="custom-control custom-checkbox">
  <input type="checkbox" class="custom-control-input" id="customCheck1">
  <label class="custom-control-label" for="customCheck1">...</label>
</div>
```

/!\ Labels are now required (use a zero-width space if necessary)
2018-07-27 12:36:54 +02:00
qsm-odoo ed1b18f103 [REF] *: BS4, adapt col-related classes
col-lg-* -> col-xl-*
col-md-* -> col-lg-*
col-sm-* -> col-md-*
col-xs-* -> col-*

col-lg-offset-* -> offset-xl-*
col-md-offset-* -> offset-lg-*
col-sm-offset-* -> offset-md-*
col-xs-offset-* -> offset-*

col-lg-pull-* -> order-xl-1
col-md-pull-* -> order-lg-1
col-sm-pull-* -> order-md-1
col-xs-pull-* -> order-1

col-lg-push-* -> order-xl-2
col-md-push-* -> order-lg-2
col-sm-push-* -> order-md-2
col-xs-push-* -> order-2
2018-07-27 12:36:54 +02:00
Fabien Pinckaers bed29a4aea [IMP] product: Unify/Clean product demo data
PURPOSE
=======

1. Unified product demo data
2. Less demo: one per use case
3. Demo data for all models

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

1. Refactor all the brol in the demo data
2. Adapt the tests to make them green, as some products are
   renamed, removed, created in python instead of as demo data
   ...
2018-07-05 08:57:41 +02:00
RomainLibert 631891dc5d [IMP] hr_expense: add draft state to expense lines
We need to be able to change an expense report before submitting it, for
this we add a new step in the expense process (a draft state for the
expense sheets).

Task #41700
Closes #24806
2018-06-07 13:55:06 +02:00
fda-odoo 2df2afc405 [IMP] hr_expense: improve useability of hr_expense
- Change the differents states of hr.expense to have
ToSubmit, submitted, approved, refused and paid.
- Add a responsible field on employee model. The responsible is a res.user that belong to the group "hr_expense.group_hr_expense_manager"
The commit change too a "vals" variable that changed in a git rebase operation.
- Make the other_info tab invisible if the user doesn't belong to account.group_account_user.
- Make expense wizard (for expense lines) editable if expense is in reported mode, so when the sheet is in To submit state.
- Move a tour from expense form to expense_sheet form
- rename two fields (attachments and manager)
- The buttons "approve" and "expense" must be hidden if the user isn't the expense responsible.
- The description field of expense line must be editable in draft, reported and refused state
- Add a subtype to follow responsible changes on expenses sheets
2018-01-25 15:51:57 +01:00
fda-odoo ab8f5ec95d [IMP] hr_expense: change tours text, labels, search field
- subscribe responsibles of an expense to followers of that expense
- hr_expense requires sale_expense instead of sale_management
- remove one tour step and change texts of some others
- remove header from expense line wizard
- add tax field in form view for expense
- change the display name of some fields and other titles.
- remove the expense report and improve search bar for expenses in report.
2018-01-25 15:51:57 +01:00
Yannick Tivisse 7ed9a7fabe [REM] web_planner: Remove the module
Purpose
=======

User tests have been made by the Product Owners team. It showed that the planners are not used by new users on Odoo due to several reasons (They are too static, too heavy to use,...)

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

Remove the module and its different applications. The onboarding on the business flow will be improvement in the weeks to come.
2017-10-26 16:14:21 +02:00
Yenthe V.G 694b7ff866 [FIX] hr_expense: improve tour message
Better English

Closes #19867
2017-10-03 17:35:05 +02:00
Dhawal Limbuwala 10a497011d [IMP] hr_expense: new tour for user onboarding
Steps:
- In home, expense app icon: "Go to the expense
to attach a receipt"
- In list, on create button : "Click here to create
your first expense and add it to below."
- In form, on save button : "Once your Expense is
ready, you can save it."
- In form, point out the chatter "Attach your
receipt here."
- In list, point out record selection: "Select
expenses to submit them to your manager"
- Point out "Action": "Click on Action Submit To
Manager to submit selected expenses to your manager"
- In expense sheet point out approve “Approve the
sheet here. Tip: if you refuse, don’t forget to
give the reason thanks to the hereunder message
tool".
2017-09-14 14:48:07 +02:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
Martin Trigaux e5755b12cf [FIX] base_setup,hr_expense: missing closing tag, typo 2016-09-20 13:43:12 +02:00
Aaron Bohy 5a619d25ef [IMP] *: web_tour: remove 'Skip tour' link in tips 2016-07-05 12:42:49 +02:00
Fabien Pinckaers 4882a521f1 [IMP] Expense: tour + employee created by default 2016-06-28 19:35:25 -07:00
Yannick Tivisse f066b1ec4f [IMP] hr_expense: Onboarding improvement + mail gateway
1/ Modify the no content help message for hr_expense with a dynamic part
   which describe how to create a new expense by mail
2/ Mail gateway mechanism. New customizable email alias expense@domain
   that creates a new expense by sending an email to it. Check several things
   - Check that the email_from is the same than one of the employees or than
     on of the related users to employees. If not, send back an email to say that
     the expense will not be created.
   - If the email address is valid, check if something is between brackets '[]'
     If it is the case, check if it is linked to a product internal reference
     and set it accordingly. If nothing is found, use a default product
     'Fixed Cost'
   - If one/several float(s) are found in the mail subject, take the last
     occurence and set it as the expense total amount.
3/ If a product template is created, to not add taxes on it. We don't expect it
   to have additional taxes
4/ Under Expenses -> Configuration -> Expense Product, use a simplified product
   view with only the needed fields.
5/ When generating the account move lines, use the account defined on the expense
   line, not the sheet
6/ When creating a payment, make a reconciliation on the payable account move lines
   That way, if the total amount on the expense is paid, the expense will be set to
   paid automatically when registering a payment
7/ Add a one-page planner to explain how to use the email alias
8/ The field account_id on the expense sheet was informative. After some tests, it
   seems that it's more confusing than helping. So we removed it
9/ Add a domain on the field 'bank_journal_id' to select journals of
   type 'cash' or 'bank'
10/ If the number of expense lines is equal to 1, the expense summary on the expense
    sheet should be the same name the line. So the process can be done in one click
2016-06-21 14:09:48 +02:00
Fabien Pinckaers 3c319b2b8b [ADD] hr_expense: onboarding tour
first step only, to be continued...
2016-06-16 14:59:41 +02:00
Foram Shah aff5321d22 updated the description of 'hr_expense' 2016-05-10 15:24:44 +02:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00