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

Fast Payment method from Quotation

Subscribe

Get notified when there's activity on this post

This question has been flagged
salesinvoicesales_order
2 Replies
6071 Views
Avatar
Logicious

Hello,

       I have one problem , from sales i need to create one button to create invoice and register the payment. with in one click.

i got one solution to do quotation to Invoice by one click, but now i need to add the invoice to register payment method into it.

"""""""" this is my code , give me one hand to do this

for sale in self:

# Process order

sale.action_button_confirm()

inv_id = sale.action_invoice_create()

if inv_id:

inv = self.env['account.invoice'].browse(inv_id)

inv.signal_workflow('invoice_open')

voc = self.env

self.signal_workflow(cr, uid, ids, 'proforma_voucher')

for picking in sale.picking_ids:

picking.force_assign()

picking.action_done()


***********************

it can able to create invoice within one click, but i need to complete all process including payment  into it.

0
Avatar
Discard
Prasanth ks

actually it is in odoo 9 coding, i already done this , but it is in v8, so u can refer this,

Avatar
Prasanth ks
Best Answer

invoice_obj.write(cr,uid,invoice_id,{'state':'open'})

invoice_datas = invoice_obj.browse(cr, uid, invoice_id)

move_id = invoice_datas.move_id.id

print"Single Invoice",move_id

date=datetime.datetime.now()

data = voucher_obj.onchange_partner_id(cr, uid, [],data_partner.id, invoice_datas.journal_id.id ,0.0, False, 'receipt', date, context)['value']

journal_ids = journal_obj.search(cr, uid, [('type','in',['cash','bank'])])

statement_vals = {

'reference': invoice_datas.number,

'journal_id': journal_ids[0],

'amount': invoice_datas.amount_total,

'date' : date,

'partner_id': data_partner.id,

'account_id': invoice_datas.account_id.id,

'type': 'receipt',

'company_id':1,

}

if data.get('payment_rate_currency_id'):

statement_vals['payment_rate_currency_id'] = data['payment_rate_currency_id']

if data.get('paid_amount_in_company_currency'):

statement_vals['paid_amount_in_company_currency'] = data['paid_amount_in_company_currency']

if data.get('writeoff_amount'):

statement_vals['writeoff_amount'] =data['writeoff_amount']

if data.get('pre_line'):

statement_vals['pre_line'] = data['pre_line']

if data.get('payment_rate'):

statement_vals['payment_rate'] = data['payment_rate']

statement_id = voucher_obj.create(cr, uid, statement_vals, context)

print'+++++++++++++++++++++',data.get('line_cr_ids')

for line_cr in data.get('line_cr_ids'):

line_cr.update({'voucher_id':statement_id})

if line_cr['name']==invoice_datas.number:

line_cr['amount']=line_cr['amount_original']

line_cr['reconcile']=True

line_cr_id=voucher_line_obj.create(cr,uid,line_cr)

for line_dr in data.get('line_dr_ids'):

line_dr.update({'voucher_id':statement_id})

line_dr_id=voucher_line_obj.create(cr,uid,line_dr)

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
Problem with sales order pdf quotation
sales sales_order
Avatar
1
May 25
1604
Sales upload Template required
sales invoice
Avatar
Avatar
2
Dec 23
4137
Importing confirmed sales orders?
sales sales_order
Avatar
Avatar
Avatar
Avatar
3
Oct 23
4839
Sales orders that have been billed are kept with "To Invoice" status Solved
sales invoice
Avatar
Avatar
Avatar
Avatar
6
Mar 22
10395
Odoo 18 - PDF Quote Builder: field names, paths and "custom_note"
sales sales_order pdfquotebuilder
Avatar
Avatar
1
Jan 25
2720
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