Odoo Help

0

Button with classes doesn't work ??

By
Jose M. González
on 12/21/15, 6:51 AM 1,135 views

Hi,

I have a inherit view with a new button (and class) but it's doesn't work...

i don't know for why, anyone know why?

This is the view code, I'm doing something wrong ?, there any alternative?.

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="ocl_hr_expense">
<field name="name">hr.expense.line.tree</field>
<field name="model">hr.expense.expense</field>
<field name="inherit_id" ref="hr_expense.view_expenses_form" />
<field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page[@string='Description']/field[@name='line_ids']/tree[@string='Expense Lines']/field[@name='total_amount']"
position="after">
<!-- <div class="oe_edit_only oe_button oe_form_button oe_link"> </div>-->
<button name="open_tickets_form" icon="gtk-add" type="object" class="oe_edit_only oe_button oe_form_button oe_link" />
<button name="view_tickets_kanban" icon="terp-folder-orange" type="object" context="{'line_id': active_id}" />
</xpath>
</field>
</record>
</data>
</openerp>


Thanks.

1

Here you have tried to add button to a One2many field, and the css class, that you are trying to apply does not apply in One2many field. The css class applies on the buttons which are placed on the form view along with other fields but not inside One2many field.

Thanks !!!

Jose M. González
on 12/22/15, 2:52 AM

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

Question tools

1 follower(s)

Stats

Asked: 12/21/15, 6:51 AM
Seen: 1135 times
Last updated: 5/11/16, 6:40 AM