Remove usage of header_view_get and string attribute from views
issue2350 review25421002
This commit is contained in:
1 parent
64df01fbc6
commit
3c3e0903cc
14 files changed
+13
-21
No files matched your search
@@ -109,14 +109,6 @@ class Line(ModelSQL, ModelView):
|
||||
Date_ = Pool().get('ir.date')
|
||||
return Transaction().context.get('date') or Date_.today()
|
||||
|
||||
@classmethod
|
||||
def view_header_get(cls, value, view_type='form'):
|
||||
if not Transaction().context.get('employee'):
|
||||
return value
|
||||
Employee = Pool().get('company.employee')
|
||||
employee = Employee(Transaction().context['employee'])
|
||||
return value + " (" + employee.rec_name + ")"
|
||||
|
||||
@classmethod
|
||||
def validate(cls, lines):
|
||||
super(Line, cls).validate(lines)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Hours per Employee">
|
||||
<form>
|
||||
<label name="start_date"/>
|
||||
<field name="start_date"/>
|
||||
<label name="end_date"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<graph string="Hours per Employee">
|
||||
<graph>
|
||||
<x>
|
||||
<field name="employee"/>
|
||||
</x>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Hours per Employee per Month">
|
||||
<tree>
|
||||
<field name="year"/>
|
||||
<field name="month"/>
|
||||
<field name="employee"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Hours per Employee">
|
||||
<tree>
|
||||
<field name="employee"/>
|
||||
<field name="duration" sum="Duration"/>
|
||||
</tree>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Hours per Employee per Week">
|
||||
<tree>
|
||||
<field name="year"/>
|
||||
<field name="week"/>
|
||||
<field name="employee"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Enter Timesheet">
|
||||
<form>
|
||||
<label name="employee"/>
|
||||
<field name="employee"/>
|
||||
<label name="date"/>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Timesheet Line">
|
||||
<form>
|
||||
<label name="employee"/>
|
||||
<field name="employee"/>
|
||||
<label name="company"/>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Timesheet Lines" editable="bottom">
|
||||
<tree editable="bottom">
|
||||
<field name="company"/>
|
||||
<field name="employee"/>
|
||||
<field name="date"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Work Context">
|
||||
<form>
|
||||
<label name="from_date"/>
|
||||
<field name="from_date"/>
|
||||
<label name="to_date"/>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Work">
|
||||
<form>
|
||||
<group id="labels" col="1" xexpand="0" yfill="1">
|
||||
<label name="name" xexpand="1" yexpand="1"/>
|
||||
<label name="origin" xexpand="1" yexpand="1"/>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<graph string="Hours per Work" type="pie">
|
||||
<graph type="pie">
|
||||
<x>
|
||||
<field name="name"/>
|
||||
</x>
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Works">
|
||||
<tree>
|
||||
<field name="rec_name"/>
|
||||
<field name="active" tree_invisible="1"/>
|
||||
<field name="origin" tree_invisible="1"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Works">
|
||||
<tree>
|
||||
<field name="rec_name"/>
|
||||
<field name="duration"/>
|
||||
<field name="active" tree_invisible="1"/>
|
||||
|
||||
Reference in new issue
Block a user