Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4386 Lượt xem

Im trying to create a store procedure at module install by

__openerp_.py:

 ...

   'data': [

"data/activity_period_team_sp.sql",

...

and on data/activity_period_team_sp.sql file:

create or replace function select_activity_by_period_team(from_date date, to_date date,team_id int)

RETURNS TABLE(

id int,

name varchar,

full_date date,

semana float8,

fecha text,

descripcion text,

iniciativas bigint,

oportunidades bigint,

llamadas bigint,

cotizaciones bigint,

montos numeric

)

LANGUAGE sql AS

$$

SELECT u.id,

p.name,

dats.date as full_date,

...

So the log error says:

 File "/home/carlos/odoo8/source/odoo/openerp/sql_db.py", line 234, in execute

res = self._obj.execute(query, params)

ProgrammingError: unterminated dollar-quoted string at or near "$$ ...

If i run my sql statement on psql it works but if i try to doit by odoo dont

Some one has succeed on this?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 4 23
11436
0
thg 6 16
4491
1
thg 3 15
4301
3
thg 7 25
1997
3
thg 5 25
3483