Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

How to sort projects in Kanban view by name?

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
projectkanbansortingodoo8.0
1 Atsakyti
8479 Rodiniai
Portretas
Yenthe Van Ginneken (Mainframe Monkey)

Hi guys,

What is the correct way to order the Kanban from projects?
The first thing I did was to add a default_order in the arch (project_view.xml) but this didn't change anything:

<record model="ir.ui.view" id="view_project_kanban">
            <field name="name">project.project.kanban</field>
            <field name="model">project.project</field>
            <field name="arch" type="xml">
                <kanban class="oe_background_grey">
                   <kanban default_order="name" />
                  //irrelevant code

               </kanban>
            </field>

Then I went into project.py and found the method _get_type_common which orders the projects in kanban view. By default its like this:

def _get_type_common(self, cr, uid, context):
        ids = self.pool.get('project.task.type').search(cr, uid, [('case_default','=',1)], context=context)
        return ids
    _order = "sequence, id"
    //irrelevant code

So I thought I'd change the _order="sequence,id" to _order="name" but the field 'name' is not in the model project.project..So I thought I'd change it to this:

_order = "type_ids.name"

But then I get the following error:

AccessError

Invalid "order" specified. A valid "order" specification is a comma-separated list of valid field names (optionally followed by asc/desc for the direction) 

So, what is the correct way to order on the name of the project in the Kanban view then?

 

Update: New code now looks like this:

class project(osv.osv):
    _name = "project.project"
    _description = "Project"
    _inherits = {'account.analytic.account': "analytic_account_id",
                 "mail.alias": "alias_id"}
    _inherit = ['mail.thread', 'ir.needaction_mixin','project.project']
    _order = 'name asc'
    name = fields.char('Account/Contract Name', required=True, track_visibility='onchange')

With kind regards,

Yenthe

0
Portretas
Atmesti
Portretas
Zbik
Best Answer

Try this:

class project(models.Model):
    _name = "project.project"
    _inherit = ['project.project']
    _order = "name asc"

    name = fields.Char('Account/Contract Name', required=True, track_visibility='onchange')

 UPDATED:

### name = fields.Char('Account/Contract Name', required=True, track_visibility='onchange')

1
Portretas
Atmesti
Yenthe Van Ginneken (Mainframe Monkey)
Autorius

Thanks for the answer zbik! I've tried this but it gives me KeyError: 'project.project'. I've updated my question with the new code.

Zbik

depends?

Zbik

PS. you inherit only _inherit = ['project.project']

Yenthe Van Ginneken (Mainframe Monkey)
Autorius

Zbik I believe your example code is for in a custom module? I would like to simply replace/modify the code in the current project module. In the current module I'd need the 'mail.thread', 'ir.needaction_mixin', too.

Zbik

You inherit project.project -> project.project inherit mail.thread and ir.needaction_mixin = you inherit all

Yenthe Van Ginneken (Mainframe Monkey)
Autorius

Sorry for the late reply Zbik! So I've created a new module and installed this. Everything works fine until I try to open up any of the projects. I then get a programmingError saying the column doesn't exist. As you can see here: http://i.imgur.com/YSCwmJh.png why is my Odoo throwing this up? The field does exist..

Yenthe Van Ginneken (Mainframe Monkey)
Autorius

You can find the module here in case you want to test it / see whats wrong: https://github.com/Yenthe666/order_projects_by_name

Zbik

In my test system, I have oher error when create new project and when name = fields.Char() is defined (??? hmmm ???). When I comment this line and update module all works ok.

Yenthe Van Ginneken (Mainframe Monkey)
Autorius

I already removed the name field Zbik, as you can see here: https://github.com/Yenthe666/order_projects_by_name/blob/master/order_projects_by_name/models.py but even then I get errors. It only happens when you open up project tasks by clicking on a project, not when showing the project overview etc.

Zbik

Strange, I do not have such a issue. Try to remove and re-install the module.

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

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

Registracija
Related Posts Replies Rodiniai Veikla
Kanban and calendar views disappeared from Project.task
project kanban
Portretas
0
kov. 22
3656
Project Kanban Columns Solved
project kanban
Portretas
Portretas
1
gruod. 19
5622
Kanban - change action in project
project kanban
Portretas
Portretas
Portretas
3
gruod. 17
7542
how to open new form (poupup) to create new project from kanban view in odoo9
project kanban
Portretas
0
rugs. 17
4296
On Premise: Project Task kanban auto update doesn't work
project kanban tasks
Portretas
0
rugs. 25
788
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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