Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5539 มุมมอง

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?

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.พ. 24
1312
0
ก.พ. 19
3721
2
ก.พ. 24
2391
1
พ.ค. 23
2588
2
มิ.ย. 21
3244