Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
11600 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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.

Аватар
Відмінити
Автор

ok, thanks

Найкраща відповідь

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

Аватар
Відмінити
Автор

i edited my question

well, take a look at the account_invoice.py module

Related Posts Відповіді Переглядів Дія
3
груд. 23
7109
1
серп. 20
11967
9
серп. 18
7707
1
бер. 18
4968
1
бер. 15
9782