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

how can I write a def _getdaysbetween fot timedelta between 2 date in a module? [Closed]

By
nasim
on 1/21/16, 1:04 AM 101 views

The Question has been closed

by
Yenthe
on 01/21/2016 01:38:43

hi

how can I write a def _getdaysbetween fot timedelta between 2 date in a module?

my .py code (for a webkit report) is:


def _getdaysbetween(self, date_start, write_date):

sql = "SELECT write_date - date_start from purchase_requisition as pr

where pr.date_start = \'%s\' AND pr.write_date = \'%s\' " %(date_start, write_date)

self.cr.execute(sql)

return self.cr.fetchall()


but when I want to create a report from purchase requisition, this error show:


SyntaxError: EOL while scanning string literal


I don't know what is problem?


Thanks for your help

Duplicaten question. I've released the other one to be public.

Yenthe
on 1/21/16, 1:39 AM

About This Community

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

Question tools

1 follower(s)

Stats

Asked: 1/21/16, 1:04 AM
Seen: 101 times
Last updated: 1/21/16, 1:38 AM