Odoo Help


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.


How to setup many2many field in report.pos.order

on 7/5/13, 11:42 AM 994 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

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)


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