Commit Graph
8 Commits
Author SHA1 Message Date
Laurent Smet 09afbf1608 [IMP] hr_expense,sale_expense: Remove dependency to AccountTestCommon
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it:
- doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates...
- doesn't setup a testing user then all tests are done using the superuser.
- doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc...
- is run sometimes at-install.

--task: 2301180
2020-07-31 07:11:32 +00:00
fw-bot fccaa703c4 [MERGE] project, hr_expense: Fix several multi-company issues + tests
Purpose
Fix multi-company access issues following the big changes that happened
(the 13.0). Make the usability better in order to avoid potential
multi-company issues for the user.

Specification
Check the related commits to see the different fixes that have been
made. For more information about the technical/functional considerations,
check the related task.

Taskid: 2088891
X-original-commit: 5c8df3a5e5f7960e5eab6439e0a32a06224ba826
2020-01-15 15:11:50 +01:00
Rohan PatelandLucas Lefèvre 4ba8f51d87 [IMP] hr_expense: improve mail gateaway
1/ Send mail notification if expense is registered successfully

Before this commit, when user submits the expense via email, user is not getting
information about whether expense is registered or not. After this commit user
will get a confirmation email.

Few other usability improvements,
- Improved tooltip for the field 'default_code' in expense's form and in the
'Emails' config setting.
- Added product's default code in product's kanban view
- Filtered uom based on category of product's uom.

2/ Better parsing of expense mail subject

Criteria for matching expense product from email subject is changed,
  - The product code should be the first word of the subject.
  - Only expense products are allowed, previously there was no filter and user was
    able to select any product in expense via mail.

Currency support is added,
  - Now user can specify currency symbols and ISO code in expense mail subject.
  - If subject contains multiple numbers in that case, number with currency will
    get higher priory, and it selected as an amount in expense.
  - If multi currency is active, user can use any active currency symbol/ISO code
    in mail subject. Respective currency will be selected in registered expense.
  - If multi currency is not active, user can only pass company currency. Other
    currencies are ignored and expense will be registered as default company currency
  - If user pass non active currency in subject then that currency will be ignored
    and expense will be registered as default company currency

Examples:
PROD_CODE 2 foo $1205.91 baz

Added python test cases for mail subject parsing.

Related to task #35093
closes #22168

Co-authored-by: Lucas Lefèvre <lul@odoo.com>
2019-01-24 13:08:27 +00:00
Jérome Maes c8e23968d3 [IMP] sale_expense: add test cases 2017-09-14 14:48:07 +02:00
Yannick Tivisse 717f9217bb [IMP] hr_expense: bring back the sheets + other new features
NB:
- The option no_delete is not working, a fix will come from chm
- The many2many widget on a sheet creation is not working correctly as
  the called command is a (1, id, values) without a (4, id, _) before.
  A fix will also come from chm, but a disgusting hack has been
  provided for this particular case (to remove after chm fix)
2016-06-17 12:14:57 +02:00
Foram Katharotiya 52d72e61de [MERGE] hr_expense: module rewritten for more easiness and a better usability. Concept of expense sheet removed. Was PR #7387. 2015-09-04 17:23:19 +02:00
Denis Ledoux d350f5b59e [FIX] hr_expense: deprecated use of fast_suite
Introduced during forward port b0be8dfdfd
2015-02-20 17:25:30 +01:00
Somesh Khare 7f5bc3fdf0 [Fix] hr_expense: correct amount for included tax with negative sign
Setting an expense with a tax included with a negative base code sign was
getting the wrong amount (tax line as a credit instead of debit). So leading to
a total for the accounting entry superior of the total of the expense (should
not happend as the tax is included).
Add test to verify this scenario.
Fixes #4260, opw 618531
2015-02-20 11:10:32 +05:30