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

[12.0][MIG] stock_account_internal_move #570

Merged
merged 23 commits into from Sep 30, 2019

Conversation

kittiu
Copy link
Member

@kittiu kittiu commented Apr 3, 2019

Migrate to v12

Artem Kostyuk and others added 22 commits April 3, 2019 11:08
* Rewrite SQL constraints to Python
* Adapt location view to display valuation accounts on internal locations
Treat corresponding valuation account counterparts on internal locations
as valuation accounts when a move is `in` or `out`, namely:

* treat location's `valuation_in_account` as a valuation on `in` moves,
* treat location's `valuation_out_account` as one on `out` moves.

Sure, the above takes place only when location has
`force_accounting_entries` on it, otherwise vanilla behavior is not to
tamper w/.
@rousseldenis rousseldenis added this to the 12.0 milestone Apr 3, 2019
@OCA-git-bot OCA-git-bot mentioned this pull request Apr 3, 2019
54 tasks
@kittiu kittiu force-pushed the 12.0-mig-stock_account_internal_move branch from aae7cb8 to 25877e1 Compare April 4, 2019 03:09
@kittiu
Copy link
Member Author

kittiu commented Apr 4, 2019

Migrated

Copy link
Sponsor Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Copy link
Member

@tbaden tbaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the work 👍
code review: lgtm
just the one question (see below)

self.ensure_one()
res = super()._run_valuation(quantity)
if self._is_internal() and not self.value:
# TODO: recheck if this part respects product valuation method
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were the todo checked?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, sorry, I am not sure what is the intention of the original author too.
Any hint, @max3903?

Copy link
Member

@gurneyalex gurneyalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also suggested some typo fixes in the strings

if loc.usage != 'internal' and loc.force_accounting_entries:
raise ValidationError(_(
'You cannot force accounting entries'
' on a non-internal locations.'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
' on a non-internal locations.'))
' on a non-internal location.'))

if not loc.valuation_in_account_id \
or not loc.valuation_out_account_id:
raise ValidationError(_(
'You must provide a valuation in/out accounts'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'You must provide a valuation in/out accounts'
'You must provide a valuation in/out account'

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@rousseldenis
Copy link
Sponsor Contributor

@kittiu Do you plan to attend @gurneyalex comments ?

@kittiu kittiu force-pushed the 12.0-mig-stock_account_internal_move branch from 25877e1 to 73c68c2 Compare April 26, 2019 17:27
@oca-clabot
Copy link

Hey @kittiu, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@kittiu
Copy link
Member Author

kittiu commented Apr 26, 2019

@kittiu Do you plan to attend @gurneyalex comments ?

Done :)

@rousseldenis
Copy link
Sponsor Contributor

@max3903 Any advice on the TODO ?

@rousseldenis
Copy link
Sponsor Contributor

I think we can merge this.

@rousseldenis
Copy link
Sponsor Contributor

/ocabot merge

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 12.0-ocabot-merge-pr-570-by-rousseldenis-bump-no, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 30, 2019
Signed-off-by rousseldenis
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at b986233. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot merged commit 73c68c2 into OCA:12.0 Sep 30, 2019
i-vyshnevska pushed a commit to camptocamp/stock-logistics-warehouse that referenced this pull request Apr 13, 2020
Signed-off-by pedrobaeza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants