Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

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

Avatar
Buang

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?

Post Terkait Replies Tampilan Aktivitas
0
Feb 24
1242
0
Feb 19
3662
2
Feb 24
2328
1
Mei 23
2526
2
Jun 21
3183