Odoo Help

2

0
4 Answers
2
Avatar

Pawan India

--Pawan--

1617
| 4 4 8
Hyderabad, India
--Pawan--


Pawan India
12/12/18, 12:47 AM

Hi Shayar,

Inspite of COMMA ',' try using '%'

pick.jobsheet_no=%s"""%(jobsheet_no.id)

1
Avatar

Thayif kabir India

--Thayif kabir--

9185
| 6 3 9
Calicut, India
--Thayif kabir--


Thayif kabir India
12/12/18, 12:49 AM

hello shayar,

try jobsheet_no.ids  instead of jobsheet_no.id

self.env.cr.execute("""SELECT move.name as product,move.product_uom_qty as quantity,pick.name as                 delivered from stock_move move,stock_picking pick where move.picking_id = pick.id and                 move.state = 'done' and move.location_id!=9 and pick.jobsheet_no=%s""",(jobsheet_no.ids))

0
Sehrish Pakistan
12/12/18, 1:11 AM

Use this one

self.env.cr.execute("""SELECT move.name as product,move.product_uom_qty as quantity,pick.name as                 
delivered    from stock_move move,stock_picking pick where move.picking_id = pick.id
and                 move.state = 'done'
and move.location_id!=9
and pick.jobsheet_no="""+str(jobsheet_no.id)+"""""")


0
Avatar

subbarao India

--subbarao--

1413
| 5 3 8
Chennai, India
--subbarao--


subbarao India
12/12/18, 2:14 AM

in sql query you are using %s parameter

so you have to pass arguments using %s only

but here end of the query you are passing , operator instead of %s


 

Ask a Question
Writer
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

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

Test it now