bzr revid: fp@tinyerp.com-20081212045422-p3mo4x2hl8q7nj4t
This commit is contained in:
Fabien Pinckaers
2008-12-12 05:54:22 +01:00
5 changed files with 15 additions and 14 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
#!/usr/pkg/bin/python
#!/usr/bin/python
from common import *
from code39 import *
from code93 import *
@@ -52,4 +52,4 @@ def run():
if __name__=='__main__':
run()
+3 -3
View File
@@ -59,10 +59,10 @@ class res_partner_contact(osv.osv):
res = []
for r in self.read(cr, user, ids, ['name','first_name','title']):
addr = r['title'] and str(r['title'])+" " or ''
addr +=str(r['name'] or '')
addr += r.get('name', '')
if r['name'] and r['first_name']:
addr += ' '
addr += str(r['first_name'] or '')
addr += r.get('first_name', '')
res.append((r['id'], addr))
return res
res_partner_contact()
@@ -79,7 +79,7 @@ class res_partner_address(osv.osv):
res.append((r['id'], r['partner_id'][1]))
else:
addr = str('')
addr += str(r['street'] or '') + ' ' + str(r['zip'] or '') + ' ' + str(r['city'] or '')
addr += "%s %s %s" % ( r.get('street', ''), r.get('zip', ''), r.get('city', '') )
res.append((r['id'], addr.strip() or '/'))
return res
+6 -5
View File
@@ -131,22 +131,23 @@ class questionnaire(osv.osv):
query = """
select name, id
from crm_profiling_question
where id in ( select question from profile_questionnaire_quest_rel where questionnaire = %s)"""% data['form']['questionnaire_name']
cr.execute(query)
where id in ( select question from profile_questionnaire_quest_rel where questionnaire = %s)"""
res = cr.execute(query, data['form']['questionnaire_name'])
result = cr.fetchall()
quest_fields={}
quest_form='''<?xml version="1.0"?>
<form string="%s">''' % _('Questionnaire')
for x in cr.fetchall():
for x in result:
quest_form = quest_form + '''<field name="quest_form'''+str(x[1])+'''"/><newline/>'''
quest_fields['quest_form'+str(x[1])] = {'string': str(x[0]), 'type': 'many2one', 'relation': 'crm_profiling.answer', 'domain': [('question_id','=',x[1])] }
quest_form = quest_form + '''</form>'''
return quest_form,quest_fields
_columns={
_columns = {
'name': fields.char("Questionnaire",size=128, required=True),
'description':fields.text("Description", required=True),
'questions_ids': fields.many2many('crm_profiling.question','profile_questionnaire_quest_rel','questionnaire', 'question', "Questions"),
}
}
questionnaire()
+2 -2
View File
@@ -21,7 +21,7 @@
##############################################################################
import time
import netsvc
from osv import fields,osv,orm
from osv import fields,osv
from tools.translate import _
class delivery_carrier(osv.osv):
@@ -124,7 +124,7 @@ class delivery_grid(osv.osv):
ok = True
break
if not ok:
raise except_osv(_('No price avaible !'), _('No line matched this order in the choosed delivery grids !'))
raise osv.except_osv(_('No price available !'), _('No line matched this order in the choosed delivery grids !'))
return price
+2 -2
View File
@@ -13,7 +13,7 @@
<separator string="Warning on the sale order" colspan="4"/>
<field name="sale_warn"/>
<field name="sale_warn_msg" colspan="4" nolabel="1"/>
<separator string="Warning on the sale order" colspan="4"/>
<separator string="Warning on the purchase order" colspan="4"/>
<field name="purchase_warn"/>
<field name="purchase_warn_msg" colspan="4" nolabel="1"/>
<separator string="Warning on the picking" colspan="4"/>
@@ -38,7 +38,7 @@
<separator string="Warning when selling this product" colspan="4"/>
<field name="sale_line_warn"/>
<field name="sale_line_warn_msg" colspan="4" nolabel="1"/>
<separator string="Warning when puchasing this product" colspan="4"/>
<separator string="Warning when purchasing this product" colspan="4"/>
<field name="purchase_line_warn"/>
<field name="purchase_line_warn_msg" colspan="4" nolabel="1"/>
</page>