Commit Graph
424 Commits
Author SHA1 Message Date
Goffin Simon b36fef7185 [FIX] hr_expense: Wrong journal entries
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

closes odoo/odoo#73715

X-original-commit: 3add44d462deebb2b7600d0bd2d86a4af8b2ab4e
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-14 12:51:33 +00:00
Goffin Simon f983ba9352 [FIX] hr_expense: Wrong journal entries
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

closes odoo/odoo#71627

X-original-commit: 25ac51e01a2084afd7a4d5e9c4c87a50ea787b93
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-02 15:57:37 +00:00
Yannick Tivisse f6a77867df [IMP] hr: Remove M2O references to archived employees
Purpose
=======

When you archive an employee, if he's the manager/coach of someone else, the link is not removed.

closes odoo/odoo#71368

Taskid: 2536219
Related: odoo/enterprise#18588
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-05-28 08:04:40 +00:00
Urvi Soni a50157e60e [FIX] hr_expense: do not create a payment when expense is paid by company
Currently, when we create an expense that is paid by company,
then create and approve a report, then post entries, 2 entries are
created. 1 is posted and is correct, the other one is in draft due to
the creation of the payment for employee and should not be there.

As when a company pays for an expense, in 99% of the cases,
it's because employees have a credit card funded by the company.
It happens often that company owners have this kind of card or even
employees but that's more common in the US. In such case,
it's just an account payable to visa or mastercard. so no need to
create a payment for the employee.

So this commit, draft entry will not be created when payment paid
by the company while posting the entries from the expense.

closes odoo/odoo#71063

Taskid: 2410551
X-original-commit: 2aedd076317b37ceffba061c48e3d4fc38f02ea9
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-05-19 16:56:04 +00:00
sofiagvaladze a2d078c17f [FIX] hr_expense: Fix traceback caused by empty company_id
task - 2475520

closes odoo/odoo#70871

X-original-commit: fa38e56e605406f0c97a3e2c260d2a1b2a19dea5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-05-17 12:06:28 +00:00
Raphael Collet 35a9f6c27a [FIX] core: SELF_READABLE_FIELDS and SELF_WRITEABLE_FIELDS on res.users
Avoid setting up those lists with method __init__() on the model, since
the model's class no longer has the expected parent classes.
2021-05-06 07:30:24 +00:00
Bonis Modi d00a381ece [FIX] hr_expense: create expense report without creating record
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.

closes odoo/odoo#65104

Taskid: 2359834
Related: odoo/upgrade#1875
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-06 09:19:44 +00:00
Goffin Simon bb54e5ea1a [FIX] hr_expense: Create an expense product with vendor taxes
Steps to reproduce the bug:

When trying to import or create a expense product with supplier taxes,
the supplier taxes were removed.

PS: The field vendor taxes is available in the expense product view

opw:2444551

closes odoo/odoo#65403

X-original-commit: 02d0591b73f5acd8c94e65cda3af1158c3a2254a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-02 12:58:42 +00:00
Kairis e426492142 [IMP] Expense, Timesheets: toast feedback to user
Display notification to give feedback to user.
And reload the view with the params "next".

closes odoo/odoo#67219

Taskid: 2344276
X-original-commit: bd33f283a1fa39815481ca28918c65ac7b48d641
Related: odoo/enterprise#16830
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-10 08:46:24 +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
Laurent Smet bb839c75cb [FIX] hr_expense: Don't write 'payment_id' on aml
This line was an hack to manage the custom register payment wizard of hr_expense.
Since this wizard is gone and 'payment_id' is a related stored field in account.move.line, we should not write such data explicitely.

closes odoo/odoo#67162

X-original-commit: 2d7f45e76607736bcc4f37bec480967ae2b373d7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-03-03 14:51:25 +00:00
qdp-odoo bb1f14e728 [IMP] hr_expense: add "payment_status" field + change error msg
- 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."

closes odoo/odoo#65528

Task: 2424870
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-03 09:39:46 +00:00
davidandsimongoffin 1843a1ae4d [FIX] hr_expense: wrong company account when creating from mail
In a multicompany environment, when a expense is created from the
expense email alias, the expense account is computed with SUPERUSER
context, so depending on the SUPERUSER set company, we could get
a mismatch of expense and employee's company and the account one, wich
causes a subsequent error when trying to post the expense.

closes odoo/odoo#65413

X-original-commit: da758c44b19a9339f0c0b1b6a74c11e3e5491a64
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: simongoffin <sig@odoo.com>
2021-02-02 13:30:55 +00:00
Sofie Gvaladze 2de15d5c0c [IMP] hr_expense: amend multicurrency
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

closes odoo/odoo#61920

Related: odoo/enterprise#14838
Related: odoo/upgrade#2028
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-11 14:04:06 +00:00
Shahnawaz Idariya 44ce92a51a [FIX] hr, sale(_expense): rename expense product to category
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.

closes odoo/odoo#62661

Taskid: 2391433
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-11 11:18:55 +00:00
Adrien Widart 79fc263373 [FIX] hr_expense: expense reconciliation
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

closes odoo/odoo#63486

Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-12-17 06:54:30 +00:00
sofiagvaladze acf99ae77d [FIX] hr_expense: Fix traceback caused by empty currency_id
One can leave the currency_id empty and that causes Traceback error

Task - 2409942

closes odoo/odoo#63159

X-original-commit: 7473ad44f960aa3609faafe0cee8e12a392b43a9
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: sofiagvaladze <sofiagvaladze@users.noreply.github.com>
2020-12-10 12:36:09 +00:00
Kevin Baptiste cc654dab9b [FIX] hr_expense: fix form view not editable on new record
Since commit 80c1dad, the form view of a new record was no longer
editable.

The "editability" of the expense sheet is computed based on the status
but no default value was available.

closes odoo/odoo#63049

Taskid: 2413154
X-original-commit: d0ad00fddf5c3eb05381769a4e75c93e4dcfc388
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-12-08 16:28:18 +00:00
Adrian Torres 679185f3e8 [IMP] *: replace all raises inside unlink by api.ondelete
With this commit, all instances of errors being raised inside
`BaseModel.unlink` overrides are moved into methods decorated with
`api.ondelete` which is safer.
2020-12-04 09:16:16 +00:00
Victor Feyens 8d32f8724e [FIX] *: adapt python constraints to support multi recordsets
Otherwise, they may crash or be incorrectly verified when
creating/updating recordsets containing multiple records.

Also improve the constraint error messages to be more detailed.

When possible, use a sql constraint instead to speed up the records
validation.

Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
2020-11-20 10:04:27 +00:00
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