Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] account_asset_management: Migration to version 18.0 #2021

Open
wants to merge 181 commits into
base: 18.0
Choose a base branch
from

Conversation

carlos-lopez-tecnativa
Copy link

@carlos-lopez-tecnativa carlos-lopez-tecnativa commented Jan 30, 2025

Depends on:

  • [18.0][MIG] report_xlsx_helper reporting-engine#958

  • Update translation from _() to self.env._().

  • Update domain on fields related to account.account, using check_company=True and _check_company_domain = models.check_company_domain_parent_of to support company branches.

  • Update domain in record rules; the fields are required, so company=False is unnecessary.

TT54054
@Tecnativa @pedrobaeza @victoralmau @carlosdauden could you please review this?.

lepistone and others added 30 commits January 30, 2025 06:57
add asset management modules

asset mgt update

redo

synch asset mgt with recent V7 changes
[UPD] add places arg in assertAlmostEqual tests

[UPD] flake clean
…an't be modified if a move is linked with a depriciation line

[IMP][account_asset_management] Define FIELDS_AFFETCS_ASSET_MOVE as a set directly
* Fix compute methods dependencies and small optimizations
* Rename demo file to test and move it into the right folder
This is now supported natively by Odoo 11.
* account_asset: Do not loop on all the lines to search for one linked asset

Before this change, the use of `mapped` on self did loop on all the move
lines that are included in self to get the assets, what could be very
costly for a simple write on a lot of move lines. As the goal is to raise
an error only if at least one move is linked to an asset, we break the
loop if the condition is fulfilled.

* performance improvement

* [RMV] - Remove useless dependency

In 12.0 account_fiscal_year is a standard feature no need to depend on oca
module account_fiscal_year
Currently translated at 40.1% (79 of 197 strings)

Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_asset_management/pt_BR/
Currently translated at 100.0% (195 of 195 strings)

Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_asset_management/fr/
Currently translated at 91.8% (179 of 195 strings)

Translation: account-financial-tools-12.0/account-financial-tools-12.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_asset_management/es/
…ount_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.
…ent from extra method_time values

If not, added methods won't hide these fields.
weblate and others added 23 commits January 30, 2025 10:46
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/
Currently translated at 100.0% (259 of 259 strings)

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/es/
Currently translated at 27.0% (70 of 259 strings)

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/
Currently translated at 27.1% (70 of 258 strings)

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/it/
Currently translated at 46.1% (119 of 258 strings)

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/nl/
Currently translated at 100.0% (258 of 258 strings)

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/fr/
Currently translated at 100.0% (258 of 258 strings)

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/es_AR/
Currently translated at 87.2% (225 of 258 strings)

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/nl/
Currently translated at 89.1% (230 of 258 strings)

Translation: account-financial-tools-16.0/account-financial-tools-16.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_asset_management/pt_BR/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_asset_management/
Currently translated at 42.0% (108 of 257 strings)

Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_asset_management/it/
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
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_asset_management/
Currently translated at 100.0% (256 of 256 strings)

Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_asset_management/it/
Currently translated at 100.0% (256 of 256 strings)

Translation: account-financial-tools-17.0/account-financial-tools-17.0-account_asset_management
Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_asset_management/es_AR/
The Financial Assets report generates an error message where there is an asset
without depreciation table.
This is ok for most assets but not for those with method_number = 0 which
is the case for assets of type 'Land and Buildings'.
@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 18.0-mig-account_asset_management branch from af7b030 to fe31f2b Compare January 30, 2025 16:51
When this module is installed, it prevents the cancellation of posted journals. However, in many cases, this action is necessary—for example, in the account_asset_management module.

With this commit, the default constraint is applied only in this module's tests or when Odoo is not running in test mode.

This approach provides an alternative to avoid marking the module as rebellious.
@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 18.0-mig-account_asset_management branch from fe31f2b to 5376dd8 Compare January 30, 2025 16:55
@pedrobaeza
Copy link
Member

/ocabot migration account_asset_management

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Jan 30, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Jan 30, 2025
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.