Odoo Help


What does this error mean? TypeError: must be string, not bool

on 10/16/14, 2:27 AM 5,732 views

I'm changing the date of my data but when i'd tried to save this an error appeared. any help please.

File "/opt/openerp/server-7/openerp/addons/web/session.py", line 90, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server-7/openerp/netsvc.py", line 293, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server-7/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/opt/openerp/server-7/openerp/osv/osv.py", line 188, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp/server-7/openerp/osv/osv.py", line 131, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp/server-7/openerp/osv/osv.py", line 197, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp/server-7/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr return fct_src(cr, uid, model, method, *args, **kw) File "/opt/openerp/server-7/openerp/osv/osv.py", line 185, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp/server-7/openerp/addons/mrp_operations/mrp_operations.py", line 156, in write prod_obj.write(cr, uid, [prod.production_id.id], {'date_start':dstart}, context=context, mini=False) File "/opt/openerp/server-7/openerp/addons/mrp_operations/mrp_operations.py", line 358, in write self._compute_planned_workcenter(cr, uid, ids, context=context, mini=mini) File "/opt/openerp/server-7/openerp/addons/mrp_operations/mrp_operations.py", line 294, in _compute_planned_workcenter

dt_end = datetime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')

TypeError: must be string, not bool

Piyush Suva
On 10/16/14, 2:54 AM

May be date_planned_end coantain False Value 

So just check first value of date_planned_end using print statement.

If there is posibility of False value of date_planned_end

use this code:

dt_end = False

if wc.date_planned_end:

    dt_end = datetime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')

thanks Piyush

on 10/16/14, 3:17 AM
On 5/17/17, 3:49 AM

I have faced the same issue the above answer is working for me

dt_end = False

if wc.date_planned_end:

    dt_end = datetime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')

Gaurav Marsoniya
On 10/16/14, 2:53 AM

Hi Lee

You tried to change date_planned_end date formate but  i guess date_planned_end field is empty in your database so in this case openerp framework return @false boolean value plz debug ur code and find out way wc.date_planned return false value


thanks Gaurav

on 10/16/14, 3:18 AM

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

2 follower(s)


Asked: 10/16/14, 2:27 AM
Seen: 5732 times
Last updated: 5/17/17, 3:49 AM