Add active field
issue7023 review52271002
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
* Add active field on country and subdivision
|
||||
|
||||
Version 5.0.0 - 2018-10-01
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Remove support for Python 2.7
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.model import ModelView, ModelSQL, DeactivableMixin, fields
|
||||
from trytond.pyson import Eval
|
||||
|
||||
__all__ = ['Country', 'Subdivision', 'Zip']
|
||||
|
||||
|
||||
class Country(ModelSQL, ModelView):
|
||||
class Country(DeactivableMixin, ModelSQL, ModelView):
|
||||
'Country'
|
||||
__name__ = 'country.country'
|
||||
name = fields.Char('Name', required=True, translate=True,
|
||||
@@ -69,7 +69,7 @@ class Country(ModelSQL, ModelView):
|
||||
super(Country, cls).write(*args)
|
||||
|
||||
|
||||
class Subdivision(ModelSQL, ModelView):
|
||||
class Subdivision(DeactivableMixin, ModelSQL, ModelView):
|
||||
"Subdivision"
|
||||
__name__ = 'country.subdivision'
|
||||
country = fields.Many2One('country.country', 'Country',
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
<?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>
|
||||
<form col="6">
|
||||
<label name="name"/>
|
||||
<field name="name"/>
|
||||
<label name="active"/>
|
||||
<field name="active"/>
|
||||
<newline/>
|
||||
<label name="code"/>
|
||||
<field name="code"/>
|
||||
<label name="code3"/>
|
||||
<field name="code3"/>
|
||||
<label name="code_numeric"/>
|
||||
<field name="code_numeric"/>
|
||||
<field name="subdivisions" colspan="4"/>
|
||||
<field name="subdivisions" colspan="6"/>
|
||||
</form>
|
||||
|
||||
@@ -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>
|
||||
<form col="6">
|
||||
<label name="country"/>
|
||||
<field name="country"/>
|
||||
<newline/>
|
||||
@@ -9,6 +9,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="name"/>
|
||||
<label name="code"/>
|
||||
<field name="code"/>
|
||||
<label name="active"/>
|
||||
<field name="active"/>
|
||||
<label name="type"/>
|
||||
<field name="type"/>
|
||||
<label name="parent"/>
|
||||
|
||||
Reference in New Issue
Block a user