Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

TypeError: '<' not supported between instances of 'bool' and 'datetime.date'

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
invoicedatetime
1 Svar
6775 Visninger
Avatar
MIELVAC Mathew

Hello, 

For information, i'm on a 14day trial database on Odoo Cloud, lastest version


I create invoices via Requests with an Odoo Client in a Symfony, 2 months ago I had no problem, but now I have an error and I have been pulling my hair out for 2 days without understanding why, someone anyone know why?

$data = ["invoice_date" => $invoiceDate->format("Y-m-d"),"invoice_date_due" => $invoiceDateDue->modify('+30days')->format("Y-m-d"),"payment_reference" => $json["invoiceData"]["invoiceType"]["type"],"move_type" => "out_invoice","type_name" => "Invoice","partner_id" => $invoiceClientOdooId,"invoice_partner_display_name" => $invoiceClient->getNomSociete(),"currency_id" => $currencyId[0],"ref" => $ref, ];

$client->create('account.move.line', $data, $context);$invoiceAccounting = $client->read('account.move', [$invoiceId]);


Error send by odoo :


[ResponseFault] Fault(1) 'Traceback (most recent call last):
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 983, in get
cache_value = field_cache[record._ids[0]]
KeyError: 19

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/16.0/odoo/fields.py", line 1138, in __get__
value = env.cache.get(record, self)
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 990, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'account.move(19,).payment_term_details'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/16.0/odoo/addons/base/controllers/rpc.py", line 149, in xmlrpc_2
response = self._xmlrpc(service)
File "/home/odoo/src/custom/trial/saas_trial/controllers/main.py", line 270, in _xmlrpc
res = super(OdooRPC, self)._xmlrpc(service)
File "/home/odoo/src/odoo/16.0/odoo/addons/base/controllers/rpc.py", line 129, in _xmlrpc
result = dispatch_rpc(service, method, params)
File "/home/odoo/src/odoo/16.0/odoo/http.py", line 368, in dispatch_rpc
return dispatch(method, params)
File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 37, in dispatch
res = execute_kw(db, uid, *params[3:])
File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 59, in execute_kw
return execute(db, uid, obj, method, *args, **kw or {})
File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 65, in execute
res = execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 50, in execute_cr
result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env)
File "/home/odoo/src/odoo/16.0/odoo/service/model.py", line 134, in retrying
result = func()
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/16.0/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/16.0/odoo/models.py", line 2994, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/16.0/odoo/models.py", line 3132, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/home/odoo/src/odoo/16.0/odoo/models.py", line 5842, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/16.0/odoo/fields.py", line 1187, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/16.0/odoo/fields.py", line 2332, in compute_value
super().compute_value(records)
File "/home/odoo/src/odoo/16.0/odoo/fields.py", line 1346, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/16.0/addons/mail/models/mail_thread.py", line 403, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/16.0/odoo/models.py", line 4187, in _compute_field_value
getattr(self, field.compute)()
File "/home/odoo/src/odoo/16.0/addons/account/models/account_move.py", line 1185, in _compute_payment_term_details
for line in invoice.line_ids.filtered(lambda l: l.display_type == 'payment_term').sorted('date_maturity'):
File "/home/odoo/src/odoo/16.0/odoo/models.py", line 5506, in sorted
return self.browse(item.id for item in sorted(self, key=key, reverse=reverse))
TypeError: ' < ' not supported between instances of 'bool' and 'datetime.date'


 

0
Avatar
Kassér
Ray Carnes (ray)

The error message tells you that the code has found a date value of "FALSE" (ie: there is no date value) and that's why the comparison fails. An unknown date can't be earlier or later than a known date.

Avatar
MIELVAC Mathew
Forfatter Bedste svar

But even if i create the invoice On Odoo, there is a bug 

So It couldn t be an Odoo's code problem ?

When Invoice created on Odoo and trying to get the json information in my projetct :

$data = $client->search('account.move')

;$accountGroups = $client->read('account.move', $data);



return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/16.0/odoo/fields.py", line 1194, in __get__
raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))
ValueError: Compute method failed to assign account.move(27,).asset_remaining_value

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
change between 2 Invoice formats Løst
invoice
Avatar
Avatar
1
jul. 25
1681
Hello, how can I change the size of the logo and the invoice? Løst
invoice
Avatar
Avatar
Avatar
2
jul. 25
2012
Validation Error. You will need to clear the Journal Entry's Number to proceed
invoice
Avatar
Avatar
1
jul. 25
2989
Difference Between Two Dates (result not showing up when diff = 0 Day)
datetime
Avatar
Avatar
Avatar
3
jun. 25
1770
Restricting Salesperson Access to Customer Invoice Details
invoice
Avatar
Avatar
Avatar
3
apr. 25
2882
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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