Odoo Help

1
2 Answers
1
Muniswaran
12/6/18, 8:41 AM

Hi Mike

in that last you should pass value as %(self.jobsheet) below i corrected

self._cr.execute("""


CREATE OR REPLACE VIEW jobsheet_overview AS (

SELECT

row_number() over (ORDER BY move.name) AS id,

move.name as product,

move.product_uom_qty as quantity,

pick.id as picking_id

from stock_move move,stock_picking pick where move.picking_id = pick.id and pick.jobsheet_no=%s)""" %(self.jobsheet))

1
Sehrish
12/6/18, 11:30 PM

Try this one

self._cr.execute("""
CREATE OR REPLACE VIEW jobsheet_overview AS (
SELECT
row_number() over (ORDER BY move.name) AS id,
move.name as product,
move.product_uom_qty as quantity,
pick.id as picking_id
from stock_move move,stock_picking pick where move.picking_id = pick.id and pick.jobsheet_no="""+str(self.jobsheet)+""")
"""


Ask a Question
Writer
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