콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
11272 화면

Hi, 

How to create the action of the buttons Odoo Community Version 12 ???


View.xml :

<div class="oe_button_box" name="button_box">
<button string="Effectif restant" class="oe_stat_button oe_read_only" icon="fa-heartbeat" type="action"/>
<button string="Mortalité" class="oe_stat_button oe_read_only" icon="fa-drupal" context="{'cycle_id': active_id}" type="action"/>
<button string="Programmes normes" class="oe_stat_button oe_read_only" icon="fa-th" type="action"/>
<button string="Statistique normes" class="oe_stat_button oe_read_only" icon="fa-pie-chart" type="action"/>
<button string="Programmes production" class="oe_stat_button oe_read_only" icon="fa-thermometer-full" type="action"/>
<button string="Aliment" class="oe_stat_button oe_read_only" icon="fa-paw" context="{'cycle_id': active_id}" type="action"/>
<button string="Ouvrier" class="oe_stat_button oe_read_only" icon="fa-user-plus" type="action"/>
<button string="Enlèvement" class="oe_stat_button oe_read_only" icon="fa-money" type="action"/>
<button string="Ventes œufs" class="oe_stat_button oe_read_only" icon="fa-usd" type="action"/>
<button string="Dépense" class="oe_stat_button oe_read_only" icon="fa-calculator" type="action"/>
</div>
아바타
취소
작성자 베스트 답변

views.xml

<button string="Mortalité" class="oe_stat_button oe_read_only" icon="fa-drupal" name="%(act_mortalite_open_quants)d" type="action"/>


<!-- Action Mortalité -->
<record model="ir.actions.act_window" id="act_mortalite_open_quants">
<field name="name">Mortalité</field>
<field name="context">{'default_cycle_id': active_id}</field>
<field name="domain">[('cycle_id', '=', active_id)]</field>
<field name="res_model">production.mortalite</field>
</record>
아바타
취소
관련 게시물 답글 화면 활동
1
3월 19
3339
4
3월 19
9879
3
4월 17
2465
0
4월 17
5032
3
5월 25
1422