Guest User

Odoo add table to pos view

a guest
Jun 13th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. diff -u addons/point_of_sale/report/pos_order_report.py.bk addons/point_of_sale/report/pos_order_report.py
  2. --- addons/point_of_sale/report/pos_order_report.py.bk 2016-06-13 11:10:47.496000000 +0530
  3. +++ addons/point_of_sale/report/pos_order_report.py 2016-06-12 17:58:42.005000000 +0530
  4. @@ -26,6 +26,7 @@
  5. 'nbr':fields.integer('# of Lines', readonly=True), # TDE FIXME master: rename into nbr_lines
  6. 'product_qty':fields.integer('Product Quantity', readonly=True),
  7. 'journal_id': fields.many2one('account.journal', 'Journal'),
  8. + 'table_id': fields.many2one('pos.order', 'Table', readonly=True),
  9. 'delay_validation': fields.integer('Delay Validation'),
  10. 'product_categ_id': fields.many2one('product.category', 'Product Category', readonly=True),
  11. 'invoiced': fields.boolean('Invoiced', readonly=True),
  12. @@ -73,6 +74,6 @@
  13. left join pos_config pc on (ps.config_id=pc.id)
  14. group by
  15. s.date_order, s.partner_id,s.state, pt.categ_id,
  16. - s.user_id,s.location_id,s.company_id,s.sale_journal,s.pricelist_id,s.invoice_id,l.product_id,s.create_date,pt.categ_id,pt.pos_categ_id,p.product_tmpl_id,ps.config_id,pc.stock_location_id
  17. + s.user_id,s.location_id,s.company_id,s.sale_journal,s.pricelist_id,s.invoice_id,s.table_id,l.product_id,s.create_date,pt.categ_id,pt.pos_categ_id,p.product_tmpl_id,ps.config_id,pc.stock_location_id
  18. having
  19. sum(l.qty * u.factor) != 0)""")
  20.  
  21. diff -u addons/point_of_sale/report/pos_order_report_view.xml.bk addons/point_of_sale/report/pos_order_report_view.xml
  22. --- addons/point_of_sale/report/pos_order_report_view.xml.bk 2016-06-12 16:14:12.239000000 +0530
  23. +++ addons/point_of_sale/report/pos_order_report_view.xml 2016-06-13 11:12:21.151000000 +0530
  24. @@ -10,6 +10,7 @@
  25. <field name="date" interval="month" type="col"/>
  26. <field name="product_qty" type="measure"/>
  27. <field name="price_total" type="measure"/>
  28. + <field name="table_id" type="row"/>
  29. </pivot>
  30. </field>
  31. </record>
  32. @@ -42,6 +43,7 @@
  33. <field name="user_id"/>
  34. <field name="product_id"/>
  35. <field name="product_categ_id"/>
  36. + <field name="table_id"/>
  37. <group expand="1" string="Group By">
  38. <filter string="Salesperson" name="User" context="{'group_by':'user_id'}"/>
  39. <filter string="Product Category" context="{'group_by':'product_categ_id'}"/>
Add Comment
Please, Sign In to add comment