replaced tab by white spaces

bzr revid: fp@tinyerp.com-20100228195016-j8cdsh6si05e5xhh
This commit is contained in:
Fabien Pinckaers 2010-02-28 20:50:16 +01:00
parent faefdc22e5
commit 97d8612767
2 changed files with 54 additions and 54 deletions

View File

@ -94,30 +94,30 @@
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<form string="Address">
<field name="partner_id" select="1" colspan="2"/>
<field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
<newline/>
<group colspan="4" col="6">
<field name="name" select="2"/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field name="function"/>
</group>
<field name="partner_id" colspan="2"/>
<field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
<newline/>
<field name="name"/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field name="function"/>
</group>
<group colspan="2" col="2">
<separator string="Postal Address" colspan="4" col="4"/>
<field name="street" select="2"/>
<separator string="Postal Address" colspan="4" col="4"/>
<field name="street"/>
<field name="street2"/>
<field name="zip" select="2"/>
<field name="city" select="2"/>
<field name="country_id" select="2" completion="1"/>
<field name="state_id" select="2"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
</group>
<group colspan="2" col="2">
<separator string="Communication" colspan="4" col="4"/>
<field name="type" select="2" />
<separator string="Communication" colspan="4" col="4"/>
<field name="type"/>
<field name="phone"/>
<field name="fax"/>
<field name="mobile" select="2"/>
<field name="email" select="2" widget="email"/>
<field name="mobile"/>
<field name="email" widget="email"/>
</group>
</form>
</field>
@ -158,15 +158,15 @@
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field name="street"/>
<field name="street2"/>
<field name="type" select="2"/>
<field name="type"/>
<field name="function"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
<field name="zip" select="2"/>
<field name="city" select="2"/>
<field name="zip"/>
<field name="city"/>
<newline/>
<field completion="1" name="country_id" select="1"/>
<field name="state_id" select="2"/>
<field name="state_id"/>
<newline/>
<field name="phone"/>
<field name="fax"/>
@ -238,8 +238,8 @@
<field name="name"/>
<field name="title"/>
<field name="ref"/>
<field name="city" select="2"/>
<field name="country" select="2"/>
<field name="city"/>
<field name="country"/>
<field name="lang"/>
</tree>
</field>
@ -256,11 +256,11 @@
<field name="name" select="1" colspan="6"/>
<field name="ref" select="1"/>
<field domain="[('domain', '=', 'partner')]" name="title"/>
<field name="lang" select="2"/>
<field name="lang"/>
</group>
<group colspan="1" col="2">
<field name="customer" select="1"/>
<field name="supplier" select="2"/>
<field name="supplier"/>
</group>
</group>
<notebook colspan="4">
@ -268,27 +268,27 @@
<field colspan="4" mode="form,tree" name="address" nolabel="1" select="1" height="260">
<form string="Partner Contacts">
<group colspan="4" col="6">
<field name="name" select="2"/>
<field name="name"/>
<field domain="[('domain', '=', 'contact')]" name="title" size="0"/>
<field name="function"/>
</group>
<newline/>
<group colspan="2" col="4">
<separator string="Postal Address" colspan="4" col="4" />
<field name="street" select="2" colspan="4"/>
<field name="street" colspan="4"/>
<field name="street2" colspan="4"/>
<field name="zip" select="2"/>
<field name="city" select="2"/>
<field name="country_id" select="2" completion="1"/>
<field name="state_id" select="2"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id" completion="1"/>
<field name="state_id"/>
</group>
<group colspan="2" col="2">
<separator string="Communication" colspan="2" col="2" />
<field name="type" select="2" string="Type" />
<field name="type" string="Type" />
<field name="phone"/>
<field name="mobile"/>
<field name="fax"/>
<field name="email" select="2" widget="email"/>
<field name="email" widget="email"/>
</group>
</form>
<tree string="Partner Contacts">
@ -301,14 +301,14 @@
</tree>
</field>
<separator colspan="4" string="Categories"/>
<field colspan="4" name="category_id" nolabel="1" select="2" height="90"/>
<field colspan="4" name="category_id" nolabel="1" height="90"/>
</page>
<page string="Sales &amp; Purchases">
<separator string="General Information" colspan="4"/>
<field name="user_id" select="2"/>
<field name="active" select="2"/>
<field name="user_id"/>
<field name="active"/>
<field name="website" widget="url"/>
<field name="date" select="2"/>
<field name="date"/>
<field name="parent_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
@ -457,7 +457,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bank account">
<field name="state" select="2"/>
<field name="state"/>
<field name="partner_id" select="1"/>
<newline/>
<field name="acc_number" select="1"/>
@ -467,12 +467,12 @@
<field name="sequence"/>
<field colspan="4" name="name"/>
<separator colspan="4" string="Bank Account Owner"/>
<field colspan="4" name="owner_name" select="2"/>
<field colspan="4" name="owner_name"/>
<field colspan="4" name="street"/>
<field name="city"/>
<field name="zip"/>
<field completion="1" name="country_id" select="2"/>
<field name="state_id" select="2"/>
<field completion="1" name="country_id"/>
<field name="state_id"/>
</form>
</field>
</record>
@ -539,7 +539,7 @@
<field name="active" select="1"/>
<field name="parent_id"/>
<separator colspan="4" string="Partners"/>
<field colspan="4" name="partner_ids" nolabel="1" select="2"/>
<field colspan="4" name="partner_ids" nolabel="1"/>
</form>
</field>
</record>

View File

@ -247,7 +247,7 @@ class browse_record(object):
new_data[n] = self._list_class([browse_record(self._cr, self._uid, id, self._table.pool.get(f._obj), self._cache, context=self._context, list_class=self._list_class, fields_process=self._fields_process) for id in data[n]], self._context)
else:
new_data[n] = data[n]
self._data[data['id']].update(new_data)
self._data[data['id']].update(new_data)
if not name in self._data[self._id]:
#how did this happen?
self.logger.notifyChannel("browse_record", netsvc.LOG_ERROR,
@ -1100,7 +1100,7 @@ class orm_template(object):
if column._domain and not isinstance(column._domain, (str, unicode)):
dom = column._domain
dom += eval(node.get('domain','[]'), {'uid':user, 'time':time})
context.update(eval(node.get('context','{}')))
context.update(eval(node.get('context','{}')))
attrs['selection'] = self.pool.get(relation).name_search(cr, user, '', dom, context=context)
if (node.get('required') and not int(node.get('required'))) or not column.required:
attrs['selection'].append((False,''))
@ -1836,7 +1836,7 @@ class orm(orm_template):
self.pool.get('ir.model.access').check(cr, uid, self._name, 'read', context=context)
if not fields:
fields = self._columns.keys()
(where_clause, where_params, tables) = self._where_calc(cr, uid, domain, context=context)
dom = self.pool.get('ir.rule').domain_get(cr, uid, self._name, context=context)
where_clause = where_clause + dom[0]
@ -1844,10 +1844,10 @@ class orm(orm_template):
for t in dom[2]:
if t not in tables:
tables.append(t)
# Take care of adding join(s) if groupby is an '_inherits'ed field
tables, where_clause = self._inherits_join_calc(groupby,tables,where_clause)
tables, where_clause = self._inherits_join_calc(groupby,tables,where_clause)
if len(where_clause):
where_clause = ' where '+string.join(where_clause, ' and ')
else:
@ -1859,7 +1859,7 @@ class orm(orm_template):
float_int_fields = filter(lambda x: fget[x]['type'] in ('float','integer'), fields)
sum = {}
group_by = groupby
group_by = groupby
if fget.get(groupby,False) and fget[groupby]['type'] in ('date','datetime'):
flist = "to_char(%s,'yyyy-mm') as %s "%(groupby,groupby)
groupby = "to_char(%s,'yyyy-mm')"%(groupby)
@ -1876,7 +1876,7 @@ class orm(orm_template):
flist += ',avg('+f+') as '+f
else:
flist += ',sum('+f+') as '+f
cr.execute('select min(%s.id) as id,' % self._table + flist + ' from ' + ','.join(tables) + where_clause + ' group by '+ groupby + limit_str + offset_str, where_params)
alldata = {}
groupby = group_by
@ -1909,10 +1909,10 @@ class orm(orm_template):
return data
def _inherits_join_calc(self, field, tables, where_clause):
""" Adds missing table select and join clause(s) for reaching
""" Adds missing table select and join clause(s) for reaching
the field coming from an '_inherits' parent table.
@param tables: list of table._table names enclosed in double quotes as returned
by _where_calc()
by _where_calc()
"""
current_table = self
while field in current_table._inherit_fields and not field in current_table._columns:
@ -2053,12 +2053,12 @@ class orm(orm_template):
if isinstance(f, fields.one2many):
cr.execute("SELECT relname FROM pg_class WHERE relkind='r' AND relname=%s", (f._obj,))
if self.pool.get(f._obj):
if f._fields_id not in self.pool.get(f._obj)._columns.keys():
if not self.pool.get(f._obj)._inherits or (f._fields_id not in self.pool.get(f._obj)._inherit_fields.keys()):
raise except_orm('Programming Error', ("There is no reference field '%s' found for '%s'") % (f._fields_id,f._obj,))
if cr.fetchone():
cr.execute("SELECT count(1) as c FROM pg_class c,pg_attribute a WHERE c.relname=%s AND a.attname=%s AND c.oid=a.attrelid", (f._obj, f._fields_id))
res = cr.fetchone()[0]