Commit Graph
404 Commits
Author SHA1 Message Date
Martin TrigauxandXavier Morel 49838338e0 [FIX] *: sanitize action content reading
The open_action_with_context was not using _for_xml_id, producing an
error when reading the action content.

In open_action, the action_name was taken from the context and needs
sanity checks. Ensure only actions from the account module can be
read and only if the user has access to the target model.
This is a limitation of the previous behaviour but, at the moment, all
known calls are made refering to an action from the account module.
Limit the scope of this method while the 14.0 is still early to avoid
having a door open to ready any action, and difficult to close later.

Remove old action fetching from the context in create_move that is no
longer used.

closes odoo/odoo#61602

X-original-commit: a39e94f7e4dc74e850650ac90bbc5f85af130bc8
Related: odoo/enterprise#14695
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-11-10 16:04:29 +00:00
oco-odoo f1f3366bc0 [FIX] account, hr_expense: show correct sign for tax_base_amounts of misc operations' lines
Before this, misc operations always used the balance of the base line as the tax_base_amount of the tax line. This was inconsistent with the invoices, for which we invert its sign when making a sale invoice or a purchase refund (as for those operations, positive amounts are put in credit). This commit should make everything behave in the same way.

closes odoo/odoo#60912

X-original-commit: 2ca3158ce2de596526067dbd86da2ef7d4ae85bd
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-10-28 14:56:20 +00:00
Martin Trigaux 522365c64f [FIX] hr_expense: allow to set an employee from the user profile
When a user can edit it's employee, the field expense_manager_id is
editable but any value is ignored, and the previous manager is forced.

closes odoo/odoo#60261

X-original-commit: 41f73fe92139811bc1f43ea07ca4539768001ae5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-19 11:24:02 +00:00
Aurélien (avd) cd26051496 [FIX] hr_expense: fix traceback on expense sheet post multiple entries
closes odoo/odoo#60125

X-original-commit: 72f39f240579fc21cde33ce4b50f875d71ac9052
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-15 16:40:40 +00:00
Giacomello Nathan (ngi) 497778b69a [FIX] Expense: Cancel activity for manager if expense is reset to draft
If we submit an expense to the manager, a next activity is created for him.
If we reset to draft, it is not cancelled.
So if we resubmit expense, a second next activity is created for the manager.

This commit will cancel created activities when we put the expense in draft

Task id: 2350168

closes odoo/odoo#60107

X-original-commit: 107ac15687befccf59527730cc776d5ad68cac44
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-15 14:19:10 +00:00
IEL d07f540e30 [FIX] hr_expense: correct check for bank settings
TLDR: fix a mess in journal fields check

Steps:

* Create expense "paid by Company"
* Click Post

Before:

* AttributeError: 'account.journal' object has no attribute
'default_credit_account_id'

After:

* Either posted or shows user error about journal misconfiguration

Notes:

* Field ``default_credit_account_id`` is replaced in https://github.com/odoo/odoo/commit/41f119d5325dfbbf916d1d34e63946646ed4d44c
* The error is introduced during incorrect forward-port #58852

---

task-2355177

closes odoo/odoo#59780

X-original-commit: 5c0fca662279702115b5e61c8227f82086693e38
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-10-12 15:20:23 +00:00
Swapnesh Shah 6715804764 [FIX] hr_expense: fixed typo
closes odoo/odoo#59328

X-original-commit: a72e448a035067465c733ece3d0c9219d1cda360
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-06 19:00:16 +00:00
Laurent Smet ad77981a96 [FIX] hr_expense: Bank account must not be impacted directly
The outstanding payment account must be used instead.

closes odoo/odoo#59066

Task: 2348361
X-original-commit: 84a9d31f8611d4890ce06c511fd74b13ce17958c
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-10-05 07:46:51 +00:00
Kamesh Patel cb461b77cd [IMP] expense: hide approve button on expense reports
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

closes odoo/odoo#56784

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-16 11:25:54 +00:00
Victor Feyens c482fdbf05 [IMP] various: improve code style and performance by improve `all()` usage
PURPOSE

Clean code. Be more performance oriented.

SPECIFICATIONS

Improvements applied in this commit

  * not all() --> any(not) for earlier returns;
  * all([generator]) --> all(generator) to avoid unnecessary list casting.
    This code construct is better managed by all;

This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.

LINKS

Task ID-2328619

closes odoo/odoo#56810

X-original-commit: 1cc6bb1231401ea7f501d2f5b5e9641ec8734850
Related: odoo/enterprise#12802
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-31 13:59:27 +00:00
Kevin Baptiste 45bb6f6e39 [IMP] hr_expense: show alias_email on list helper
The "Incoming Emails" setting is now enabled by default and the email
address shown on the list helper.

closes odoo/odoo#56069

Taskid: 2300864
Related: odoo/enterprise#12494
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-18 14:48:47 +00:00
Martin Trigaux d5c1649239 [IMP] base,web: _for_xml_id as a safe access point
/web/action/load is the public controller that Should be used by the
webclient to fetch actions
_for_xml_id is the default access method on actions that implements
fields filtering to avoid leaking server action code or other
information not needed by the webclient

Implementing whitelist of fields that can be access per model
2020-08-17 09:08:23 +00:00
Laurent Smet 419d4bbee0 [IMP] account, *: Required currency on journal items
closes odoo/odoo#50711

Task: 1930680
Related: odoo/enterprise#10394
Related: odoo/upgrade#1147
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-08-13 11:48:06 +00:00
Laurent Smet b25e53a0b9 [IMP] hr_expense(_check): Remove the custom register payment expense wizard
- 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
2020-08-12 12:30:43 +00:00
Nicolas (vin) 41f119d532 [IMP] account: Misc. improvements
Miscellaneous changes aiming to improve the user experience in the accounting module,
mainly in the journal model and its form view.

Also aim to improve the bank account creation wizard.

Task ID: #2250349

closes odoo/odoo#54494

Related: odoo/upgrade#1546
Related: odoo/enterprise#11862
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-11 12:41:13 +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
william 82dc0cb7b9 [IMP] account: soft post entries in the future
Add an easy way to not post the entries in the future when calling
post() on it, but rather set it to be auto-posted at accounting date.
This is useful when we are creating a lot of entries in batch and some
might be in the future, some in the past, and we don't want to separate
that in two batch every time. (asset, accrual, transfer,... )
2020-08-05 11:57:10 +00:00
Nasreddin (bon) b033244f99 [FIX] hr_expense: Fix accounting fields edition + add test
This fix will complete the task 1965890 by allowing the user with
access rights to edit fields (reference, account_id, taxes_ids
& analytic_account_id) depending the sheet state.

Also added Tests to check if access rights on expense lines are
working well depending on the expense.sheet.state and the user group.

Task ID 2226352

closes odoo/odoo#53862

X-original-commit: f42c812916a50438078210c020f6144c7417d365
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-30 11:09:14 +00:00
Aurélien (avd) 7e5ae026fd [FIX] hr_expense: Apply miscellaneous fixes
closes odoo/odoo#53834

Taskid: 2229597
X-original-commit: cc125a1fe850941a7bf1cec2cd0392fdf025a60a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-29 18:51:25 +00:00
Nidhi Patel 8438286478 [IMP] account,hr(_expense): Employee private address should be 'private' instead of 'contact'
Purpose of this task is,lots of business flows can be crashed if
the field Private Address(address_home_id) is a private address instead
of a regular contact.

so in this commit,we change the demo data for employee and set the
private type address on employee for private address and also fix
the flows on which errors could occur.

Currently billing administrator does not have right for private address
and while creating payment from expense it was going to set the
customer from the employee's private address on payment so give the
private address right to the billing adminnistrator.
Also chaned admin/demo user's private address as 'private' instead of
regular contact.
and on hr_expense use the Sudo while accessing the home address this
method is used from payslip too.

TaskID:2170016

closes odoo/odoo#46628

Closes: #46628
Related: odoo/enterprise#8924
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-11 07:09:48 +00:00
Victor Feyens bdcad21ccc [FIX] *: correct support of multi records in methods
Wrong usage of self in for loops makes some apparently multi-friendly
methods not work correctly when called with a recordset of len > 1.

This commit replaces those references by the correct unique record
reference which should be used at this iteration of the loop, avoiding
potential exceptions or wrong behavior in the concerned methods.

closes odoo/odoo#53320

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-06-19 13:27:41 +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
Aurélien (avd) 0a82848606 [FIX] hr_expense: fix traceback when creating a report
closes odoo/odoo#52969

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-15 15:14:22 +00:00
Laurent Smet beccf82e09 [REF] account: journal items reconciliation (part 1/2)
This commits refactors the code of the reconciliation, in order to facilitate the process of complex use cases, namely multi-currencies or cash-basis-taxes related (see details below). It also prepares the code for a second refactoring where we will save on each journal items the amount_currency and currency_id field (even in case of operation made in company currency), also in the sake of simplification.

1) Multi-currencies:
- the account.partial.reconcile model now will have dedicated columns to specify the amount of the partial reconciliation in the debit_line_id currency and the credit_line_id currency. That comes in handy when dealing with journal items having different secondary currencies, but also allows some simplification.
- residual_amount_currency computation changed accordingly
- moved models account.full.reconcile and account.partial.reconcile in their dedicated .py file

2) Cash basis taxes
- cash basis entries now handle correctly rounding errors to make sure the exact amount of gets reported when the reconciliation becomes full.
- the account for the base amount of cash basis entries has to be set, now, on the company instead of on each cash basis tax.
- that new 'property' field can be set at the CoA installation via the field property_cash_basis_base_account_id of account.chart.template, or going through the accounting settings.

Was task task: 2243420
Was PR #50308

Related: odoo/upgrade#1121
Related: odoo/enterprise#10252
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-06-15 08:36:04 +00:00
Simon Genin (ges) 84cc6fab9e [FIX] hr_expense: remove traceback when post entry
The `state` field of `account.payment` no longer exists and should not be set explicitely.
Set the `ref` field to the expense name instead of the `name`field.

Task ID 2266922

closes odoo/odoo#52823

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-12 13:21:13 +00:00
Florent de Labarre 0c67025c40 [FIX] hr_expense: default_expense_line_ids can be used multi time
Create an expense
Click "Create report"
Save the report A (you can also submit, post inventory, ...)
Now click on Create (a new report B)

The expense in A are copied in B because default_expense_line_ids
are not cleared

Closes #52457

opw-2271851

closes odoo/odoo#52852

X-original-commit: e8cee2d8249f6c0076253f37db040eef293bb275
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-11 13:25:34 +00:00
Goffin Simon 592a0f6533 [FIX] hr_expense: doesn't post if journal.post_at == 'bank_rec'
The field post_at doen't exist any more.

opw:2262459

closes odoo/odoo#52763

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-10 11:18:28 +00:00
Florent de Labarre accfe5e089 [FIX] hr_expense: doesn't post if journal.post_at == 'bank_rec'
Steps to reproduce:
- Create a bank journal, with "post at" = "Bank reconciliation"
- Create a new expense paid by "Company"
- Create a report and confirm

Current behavior:
- the bank move is posted

Expected behavior:
- the bank move is not posted (and i will posted during the bank reconciliation"

closes odoo/odoo#52260

X-original-commit: 0b45a8317f1e4538ad93aa169b8be08f5403340a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-03 06:23:53 +00:00
Martin Trigaux 4afa747fa1 [IMP] *: make ir.property methods private
Should only interact with them via python code in a controlled
environment, no direct call with RPC
2020-05-26 15:50:11 +02:00
jbw 26175ea7a1 [IMP] account : remove analytic default modules
Merge account_analytic_default into account
Merge account_analytic_default_hr_expense into hr
Merge account_analytic_default_purchase into purchase

Prevent having to manually install default modules after activating analytics

closes odoo/odoo#50816

Task: 2182900
Related: odoo/upgrade#1186
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-05-14 07:53:18 +00:00
Yannick Tivisse 152097d099 [IMP] hr*: Use correct default employee_id based on company
Followup of https://github.com/odoo/odoo/pull/50982/commits

Courtesy of https://github.com/sswapnesh

In a multi-company environment `self.env['hr.employee'].search([('user_id', '=', self.env.uid)], limit=1)` could be wrong while `employee_id`represents correct employee based on company.

https://github.com/odoo/odoo/blob/fb17af76d791488c69eb3829376940b32998d374/addons/hr/models/res_users.py#L13

Making behavior Similar to https://github.com/odoo/odoo/blob/fb17af76d791488c69eb3829376940b32998d374/addons/hr_expense/models/hr_expense.py#L663

closes odoo/odoo#51246

Taskid: 2254687
X-original-commit: d7d1557e7a0f613335a9ca5ca1355d246093f9d1
Related: odoo/enterprise#10599
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-15 07:06:59 +00:00
Martin Trigaux d9287caf94 [IMP] *: convert to private methods
render, render_template, load, activity_schedule_with_view,
get_website_pages should all be private:
It should not be possible to render an aribtrary template only with
its name or id

Still need to render some qweb views from js so the method
render_template is kept public.
This explains why the website editor still need read access on
ir.ui.view as we want to allow any snippet to be rendered.
2020-05-14 13:59:10 +02:00
Nicolas Martinelli a9d117178f [FIX] hr_expense: analytic tax
- Enable Include in Analytic Cost in purchase tax P
- Create an expense
- Select product, purchase tax P, set analytic account and tags
- Create report, submit to manager, approve, post journal entries

The tax `account.move.line` does not have the analytic account and tags
assigned.

The information is missing at the tax line creation, so apply the same
logic than:

https://github.com/odoo/odoo/blob/784d22bd005db7825375a97caf9661bd5d463efe/addons/account/models/account_invoice.py#L1055-L1057

opw-2250257

closes odoo/odoo#50879

X-original-commit: ec6fe8cdff7a072a6d44e5a2a40ca0da43254f7d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-07 15:55:33 +00:00
Florent de Labarre 918a5f2cc0 [FIX] hr_expense: unit_amount erase when set product_id
When an expense is create from email, if the product is not set, when you want set the product it is erase the unit price.

closes odoo/odoo#50397

X-original-commit: 74736914bb4d39947523f3dcd5e9d9455f4ee768
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-30 10:03:41 +00:00
Anh Thao Pham (pta) 3bd345597f [REF] hr*: convert onchange methods to stored-editable computed fields
Impacted modules:
hr, hr_contract, hr_recruitment, hr_payroll, fleet, hr_skills, hr_appraisal, ....

Several onchanges have been converted to computed fields in the following modules :
    Community :
        - hr
        - hr_contract
        - hr_recruitment
        - hr_work_entry
        - hr_maintenance
        - hr_expense
        - hr_expense_check
        - hr_holidays
        - sale_expense
        - account_analytic_default_hr_expense

    Enterprise:
        - hr_contract_salary
        - hr_referral
        - hr_payroll
        - hr_payroll_expense
        - test_l10n_be_hr_payroll_account

There are still 2 onchanges with complex behavior that couldn't be converted easily:
- an onchange that updates "tz" (timezone) that is defined as a related field
  to "resource_id.tz". Apparently it is useless except to initialize the default
  value of "tz".
- an onchange that updates "name" that is defined as a related field to
  "resource_id.name".
  the applicant.

closes odoo/odoo#45414

Taskid: 2169099
Related: odoo/enterprise#8572
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-20 10:32:45 +00:00
Laurent Smet caeb782841 [IMP] account,*: Improve bank statements/payments workflow
- Create journal entries as soon as bank/cash statement lines are created, temporary booked on a suspense account set on the journal.
- Simplify the management of "blue" lines in the reconciliation widget. A "blue" line is now a journal item using a temporary liquidity account (outstanding payment/receipt accounts, set on the journal).
- Adapt and simplify the bank reconciliation report.
- Remove the bank reconciliation threshold date. The reconciliation report will show the not already reconciled journal entries using a liquidity account and the not already reconciled journal entries using a temporary liquidity account. Without accounting, an account.payment will involve directly the liquidity account and then, will be considered as a statement line directly.
- Remove the post_at bank reconciliation feature. The "paid" state will be set on the invoices only if reconciled with a journal entry involving the journal's liquidity account.
    With invoicing, the payment will do that so the "in_payment" state should never be shown up.
    With accounting, only the statement lines have the power to move an invoice to the "paid" state.
- Fix various corner cases about the management of multi-currency in bank statement lines.
- Fix the conversion dates in multi-currency: Since the bank/cash is always used on the statement lines, it will use always the real "bank" date instead of the fictive payment one.
- Ensure the 'reconcile' method will raise an error if the involved moves are not posted.

related enterprise PR odoo/enterprise#7019

closes odoo/odoo#41301

--task: 2092096
Related: odoo/upgrade#1018
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-04-10 09:47:24 +00:00
Victor Feyens 475abff87b [IMP] hr_expense: create products in batch
Products are created in batch, unless hr_expense is installed, because its create
override isn't defined and implemented for batch creation.

Because products creation in batch can be up to 10 times faster than creation record
by record, it is important to ensure the creation of products is always done in batch.

X-original-commit: e8e34ed5b66274264c27e9a379a7857e086e5264
2020-04-02 13:53:04 +02:00
Kevin Baptiste f32067cb95 [IMP] hr_expense: add accounting_date in expense
Add a related field `accounting_date` in the expense to the expense
report.

 - Should represent the accounting_date field from the expense report
 linked to this expense
 - Only visible if the status of the report is approve, post or done
 - Only visible if the user has at least the Accounting > Auditor access
 right level
 - Should be in read-only
 - Should be stored

closes odoo/odoo#48238

Taskid: 2221668
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-31 14:00:14 +00:00
Thomas Carlier 6dc2835814 [FIX] hr_expense: remove the expense_extract options from hr_expense
before this commit:
- the selection field with OCR options was in hr_expense module

after this commit:
- the selection field is now in expense_extract module

closes odoo/odoo#48617

X-original-commit: 9440139105825d4efa5fda23149c60179870f9f3
Related: odoo/enterprise#9553
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Thomas Carlier <Explicitapps@users.noreply.github.com>
2020-03-30 14:08:07 +00:00
Thomas Carlier 38a018a444 [FIX] hr_expense: fix the default product
- before this commit the product was set to EXP_GEN
  but nothing if EXP_GEN is not in db anymore
- now it will pick the first "expensable" product if EXP_GEN doesn't exist.

closes odoo/odoo#47678

X-original-commit: ee35c662768c6f27dff88e9c4597695c17b3b67b
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Thomas Carlier <Explicitapps@users.noreply.github.com>
2020-03-16 10:38:20 +00:00
Thibault Delavallée 3d86a29aeb [MOV] mail, various: move replace_local_links to render mixin
PURPOSE

Move links shortening tools on mail.render.mixin to have rendering and
post procesing tools available on that mixin.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:44 +00:00
Thibault Delavallée 4501e3081d [FIX] hr_expense: set expense_extract_show_ocr_option_selection as not required
Adding required fields on company model is annoying for tests. Indeed multi
company tests may run during module installation, notably in CRM. Those tests
generally require to create a new company which is not possible if the column
is required but module not already loaded in registry. This is the case
if for example hr_expense is installed and updating CRM.

When possible, avoid required fields on a such used model as company. In this
case we can easily consider a void value as 'no_send'.

In this commit we simply make the field not required in database but set
a required on the view itself to avoid confusion. That way behavior is still
the same, existing databases are left untouched as all keys still exist
and running tests is smoother.

LINKS

Follow up of odoo/odoo@4eeeb4f172 and odoo/enterprise@be3cfc3bab
and odoo/enterprise@227da38f9a .

Task ID 2207180
Community PR odoo/odoo#46601
Enterprise PR odoo/enterprise#8903

closes odoo/odoo#46889

X-original-commit: 1c289d8692e0cdff25b08988994820af655cb289
Related: odoo/enterprise#9013
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-04 13:47:45 +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
jbm-odoo 39c570a777 [IMP] hr_expense: Add tracking on some values
closes odoo/odoo#42823

Taskid: 1978580
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-26 13:08:31 +00:00
Victor Feyens 570e2b3105 [FIX] hr_expense: ensure properties are read with the correct company. 2020-02-27 12:19:24 +00:00
Goffin Simon 499853e273 [FIX] hr_expense: Email creation for Expense
Steps to reproduce the bug:

- Let's consider an expense product P with internal reference = 1 and sales price = 100€
- Let's consider an employee E with a work email address W
- Configure your domain alias as odoo.com
- Configure the expense alias as expense
- Send an email from W to expense@odoo.com with '1 P 100' as subject

Bug:

An expense had been created for E with P as product and 0€ as price

opw:2191939

closes odoo/odoo#46314

X-original-commit: bde7d4ecb2b4e7954753ff932467ce5618720580
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-26 10:15:15 +00:00
Ankita Raval 933b21e2c5 [IMP] account,*: rename tag_ids to tax_ids in account.move
closes odoo/odoo#44835

Note: Many2many table name and columns name is not changed so no change in report's query
Task-id: 2028813
Related: odoo/enterprise#8261
Related: odoo/upgrade#745
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-19 09:09:20 +00:00
alt-odoo 1bbe7c034c [FIX] hr_expense: add constraint on product_id in hr.expense model
Before this commit, it was possible to delete an expense product even if it
was already set on expense notes.

closes odoo/odoo#45216

X-original-commit: d887bff9d52b649ea84d351fbf5fb2afbcebcbcd
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-02-12 15:07:58 +00:00
jbw 7b5664660f [IMP] hr_expense enable attachment preview in journal view
Adding preview of expenses attachment to journal view.

When creating an expense, files can be attached (e.g. scanned receipts).
Those attachment files where not displayed in "Accounting > Accounting > Journals > Purchases" move_line list.
They now appear in the document preview.

Task = 2176443

closes odoo/odoo#44161

Related: odoo/enterprise#8002
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-03 15:35:08 +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