Hardik Ansodariya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-usability-create_invoice_from_picking-han
 into lp:~openerp-dev/openobject-addons/trunk-usability.

Requested reviews:
  Amit (Open ERP) (apa-tiny)
  Hardik Ansodariya (OpenERP) (han-tinyerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability-create_invoice_from_picking-han/+merge/74546
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability-create_invoice_from_picking-han/+merge/74546
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-usability.
=== modified file 'stock/wizard/stock_invoice_onshipping.py'
--- stock/wizard/stock_invoice_onshipping.py	2011-05-02 18:46:43 +0000
+++ stock/wizard/stock_invoice_onshipping.py	2011-09-08 05:07:16 +0000
@@ -25,6 +25,9 @@
 
 class stock_invoice_onshipping(osv.osv_memory):
 
+    def _get_journal(self, cr, uid, context=None):
+        return self._get_journal_id(cr, uid, context=context)[0][0] or False
+    
     def _get_journal_id(self, cr, uid, context=None):
         if context is None:
             context = {}
@@ -61,7 +64,6 @@
                     vals.append(t1)
         return vals
 
-
     _name = "stock.invoice.onshipping"
     _description = "Stock Invoice Onshipping"
 
@@ -70,7 +72,11 @@
         'group': fields.boolean("Group by partner"),
         'invoice_date': fields.date('Invoiced date'),
     }
-
+    
+    _defaults = {
+        'journal_id' : _get_journal,
+    }
+    
     def view_init(self, cr, uid, fields_list, context=None):
         if context is None:
             context = {}

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to