[IMP] hr_improvement : Fix the journal used when the expense is paid.
authorDivyesh Makwana (Open ERP) <mdi@tinyerp.com>
Thu, 12 Jul 2012 11:33:46 +0000 (17:03 +0530)
committerDivyesh Makwana (Open ERP) <mdi@tinyerp.com>
Thu, 12 Jul 2012 11:33:46 +0000 (17:03 +0530)
bzr revid: mdi@tinyerp.com-20120712113346-47fkltrn5kyydmld

addons/hr_expense/hr_expense.py
addons/hr_expense/hr_expense_view.xml

index bc150e1..edd7076 100644 (file)
@@ -63,7 +63,7 @@ class hr_expense_expense(osv.osv):
         'name': fields.char('Description', size=128, required=True),
         'id': fields.integer('Sheet ID', readonly=True),
         'date': fields.date('Date', select=True),
-        'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is invoiced"),
+        'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is paid."),
         'employee_id': fields.many2one('hr.employee', "Employee", required=True),
         'user_id': fields.many2one('res.users', 'User', required=True),
         'date_confirm': fields.date('Confirmation Date', select=True, help = "Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."),
index 78e651f..99fbc2d 100644 (file)
                         <page string="Other Info">
                             <group>
                                 <group string="Accounting Data">
-                                    <field name="journal_id"/>
+                                    <field name="journal_id" widget="selection" domain="[('type', 'in', ('purchase','purchase_refund'))]"/>
                                     <field name="voucher_id" context="{'form_view_ref': 'account_voucher.view_purchase_receipt_form'}"/>
                                 </group>
                             </group>