Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
11576 Visualizzazioni

Hi,

I am coding a module who need to generate an invoice from nearly nothing , the problem is how do i do it in python ? Is there an example in the standard modules ?

thanks

edit: i am developing an openerp module not some external soft

Avatar
Abbandona
Risposta migliore

This is a simple exemple to generate invoice:

invoice_id = self.pool.get('account.invoice').create(cr,uid,{
    'date_invoice' : '2013-04-04',
    'partner_id' : 144,
    ...
    your values here
    ...
    })

This code generate an invoice and return the id.

Avatar
Abbandona
Autore

ok, thanks

Risposta migliore

There are many ways to do that. First thing that comes to my mind is using oerplib, the other is with web-services.

Then I would take a look at the code for creating invoices in the sales and account modules. Specially study what the account_invoice.py in the account module does. The information you need in order to create an invoice from 0 is there

Avatar
Abbandona
Autore

i edited my question

well, take a look at the account_invoice.py module

Post correlati Risposte Visualizzazioni Attività
3
dic 23
7069
1
ago 20
11957
9
ago 18
7691
1
mar 18
4934
1
mar 15
9755