Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

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

Odoberať

Get notified when there's activity on this post

This question has been flagged
invoicedatetime
1 Odpoveď
6786 Zobrazenia
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
Zrušiť
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
Autor 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
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
change between 2 Invoice formats Solved
invoice
Avatar
Avatar
1
júl 25
1689
Hello, how can I change the size of the logo and the invoice? Solved
invoice
Avatar
Avatar
Avatar
2
júl 25
2019
Validation Error. You will need to clear the Journal Entry's Number to proceed
invoice
Avatar
Avatar
1
júl 25
2993
Difference Between Two Dates (result not showing up when diff = 0 Day)
datetime
Avatar
Avatar
Avatar
3
jún 25
1774
Restricting Salesperson Access to Customer Invoice Details
invoice
Avatar
Avatar
Avatar
3
apr 25
2889
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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