コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1844 ビュー

Dear community,


Is it possible add field in view standard but i only want to see in a new menu item? Not in the standard view.


Kind regards.

アバター
破棄
著作者

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="aurb_xx_action_orders" model="ir.actions.act_window">
<field name="name">Auren Sales Orders</field>
<field name="res_model">sale.order</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="sale.sale_order_view_search_inherit_sale" />
<field name="context">{}</field>
<field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>
</record>
<record id="aurb_xx_view_order_form" model="ir.ui.view">
<field name="name">sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']"
position="after">
<field name="xx_tpv" string="TPV" />
</xpath>
</field>
</record>
</data>
</odoo>

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem id="mn_xx_main" name="aStore" web_icon="xx,static/description/icon.png">
<menuitem id="mn_xx_sale" name="Sale" sequence="10">
<menuitem id="mn_xx_sale_order_action" name="Pedido" sequence="11" action="aurb_xx_action_orders" />
<menuitem id="mn_xx_sale_delivery_action" name="Albaran" sequence="12"
action="stock.action_picking_tree_outgoing" />
<menuitem id="mn_xx_sale_invoice_action" name="Factura" sequence="13"
action="account.action_move_out_invoice_type" />
</menuitem>
<menuitem id="mn_xx_configuration" name="Configuration" sequence="90">

<menuitem id="mn_xx_conf_xx_action" name="aStore" sequence="91" action="act_aurb_xx_tpvs" />
</menuitem>
</menuitem>
</odoo>

著作者 最善の回答

Dear community

I have managed to do it through the context and the default values
    @api.model
    def default_get(self, fields_list):

Kind regards

アバター
破棄
関連投稿 返信 ビュー 活動
0
2月 24
2542
3
5月 24
3263
0
1月 24
1830
1
9月 24
1692
5
10月 24
16568