Remove code field form fiscalyear model | #072568
This commit is contained in:
parent
493c2ade1d
commit
9c813d7504
|
@ -14,7 +14,6 @@ def register():
|
|||
Pool.register(
|
||||
account.Account,
|
||||
account.AccountTemplate,
|
||||
account.FiscalYear,
|
||||
account.Period,
|
||||
account.AccountType,
|
||||
account.AccountTypeTemplate,
|
||||
|
|
15
account.py
15
account.py
|
@ -28,21 +28,6 @@ class AccountTemplate(metaclass=PoolMeta):
|
|||
return True
|
||||
|
||||
|
||||
class FiscalYear(metaclass=PoolMeta):
|
||||
__name__ = 'account.fiscalyear'
|
||||
code = fields.Char('Code', size=None)
|
||||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
if clause[1].startswith('!') or clause[1].startswith('not '):
|
||||
bool_op = 'AND'
|
||||
else:
|
||||
bool_op = 'OR'
|
||||
return [bool_op,
|
||||
('code',) + tuple(clause[1:]),
|
||||
(cls._rec_name,) + tuple(clause[1:]),
|
||||
]
|
||||
|
||||
|
||||
class Period(metaclass=PoolMeta):
|
||||
__name__ = 'account.period'
|
||||
|
|
12
view.xml
12
view.xml
|
@ -3,18 +3,6 @@
|
|||
copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<!-- account fiscalyear -->
|
||||
<record model="ir.ui.view" id="fiscalyear_view_form">
|
||||
<field name="model">account.fiscalyear</field>
|
||||
<field name="inherit" ref="account.fiscalyear_view_form"/>
|
||||
<field name="name">fiscalyear_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="fiscalyear_view_tree">
|
||||
<field name="model">account.fiscalyear</field>
|
||||
<field name="inherit" ref="account.fiscalyear_view_tree"/>
|
||||
<field name="name">fiscalyear_tree</field>
|
||||
</record>
|
||||
|
||||
<!-- account period -->
|
||||
<record model="ir.ui.view" id="period_view_form">
|
||||
<field name="model">account.period</field>
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--The COPYRIGHT file at the top level of this repository
|
||||
contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/field[@name='name']" position="after">
|
||||
<label name="code"/>
|
||||
<field name="code"/>
|
||||
<newline/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--The COPYRIGHT file at the top level of this repository
|
||||
contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/tree/field[@name='name']" position="after">
|
||||
<field name="code"/>
|
||||
</xpath>
|
||||
</data>
|
Loading…
Reference in New Issue