Siirry sisältöön
Odoo Menu
  • Kirjaudu sisään
  • Kokeile ilmaiseksi
  • Sovellukset
    Talous
    • Kirjanpito
    • Laskutus
    • Kulut
    • Datataulukot (BI)
    • Asiakirjat
    • Allekirjoita
    Myynti
    • CRM
    • Myynti
    • Kassajärjestelmä myymälään
    • Kassajärjestelmä ravintolaan
    • Tilaukset
    • Vuokraus
    Verkkosivut
    • Verkkosivun Rakennustyökalu
    • Verkkokauppa
    • Blogi
    • Foorumi
    • Livechat
    • Verkko-oppiminen
    Toimitusketju
    • Varastointi
    • Tuotanto
    • Tuotteen elinkaaren hallinta (PLM)
    • Ostot
    • Huolto
    • Laatu
    Henkilöstöhallinto
    • Työntekijät
    • Rekrytointi
    • Vapaat
    • Arvioinnit
    • Suositukset
    • Kuljetuskalusto
    Markkinointi
    • Somemarkkinointi
    • Sähköpostimarkkinointi
    • Tekstiviestimarkkinointi
    • Tapahtumat
    • Markkinoinnin automaatio
    • Kyselyt
    Palvelut
    • Projekti
    • Työaikakirjaukset
    • Kenttähuolto
    • Asiakaspalvelu
    • Suunnittelu
    • Ajanvaraukset
    Tuottavuus
    • Viestintä
    • Hyväksynnät
    • IoT
    • IP-puhe
    • Tietokirjasto
    • WhatsApp
    Kolmannen osapuolen sovellukset Odoo-Studio Odoo-Pilvialusta
  • Toimialat
    Vähittäiskauppa
    • Kirjakauppa
    • Vaatekauppa
    • Huonekaluliike
    • Ruokakauppa
    • Laitteistokauppa
    • Lelukauppa
    Ruoka & Majoitus
    • Baari ja Pubi
    • Ravintola
    • Pikaruoka
    • Majatalo
    • Juomien jakelija
    • Hotelli
    Kiinteistöt
    • Kiinteistönvälitystoimisto
    • Arkkitehtitoimisto
    • Rakentaminen
    • Kiinteistönhallinta
    • Puutarhanhoito
    • Kiinteistön omistajien yhdistys
    Konsultointi
    • Tilitoimisto
    • Odoo-kumppani
    • Markkinointitoimisto
    • Lakitoimisto
    • Osaajahankinta
    • Tilintarkastus & sertifiointi
    Tuotanto
    • Tekstiili
    • Metalli
    • Huonekalut
    • Ruoka
    • Panimo
    • Yrityslahjat
    Terveys & Liikunta
    • Urheiluseura
    • Silmälasiliike
    • Kuntokeskus
    • Hyvinvointialan ammattilaiset
    • Apteekki
    • Kampaamo
    Kaupat
    • Yleismies
    • IT-laitteisto & Tuki
    • Aurinkoenergiajärjestelmät
    • Suutari
    • Siivouspalvelut
    • LVI-palvelut
    Muut
    • Voittoa tavoittelematon järjestö
    • Ympäristötoimisto
    • Mainostaulujen vuokraus  
    • Valokuvaus
    • Leasing-pyörät
    • Ohjelmistojen jälleenmyyjä
    Selaa kaikkia toimialoja
  • Yhteisö
    Opi
    • Kurssit
    • Dokumentaatio
    • Todistukset
    • Koulutus
    • Blogi
    • Podcast
    Kannusta kouluttautumaan
    • Koulutusohjelmat
    • Scale Up! Liiketoimintapeli
    • Vieraile Odoolla
    Hanki ohjelmisto
    • Lataa
    • Vertaile versioita
    • Julkaisut
    Tee yhteistyötä
    • Github
    • Foorumi
    • Tapahtumat
    • Käännökset
    • Ryhdy kumppaniksi
    • Kumppanipalvelut
    • Rekisteröi tilitoimistosi
    Hanki palveluja
    • Löydä kumppani
    • Löydä kirjanpitäjä
    • Varaa asiantuntijatapaaminen
    • Implementaatiopalvelut
    • Asiakasreferenssit
    • Tuki
    • Versionkorotukset
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Varaa demo
  • Hinnoittelu
  • Asiakaspalvelu

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

  • CRM
  • e-Commerce
  • Kirjanpito
  • Varastointi
  • PoS
  • Projekti
  • MRP
All apps
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Apua

one2many problem: How to fix this?Button become readonly when it's shown on wizard object's one2many??

Tilaa

Saat ilmoituksen, kun tähän viestiin ilmaantuu aktiviteettia

Tämä kysymys on merkitty
4 Vastaukset
8859 Näkymät
Avatar
Alcaline

Problem with this button GET TOTAL:  I got a form that has a one2many relationship with the other class, when I  go to  the tree view of this one2many the button  GET TOTAL is disabled but when in the original form view it is enbled, I think the cuase of this is the widget  one2many because i tried it to many2many it works but i need it in one2many relationship. any idea please or have you encountered this kind of problem?? how can i fix this problem??

the form that has a one2many relationship and the button disabled:

 

 

 

 

 

 

2
Avatar
Hylkää
klacus

Please post your Code! xml and py.

Avatar
Sudhir Arya (ERP Harbor Consulting Services)
Paras vastaus

Hello Lee,

The button will always be disabled for one2many field if record is not saved.

Try it after saving the record. It will work once it is saved.

1
Avatar
Hylkää
Alcaline
Tekijä

thank you Sudhir Arya, thanks for the information i did that already. but one question why is it the button inside the one2many list is disabled? any explanation for this.

Sudhir Arya (ERP Harbor Consulting Services)

Its a default behavior of the Odoo. We cannot change it.

Alcaline
Tekijä

thanks Mr. Arya this is really a big help in task:)

Pawan Kumar Sharma

Hello Sudhir, I have similar problem. Is there any way to enable this button in wizard for one2many field?

Avatar
klacus
Paras vastaus

Sorry but didn't clear me for the relation with one2many and the button.

Your form view has a button. it is clear.

Your model has a one2many relation this is also clear.

How you definie the button in xml? Do you have any extra atrributes? Do you have a acces rights? A lot of thinks is possible to miss, and the effect is the trouble. As I wrote down to you your prev. post, please post the xml, for the better understanding.

 

Please try this:

    <xpath expr="//field[@name='amount']" position="after">
                    <button name="get_total_bom_commit_button" string="Get Total" type="object" icon="gtk-o"/>
                </xpath>

 

I thin kyour problem is here:

states="" or atribute="" or readonly="False" >> just clear out
 

0
Avatar
Hylkää
Alcaline
Tekijä

hi sir, this is my code in PY for button: (This button is belong to the class of "account.analytic.line.commit" ) and i want the whole form of this button will display in my project.project class. So, I did a one2many relationship between the two class ("account.analytic.line.commit" and "project.project") to call the form in project.project. The codes that i did is totally working without errors except for one problem the button GET TOTAL is disable. I don't understand why it is disabled. Can you please help me i don't know what to do? class account_analytic_line_commit(osv.osv): _inherit = "account.analytic.line.commit" def get_total_bom_commit_button(self, cr, uid, ids, context=None): bom_total_new = {} bom_prod_com_pool = self.pool.get('bom.product.components') for bom_total_ids in self.browse(cr,uid,ids): new_price = 0 bom_total_line = bom_prod_com_pool.search(cr,uid,[('commit_id','=',bom_total_ids.id)]) netsvc.Logger().notifyChannel("\n for bom_total_new in bom_prod_com_pool.browse(cr,uid,bom_total_line): new_price = new_price + bom_total_new.total_price self.write(cr,uid,bom_total_ids.id,{'amount': new_price}, context=context) return True and this is my code in XML: <xpath expr="//field[@name='amount']" position="after">

Alcaline
Tekijä

I'm sorry sir for what I've been said a while ago.. I'm just only newbie here in ODOO.

klacus

Ok. No problem.

klacus

I refresh my ansver. Let's try.

Alcaline
Tekijä

sir I've already try that one but it's not working.. I think the problem is the ONE2MANY relationship because when I tried to changes it to MANY2MANY the button GET TOTAL inside it works perfectly. but I need it to stay ONE2MANY. I also have this kind of problem with the other modules. how can i fix that one? :(

klacus

Hi. Please send the complett modul for me. at kozmalg@gmail.com

Alcaline
Tekijä

sorry sir but i can't do that

Avatar
Alcaline
Tekijä Paras vastaus

hi sir, this is my code in PY for button: (This button is belong to the class of "account.analytic.line.commit" ) and i want the whole form of this button will display in my project.project class. So, I did a one2many relationship between the two class ("account.analytic.line.commit" and "project.project") to call the form in project.project. The codes that i did is totally working without errors except for one problem the button GET TOTAL is disable. I don't understand why it is disabled. Can you please help me i don't know what to do?

 

class account_analytic_line_commit(osv.osv):

_inherit = "account.analytic.line.commit"

 def get_total_bom_commit_button(self, cr, uid, ids, context=None):
        
        
        bom_total_new = {}
        
        bom_prod_com_pool = self.pool.get('bom.product.components')
        
        for bom_total_ids in self.browse(cr,uid,ids):

            new_price = 0
            
            bom_total_line = bom_prod_com_pool.search(cr,uid,[('commit_id','=',bom_total_ids.id)])
            
            for bom_total_new in bom_prod_com_pool.browse(cr,uid,bom_total_line):
               
                new_price = new_price + bom_total_new.total_price
            
            self.write(cr,uid,bom_total_ids.id,{'amount': new_price}, context=context)
            
                
        return True    

 

And this is my code in XML:

    <xpath expr="//field[@name='amount']" position="after">
                    <button type="object"
                            icon="gtk-ok"
                            name="get_total_bom_commit_button"
                            string="Get Total" groups="" readonly="False" attrs="" states="" disable="False" button="True"/>
                </xpath>

0
Avatar
Hylkää
Avatar
Adil Akbar
Paras vastaus

Hi, you can follow following link for this:

https://youtu.be/oMnHpHH54QU

Thanks

0
Avatar
Hylkää
Nautitko keskustelusta? Älä vain lue, vaan osallistu!

Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!

Rekisteröidy
Yhteisö
  • Kurssit
  • Dokumentaatio
  • Foorumi
Avoin lähdekoodi
  • Lataa
  • Github
  • Runbot
  • Käännökset
Palvelut
  • Odoo.sh hosting
  • Tuki
  • Versionkorotus
  • Räätälöidyt kehitykset
  • Koulutus
  • Löydä kirjanpitäjä
  • Löydä kumppani
  • Ryhdy kumppaniksi
Meistä
  • Yrityksemme
  • Tavaramerkki
  • Ota yhteyttä
  • Työpaikat
  • Tapahtumat
  • Podcast
  • Blogi
  • Asiakkaat
  • Oikeudellinen ilmoitus • Yksityisyys
  • Tietoturva
الْعَرَبيّة 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 on kokoelma avoimen lähdekoodin yrityssovelluksia, jotka kattavat kaikki yrityksesi tarpeet: asiakkuudenhallinta eli CRM, verkkokauppa, kirjanpito, varastointi, kassajärjestelmä, projektinhallinta, jne.

Odoon uniikki arvolupaus on olla samanaikaisesti erittäin helppokäyttöinen ja täysin integroitu.

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