コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
11587 ビュー

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

関連投稿 返信 ビュー 活動
3
12月 23
7079
1
8月 20
11962
9
8月 18
7701
1
3月 18
4961
1
3月 15
9766