2
0
Commit Graph

70 Commits

Author SHA1 Message Date
Saran440
a2807321b2 [FIX] account_asset_management: Allow to write on moves with no asset permission
Steps to reproduce the problem:

- User (Not accountant) create an invoice.
- Create invoice plan with Deposit on 1st Invoice
- Confirm Order > Register Deposit > Create and View bills
- It throws a permission error

That's because the search on asset lines is done always for each write on the account.move
if certain fields (like the date) are written.
2023-06-26 13:06:07 +07:00
Rodrigo
12a018de43 [REF] account_asset_management: the name of the company_currency_id field is changed to currency_id and currency_field is not required. 2023-01-04 16:07:33 +01:00
Rodrigo
f1371e5b33 [MIG] account_asset_management: Migration to 16.0 2023-01-04 16:07:33 +01:00
Alexis de Lattre
3c5d26b456 [IMP] : pre-commit stuff 2022-12-24 00:58:24 +01:00
KNVx
0466dc9c43 [FIX] account_asset_management: Poor performance updating assets massively
When updating assets massively the performance when searching for deprecation_lines_ids is very low.
It is a difficult problem to detect since massive asset updates are not common.
Indexing in this field dramatically improves the timing performance.
For example, to update 3000 records it took 30 sec. With this index it takes to 2 seconds.
2022-12-24 00:42:23 +01:00
manu
6fc511524d [MIG]account_asset_management: Migration to 15.0 2022-12-24 00:42:23 +01:00
manu
9d5714cd94 [IMP] : black, isort, prettier 2022-12-24 00:42:23 +01:00
mariadforgeflow
ab9164d69b [IMP] account_asset_management: prevent from creating assets from tax lines 2022-12-24 00:42:23 +01:00
oca-git-bot
ce0e170f1c [IMP] update dotfiles 2022-12-24 00:42:23 +01:00
Jordi Ballester
92e7f1cee5 [IMP] account_asset_management: Allow to reverse the posting of a depreciation line
instead of deleting the journal entry.
This will be done when the company has activated the inalterability hash
on the original journal entry.
2022-12-24 00:42:23 +01:00
Jordi Ballester
c62bab7c9e [IMP] account_asset_management: add carry_forward_missed_depreciations 2022-12-24 00:42:23 +01:00
mariadforgeflow
9ca30734ac [IMP] account_asset_management: set asset_profile_id on invoice creation 2022-12-24 00:42:23 +01:00
Víctor Martínez
4573edf2ff [IMP] account_asset_management: Add chatter + activities to assets.
TT34459
2022-12-24 00:42:23 +01:00
ps-tubtim
c8e3f435c7 [FIX] account_asset_management: sudo smart button asset 2022-12-24 00:42:23 +01:00
Víctor Martínez
c6c9e97d78 [FIX] account_asset_management: Avoid the error when clicking on "Delete" button if there is a residual value and all the depreciation lines are posted.
TT32861
2022-12-24 00:42:23 +01:00
Alexis de Lattre
445dc250be account_asset_management: improve and cleanup views 2022-12-24 00:42:23 +01:00
Kitti U
0dea77f078 [14.0][FIX] account_asset_management, singleton error on asset_count 2022-12-24 00:42:22 +01:00
Kitti U
32c477bdb4 [14.0][FIX] account_asset_management, fix multi currency 2022-12-24 00:42:22 +01:00
mreficent
bc1cdf35aa [IMP] account_asset_management: hook for asset vals 2022-12-24 00:42:22 +01:00
ps-tubtim
40f4b6cf8a [ENH] account_asset_management: Add purchase value in asset report 2022-12-24 00:42:22 +01:00
ps-tubtim
1099b85fe7 [FIX] account_asset_management: fix _check_dates 2022-12-24 00:42:22 +01:00
ps-tubtim
6d49df0ddf [14.0][FIX] account_asset_management: pre-commit 2022-12-24 00:42:22 +01:00
Mateu Griful
69299744f2 [13.0][account_asset_management] propose account when user chooses 2022-12-24 00:42:22 +01:00
Jordi Ballester
ffa8d96851 [13.0][account_asset_management] propose account when user chooses 2022-12-24 00:42:22 +01:00
Jordi Ballester
cf6de3db86 [13.0][account_asset_management] button to navigate from the vendor bill
to the asset.
2022-12-24 00:42:22 +01:00
Jordi Ballester
319042dc87 [13.0][fix][account_asset_management] display only accounts associated
to the current company.
2022-12-24 00:42:22 +01:00
Jairo Llopis
ca744428ef [FIX] account_asset_management: make asset company match move's
To start, the context `company_id` is no longer used in v14. Instead, we use `with_company`.

OTOH, it doesn't make much sense because in case you have several companies enabled in your context, not necessarily your main one is gonna be the one that should be used for the asset. Instead, it should be the move company always, or consistency rules will fail.

Altered forward port of https://github.com/OCA/account-financial-tools/pull/1223.

@Tecnativa TT31311
2022-12-24 00:42:22 +01:00
mreficent
c964dccf2c [FIX] account_asset_management: create asset using Form
This way, the computes are computed as expected.
2022-12-24 00:42:22 +01:00
mreficent
b1b0952153 [FIX] account_asset_management: include 'number' method_time 2022-12-24 00:42:22 +01:00
João Marques
2cbf50e056 [IMP] account_asset_management: Add analytic tags and propagate
TT28974
2022-12-24 00:42:22 +01:00
Víctor Martínez
0325891a82 [FIX] account_asset_management: Prevent create lines with init=True when account_lock_date_update addon is installed and lock date defined 2022-12-24 00:42:22 +01:00
Víctor Martínez
db1e569dab [FIX] account_asset_management: Fix error according to _name_search in group when try to set groups in profile 2022-12-24 00:42:22 +01:00
Víctor Martínez
79cc93f3dd [FIX] account_asset_management: Fix error from group_ids in asset when set profile_id 2022-12-24 00:42:22 +01:00
Luc De Meyer
e4796d3bd5 [IMP] account_asset_management: Add reporting 2022-12-24 00:42:22 +01:00
JordiMForgeFlow
0d332ba006 [13.0][account_asset_management]: add user error when creating asset from bill 2022-12-24 00:42:22 +01:00
Víctor Martínez
4e31113bbe [FIX] account_asset_management: Fix onchange account_id and asset_profile_id to prevent account_id is empty in some use cases 2022-12-24 00:42:22 +01:00
Pedro M. Baeza
1620d3a4d8 [FIX] account_asset_management: Missing field renaming
type > move_type, due to uncovered code.
2022-12-24 00:42:22 +01:00
João Marques
dd7e4e08df [MIG] account_asset_management: Migration to v14
TT26410
2022-12-24 00:42:21 +01:00
Pedro M. Baeza
2aa11d4e40 [FIX] account_asset_management: Proper asset unlink + move unlink
2 related fixes:

- When removing an asset line depreciation move, we have to pass it
  first to draft, or we won't be able to remove it even with the
  context.
- When removing a move, the check for removing the linked asset should
  be only for purchase documents, not for "not sale" documents.
2022-12-24 00:42:21 +01:00
Florent de Labarre
3945771c61 [FIX] account_asset_management : empty message is posted if there are no asset 2022-12-24 00:42:21 +01:00
Pedro M. Baeza
2b360a8c27 [IMP] account_asset_management: Refinements 2022-12-24 00:42:21 +01:00
Carlos Dauden
389d82839e [IMP] account_asset_management: Improve code and translation 2022-12-24 00:42:21 +01:00
Saran440
869cc39d5e [FIX] account_asset_management - Allow editing salvage value 2022-12-24 00:42:21 +01:00
Valentin Vinagre Urteaga
9f9a72f073 [FIX] account_asset_management: FIX empty asset reference
If the assets are created before posting the invoice, they wouldn't have a name and the "code" field of the assets will be empty, but they would have the invoice name.
2022-12-24 00:42:21 +01:00
Ernesto Tejeda
a555ed9259 [FIX] account_asset_management: fix remaining_value cache miss error. 2022-12-24 00:42:21 +01:00
Valentin Vinagre Urteaga
009b0b494a [IMP] account_asset_management: Add chatter entry in invoice for generated asset 2022-12-24 00:42:21 +01:00
Andrea
91f989be0e Fix of pre-commit: E741 ambiguous variable name 'l' 2022-12-24 00:42:21 +01:00
Quentin Groulard
e53bd5b26e [IMP] account_asset_management: Depreciation board compute upon asset confirmation 2022-12-24 00:42:21 +01:00
Pedro M. Baeza
20078b4472 [IMP] account_asset_management: Simplify code for opening related entries
We don't need the search having the one2many field and no need also for list
comprehension having mapped operator.
2022-12-24 00:42:21 +01:00
Pedro M. Baeza
a16a456511 [FIX] account_asset_management: Avoid error
Steps to reproduce the problem:

* Go to assets view
* Group by profile
* Unfold a group and click on an asset
* Click on "Journal Entries" smart-button
* Go back to the asset list
* Click again on the same asset (or another).
* Click on "Journal Entries" smart-button

Current behavior:

Error saying "KeyError: 'profile_id'"

Expected behavior:

No error

The cause for this is that Odoo stores in the context the key `group_by` with the
value `profile_id` in the specified chain of steps. That context entry is used for
grouping records in the list, and system tries to group the journal entries also
by that field, which doesn't exists in the other model, and thus the error.

We avoided it copying the context to be passes and leaving out that entry.
2022-12-24 00:42:21 +01:00