Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Automatique invoice generation after website payment in error

Subscribe

Get notified when there's activity on this post

This question has been flagged
automaticinvoicingpayment_termswebsite
3656 Views
Avatar
Tidiane SIDIBE

After the payment is done correctly with the payment acquirer, invoice automatique generation throws an error : 

2018-12-14 14:12:09,076 11 INFO kiwi odoo.addons.sale_payment.models.payment: <orangemoney> transaction completed, auto-generated invoice  (ID 275) for SO396 (ID 396)

2018-12-14 14:12:09,089 11 ERROR kiwi odoo.http: Exception during JSON request handling.

Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 650, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise

    raise value

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 692, in dispatch

    result = self._call_function(**self.params)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 342, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper

    return f(dbname, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 335, in checked_call

    result = self.endpoint(*a, **kw)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 936, in __call__

    return self.method(*args, **kw)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap

    response = f(*args, **kw)

  File "/mnt/bwi/payment_orangemoney/controllers/main.py", line 87, in orangemoney_notify

    self.orangemoney_validate_data(jsonr)

  File "/mnt/bwi/payment_orangemoney/controllers/main.py", line 71, in orangemoney_validate_data

    res = request.env['payment.transaction'].sudo().form_feedback(response, 'orangemoney')

  File "/usr/lib/python3/dist-packages/odoo/addons/sale_payment/models/payment.py", line 34, in form_feedback

    tx._confirm_so()

  File "/usr/lib/python3/dist-packages/odoo/addons/website_sale/models/payment.py", line 24, in _confirm_so

    self._generate_and_pay_invoice()

  File "/usr/lib/python3/dist-packages/odoo/addons/sale_payment/models/payment.py", line 103, in _generate_and_pay_invoice

    created_invoice.action_invoice_open()

  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/account_invoice.py", line 778, in action_invoice_open

    to_open_invoices.action_date_assign()

  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/account_invoice.py", line 925, in action_date_assign

    inv._onchange_payment_term_date_invoice()

  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/account_invoice.py", line 704, in _onchange_payment_term_date_invoice

    self.date_due = max(line[0] for line in pterm_list)

ValueError: max() arg is an empty sequence


Has anyone face this before ? Have solution proposals ?

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

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

Sign up
Related Posts Replies Views Activity
Installment payment terms.
invoicing quotation payment_terms
Avatar
0
Aug 24
1231
How do I remove the numbers from the slugs in my blog and blogpost? Solved
website
Avatar
Avatar
Avatar
Avatar
3
Sep 25
2490
Login Website Solved
website
Avatar
3
Oct 25
149265
500 Server Error after upgrading from 18.0 to 18.4 Odoo Online
website
Avatar
Avatar
1
Sep 25
1821
Can't delete website Solved
website
Avatar
Avatar
Avatar
Avatar
Avatar
4
Sep 25
6638
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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