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

11.0 mig stock partner lot #419

Closed

Conversation

agungrachmatullah
Copy link

Migrating and adding Unit Test

@pedrobaeza pedrobaeza added this to the 11.0 milestone Apr 20, 2018
@pedrobaeza
Copy link
Member

Please squash together adjacent "OCA Transbot.." commits using https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests

And also check Travis status.

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

quant_count = fields.Integer('Owned Products',
compute='_compute_quant_count')

@api.multi
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

Please depends on quant_ids

Copy link
Author

Choose a reason for hiding this comment

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

Oh my, yes the quant_count should updated when the value of quant_ids has changed, ill revise it and the description, thanks @rousseldenis


@api.multi
def _compute_quant_count(self):
"""compute the quant each of partnet"""
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

Maybe 'Compute the quants length for each partner'

Copy link
Author

@agungrachmatullah agungrachmatullah left a comment

Choose a reason for hiding this comment

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

depends updated

({'no_reset_password': True, 'mail_create_nosubscribe': True})
user = self.env['res.users'].with_context(
{'no_reset_password': True, 'mail_create_nosubscribe': True}
)
self.purchase_user = user.create({
Copy link
Member

Choose a reason for hiding this comment

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

this code unused i think self.purchase_user.

Copy link
Member

Choose a reason for hiding this comment

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

If you plan to use this user to create data you should add ...sudo(self.purchase_user).create... at L41

@ghost
Copy link

ghost commented Jun 4, 2018

Hello!
Great work! I was looking for exactly this module. The problem is however on latest runbot and my odoo instance owner_id is always null on stock.move.line and stock.quant. I would have expected to be owner_id the partner of the picking.

So this module won't have any effect.

Can you confirm this is working for you as expected and owner_id is set on your move lines/quants? If so, do you have special configuration?

Thanks for your insights!

edit: nevermind found the configuration. Should have read the module readme..
edit2: Sorry the spam:
Does anybody have an approach to just show the quants sent to a partner?

@rousseldenis
Copy link
Sponsor Contributor

@agungrachmatulah Can you attend comments ?

@rousseldenis
Copy link
Sponsor Contributor

@agungrachmatulah

1 similar comment
@rousseldenis
Copy link
Sponsor Contributor

@agungrachmatulah

@rousseldenis
Copy link
Sponsor Contributor

Closing this as it's quite old. Feel free to reopen it if needed

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

7 participants