[IMP] improve views of expense
authornel@tinyerp.com <>
Mon, 29 Mar 2010 09:50:29 +0000 (11:50 +0200)
committernel@tinyerp.com <>
Mon, 29 Mar 2010 09:50:29 +0000 (11:50 +0200)
bzr revid: nel@tinyerp.com-20100329095029-crh321t0u57r1d8u

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

index 3c99276..d474775 100644 (file)
@@ -56,17 +56,17 @@ class hr_expense_expense(osv.osv):
         'id': fields.integer('Sheet ID', readonly=True),
         'ref': fields.char('Reference', size=32),
         'date': fields.date('Date'),
-        'journal_id': fields.many2one('account.journal', 'Force Journal'),
+        'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is invoiced"),
         'employee_id': fields.many2one('hr.employee', "Employee's Name", required=True),
         'user_id': fields.many2one('res.users', 'User', required=True),
-        'date_confirm': fields.date('Date Confirmed'),
-        'date_valid': fields.date('Date Validated'),
+        'date_confirm': fields.date('Confirmation Date', help = "Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."),
+        'date_valid': fields.date('Validation Date', help = "Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."),
         'user_valid': fields.many2one('res.users', 'Validation User'),
         'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
         'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
         'note': fields.text('Note'),
         'amount': fields.function(_amount, method=True, string='Total Amount'),
-        'invoice_id': fields.many2one('account.invoice', 'Invoice'),
+        'invoice_id': fields.many2one('account.invoice', "Employee's Invoice"),
         'currency_id': fields.many2one('res.currency', 'Currency', required=True),
         'department_id':fields.many2one('hr.department','Department'),
         'company_id': fields.many2one('res.company', 'Company', required=True),
index 16828a8..0cf1b94 100644 (file)
@@ -68,7 +68,7 @@
                     <group colspan="4" col="6">
                         <field name="name" select="1"/>
                         <field name="employee_id" select="1"/>
-                        <field name="id" select="2"/>
+                        <field name="ref" select="2"/>
                         <field name="date" select="1"/>
                         <field name="amount"/>
                         <field name="currency_id"/>
@@ -77,7 +77,6 @@
                     </group>
                     <notebook colspan="4">
                         <page string="Expense Sheet">
-                            <field name="ref" select="2"/>
                             <newline/>
                             <field colspan="4" name="line_ids" nolabel="1">
                                 <form string="Expense Lines">
                             <separator colspan="4" string="Accounting data"/>
                             <field name="journal_id"/>
                             <separator colspan="4" string="Validation"/>
-                            <field name="date_confirm" select="2"/>
-                            <field name="date_valid" select="2"/>
+                            <field name="date_confirm" select="2" readonly = "1"/>
+                            <field name="date_valid" select="2" readonly = "1"/>
                             <field name="user_valid" select="2"/>
                             <field name="invoice_id" select="2"/>
                             <separator colspan="4" string="Notes"/>
                         help="Expenses to Invoice"/>
                       <separator orientation="vertical"/>
                       <field name="name" select='1'/>
+                      <field name="date" select='1'/>
                       <field name="user_id" select="1" widget="selection">
                           <filter
                             icon="gtk-execute"