ajay javiya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-10click-warehouse-tpa-fix-aja into
lp:~openerp-dev/openobject-addons/trunk-10click-warehouse-tpa.
Requested reviews:
Turkesh Patel (openERP) (turkesh-tinyerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-10click-warehouse-tpa-fix-aja/+merge/133659
Hello,
Fix issue in warehouse module.
[1] Receive/Deliver By Orders
-> "Shipping Type" should be read-only and set to Getting Goods for Incoming
Products and Sending Goods for Deliver Products
-> Reference should only allow you to select incoming shipments for Incoming
Products and deliveries for Deliver Products
[2] Inventory Control
-> Fill inventory button should not visible in done state.
-> Rename warning message.
-> In Fill Inventory wizard, selecting "set to zero" will create duplicate
lines if you already have existing products with a quantity. You should not
create a line with 0, if a line for this product already exists.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-10click-warehouse-tpa-fix-aja/+merge/133659
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-10click-warehouse-tpa.
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2012-11-05 07:04:08 +0000
+++ stock/stock_view.xml 2012-11-09 12:21:21 +0000
@@ -114,7 +114,7 @@
</header>
<sheet>
<div class="oe_right oe_button_box">
- <button name="%(action_view_stock_fill_inventory)d" string="Fill Inventory" type="action" />
+ <button name="%(action_view_stock_fill_inventory)d" string="Fill Inventory" states="draft,cancel,confirm" type="action" />
</div>
<group>
<group>
@@ -1234,8 +1234,8 @@
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group name="origin_grp" string="Origin">
- <field name="picking_id"/>
- <field name="type" on_change="onchange_move_type(type)"/>
+ <field name="picking_id" domain="[('type','=',type)]"/>
+ <field name="type" readonly="True" on_change="onchange_move_type(type)"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="create_date" groups="base.group_no_one"/>
</group>
=== modified file 'stock/wizard/stock_fill_inventory.py'
--- stock/wizard/stock_fill_inventory.py 2012-09-29 10:51:04 +0000
+++ stock/wizard/stock_fill_inventory.py 2012-11-09 12:21:21 +0000
@@ -60,9 +60,6 @@
if context.get('active_id', False):
stock = self.pool.get('stock.inventory').browse(cr, uid, context.get('active_id', False))
-
- if stock.state == 'done':
- raise osv.except_osv(_('Warning!'), _('Stock Inventory is already Validated.'))
return True
def fill_inventory(self, cr, uid, ids, context=None):
@@ -126,22 +123,23 @@
res[location] = datas
if not flag:
- raise osv.except_osv(_('Warning!'), _('No product in this location.'))
+ raise osv.except_osv(_('Warning!'), _('No product in this location. Please select a location in the product form.'))
for stock_move in res.values():
for stock_move_details in stock_move.values():
stock_move_details.update({'inventory_id': context['active_ids'][0]})
domain = []
-
- if fill_inventory.set_stock_zero:
- stock_move_details.update({'product_qty': 0})
-
for field, value in stock_move_details.items():
+ if field == 'product_qty' and fill_inventory.set_stock_zero:
+ domain.append((field, 'in', [value,'0']))
+ continue
domain.append((field, '=', value))
line_ids = inventory_line_obj.search(cr, uid, domain, context=context)
if not line_ids:
+ if fill_inventory.set_stock_zero:
+ stock_move_details.update({'product_qty': 0})
inventory_line_obj.create(cr, uid, stock_move_details, context=context)
return {'type': 'ir.actions.act_window_close'}
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp