123456789101112131415161718 |
- # -*- coding: utf-8 -*-
- from openerp.http import request as r
- _MODEL = 'product.pack.line'
- def get_product_packs():
- return [
- {
- 'id': p.id,
- 'name': p.display_name,
- 'parentProduct': p.parent_product_id.id or None,
- 'productId': p.product_id.id or None,
- 'price': p.price,
- 'quantity': p.quantity,
- 'subtotal': p.subtotal,
- 'discount': p.discount
- } for p in r.env[_MODEL].search([])
- ]
|