Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How can we open the form view when click on kanban view ?

Subscribe

Get notified when there's activity on this post

This question has been flagged
odoo-10-Enteprise
2 Replies
18328 Views
Avatar
Swapnali Kadam

I have taken state(selection field) in project and displaying those states in kanban view. Now I have override the read_group() method to display all states so that I can drag & drop record from one state to other state.

But when I click on that kanban view, form view is not opening .

help me out.Thanks in advance

Following is the kanban view. (odoo-10 Enterprise version)

<record id="project_kanban_view2" model="ir.ui.view">
            <field name="name">project.kanban.view</field>
            <field name="model">project.project</field>
            <field name="arch" type="xml">
                <kanban default_group_by="state" class="o_kanban_small_column">
                    <field name="state" options='{"group_by_tooltip": {"requirements": "Description", "legend_priority": "Use of stars"}}'/>
                    <field name="name"/>
                    <field name="user_id"/>
                    <field name="color"/>
                    <field name="task_count"/>
                    <field name="task_needaction_count"/>
                    <field name="label_tasks"/>
                    <field name="task_ids"/>
                    <field name="alias_id"/>
                    <field name="alias_name"/>
                    <field name="alias_domain"/>
                    <field name="doc_count"/>
                    <field name="is_favorite"/>
                    <templates>
                        <field name="date_start"/>
                        <t t-name="kanban-box">
                            <div t-attf-class="#{kanban_color(record.color.raw_value)} oe_kanban_global_click_edit"> <!--oe_kanban_global_click-->
                                <div class="o_dropdown_kanban dropdown">
   
                                    <a class="dropdown-toggle btn" data-toggle="dropdown" href="#" >
                                        <span class="fa fa-bars fa-lg"/>
                                    </a>
                                     <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                        <t t-if="widget.editable"><li><a type="edit">Edit</a></li></t>
                                        <t t-if="widget.deletable"><li><a type="delete">Delete</a></li></t>
                                        <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
                                    </ul>
                                </div>
                                <div class="oe_kanban_content">
                                    <div>
                                    <strong><field name="name"/></strong>
                                    </div>
                                    <div>
                                        <field name="user_id"/>
                                       
                                    </div>
                                    <div class="o_kanban_footer">
                                         
                                    </div>
                                </div>
                                <div class="oe_clear"></div>
                            </div>
                        </t>
                    </templates>
                </kanban>
            </field>
        </record>

0
Avatar
Discard
Swapnali Kadam
Author

Thanks for the reply. There is code for project.project i.e. written for the Project Dashboard(kanban view). In Project dashboard kanban view, class="o_project_kanban_boxes" is written for div and anchor a is written for Task action, when clicked on Project Dashboard (In div) then it opens Task view.

In my case when I clicked on my project kanban view , process will go in if condition (js )but there is code which for [division class anchor] (Task)..so that my project form view is not opening.

But when I comment code -this.$('.o_project_kanban_boxes a').first().click(); and write else part code - this._super.apply(this, arguments); Then my form view will open properly.

But this wont work for the Dashboard click.

 

if (this.model === 'project.project') {

this.$('.o_project_kanban_boxes a').first().click();

} else {

this._super.apply(this, arguments);

}

Avatar
Denis Baranov
Best Answer

By default Odoo kanban cards click open related objects form views.

However, for projects, it is re-written on js level. Have a look at project/static/src/js/project.js You have re-defined kanban view and currently this part leads to incorrect result

this.$('.o_project_kanban_boxes a').first()

What you should do:

* redefine project.js in your module

* in the function 'on_card_clicked' do nothing: a click then would lead to a project form view

1
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Can we do Odoo-10 Enterprise and Office 365 outlook Integaration for email, calendar, etc sync ?
odoo-10-Enteprise
Avatar
Avatar
1
May 17
4903
Single company with multiple (2) branches, 3 Profit & Loss is generated Solved
odoo-10-Enteprise
Avatar
Avatar
3
Mar 17
6237
Display a field in tree view depending on value of another field in the model Solved
odoo10.0 odoo-10-Enteprise
Avatar
Avatar
Avatar
2
Apr 22
7186
How does Project created on sale confirmation in odoo-10 enterprise??
odoo10 odoo-10-Enteprise
Avatar
Avatar
1
Mar 17
2570
Odoo ORM Create Method Doesn't Save created Records in Treeview?
orm onchange odoo-10-Enteprise
Avatar
0
Aug 17
5700
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now