bzr revid: fp@tinyerp.com-20100228080214-zhgkweltq2lv75xy
This commit is contained in:
Fabien Pinckaers 2010-02-28 09:02:14 +01:00
parent 2916ba99b3
commit faefdc22e5
4 changed files with 4 additions and 21 deletions

View File

@ -121,7 +121,7 @@
<page string="Roles">
<field colspan="4" nolabel="1" name="roles_id"/>
</page>
<page string="Accepted Companies">
<page string="Companies">
<field colspan="4" nolabel="1" name="company_ids" select="1"/>
</page>
</notebook>

View File

@ -188,7 +188,7 @@ class users(osv.osv):
'rules_id': fields.many2many('ir.rule.group', 'user_rule_group_rel', 'user_id', 'rule_group_id', 'Rules'),
'company_id': fields.many2one('res.company', 'Company', required=True,
help="The company this user is currently working for."),
'company_ids':fields.many2many('res.company','res_company_users_rel','user_id','cid','Accepted Companies'),
'company_ids':fields.many2many('res.company','res_company_users_rel','user_id','cid','Companies'),
'context_lang': fields.selection(_lang_get, 'Language', required=True,
help="Sets the language for the user's user interface, when UI "
"translations are available"),

View File

@ -1901,7 +1901,7 @@ class orm(orm_template):
d['__domain'] = [(groupby,'>=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-01','%Y-%m-%d').strftime('%Y-%m-%d') or False),\
(groupby,'<=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-' + str(days),'%Y-%m-%d').strftime('%Y-%m-%d') or False)] + domain
elif fget[groupby]['type'] == 'many2one':
d[groupby] = d[groupby] and d[groupby][1] or ''
d[groupby] = d[groupby] and ((type(d[groupby])==type(1)) and d[groupby] or d[groupby][1]) or ''
del alldata[d['id']][groupby]
d.update(alldata[d['id']])

View File

@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import cStringIO
import csv
import logging
@ -62,7 +63,6 @@ def _eval_xml(self,node, pool, cr, uid, idref, context=None):
f_search = node.get("search",'').encode('utf-8')
f_use = node.get("use",'id').encode('ascii')
f_name = node.get("name",'').encode('utf-8')
q = eval(f_search, idref)
ids = pool.get(f_model).search(cr, uid, q)
if f_use != 'id':
@ -190,7 +190,6 @@ class assertion_report(object):
return res
class xml_import(object):
@staticmethod
def nodeattr2bool(node, attr, default=False):
if not node.get(attr):
@ -866,19 +865,3 @@ def convert_xml_import(cr, module, xmlfile, idref=None, mode='init', noupdate=Fa
obj.parse(doc.getroot())
return True
def convert_xml_export(res):
uid=1
pool=pooler.get_pool(cr.dbname)
cr=pooler.db.cursor()
idref = {}
page = etree.Element ( 'terp' )
doc = etree.ElementTree ( page )
data = etree.SubElement ( page, 'data' )
text_node = etree.SubElement ( page, 'text' )
text_node.text = 'Some textual content.'
cr.commit()
cr.close()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: