Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

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

Naroči se

Get notified when there's activity on this post

This question has been flagged
invoicedatetime
1 Odgovori
6804 Prikazi
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
Opusti
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
Avtor Best Answer

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
Opusti
Enjoying the discussion? Don't just read, join in!

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
change between 2 Invoice formats Solved
invoice
Avatar
Avatar
1
jul. 25
1702
Hello, how can I change the size of the logo and the invoice? Solved
invoice
Avatar
Avatar
Avatar
2
jul. 25
2040
Validation Error. You will need to clear the Journal Entry's Number to proceed
invoice
Avatar
Avatar
1
jul. 25
2999
Difference Between Two Dates (result not showing up when diff = 0 Day)
datetime
Avatar
Avatar
Avatar
3
jun. 25
1789
Restricting Salesperson Access to Customer Invoice Details
invoice
Avatar
Avatar
Avatar
3
apr. 25
2897
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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