고객 송장에 'Confirm'버튼이 생성되었습니다. '확인'버튼을 클릭하면 '상태 1'이 '확인'됩니다. 'state1'= 'draft'일 때 Validate 버튼을 숨기고 'state1'= 'confirmed'일 때 Validate 버튼을 보여주고 싶습니다. 코드 아래에서 시도했지만 작동하지 않습니다. 누구든지 나를 도울 수 있습니까?고객 송장 유효성 검사 버튼
<!-- inherit account invoice form -->
<record id="invoice_form_inheritai" model="ir.ui.view">
<field name="name">account.invoice.form.inheritai</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="invoice_print" position="after">
<field name="state1" invisible="1"/>
<button name="invoice_check" string="Confirm" type="object" attrs="{'invisible': [('state1','not in', ['draft'])]}" class="oe_highlight" groups="base.group_user"/>
</button>
<button name="invoice_open" position="replace">
<button name="invoice_open" state="draft" string="Validate" attrs="{'invisible': [('state1','!=', ['confirmed'])]}" groups="base.group_user"/>
</button>
</field>
</record>
내가 말한대로 시도했지만 ... 여전히 유효성 검사 버튼을 표시하고 있습니다. 확인 버튼을 클릭하기 전까지 숨기고 싶습니다. '확인'버튼을 누르면 '상태 1'필드가 '확인 됨'으로 변경됩니다. – sajadkk
oh den put states = "확인 됨". 내 대답도 편집했습니다. – Dharmraj
잘 확인 단추가 숨겨져 있지만 '확인'단추를 클릭하면 표시되지 않습니다. 내가 워크 플로우를 바꿔야한다고 생각해. – sajadkk