-
Notifications
You must be signed in to change notification settings - Fork 5
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
[IMP] Getting rid of _quant_create method override from product_unique_serial module #14
[IMP] Getting rid of _quant_create method override from product_unique_serial module #14
Conversation
Method _quant_create just got deleted from this module and Could you please review and/or merge this PR Regards |
line.product_id.name, line.qty, | ||
line.lot_id.name, note))) | ||
'You should only receive by the piece with the same ' | ||
'serial number')) |
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.
As you see hbto you are not showing proper information of the product failling here.
Can you concatenate properly?
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 am using the same lines that were used before,
In order to be too much hassle the module's test itself and other test upwards
I like the new approach. What We need is send the warning with all the information related (product and serial) involved in the warning. |
I am using the same approach used earlier by avoiding to break the least what is already working. If some improve is needed I want to do that in a second round, I am trying to reach an stable process, by changing the test & validation at all I will be causing So, yes you are right, Exceptions and Test needs better wording, but that can be done Regards |
…oduct_unique_serial
@nhomar Could you please review and/or merge |
|
||
msg_increase = _( | ||
u'Product %s has been configured to use unique lots. ' | ||
u'You are trying to increase %s items in the lot %s. %s') |
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.
Avoid global variables.
Can you please add them as attributes in the class and they will be available in all the class, use this kind of variables is a bad practice.
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 for your advice.
Doing
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.
BTW
Do pylint or any other of our tools check for this bad practice,
or Have I overlooked the check?
For me is ok all (thanks) I just have a little comment in the global variables used for the long texts. The correct approach is add them as new attributes to the class. class name(models.Model):
_your_var = _(----....long text)
fields_name = fields.Text(help=self._your_var)
# in the method
def method(self):
....
self._your_var |
@nhomar Please recheck. Regards |
As a last step can you make a dummy PR to yoytec please.! |
@nhomar Regards |
Please review runbot for yoytec on this PR. being this the regarding pull request this has already gone green |
return super(StockQuant, self)._quant_create( | ||
qty, move, lot_id, owner_id, src_package_id, | ||
dest_package_id, force_location_from, force_location_to) | ||
|
||
@api.multi | ||
@api.constrains('product_id', 'lot_id', 'qty') | ||
def _check_inicity_lot_product(self): |
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.
s/inicity/uniqueness/g
s/_check_inicity_lot_product/_check_uniqueness_lot/g
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.
It is Ok for me, just a little typo to merge, can you @hugho-ad check this please to merge ASAP |
I'm not full in context for a reviewing, maybe you are askying for Moy's reviewing Regards |
Sorry I meant @hbto |
[IMP] Getting rid of _quant_create method override from product_unique_serial module
[IMP] Fixing tests on product_unique_serial module because of the delete override