Odoo Help

Welcome!

This community 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.

0

Adding Table field in POS Reports

By
Some name
on 6/12/16, 9:08 AM 282 views

I'd like to add an entry for the table name at which an order was served in the 'Orders Analysis' table report.  This will be in addition to the existing categories available, like product name, point of sale, company name, etc.

Can someone give me a clue as to how to go about doing this?

What I've found so far: pos_order.table_id has the table info; I just need this data in the view.

addons/point_of_sale/report/pos_order_report.py has the necessary code, but I can't figure out how to make the changes I need.  I'm getting some programmingerror errors when I try something.  Any clues will be appreciated.

Please send your code and error .

kirubanidhi
on 6/13/16, 12:58 AM

Changes I've made to try this out:

http://pastebin.com/0nbkxfCy

Errors I'm getting:

http://pastebin.com/Smtn82ej

2nd error:

http://pastebin.com/123KHPih

The 2nd error pops up when I press 'OK' on the 1st one.

Note that I only want the view to change, not the databases. I think what my changes are doing are trying to modify the db itself? That's not the effect I want. My python and postgresql skills are pretty basic, so I can't say what I'm doing wrong.

Some name
on 6/13/16, 2:02 AM
0
Javier Ruiz
On 9/16/16, 12:34 AM

Hello

You have to inherit the 'report.pos.order' model and overwrite its 'init' method

This should work

http://pastebin.com/6eRbjDxP

Best Regards


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/12/16, 9:08 AM
Seen: 282 times
Last updated: 9/16/16, 12:34 AM