Odoo Help

Welcome!

This community 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.

2

Make a New view rather than odoo form,tree,kanban views in odoo9 and I need to use it in xml instead of form or tree.

By
Hilar AK
on 11/15/16, 12:47 AM 553 views

Hi guys,

I need to make a new view like form or tree , what should I need to do ?

do I need to add those template in any other registries for my new view?


I made a view by inheriting kanbanView

Hilar AK
on 11/16/16, 2:11 AM

Hi,

can you give more detail about that ? I'm trying something similar

Célia Couiller
on 12/7/16, 4:33 AM

Hi celia,

I like to create a new view type like form or tree, and need to use in xml views like we making form or tree in xml.

If i create a new view xxx then need to define fields inside the view <xxx><fileds or something like that /></xxx>

Hilar AK
on 12/7/16, 10:24 PM

In Odoo10/Odoo/addons/bas/ir/ir_ui_view.py I find this

class View(models.Model):

_name = 'ir.ui.view'

[...]

type = fields.Selection([('tree', 'Tree'),

('form', 'Form'),

('graph', 'Graph'),

('pivot', 'Pivot'),

('calendar', 'Calendar'),

('diagram', 'Diagram'),

('gantt', 'Gantt'),

('kanban', 'Kanban'),

('search', 'Search'),

('qweb', 'QWeb')], string='View Type')

arch = fields.Text(compute='_compute_arch', inverse='_inverse_arch', string='View Architecture', nodrop=True)

So If I understand well, kanban is just a type attribute and we can't inherit from it ?

Sorry I'm still beginning with Odoo.

It may be easier to add modification with js in the existent kanban view don't you think ?

Célia Couiller
on 12/8/16, 3:54 AM

yes , you are right and I already did a new view by extending the kanban view, Like dashboards in sale, accounting etc.. , Now I need to add a new view not by extending or include the form or kanban. I think I almost did the views needs in js and xml, but as you said need to add that new type in python also in that 'type' selection list

Any way Thanks :)

Hilar AK
on 12/8/16, 8:44 AM
1
Nguyen Xuan Binh
On 11/15/16, 2:38 AM

Hi,

That is a chance to understand how do Odoo create a view type.

You should start by take a look at model "ir.ui.view" and check the type field.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/15/16, 12:47 AM
Seen: 553 times
Last updated: 12/7/16, 3:19 AM