Odoo Help


TypeError: write() takes at most 6 arguments (8 given) [Closed]

on 4/10/13, 4:52 PM 8,126 views

The Question has been closed

on 04/20/2013 03:19:24
  File "/home/priyan/Software/openerp-7.0-20130309-002120/openerp/addons/bpl/bpl.py", line 100, in create
    no_define_object_browse.write(cr, uid, {'current_no': emp_no})
  File "/home/priyan/Software/openerp-7.0-20130309-002120/openerp/osv/orm.py", line 374, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
TypeError: write() takes at most 6 arguments (8 given)
2013-04-10 18:44:36,733 23633 ERROR demo openerp.netsvc: write() takes at most 6 arguments (8 given)

I tried to override the write function. in that i need to update another model's (bpl.company.define) column also.so i used the write() method.but its give above error & need to sort it. please advice me and explaint which parameters need to pass for the write() method (except cr,uid).

I upload my model class here. & view class here.

Line number 100 in bpl.py

now error is like this

ProgrammingError: operator does not exist: integer = boolean
LINE 1: ...=1,write_date=(now() at time zone 'UTC') where id IN (false)
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

Mohammad Alhashash

--Mohammad Alhashash--
| 5 5 8
Giza, Egypt
--Mohammad Alhashash--


Mohammad Alhashash
On 4/10/13, 4:59 PM

Line 100 is incorrect:

no_define_object_browse.write(cr, uid, {'current_no': emp_no})

When you call a method through a browse record, arguments cr, uid, id and context that were used to get the browse object are sent automatically by the proxy method.

Line should be changed to:

no_define_object_browse.write({'current_no': emp_no})

Dear Mohammad,now another error occur. Post edited.

on 4/11/13, 2:08 AM

!!!! You should create a new question for your new problem.

Mohammad Alhashash
on 4/11/13, 2:12 AM

Thanks it was helpful to me

Mohamed Essakali
on 4/25/13, 9:47 PM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/10/13, 4:52 PM
Seen: 8126 times
Last updated: 3/16/15, 8:10 AM