-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Saas 18 stock scrap warn wizard pgu #19655
Merged
jorenvo
merged 4 commits into
odoo:saas-18
from
odoo-dev:saas-18-stock-scrap-warn-wizard-pgu
Sep 27, 2017
Merged
Saas 18 stock scrap warn wizard pgu #19655
jorenvo
merged 4 commits into
odoo:saas-18
from
odoo-dev:saas-18-stock-scrap-warn-wizard-pgu
Sep 27, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pgu-odoo
force-pushed
the
saas-18-stock-scrap-warn-wizard-pgu
branch
from
September 25, 2017 05:40
c8a0956
to
26274c9
Compare
sle-odoo
reviewed
Sep 26, 2017
@api.constrains('lot_id', 'product_id') | ||
def constrain_lot_id(self): | ||
for line in self.filtered(lambda x: x.product_id.tracking != 'none' and not x.lot_id): | ||
raise ValueError(_("Serial number is required for operation line with product '%s'") % (line.product_id.name)) |
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.
ValidationError
sle-odoo
force-pushed
the
saas-18-stock-scrap-warn-wizard-pgu
branch
from
September 26, 2017 14:53
4e0b470
to
487adf2
Compare
sle-odoo
reviewed
Sep 26, 2017
addons/stock/models/stock_scrap.py
Outdated
package_id = self.package_id or None | ||
owner_id = self.owner_id or None | ||
available_qty = self.env['stock.quant']._get_available_quantity(self.product_id, self.location_id, lot_id, package_id, owner_id, strict=True) | ||
if float_compare(available_qty, self.scrap_qty, 2) >= 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.
why forcing precision_digits?
jorenvo
force-pushed
the
saas-18-stock-scrap-warn-wizard-pgu
branch
7 times, most recently
from
September 27, 2017 02:40
e5ef0af
to
0d2db8f
Compare
Instead of stock.move.
Instead of only checking when actually confirming the repair.
Instead of stock.move.
This implements a warning when the user tries to do any of the following operations on a product that is not in stock: - Scrapping - Unbuilding - Repairing The warning displays the current stock of the product in question per location which can be helpful in case the user selected the wrong location.
jorenvo
force-pushed
the
saas-18-stock-scrap-warn-wizard-pgu
branch
from
September 27, 2017 04:36
0d2db8f
to
55c0221
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the issue/feature this PR addresses:
task id - https://www.odoo.com/web#id=36014&view_type=form&model=project.task&action=327&menu_id=
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr