Commit Graph

58 Commits

Author SHA1 Message Date
Alexis de Lattre
1ac6afe15d account_asset_management: improve and cleanup views 2021-10-31 19:47:20 +01:00
OCA-git-bot
3a0700941a Merge PR #1238 into 14.0
Signed-off-by kittiu
2021-10-01 05:04:16 +00:00
OCA-git-bot
9a64c52e79 Merge PR #1230 into 14.0
Signed-off-by kittiu
2021-09-28 16:21:42 +00:00
Kitti U
cdc7660710 [14.0][FIX] account_asset_management, singleton error on asset_count 2021-09-28 10:28:10 +07:00
Kitti U
1026b91b1a [14.0][FIX] account_asset_management, fix multi currency 2021-09-19 22:15:24 +07:00
mreficent
396c27cebe [IMP] account_asset_management: hook for asset vals 2021-09-16 15:41:12 +02:00
ps-tubtim
01e2ff0914 [ENH] account_asset_management: Add purchase value in asset report 2021-09-15 23:05:40 +07:00
ps-tubtim
8de035bcab [FIX] account_asset_management: fix _check_dates 2021-08-19 02:25:08 +07:00
ps-tubtim
35e8d092c2 [14.0][FIX] account_asset_management: pre-commit 2021-08-16 13:49:03 +07:00
Mateu Griful
756d70b971 [13.0][account_asset_management] propose account when user chooses 2021-08-16 13:49:03 +07:00
Jordi Ballester
32b9e1e8a4 [13.0][account_asset_management] propose account when user chooses 2021-08-16 13:49:03 +07:00
Jordi Ballester
af74e459e6 [13.0][account_asset_management] button to navigate from the vendor bill
to the asset.
2021-08-16 13:49:03 +07:00
Jordi Ballester
cde49822f3 [13.0][fix][account_asset_management] display only accounts associated
to the current company.
2021-08-16 13:49:03 +07:00
Jairo Llopis
274f328ab4 [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
2021-08-12 13:31:37 +01:00
mreficent
a8871debf4 [FIX] account_asset_management: create asset using Form
This way, the computes are computed as expected.
2021-05-11 18:03:15 +02:00
mreficent
a4bedab0df [FIX] account_asset_management: include 'number' method_time 2021-05-11 18:03:15 +02:00
João Marques
5e0215d678 [IMP] account_asset_management: Add analytic tags and propagate
TT28974
2021-05-11 17:19:05 +02:00
Víctor Martínez
3dc3c6f1d7 [FIX] account_asset_management: Prevent create lines with init=True when account_lock_date_update addon is installed and lock date defined 2021-05-11 15:03:06 +02:00
Víctor Martínez
bf56a67016 [FIX] account_asset_management: Fix error according to _name_search in group when try to set groups in profile 2021-05-03 08:15:12 +02:00
Víctor Martínez
30877b9a92 [FIX] account_asset_management: Fix error from group_ids in asset when set profile_id 2021-04-30 11:36:21 +02:00
OCA-git-bot
6a51c76bb9 Merge PR #1124 into 14.0
Signed-off-by StefanRijnhart
2021-04-20 17:49:12 +00:00
Luc De Meyer
940713fa53 [IMP] account_asset_management: Add reporting 2021-04-16 11:07:30 +02:00
JordiMForgeFlow
43c04753f7 [13.0][account_asset_management]: add user error when creating asset from bill 2021-04-15 16:58:53 +02:00
Víctor Martínez
8ff9f2e0fa [FIX] account_asset_management: Fix onchange account_id and asset_profile_id to prevent account_id is empty in some use cases 2021-03-11 09:18:10 +01:00
Pedro M. Baeza
e7128db342 [FIX] account_asset_management: Missing field renaming
type > move_type, due to uncovered code.
2021-01-26 15:59:48 +01:00
João Marques
a88ea6e7bf [MIG] account_asset_management: Migration to v14
TT26410
2021-01-14 07:53:25 +00:00
Pedro M. Baeza
ff25e6269e [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.
2021-01-13 07:53:36 +00:00
Florent de Labarre
9fc3c66513 [FIX] account_asset_management : empty message is posted if there are no asset 2021-01-13 07:53:36 +00:00
Pedro M. Baeza
9223c6d060 [IMP] account_asset_management: Refinements 2021-01-13 07:53:36 +00:00
Carlos Dauden
a845cd2acf [IMP] account_asset_management: Improve code and translation 2021-01-13 07:53:36 +00:00
Saran440
eb628e8fa8 [FIX] account_asset_management - Allow editing salvage value 2021-01-13 07:53:36 +00:00
Valentin Vinagre Urteaga
dac8a473a9 [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.
2021-01-13 07:53:36 +00:00
Ernesto Tejeda
6ee118f8bc [FIX] account_asset_management: fix remaining_value cache miss error. 2021-01-13 07:53:35 +00:00
Valentin Vinagre Urteaga
ac121997e9 [IMP] account_asset_management: Add chatter entry in invoice for generated asset 2021-01-13 07:53:35 +00:00
Andrea
07c4a4edb1 Fix of pre-commit: E741 ambiguous variable name 'l' 2021-01-13 07:53:35 +00:00
Quentin Groulard
1c8874c8dd [IMP] account_asset_management: Depreciation board compute upon asset confirmation 2021-01-13 07:53:35 +00:00
Pedro M. Baeza
92f8a6b79c [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.
2021-01-13 07:53:35 +00:00
Pedro M. Baeza
b9d13cdc51 [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.
2021-01-13 07:53:35 +00:00
ernestotejeda
49e6643094 [MIG] account_asset_management: Migration to 13.0 2021-01-13 07:53:35 +00:00
ernestotejeda
22b491e1c0 [IMP] account_asset_management: black, isort 2021-01-13 07:53:35 +00:00
Luc De Meyer
55aa4cad58 [12.0][FIX]traceback when deviating FY 2021-01-13 07:53:35 +00:00
Iván Todorovich
ac08a99fa3 [12.0][FIX][account_asset_management] local variable 'asset' referenced before assignment
tools/account_asset_management/models/account_asset.py", line 970, in _compute_entries
    % (asset.name, asset.code) or asset.name
UnboundLocalError: local variable 'asset' referenced before assignment
2021-01-13 07:53:35 +00:00
Joan Sisquella
810ac3ff5c [ADD] allows setting a depreciation ending date 2021-01-13 07:53:35 +00:00
Saran
979279dd47 [ADD] options 'use_leap_years' 2021-01-13 07:53:35 +00:00
Saran
66f345e2f3 [12.0][IMP] account_asset_management 2021-01-13 07:53:35 +00:00
Pedro M. Baeza
2dffd4070d [MIG+FIX+IMP] account_asset_management: Rework migration scripts + make asset group m2m 2021-01-13 07:53:35 +00:00
Henrik Norlin
187846d3ee [IMP] removed type, parent_id, parent_path, child_ids from account.asset & account.asset.profile 2021-01-13 07:53:35 +00:00
Pedro M. Baeza
a483203c37 [FIX] account_asset_management: Don't depend on account.fiscal.year created records
* There's no need of forcing to create such records if your fiscal years are regular ones.
* FY date range computation duplicates code that is already on core.
* DummyFY is a good idea, but was not used at all. Now it is.
2021-01-13 07:53:35 +00:00
Luc De Meyer
cbc0669189 [FIX][12.0]asset_management - fix date string compare 2021-01-13 07:53:35 +00:00
Pedro M. Baeza
ca270fe67e [FIX] account_asset_management: Provide hook _compute_depreciation_amount_per_fiscal_year
This way, other method_time mechanism like localization ones is able to overwrite it.

You also got an error of variable `number` not set due to previous code. Although no
alternate implementation for a new method_time, now you don't have any error,
fallbacking to standard proportional repartition.
2021-01-13 07:53:35 +00:00