Add view form for enter_lines.init and make required employee and date

This commit is contained in:
Cédric Krier committed 2008-06-05 08:55:01 +02:00
1 parent 6b377b7368
commit 870a413ce0
2 files changed
+17 -2

No files matched your search

+2 -2
View File
@@ -64,8 +64,8 @@ Line()
class EnterLinesInit(WizardOSV):
_name = 'timesheet.enter_lines.init'
employee = fields.Many2One('company.employee', 'Employee')
date = fields.Date('Date')
employee = fields.Many2One('company.employee', 'Employee', required=True)
date = fields.Date('Date', required=True)
def default_employee(self, cursor, user, context=None):
line_obj = self.pool.get('timesheet.line')
+15
View File
@@ -56,6 +56,21 @@
<menuitem parent="menu_timesheet" action="act_line_form"
id="menu_line_form" sequence="30"/>
<record model="ir.ui.view" id="enter_lines_init_view_form">
<field name="model">timesheet.enter_lines.init</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Enter Timesheet">
<label name="employee"/>
<field name="employee"/>
<label name="date"/>
<field name="date"/>
</form>
]]>
</field>
</record>
<record model="ir.action.wizard" id="act_enter_lines">
<field name="name">Enter Timesheet</field>
<field name="wiz_name">timesheet.enter_lines</field>