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

I am using openerp version 7 and need to hide below section from existing module. I tried with many ways but still unable to do that.please advice me to sort out this (line 933 in account module) is there any restrictions in core modules or something missing to me ?

<group string="Refunds" attrs="{'invisible':[('active','=',True)]}">
<field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="account_analytic_paid_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id), ('parent_id', '&lt;&gt;', False)]" groups="analytic.group_analytic_accounting"/>

<field name="ref_base_code_id"/>
<field name="ref_base_sign"/>
<field name="ref_tax_code_id"/>
<field name="ref_tax_sign"/>
</group>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Your attrs syntax is right except value given in domain. You are giving 'true' which will be treated as a string not boolean.

Try this:

<group string="Refunds" attrs="{'invisible':[('active','!=',True)]}">

อวตาร
ละทิ้ง
ผู้เขียน

thanks arya.but its not worked for me i seperately add invisible ="1" for some fields.those are also not worked.after changes done, need to restart server & upgrade modules is enough ?

Yes you have to update the module. It's working for me.

ผู้เขียน

only upgrade account & finance module .?

If you are directly changing code in account module then you have to update account module only.

ผู้เขียน

i changed acount_view.xml line 1042 only.after upgrade also no result & its same (& see the result from Accounting->Configuration->Taxes->Taxes)

hope my editing lines & result page is equal

It will work when value of active field will change.

Make sure that changes you have made is really a view of tax or not? Because on account_view.xml: 1042 belongs to account.move.line form view. In your question you mentioned that you want to change line: 933.

Sudhir is right. I just tried that code directly from Setting --> User Interface --< Views and edit the account.tax.form view with the new attrs, given by him and its working fine.

คำตอบที่ดีที่สุด

attrs does'nt work on group , it work for invisible only ..... not for readonly and other

อวตาร
ละทิ้ง

You are right but question is about how to hide group not about readonly.

Agree with Sudhir. Sandeep your answer should be relevant to the question.

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ค. 22
22929
2
มิ.ย. 21
18432
0
ก.ย. 20
3665
0
พ.ค. 16
4051
1
ส.ค. 15
9508