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

[SOLVED] Point of sale and invoices

Subscribe

Get notified when there's activity on this post

This question has been flagged
invoicejournalsequenceopenerp7.0point_of_sale
1 Reply
11650 Views
Avatar
Ludovic CHEVALIER

Hi!

I have a problem with point of sale and invoices for few months now.

I really nead advices about this question.

My first problem is about invoicing pos orders.

 From point of sale, when I validate a pos order, an account entrie will be created at pos closing. If my customer want an invoice for his/her purchase, OpenERP permit to create invoice from the pos order. But, that generate a second account entrie. So, my accounting is false. :-(

I already have discussion about this with OpenERP employees, but I never had a answer that solved this problem.

My second problem, which is the consequence of the first.

I disable the invoice button of the point of sale module due to the first problem. So, my customers never have invoices for their purchases.

Then, I thank there was no matter having same sale journal for sales from point of sale orders and sales from invoices. Indeed, when we close a point of sale session, an account with a number wich come from journal sequence is created.

If  the point of sale use the same journal as invoices, we make holes in the invoices numbering.

So, I created a new sale journal, just for the point of sale, with its own sequence.

Problem: when I create an invoice, this point of sale journal was selected by default. So, I created a default value with condition, like its describe in this thread: https://www.odoo.com/fr_FR/forum/help-1/question/how-to-change-default-journal-when-i-create-a-new-customer-invoice-74128

It works, but, when I create an invoice from a sale order (not point of sale order, just sale order), that doesn't work.

Maybe it was not a good idea to create a different journal for point of sale. But I'm not sure that create account entries numbered with invoice sequence, with point of sale session, account entries that are not related to an invoice, is a good idea.

Is someone have the same thoughts as me?

Is someone have some answers for those questions/problems?

Thanks.

2
Avatar
Discard
michel Guénard

HiLudovic did you solve this issue? I am interested in understanding the solution when it works.

Ludovic CHEVALIER
Author

Absolutely no. Sorry.

Ludovic CHEVALIER
Author

OK. I finally found the solution. account_journal object is sorted by code by default: addons/account/account.py:763 _order = 'code' So, if we set a sale journal code that is less than pos journal code, it will be preselected when we will create invoices.

Avatar
Ludovic CHEVALIER
Author Best Answer

For my second problem, here is the method of account.invoice object (from account module) that select the journal: 

     def _get_journal(self, cr, uid, context=None):
if context is None:
context = {}
type_inv = context.get('type', 'out_invoice')
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
company_id = context.get('company_id', user.company_id.id)
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
journal_obj = self.pool.get('account.journal')
domain = [('company_id', '=', company_id)]
if isinstance(type_inv, list):
domain.append(('type', 'in', [type2journal.get(type) for type in type_inv if type2journal.get(type)]))
else:
domain.append(('type', '=', type2journal.get(type_inv, 'sale')))
res = journal_obj.search(cr, uid, domain, limit=1)
self.search(cr, uid, [('state', '=', 'done')], context=context)
return res and res[0] or False

We can see that the journal is chosen arbitrary by selecting the first one of the request ("limit=1").

Is it normal that users can't choose the journal they want for invoices? Why OpenERP prefers choose it by chance?


Edit 2015-10-23:

In addons/account/account.py:763, we could see:

    _order = 'code'

So, just have to put a correct code for invoices default journal. :-)

 

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
The operation cannot be completed: A transaction with the same name already exists.
invoice point_of_sale
Avatar
Avatar
1
Jun 25
3200
How to change Invoice sequence via xml in Odoo 15 or newer?
invoice sequence
Avatar
0
Sep 24
2235
Odoo 17.1 - How to never reset invoice number
invoice sequence
Avatar
Avatar
2
Mar 24
4224
How to select manually a sequence for an invoice? Solved
invoice sequence
Avatar
Avatar
2
Feb 23
4831
Manually set invoice number Solved
invoice sequence
Avatar
Avatar
Avatar
Avatar
Avatar
6
Oct 20
39967
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