openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #16528
[Bug 1065772] [NEW] Stock Orderpoint min=0 and max=0
Public bug reported:
If your product is setup as make_to_stock, buy and you set a Minimum Stock Rule for Min=0 and Max=0.
The above is effectively make_to_order configuration.
Run schedular
In the case some qty of the above product is required for Manufacturing and we need to buy some to fulfil the MO requirements.
Request for Quotation is created by schedular
Confirm purchase order
Recieve item into stock
Check stock levels. These are correct.
Run schedular
Check MO for product avaliability - Not Avaliable
This is a subtle bug that the user will not be able to solve, and will
take some time for a technical person to identify the configuration
error.
One solution is to add _sql_contraints that prevent this situation from occuring in the first place
class stock_warehouse_orderpoint(osv.osv):
_sql_constraints = [
('qty_multiple_check', 'CHECK( qty_multiple > 0 )', 'Qty Multiple must be greater than zero.'),
+ ('mix_qty_ge_zero_check', 'CHECK( product_min_qty >= 0 )', 'Min Quantity must be greater than or equal to zero.'),
+ ('max_qty_gt_zero_check', 'CHECK( product_max_qty > 0 )', 'Max Quantity must be greater than zero.'),
]
Thanks
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1065772
Title:
Stock Orderpoint min=0 and max=0
Status in OpenERP Addons (modules):
New
Bug description:
If your product is setup as make_to_stock, buy and you set a Minimum Stock Rule for Min=0 and Max=0.
The above is effectively make_to_order configuration.
Run schedular
In the case some qty of the above product is required for Manufacturing and we need to buy some to fulfil the MO requirements.
Request for Quotation is created by schedular
Confirm purchase order
Recieve item into stock
Check stock levels. These are correct.
Run schedular
Check MO for product avaliability - Not Avaliable
This is a subtle bug that the user will not be able to solve, and will
take some time for a technical person to identify the configuration
error.
One solution is to add _sql_contraints that prevent this situation from occuring in the first place
class stock_warehouse_orderpoint(osv.osv):
_sql_constraints = [
('qty_multiple_check', 'CHECK( qty_multiple > 0 )', 'Qty Multiple must be greater than zero.'),
+ ('mix_qty_ge_zero_check', 'CHECK( product_min_qty >= 0 )', 'Min Quantity must be greater than or equal to zero.'),
+ ('max_qty_gt_zero_check', 'CHECK( product_max_qty > 0 )', 'Max Quantity must be greater than zero.'),
]
Thanks
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1065772/+subscriptions
Follow ups
References