Commit Graph

73 Commits

Author SHA1 Message Date
Pedro M. Baeza
a54c02db2e [FIX] account_asset_management: Allow to unlink w/o billing permission
Some users may be allowed to unlink invoices without billing access,
but with current code, they are not able, as the asset line check is
done without sudo, and other users except billing or higher ones
aren't allowed to access to that model.

TT49673
2024-07-03 16:21:30 +02:00
sbiosca-s73
24f2315c75 [MIG] account_asset_management: Migration to 17.0 2024-05-31 09:23:35 +02:00
sbiosca-s73
af421268fc [IMP] account_asset_management: pre-commit auto fixes 2024-05-29 08:52:33 +02:00
Saran440
e2d11a4108 [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.
2024-05-28 12:50:14 +02:00
Rodrigo
96ff792065 [REF] account_asset_management: the name of the company_currency_id field is changed to currency_id and currency_field is not required. 2024-05-28 12:50:14 +02:00
Rodrigo
6aebd67088 [MIG] account_asset_management: Migration to 16.0 2024-05-28 12:50:14 +02:00
Alexis de Lattre
79ee693e1b [IMP] : pre-commit stuff 2024-05-28 12:50:14 +02:00
KNVx
8e852f36db [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.
2024-05-28 12:50:14 +02:00
manu
c7242e178b [MIG]account_asset_management: Migration to 15.0 2024-05-28 12:50:13 +02:00
manu
51bdb199a2 [IMP] : black, isort, prettier 2024-05-28 12:50:13 +02:00
mariadforgeflow
e812bd0b1b [IMP] account_asset_management: prevent from creating assets from tax lines 2024-05-28 12:50:13 +02:00
oca-git-bot
736e06857f [IMP] update dotfiles 2024-05-28 12:50:13 +02:00
Jordi Ballester
68f687b2e7 [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.
2024-05-28 12:50:13 +02:00
Jordi Ballester
ab2d5dbd79 [IMP] account_asset_management: add carry_forward_missed_depreciations 2024-05-28 12:50:13 +02:00
mariadforgeflow
bcd2dbb4ca [IMP] account_asset_management: set asset_profile_id on invoice creation 2024-05-28 12:50:13 +02:00
Víctor Martínez
334a2ddd1e [IMP] account_asset_management: Add chatter + activities to assets.
TT34459
2024-05-28 12:50:13 +02:00
ps-tubtim
33c49a8891 [FIX] account_asset_management: sudo smart button asset 2024-05-28 12:50:13 +02:00
Víctor Martínez
e786d16152 [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
2024-05-28 12:50:13 +02:00
Alexis de Lattre
415161fafc account_asset_management: improve and cleanup views 2024-05-28 12:50:13 +02:00
Kitti U
618d503395 [14.0][FIX] account_asset_management, singleton error on asset_count 2024-05-28 12:50:13 +02:00
Kitti U
0900dab56c [14.0][FIX] account_asset_management, fix multi currency 2024-05-28 12:50:13 +02:00
mreficent
17fc8590d4 [IMP] account_asset_management: hook for asset vals 2024-05-28 12:50:13 +02:00
ps-tubtim
d0b9d45dff [ENH] account_asset_management: Add purchase value in asset report 2024-05-28 12:50:13 +02:00
ps-tubtim
271e22e307 [FIX] account_asset_management: fix _check_dates 2024-05-28 12:50:13 +02:00
ps-tubtim
8dcb1316e1 [14.0][FIX] account_asset_management: pre-commit 2024-05-28 12:50:13 +02:00
Mateu Griful
caa40baa89 [13.0][account_asset_management] propose account when user chooses 2024-05-28 12:50:13 +02:00
Jordi Ballester
d251382675 [13.0][account_asset_management] propose account when user chooses 2024-05-28 12:50:13 +02:00
Jordi Ballester
e5ea1743aa [13.0][account_asset_management] button to navigate from the vendor bill
to the asset.
2024-05-28 12:50:13 +02:00
Jordi Ballester
aa47909a0d [13.0][fix][account_asset_management] display only accounts associated
to the current company.
2024-05-28 12:50:13 +02:00
Jairo Llopis
d3961bc7a0 [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
2024-05-28 12:50:13 +02:00
mreficent
a840220f13 [FIX] account_asset_management: create asset using Form
This way, the computes are computed as expected.
2024-05-28 12:50:13 +02:00
mreficent
ef03f1841a [FIX] account_asset_management: include 'number' method_time 2024-05-28 12:50:13 +02:00
João Marques
7325461bc2 [IMP] account_asset_management: Add analytic tags and propagate
TT28974
2024-05-28 12:50:13 +02:00
Víctor Martínez
ef4ad7eb96 [FIX] account_asset_management: Prevent create lines with init=True when account_lock_date_update addon is installed and lock date defined 2024-05-28 12:50:13 +02:00
Víctor Martínez
34490938b6 [FIX] account_asset_management: Fix error according to _name_search in group when try to set groups in profile 2024-05-28 12:50:13 +02:00
Víctor Martínez
4855a2cd76 [FIX] account_asset_management: Fix error from group_ids in asset when set profile_id 2024-05-28 12:50:13 +02:00
Luc De Meyer
99e6fa3709 [IMP] account_asset_management: Add reporting 2024-05-28 12:50:13 +02:00
JordiMForgeFlow
73bc61ddb1 [13.0][account_asset_management]: add user error when creating asset from bill 2024-05-28 12:50:13 +02:00
Víctor Martínez
3dee7d4510 [FIX] account_asset_management: Fix onchange account_id and asset_profile_id to prevent account_id is empty in some use cases 2024-05-28 12:50:13 +02:00
Pedro M. Baeza
de7e1b745d [FIX] account_asset_management: Missing field renaming
type > move_type, due to uncovered code.
2024-05-28 12:50:13 +02:00
João Marques
0a38993a0c [MIG] account_asset_management: Migration to v14
TT26410
2024-05-28 12:50:13 +02:00
Pedro M. Baeza
f12d3b72c6 [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.
2024-05-28 12:50:13 +02:00
Florent de Labarre
5e1be6a797 [FIX] account_asset_management : empty message is posted if there are no asset 2024-05-28 12:50:13 +02:00
Pedro M. Baeza
7255d48ed4 [IMP] account_asset_management: Refinements 2024-05-28 12:50:13 +02:00
Carlos Dauden
fdfd019a64 [IMP] account_asset_management: Improve code and translation 2024-05-28 12:50:13 +02:00
Saran440
68f6986676 [FIX] account_asset_management - Allow editing salvage value 2024-05-28 12:50:13 +02:00
Valentin Vinagre Urteaga
040cb6d6fa [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.
2024-05-28 12:50:12 +02:00
Ernesto Tejeda
99aca9cab7 [FIX] account_asset_management: fix remaining_value cache miss error. 2024-05-28 12:50:12 +02:00
Valentin Vinagre Urteaga
e9284170ac [IMP] account_asset_management: Add chatter entry in invoice for generated asset 2024-05-28 12:50:12 +02:00
Andrea
4f0feff985 Fix of pre-commit: E741 ambiguous variable name 'l' 2024-05-28 12:50:12 +02:00