@@ -1285,6 +1285,18 @@
|
||||
<field eval="time.strftime('%Y-01-01')" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="UAH" model="res.currency">
|
||||
<field name="name">UAH</field>
|
||||
<field name="code">UAH</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateUAH" model="res.currency.rate">
|
||||
<field name="rate">10.8266</field>
|
||||
<field name="currency_id" ref="UAH"/>
|
||||
<field eval="time.strftime('%Y-01-01')" name="name"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-02-25 06:18+0000\n"
|
||||
"PO-Revision-Date: 2010-03-01 06:21+0000\n"
|
||||
"Last-Translator: goranc <goranc@gmail.com>\n"
|
||||
"Language-Team: openerp-translators\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-02-26 04:49+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-03-02 04:41+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"Language: hr\n"
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2010-02-25 06:23+0000\n"
|
||||
"PO-Revision-Date: 2010-03-01 06:18+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-02-26 04:49+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-03-02 04:41+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
@@ -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 & 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>
|
||||
|
||||
@@ -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"),
|
||||
|
||||
+8
-8
@@ -1849,7 +1849,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]
|
||||
@@ -1857,10 +1857,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:
|
||||
@@ -1889,7 +1889,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
|
||||
@@ -1914,7 +1914,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']])
|
||||
@@ -1922,10 +1922,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:
|
||||
|
||||
@@ -40,18 +40,16 @@ import re
|
||||
import reportlab
|
||||
from lxml import etree
|
||||
import copy
|
||||
import tools
|
||||
import locale
|
||||
import netsvc
|
||||
import traceback, sys
|
||||
|
||||
_regex = re.compile('\[\[(.+?)\]\]')
|
||||
|
||||
def str2xml(s):
|
||||
return s.replace('&', '&').replace('<', '<').replace('>', '>')
|
||||
return (s or '').replace('&', '&').replace('<', '<').replace('>', '>')
|
||||
|
||||
def xml2str(s):
|
||||
return s.replace('&','&').replace('<','<').replace('>','>')
|
||||
return (s or '').replace('&','&').replace('<','<').replace('>','>')
|
||||
|
||||
def _child_get(node, self=None, tagname=None):
|
||||
for n in node:
|
||||
@@ -106,25 +104,24 @@ def _process_text(self, txt):
|
||||
sps = _regex.split(txt)
|
||||
while sps:
|
||||
# This is a simple text to translate
|
||||
result += tools.ustr(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
|
||||
result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
|
||||
if sps:
|
||||
try:
|
||||
expr = sps.pop(0)
|
||||
txt = eval(expr,self.localcontext)
|
||||
if txt and (isinstance(txt, unicode) or isinstance(txt, str)):
|
||||
txt = tools.ustr(self.localcontext.get('translate', lambda x:x)(txt))
|
||||
txt = unicode(self.localcontext.get('translate', lambda x:x)(txt))
|
||||
except Exception,e:
|
||||
tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR,'report :\n%s\n%s\nexpr: %s' % (tb_s, str(e),expr.encode('utf-8')))
|
||||
if type(txt)==type('') or type(txt)==type(u''):
|
||||
txt2 = str2xml(txt)
|
||||
result += tools.ustr(txt2)
|
||||
result += unicode(txt2)
|
||||
elif (txt is not None) and (txt is not False):
|
||||
result += tools.ustr(txt)
|
||||
result += unicode(txt)
|
||||
return result
|
||||
|
||||
def text_get(node):
|
||||
return ''.join([tools.ustr(n.text) for n in node])
|
||||
return ''.join([unicode(n.text) for n in node])
|
||||
|
||||
units = [
|
||||
(re.compile('^(-?[0-9\.]+)\s*in$'), reportlab.lib.units.inch),
|
||||
|
||||
@@ -383,7 +383,8 @@ class common(_ObjectService):
|
||||
auth.logout(params[1])
|
||||
logger.notifyChannel("web-service", netsvc.LOG_INFO,'Logout %s from database %s'%(login,db))
|
||||
return True
|
||||
elif method in ['about', 'timezone_get', 'get_server_environment', 'login_message', 'get_stats' ]:
|
||||
elif method in ['about', 'timezone_get', 'get_server_environment',
|
||||
'login_message','get_stats', 'check_connectivity']:
|
||||
pass
|
||||
elif method in ['get_available_updates', 'get_migration_scripts', 'set_loglevel']:
|
||||
passwd = params[0]
|
||||
@@ -564,7 +565,8 @@ GNU Public Licence.
|
||||
res = "OpenERP server: %d threads\n" % threading.active_count()
|
||||
res += netsvc.Server.allStats()
|
||||
return res
|
||||
def check_connectivity(self):
|
||||
|
||||
def exp_check_connectivity(self):
|
||||
return bool(sql_db.db_connect('template1'))
|
||||
|
||||
common()
|
||||
|
||||
+1
-18
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user