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

[FIX] mrp_production_real_cost - create analytic lines before done #77

Merged
merged 1 commit into from
Jan 20, 2016

Conversation

ddico
Copy link
Member

@ddico ddico commented Jan 20, 2016

Calling "action_done" before creating "account_analytic_line" triggers an "account_move_line" amount without the value of the last operation.

If we call "action_done" after the "account_analtic_line" is created it will give us the correct amount (including the last operation).

@pedrobaeza
Copy link
Member

We are not using accounting in moves, but seems logic 👍

cc @rafaelbn @antespi

@rafaelbn
Copy link
Member

Tested, thanks! 👍

@oihane
Copy link
Contributor

oihane commented Jan 20, 2016

LGTM 👍 Thanks @ddico for the contribution

pedrobaeza added a commit that referenced this pull request Jan 20, 2016
[FIX] mrp_production_real_cost - create analytic lines before done
@pedrobaeza pedrobaeza merged commit dda6e66 into OCA:8.0 Jan 20, 2016
@pedrobaeza
Copy link
Member

We are now seeing that this breaks another thing: end_date is not assigned until super is called, so machine time is never filled. Don't you have any other method for getting accounting?

@ddico ddico deleted the submit_fix_analytic_before_done branch January 21, 2016 04:19
@ddico ddico restored the submit_fix_analytic_before_done branch January 21, 2016 04:20
@ddico ddico deleted the submit_fix_analytic_before_done branch January 21, 2016 04:28
@ddico
Copy link
Member Author

ddico commented Jan 21, 2016

Is like the chicken or the egg...

I don't have a clean way, even if I find a solution I don't think is going to make other users happy?

How about we do something similar like in:
https://github.com/OCA/manufacture/blob/8.0/mrp_operations_time_control/models/operation_time.py#L21
before calling "_create_analytic_line" (or in _create_analytic_line)

Do you think that will work? Would that be OK for everyone?

cc: @pedrobaeza @rafaelbn @antespi

@pedrobaeza
Copy link
Member

Done in #78. Thanks for the tip.

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.

None yet

4 participants