-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
[ADD][8.0] stock_analytic #53
Conversation
Contributors | ||
------------ | ||
|
||
* Fabio Vílchez <fabio.vilchez@clearcorp.co.cr> |
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.
Add here Julius people and you
Same comments as in #52 |
@pedrobaeza i'm not confident regarding my retrieving technique. Is it safe to proceed? |
Yeah, I think so. It seems totally correct. |
@pedrobaeza I noticed that this module depend on purchase and sale module. Is it wise to depend on those modules since we only need stock_account to give analytic account capability to stock.move? Maybe I could create stock_sale_analytic, stock_purchase_analytic, and maybe stock_mrp_analytic to achieve modularity. |
For what is that modules needed? If there's no other choice, to keep modularity it would be good to split it. |
I mean this original module will force users to install sale and purchase. I think the main functionality for this module only to give analytic account on stock.move. So when stock.move create account.move.line it will automatically fill analytic account field on account.move.line. So no need to depend on sale and purchase. stock_sale_analytic stock_purchase_analytic I don't like to force users install modules that they don't need. But if my suggestion is somehow overkill I will continue as it is. |
No, of course is a good proposition, but I was asking for the reason to need sale or purchase modules. Now I understand that is to propagate the corresponding analytic accounts, but I agree that that should be done in the modules you propose. Maybe a better name should be sale_stock_analytic y purchase_analytic to follow Odoo's naming convention. |
Ok @pedrobaeza. Thanks for your input. I will finish this module first. |
Travis didn't run again |
Seeing https://www.traviscistatus.com/, they experimented a problem and now they have some troubles to get up to date with all the checks, so wait a bit or try again to resubmit. |
close to restart travis |
@pedrobaeza would you kindly give need review label on this PR. Thanks before. |
Done |
Thanks @pedrobaeza. |
Hi @OCA/accounting-maintainers would you kindly review this PR. Many thanks |
👍 |
Thanks @pedrobaeza |
Hi @OCA/accounting-maintainers would you kindly review this PR. Many thanks |
@aheficent and me will review. |
Thank you @jbeficent |
res[1][2].update({ | ||
'analytic_account_id': move.account_analytic_id.id, | ||
}) | ||
return res |
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.
IMHO I think It should create the analytic entries for income or expenses account only. This creates two analytic entries, one for the debit and one for the credit, even for assets accounts. Do you agree with me @andhit-r ?
cc @jbeficent
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.
@aheficent agree. I push a commit to correct this. Analytic account will only be assigned if account != valuation account
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.
Sorry for really-really late reply. Kindly review this again. Many 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.
Thank you @andhit-r I like the proposed changes. There's a problem with runbot, so i will on local. The code looks correct to me.
What else is needed to get this merged? |
Get more reviewers. You haven't approved the PR yet and there's a question unanswered as I see. |
Try to restart travis |
[IMP] SMS erase print [IMP] Stock analytic XML part is now migrated
This module allows the user to generate analytic information from stock moves.
6a7eba2
to
aa05f05
Compare
@jbeficent @aheficent all checks green. Would you kindly review it again. Many thanks. @mikevhe18 @azmimr67 please help review |
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.
I tested on local and reviewed the code and it works correctly. The only issue is related with the name of the field. What do you think about this?
class StockMove(models.Model): | ||
_inherit = "stock.move" | ||
|
||
account_analytic_id = fields.Many2one( |
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.
IMHO i think that the name of the field should be analytic_account_id. I think the name of the field should match the name of other modules as for example the account module https://github.com/OCA/OCB/blob/8.0/addons/account/account.py#L2398 or the project module https://github.com/OCA/OCB/blob/8.0/addons/project/project.py#L231
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.
Tested on runbot + code review 👍
Thank you @andhit-r and @mikevhe18 Great job!
👍 tested on runbot |
FIX in kanban_project_open
Move stock_analytic into OCA/account-analytic. The module retrieve from https://github.com/julius-network-solutions/julius-openobject-addons and https://github.com/ClearCorp-dev/stock-logistics-workflow.
Commit history preserved from both branch. Several merge conflict had been resolved.