[FIX] stock get_object and attrs for stockable non prodcut.template field
bzr revid: al@openerp.com-20140128111840-azq5nms0os24ow3f
This commit is contained in:
parent
317a236a59
commit
0f2c0f9b6b
|
@ -122,9 +122,9 @@
|
|||
</group>
|
||||
<group name="Weights" position="after">
|
||||
<group name="store" groups="stock.group_locations" string="Counter-Part Locations Properties">
|
||||
<field name="property_stock_procurement" attrs="{'readonly':['|', '|', ('type','=','service'), ('is_only_child', '=', False), ('is_only_child', '=', False)]}" domain="[('usage','=','procurement')]"/>
|
||||
<field name="property_stock_production" attrs="{'readonly':['|', '|', ('type','=','service'), ('is_only_child', '=', False), ('is_only_child', '=', False)]}" domain="[('usage','=','production')]"/>
|
||||
<field name="property_stock_inventory" attrs="{'readonly':['|', '|', ('type','=','service'), ('is_only_child', '=', False), ('is_only_child', '=', False)]}" domain="[('usage','=','inventory')]"/>
|
||||
<field name="property_stock_procurement" attrs="{'readonly':['|', ('type','=','service'), ('is_only_child', '=', False) ]}" domain="[('usage','=','procurement')]"/>
|
||||
<field name="property_stock_production" attrs="{'readonly':['|', ('type','=','service'), ('is_only_child', '=', False) ]}" domain="[('usage','=','production')]"/>
|
||||
<field name="property_stock_inventory" attrs="{'readonly':['|', ('type','=','service'), ('is_only_child', '=', False) ]}" domain="[('usage','=','inventory')]"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="product_manager" position="attributes" version="7.0">
|
||||
|
|
|
@ -28,7 +28,7 @@ class stock_fill_inventory(osv.osv_memory):
|
|||
_description = "Import Inventory"
|
||||
|
||||
def _default_location(self, cr, uid, ids, context=None):
|
||||
location = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock')
|
||||
location = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', raise_exception=False)
|
||||
if not location.exists():
|
||||
return False
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue