merge
This commit is contained in:
+1
-2
@@ -51,7 +51,7 @@ class Location(OSV):
|
||||
return 'storage'
|
||||
|
||||
def name_search(self, cursor, user, name, args=None, operator='ilike',
|
||||
context=None, limit=80):
|
||||
context=None, limit=None):
|
||||
if not args:
|
||||
args=[]
|
||||
ids = self.search(
|
||||
@@ -65,4 +65,3 @@ class Location(OSV):
|
||||
return result
|
||||
|
||||
Location()
|
||||
|
||||
|
||||
+4
-5
@@ -18,7 +18,7 @@
|
||||
<field name="active"/>
|
||||
<label name="type"/>
|
||||
<field name="type"/>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<label name="address"/>
|
||||
<field name="address"/>
|
||||
<label name="input_location"/>
|
||||
@@ -88,7 +88,7 @@
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('quantity', '!=', 0)]</field>
|
||||
<field name="context">{'locations':active_ids}</field>
|
||||
<field name="context">{'locations':active_ids}</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_product_by_location_keyword1">
|
||||
<field name="keyword">tree_open</field>
|
||||
@@ -107,7 +107,7 @@
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Model Access -->
|
||||
<!-- Model Access -->
|
||||
<record model="res.group" id="group_stock_admin">
|
||||
<field name="name">Stock administration</field>
|
||||
</record>
|
||||
@@ -131,8 +131,7 @@
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Default locations -->
|
||||
|
||||
<!-- Default locations -->
|
||||
<record model="stock.location" id="location_input">
|
||||
<field name="name">Input Zone</field>
|
||||
<field name="code">IN</field>
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
<field name="from_location"/>
|
||||
<label name="to_location"/>
|
||||
<field name="to_location"/>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<label name="planned_date"/>
|
||||
<field name="planned_date"/>
|
||||
<label name="effective_date"/>
|
||||
<field name="effective_date"/>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<label name="state"/>
|
||||
<field name="state"/>
|
||||
<group col="4" colspan="4">
|
||||
@@ -80,7 +80,7 @@
|
||||
<field name="name">Moves from suppliers</field>
|
||||
<field name="res_model">stock.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('from_location.usage', '=', 'supplier')]</field>
|
||||
<field name="domain">[('from_location.usage', '=', 'supplier')]</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_move_form_supp_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
@@ -99,7 +99,7 @@
|
||||
<field name="name">Moves from suppliers to proceed</field>
|
||||
<field name="res_model">stock.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('from_location.usage', '=', 'supplier'),('state','in',['draft','waiting']),('incoming_packing_in','=',False),('inventory_packing_in','=',False)]</field>
|
||||
<field name="domain">[('from_location.usage', '=', 'supplier'),('state','in',['draft','waiting']),('incoming_packing_in','=',False),('inventory_packing_in','=',False)]</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_move_form_supp_proceed_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
@@ -119,7 +119,7 @@
|
||||
<field name="name">Moves to customers</field>
|
||||
<field name="res_model">stock.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('to_location.usage', '=', 'customer')]</field>
|
||||
<field name="domain">[('to_location.usage', '=', 'customer')]</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_move_form_cust_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
@@ -139,7 +139,7 @@
|
||||
<field name="name">Moves to customers to proceed</field>
|
||||
<field name="res_model">stock.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('to_location.usage', '=', 'customer'),('state','in',['draft','waiting'])]</field>
|
||||
<field name="domain">[('to_location.usage', '=', 'customer'),('state','in',['draft','waiting'])]</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_move_form_cust_proceed_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@
|
||||
<group col="6" colspan="4">
|
||||
<button string="Cancel" name="signal_cancel"
|
||||
states="{'invisible': '''state in ('cancel','done') '''}"/>
|
||||
<button string="Set Done" name="signal_done"
|
||||
<button string="Set Done" name="signal_done"
|
||||
states="{'invisible': '''state != 'ready' '''}"/>
|
||||
<button string="Set Waiting" name="signal_waiting"
|
||||
states="{'invisible': '''state != 'draft' '''}"/>
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@ class Product(OSV):
|
||||
if not (context and context.get('locations')):
|
||||
return dict([(id, False) for id in ids])
|
||||
location_ids = self.pool.get('stock.location').search(
|
||||
cursor, user, [('parent', 'child_of', context['locations'])],
|
||||
cursor, user, [('parent', 'child_of', context['locations'])],
|
||||
context=context)
|
||||
pbl = self.products_by_location(
|
||||
cursor, user, location_ids=location_ids, context=None)
|
||||
@@ -23,11 +23,11 @@ class Product(OSV):
|
||||
res = True
|
||||
for field, operator, operand in domain:
|
||||
value = line.get(field)
|
||||
if not value:
|
||||
if not value:
|
||||
return False
|
||||
if operator not in ("=", ">=", "<=", ">", "<", "!="):
|
||||
return False
|
||||
if operator == "=":
|
||||
if operator == "=":
|
||||
operator= "=="
|
||||
res = res and (eval(str(value) + operator + str(operand)))
|
||||
return res
|
||||
@@ -36,14 +36,14 @@ class Product(OSV):
|
||||
if not (context and context.get('locations')):
|
||||
return []
|
||||
location_ids = self.pool.get('stock.location').search(
|
||||
cursor, user, [('parent', 'child_of', context['locations'])],
|
||||
cursor, user, [('parent', 'child_of', context['locations'])],
|
||||
context=context)
|
||||
pbl = self.products_by_location(
|
||||
cursor, user, location_ids=location_ids, context=None)
|
||||
res= [line['product'] for line in pbl \
|
||||
if self._eval_domain(line,domain)]
|
||||
return [('id', 'in', res)]
|
||||
|
||||
|
||||
|
||||
def raw_products_by_location(self, cursor, user, location_ids,
|
||||
product_ids=None, context=None):
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
<field name="list_price_uom" select="2"/>
|
||||
<field name="cost_price"/>
|
||||
<field name="type" select="2"/>
|
||||
<field name="quantity" select="2"/>
|
||||
<field name="quantity" select="2"/>
|
||||
<field name="category" select="1"/>
|
||||
<field name="default_uom" select="2"/>
|
||||
<field name="active" select="2"/>
|
||||
|
||||
Reference in New Issue
Block a user