Odoo Aide

0

0
1 Answer
3
fasluca
27/06/2017 23:55

Try this,
This is not using the domain. But will satisfy your need

<record id="so_cancel_restrict" model="ir.ui.view">
        <field name="name">sale.order.cancel.restrict</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_order_form"/>
        <field name="arch" type="xml">
            <xpath expr="//button[@name='action_cancel']" position="replace">
<button name="action_cancel" states="draft,sent" type="object" string="Cancel" groups="sales_team.group_sale_salesman_all_leads"/>
<button name="action_cancel" states="sale" type="object" string="Cancel" groups="sales_team.group_sale_manager"/>
            </xpath>
        </field>
    </record>


1 Commentaires
Jan
28/06/2017 18:29

works like a charme, thanks a lot fasluca!

Poser une question
Writer
Étiquettes
Keep Informed
1 Abonné(e)s
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now