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_reserve #637
Conversation
…will serve as a basis for the sale pre-book
…e, added a default 'Reservation Stock' location
…s, onchange not needed as we never change the type. document the fields of a reservation
…lly moved and would appear in an inventory
…e test pass as it isn't a dependancy.
don't use half the quantity so that the reserved qty is different from available qty
* check that multiple reservations are handled correctly * check that various UOM are handled correctly
test that reservations will trigger orderpoint procurements
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-10.0/stock-logistics-warehouse-10.0-stock_reserve Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-10-0/stock-logistics-warehouse-10-0-stock_reserve/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-10.0/stock-logistics-warehouse-10.0-stock_reserve Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-10-0/stock-logistics-warehouse-10-0-stock_reserve/
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.
Code review. Some comments.
Please don't remove translation files
The yaml test file needs to be converted to python: |
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.
Code review. Some changes here
|
||
@api.model | ||
def default_get(self, fields_list): | ||
""" Fix default values |
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 this is quite weird to do such kind of things in default_get for a Model.
In which case default field attribute does not work ?
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, that's the old code of version 8.0.So I don't know much detail about the logic case.
@api.onchange('product_uom_qty') | ||
def _onchange_quantity(self): | ||
""" On change of product quantity avoid negative quantities """ | ||
if not self.product_id or self.product_uom_qty <= 0.0: |
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.
You have to use float_compare.
Hey @hzh0292, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
'security/ir.model.access.csv', | ||
], | ||
'auto_install': False, | ||
'test': ['test/stock_reserve.yml', |
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.
yml tests are deprecated. Could you convert to xml ?
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.
Yes,it's a problem.Is there somebody can help me to convert the yml to python?
@hzh0292 , any progress on this migration? |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
The module stock_reserve_sale depends on this module.