[FIX] fixes
bzr revid: qdp-launchpad@openerp.com-20140505125630-903olg3ko3y5gekh
This commit is contained in:
commit
dcd10db66e
|
@ -17,7 +17,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/sheet/h1" position="before">
|
||||
<div class="oe_right oe_button_box">
|
||||
<button name="%(action_claim_from_delivery)d" string="Claims" type="action" attrs="{'invisible': [('picking_type_id.code', '=', 'outgoing')]}"/>
|
||||
<button name="%(action_claim_from_delivery)d" string="Claims" type="action" attrs="{'invisible': [('picking_type_id.code', '!=', 'outgoing')]}"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain" eval="[('picking_id.picking_type_id.code','=','outgoing'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
|
||||
<field name="domain" eval="[('picking_id.picking_type_id.code','=','incoming'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
|
||||
<field name="view_id" ref="view_move_tree_reception_picking"/>
|
||||
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
||||
<field name="help" type="html">
|
||||
|
|
|
@ -720,23 +720,11 @@ class stock_picking(osv.osv):
|
|||
|
||||
def check_group_lot(self, cr, uid, context=None):
|
||||
""" This function will return true if we have the setting to use lots activated. """
|
||||
settings_obj = self.pool.get('stock.config.settings')
|
||||
config_ids = settings_obj.search(cr, uid, [], limit=1, order='id DESC', context=context)
|
||||
#If we don't have updated config until now, all fields are by default false and so should be not dipslayed
|
||||
if not config_ids:
|
||||
return False
|
||||
stock_settings = settings_obj.browse(cr, uid, config_ids[0], context=context)
|
||||
return stock_settings.group_stock_production_lot
|
||||
return self.pool.get('res.users').has_group(cr, uid, 'stock.group_production_lot')
|
||||
|
||||
def check_group_pack(self, cr, uid, context=None):
|
||||
""" This function will return true if we have the setting to use package activated. """
|
||||
settings_obj = self.pool.get('stock.config.settings')
|
||||
config_ids = settings_obj.search(cr, uid, [], limit=1, order='id DESC', context=context)
|
||||
#If we don't have updated config until now, all fields are by default false and so should be not dipslayed
|
||||
if not config_ids:
|
||||
return False
|
||||
stock_settings = settings_obj.browse(cr, uid, config_ids[0], context=context)
|
||||
return stock_settings.group_stock_tracking_lot
|
||||
return self.pool.get('res.users').has_group(cr, uid, 'stock.group_tracking_lot')
|
||||
|
||||
def action_assign_owner(self, cr, uid, ids, context=None):
|
||||
for picking in self.browse(cr, uid, ids, context=context):
|
||||
|
|
Loading…
Reference in New Issue