parent
c1533c5164
commit
187f211488
12
timesheet.py
12
timesheet.py
|
@ -1,10 +1,8 @@
|
|||
# The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import ModelSQL, ModelView, fields
|
||||
from trytond.pool import PoolMeta, Pool
|
||||
from trytond.pyson import Eval, Id, Bool, Equal, Not, If
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
from trytond.model import fields
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.pyson import Eval, Not
|
||||
|
||||
__all__ = ['Work']
|
||||
|
||||
|
@ -38,5 +36,5 @@ class Work:
|
|||
@classmethod
|
||||
def view_attributes(cls):
|
||||
return super(Work, cls).view_attributes() + [
|
||||
('/form//group[@id="yield"]/group[@id="yield_params"]', 'states',
|
||||
{'invisible': 0 if Bool(Eval('yield_available', False)) else 1})]
|
||||
('/form/notebook/page[@id="yield"]', 'states', {
|
||||
'invisible': ~Eval('yield_available')})]
|
||||
|
|
|
@ -5,6 +5,7 @@ depends:
|
|||
res
|
||||
timesheet
|
||||
product
|
||||
timesheet_work_notebook
|
||||
|
||||
extras_depend:
|
||||
production_work_employee
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
<!-- The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/field[@name='company']" position="after">
|
||||
<group id="yield" col="4" string="Labor yield" colspan="4">
|
||||
<label name="yield_available"/>
|
||||
<field name="yield_available"/>
|
||||
<group id="yield_params" col="4" colspan="4">
|
||||
<label name="yield_record_granularity"/>
|
||||
<field name="yield_record_granularity"/>
|
||||
<label name="manual_yield_record"/>
|
||||
<field name="manual_yield_record"/>
|
||||
</group>
|
||||
</group>
|
||||
<xpath expr="/form/notebook" position="before">
|
||||
<label name="yield_available"/>
|
||||
<field name="yield_available"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook" position="inside">
|
||||
<page id="yield" string="Labor yield">
|
||||
<label name="yield_record_granularity"/>
|
||||
<field name="yield_record_granularity"/>
|
||||
<label name="manual_yield_record"/>
|
||||
<field name="manual_yield_record"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue