It is currently Sat Feb 11, 2012 11:53 am

All times are UTC + 2 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Skipping draft invoice
PostPosted: Wed Sep 24, 2008 5:36 pm 
Offline

Joined: Mon Jul 28, 2008 4:33 pm
Posts: 7
When creating an invoice from a sales order, I want to create an open invoice in stead of a draft invoice. How can I do this? Do I change something in the workflows?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 24, 2008 8:04 pm 
Offline

Joined: Fri Dec 08, 2006 3:46 pm
Posts: 175
Location: Caracas, Venezuela
Quote:
Do I change something in the workflows?

Instead of change the workflow why don't overwrite the action_invoice_create function on sale module to trigger the invoice state to open automatically. You can see an example on purchase module:


Code:
         wf_service = netsvc.LocalService("workflow")
         wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)



Regards,

_________________
Javier Duran
Venezuela


Top
 Profile  
 
 Post subject: Steps
PostPosted: Wed Sep 24, 2008 9:16 pm 
Offline

Joined: Mon Jul 28, 2008 4:33 pm
Posts: 7
Sorry I am a new user of TinyERP and not at all a programmer. Can you give me some steps to follow please. Where do I need to change things?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 25, 2008 7:08 pm 
Offline

Joined: Fri Dec 08, 2006 3:46 pm
Posts: 175
Location: Caracas, Venezuela
Quote:
Where do I need to change things?

on sale.py file, you can find it on:
server_path/addons/sale

An the example is on purchase.py file, you can find it on:
server_path/addons/purchase

Quote:
Can you give me some steps to follow please


you can overwrite the action_invoice_create function on sale.py check this:
http://openerp.com/forum/topic7320.html
http://openerp.com/forum/topic7562.html
http://openerp.com/forum/topic6942.html


Regards,

_________________
Javier Duran
Venezuela


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP