[MERGE] forward port branch saas-6 up to ef4efea

This commit is contained in:
Christophe Simonis
2016-10-12 15:33:01 +02:00
3 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -625,8 +625,7 @@ class pos_session(osv.osv):
return True
def open_frontend_cb(self, cr, uid, ids, context=None):
if not context:
context = {}
context = dict(context or {})
if not ids:
return {}
for session in self.browse(cr, uid, ids, context=context):
@@ -63,7 +63,7 @@
<field name="ordering_date" attrs="{'readonly': [('state','not in',('draft'))]}"/>
<field name="schedule_date" attrs="{'readonly': [('state','not in',('draft'))]}"/>
<field name="origin" placeholder="e.g. PO0025" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="picking_type_id" widget="selection" groups="stock.group_stock_adv_location" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="picking_type_id" widget="selection" groups="stock.group_adv_location" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" attrs="{'readonly': [('state','not in',('draft'))]}"/>
</group>
</group>
+1 -1
View File
@@ -1899,7 +1899,7 @@ class BaseModel(object):
for order_part in orderby.split(','):
order_split = order_part.split()
order_field = order_split[0]
if order_field in groupby_fields:
if order_field == 'id' or order_field in groupby_fields:
if self._fields[order_field.split(':')[0]].type == 'many2one':
order_clause = self._generate_order_by(order_part, query).replace('ORDER BY ', '')