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

Issues adding a field to POS Order report

By
Branimir
on 7/3/13, 2:48 PM 1,446 views

Hi, I am trying to put 'Product Category' to the POS Order Analysis. Still very new to OpenERP. So far I did:

In 'pos_order_report.py' add

'categ_id': fields.many2one('product.category','Category of Product', readonly=True),

to the pos_order_report class, and then

pt.categ_id as categ_id,
...
group by
...
pt.categ_id

in the SQL

In 'pos_order_report_view.xml' add

<field name="categ_id" invisible="1"/>

in the view_report_pos_order_tree and

 <field name="categ_id"/>

in view_report_pos_order_search

The Error it shows when I try to filter by "Category of Product" is:

ProgrammingError: Column report_pos_order.categ_id does not exist

LINE 1: ...HERE (("report_pos_order"."year" = '2013') AND ("report_po...

What am I doing wrong?

0
Branimir
On 7/5/13, 5:39 AM

Ok, the problem was I had to update the database

openerp-server.exe -d my_database_name -u point_of_sell

Problem solved!

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

0 follower(s)

Stats

Asked: 7/3/13, 2:48 PM
Seen: 1446 times
Last updated: 3/16/15, 8:10 AM