-
-
Notifications
You must be signed in to change notification settings - Fork 768
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
[17.0][MIG] account_asset_management #1819
[17.0][MIG] account_asset_management #1819
Conversation
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
…iods for asset posting
* 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.
… multiple assets in invoice
* 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
…ar, account_analytic_id without domain
313ef46
to
bd94767
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did some functional tests and it seems to work as expected.
@HaraldPanten tests checked |
This PR has the |
Could you separate pre-commit changes from migration commit? THX. |
@HaraldPanten what changes? |
When you open a new PR for a migration, you need to apply pre-commit, right? (black, isort, prettier). This command makes some changes to your code and they have to be in a separate commit (not in the migration commit). And then, you start the migration. These changes would be included in a new commit (the migration commit) Here you can see several examples: OCA/l10n-spain#3583 You'll see that the migration PRs that I mentioned have 2 commits. One of them is for the pre-commit stuff. Maybe @ioans73 can explain you better |
@HaraldPanten @pedrobaeza Thanks for your comments :) I'm going to review it with @sbiosca-s73 |
54bfd73
to
abfbcc2
Compare
abfbcc2
to
66442a1
Compare
@HaraldPanten @pedrobaeza changes done, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional review. Overall, seems to be OK.
@pedrobaeza Could we merge this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the name search and display_name is wrong.
@@ -495,15 +474,16 @@ def name_search(self, name, args=None, operator="ilike", limit=100): | |||
if operator in expression.NEGATIVE_TERM_OPERATORS: | |||
domain = ["&", "!"] + domain[1:] | |||
assets = self.search(domain + args, limit=limit) | |||
return assets.name_get() | |||
return assets._compute_display_name() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct. You can't call a compute method in a search.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of overriding name_search
, use _rec_names_search
, as stated in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0 (it wasn't changed in previous migration)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pedrobaeza done
66442a1
to
be9f746
Compare
@pedrobaeza changes done |
be9f746
to
24f2315
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
/ocabot merge nobump
On my way to merge this fine PR! |
Congratulations, your PR was merged at 6a9c3c7. Thanks a lot for contributing to OCA. ❤️ |
Migration module account_asset_management to v17.0