[MERGE] forward port of branch saas-3 up to 276d0e7

This commit is contained in:
Denis Ledoux 2014-12-08 15:04:09 +01:00
commit eaef500e9d
2 changed files with 4 additions and 1 deletions

View File

@ -198,6 +198,7 @@
<field name="name">account.analytic.account.list.contract</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="account.view_account_analytic_account_list"/>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml">
<field name="date_start" position="before">
<field name="last_invoice_date"/>

View File

@ -37,7 +37,9 @@ class pad_common(osv.osv_memory):
s = string.ascii_uppercase + string.digits
salt = ''.join([s[random.randint(0, len(s) - 1)] for i in range(10)])
#path
path = '%s-%s-%s' % (cr.dbname.replace('_','-'), self._name, salt)
# etherpad hardcodes pad id length limit to 50
path = '-%s-%s' % (self._name, salt)
path = '%s%s' % (cr.dbname.replace('_','-')[0:50 - len(path)], path)
# contruct the url
url = '%s/p/%s' % (pad["server"], path)