Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

AttributeError: 'bool' object has no attribute 'get' openerp

Subscriure's

Get notified when there's activity on this post

This question has been flagged
errortaxaccount.invoiceurgentmethod
14193 Vistes
Avatar
evon_dun

Hi, i created few fields to my account.invoice, and i am trying to update these fields with a function. I get this error: AttributeError: 'bool' object has no attribute 'get' openerp. Please help its really very urgent, account_invoice.py", line 844, in button_reset_taxes. My fields:

'vat13_5':fields.float('13.5%',digits_compute=dp.get_precision('Account')),
'vat5':fields.float('5%',digits_compute=dp.get_precision('Account')),
'others':fields.float('Others',digits_compute=dp.get_precision('Account')),
'sales_vat13_5':fields.function(_tax_base_amount,

type= 'float',string = 'Sales 13.5%', digits_compute=dp.get_precision('Account'),method = True, store = True), 'sales_vat5':fields.function(_tax_base_amount, type= 'float',string = 'Sales 5%', digits_compute=dp.get_precision('Account'),method = True, store = True), 'sales_others':fields.function(_tax_base_amount, type= 'float',string = 'Sales Others', digits_compute=dp.get_precision('Account'),method = True, store = True),

the fields vat13_5, vat5, and others already have values in them.

the function which i am using :

> def
> _tax_base_amount(self,cr,uid,ids,name,args,context=None):
>     res = {}
>     tax_obj = self.pool.get('account.invoice.tax')
>     for invoice in self.browse(cr,uid,ids,context=context):
>        res[invoice.id] = {
>                          'sales_vat13_5':0.0,
>                          'sales_vat5':0.0,
>                             'sales_others':0.0,
>                        }
>         base1 = 0.0
>         base2 = 0.0
>         base3 = 0.0
>         name13_5 = 'Vat13.5%'
>         name13 = '13.5% - Vat13.5% E'
>         name5 = 'Vat  5 %'
>         name5E = '5% E - Vat 5% E'
>         namecst2 = 'CST 2% '
>         namecst2E = '2% - CST 2% E'
>         namevat2 = 'Vat 2% ( 3B )'
>         namevat2E = '2% - Vat 2% ( 3B ) E'
>         namecst5 = 'CST 5% Without form C '
>         namecst5E = '5%  - CST 5% Without Form C E'
>         namecst13_5 = 'CST 13.5% Without form C '
>         namecst13_5E = '13.5%  - CST 13.5% Without Form C E'
>         namecst= '5% - CST 13.5% Without Form C E '
>         if invoice.vat13_5:                
>             cr.execute('select base_amount from account_invoice_tax
> where invoice_id = %s and name in
> (%s,%s)',(invoice.id,name13_5,name13))
>             base1 = cr.fetchall()[0]
>             #raise osv.except_osv(_('Message'), _(base1))
>             res[invoice.id]['sales_vat13_5'] =
> base1
>         if invoice.vat5:        
>             cr.execute('select base_amount from account_invoice_tax
> where invoice_id = %s and name in
> (%s,%s)',(invoice.id,name5,name5E))
>             base2 = cr.fetchall()[0]
>             #raise osv.except_osv(_('Message'), _(base2))
>             res[invoice.id]['sales_vat5'] = base2
>         if invoice.others:
>             cr.execute('select base_amount from account_invoice_tax
> where invoice_id = %s and name in
> (%s,%s,%s,%s,%s,%s,%s,%s,%s)',(invoice.id,namecst2,namecst2E,namevat2,namevat2E,namecst5,namecst5E,namecst13_5,namecst13_5E,namecst))
>             taxes = cr.fetchall()               
>             for t in taxes:
>                 base3 += t[0]
>             #raise osv.except_osv(_('Message'), _(base3))
>             res[invoice.id]['sales_others'] =
> base3
>         cr.execute('update account_invoice set sales_vat13_5=%s,
> sales_vat5=%s, sales_others=%s where
> id=%s',(base1,base2,base3,invoice.id))
>     return True
0
Avatar
Descartar
Andreas Brueckl

Can you post the whole traceback of the error?

evon_dun
Autor

hey i got my error corrected i just changed it to return res and i am sorted. Thanks anyways.

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
How to create an automatic tax ?
tax account.invoice
Avatar
0
de març 15
3927
AttributeError: 'report.account_bi_tax_report.report_bi_account_tax' object has no attribute '_get_report_values'
error tax noattribute odooV13
Avatar
Avatar
1
d’ag. 22
5597
Why a new tax is not recognized at the POS level?
python error tax posticket
Avatar
Avatar
Avatar
Avatar
4
de gen. 21
11077
Register payment always registering less amount than TOTAL AMOUNT DUE even when paid full. Shows credit amount
invoice tax account account.invoice
Avatar
0
de maig 19
5013
AttributeError account_analytic_id not found
error update analytic account.invoice
Avatar
0
de març 15
5115
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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