reverted_back_bad_commit
bzr revid: fp@tinyerp.com-20090512140127-ur98ms2xmoebu6nn
This commit is contained in:
parent
a39fd68136
commit
7abc76bccb
|
@ -118,6 +118,15 @@ def _partner_title_get(self, cr, uid, context={}):
|
||||||
res = obj.read(cr, uid, ids, ['shortcut','name'], context)
|
res = obj.read(cr, uid, ids, ['shortcut','name'], context)
|
||||||
return [(r['shortcut'], r['name']) for r in res]
|
return [(r['shortcut'], r['name']) for r in res]
|
||||||
|
|
||||||
|
def _lang_get(self, cr, uid, context={}):
|
||||||
|
obj = self.pool.get('res.lang')
|
||||||
|
ids = obj.search(cr, uid, [], context=context)
|
||||||
|
res = obj.read(cr, uid, ids, ['code', 'name'], context)
|
||||||
|
return [(r['code'], r['name']) for r in res] + [('','')]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class res_partner(osv.osv):
|
class res_partner(osv.osv):
|
||||||
_description='Partner'
|
_description='Partner'
|
||||||
_name = "res.partner"
|
_name = "res.partner"
|
||||||
|
@ -129,7 +138,7 @@ class res_partner(osv.osv):
|
||||||
'parent_id': fields.many2one('res.partner','Main Company', select=2),
|
'parent_id': fields.many2one('res.partner','Main Company', select=2),
|
||||||
'child_ids': fields.one2many('res.partner', 'parent_id', 'Partner Ref.'),
|
'child_ids': fields.one2many('res.partner', 'parent_id', 'Partner Ref.'),
|
||||||
'ref': fields.char('Code', size=64),
|
'ref': fields.char('Code', size=64),
|
||||||
'lang': fields.many2one('res.lang', 'Language', help="If the selected language is loaded in the system, all documents related to this partner will be printed in this language. If not, it will be english."),
|
'lang': fields.selection(_lang_get, 'Language', size=5, help="If the selected language is loaded in the system, all documents related to this partner will be printed in this language. If not, it will be english."),
|
||||||
'user_id': fields.many2one('res.users', 'Dedicated Salesman', help='The internal user that is in charge of communicating with this partner if any.'),
|
'user_id': fields.many2one('res.users', 'Dedicated Salesman', help='The internal user that is in charge of communicating with this partner if any.'),
|
||||||
'vat': fields.char('VAT',size=32 ,help="Value Added Tax number. Check the box if the partner is subjected to the VAT. Used by the VAT legal statement."),
|
'vat': fields.char('VAT',size=32 ,help="Value Added Tax number. Check the box if the partner is subjected to the VAT. Used by the VAT legal statement."),
|
||||||
'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'),
|
'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'),
|
||||||
|
|
|
@ -229,7 +229,7 @@
|
||||||
<field name="ref" select="1"/>
|
<field name="ref" select="1"/>
|
||||||
<field name="customer" select="1"/>
|
<field name="customer" select="1"/>
|
||||||
<field domain="[('domain', '=', 'partner')]" name="title"/>
|
<field domain="[('domain', '=', 'partner')]" name="title"/>
|
||||||
<field name="lang" select="2" widget="selection"/>
|
<field name="lang" select="2"/>
|
||||||
<field name="supplier" select="2"/>
|
<field name="supplier" select="2"/>
|
||||||
</group>
|
</group>
|
||||||
<notebook colspan="4">
|
<notebook colspan="4">
|
||||||
|
|
Loading…
Reference in New Issue