inside py
@api.model
def run_sql(self, qry):
self._cr.execute(qry)
_res = self._cr.fetchall()
return _res
qweb<t t-set= "amount" t-value="o.id" ></t>
<t t-foreach="docs" t-as="o">
<t t-set="latest_partner" t-value="o.run_sql('SELECT DISTINCT purchase_request.Name as MaterialRequest,purchase_request.origin as Source Fromm purchase_request INNER JOIN purchase_request_line on purchase_request_line.request_id = purchase_request.id
INNER JOIN purchase_order_purchase_request_line_rel on purchase_order_purchase_request_line_rel.purchase_request_line_id = purchase_request_line.id
where
purchase_order_purchase_request_line_rel.purchase_order_id =%s' % amount)"/>
<span t-esc="latest_partner"/>
<span t-esc="part"/> </t> </t>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
2471
Views
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Jul 23
|
3237 | ||
|
1
Jun 23
|
2596 | ||
|
1
Apr 23
|
3187 | ||
|
1
Nov 22
|
2121 | ||
|
1
Oct 21
|
10826 |