Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Why Browse method returns False ? [Closed]

By
Odoo
on 4/7/15, 6:26 AM 274 views

The Question has been closed for reason: not a real question

by
Odoo
on 04/07/2015 07:10:34

Here 'check_num' variable returns False ,Actually I added check_num as character in res.partner form(CHK8789) ,but it returns False value 


va= self.pool.get('res.partner').browse(cr,uid,ids)

print "start*********************************value",va

print "start*********************************value",va   

value=va.check_num    %%%%%%                               This  value variable returns False  (eg.CHK8789)

print "start*********************************value",value

print "end*********************************value"

i= cr.fetchall()

print "i^^^^^^^^^^^^^^^^^^^^^",i

sub_lines = []

if i:

for x in i:

debit=0.0

credit = 0.0

if x[4] == 'cr':

print "x[4]^^^^^^^^^^^^^^^^^^^^^^",x[4]

credit = float(x[5])

else :

debit = float(x[5])

#dt = datetime.datetime.strptime(str(x[2]), '%Y-%M-%d').strftime('%d-%M-%y')

sub_lines.append({'number':str(x[0]),'name':str(x[3]),'debit':debit,'credit':credit,'state':str(x[1]),'dat':str(x[2]),'val':value} )

print "sub_lines%%%%%%%%%%%%%%%%%%%%%%%%",sub_lines

return {'value': {'voucher_id': sub_lines}}




class res_partner(osv.osv):
    
    _inherit='res.partner'

    _columns={
              'check_num':fields.char('Cheque No')        #CHK8789
             
             }
    
res_partner()

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/7/15, 6:26 AM
Seen: 274 times
Last updated: 4/7/15, 7:10 AM