Odoo Help


How to setup many2many field in report.pos.order

on 7/5/13, 11:42 AM 1,626 views

Hi, I'm trying to put a searchable field in POS Order Analysis to filter by TAX. So far I created 'tax_id' field of type many2many

class pos_order_report(osv.osv):
_name = "report.pos.order"
_description = "Point of Sale Orders Statistics"
_auto = False
_columns = {
   'tax_id': fields.many2many('account.tax','product_taxes_rel','prod_id','tax_id','Product Tax',readonly=True ),

and added it in the View:

        <record id="view_report_pos_order_tree" model="ir.ui.view">
        <field name="name">report.pos.order.tree</field>
        <field name="model">report.pos.order</field>
        <field name="arch" type="xml">
            <tree string="Point of Sale Analysis" create="false">
                <field name="tax_id" invisible="1"/>

        <record id="view_report_pos_order_search" model="ir.ui.view">
        <field name="name">report.pos.order.search</field>
        <field name="model">report.pos.order</field>
        <field name="arch" type="xml">
            <search string="Point of Sale Analysis">
                <field name="tax_id"/>

It let me search by Product Tax but it shows wrong results. What is the right approach for this? I'll appreciate any help. Thanks

Did you get this resolved? How to add fields under init for example, if one need to add cost price & tax amount field - how these needs to be initialized?

on 2/23/14, 2:38 AM

About This Community

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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 7/5/13, 11:42 AM
Seen: 1626 times
Last updated: 3/16/15, 8:10 AM