Browse Source

IMP dir struct and copyright

pull/246/head
eLBati 9 years ago
parent
commit
04b524be5d
  1. 18
      base_field_validator/__init__.py
  2. 6
      base_field_validator/__openerp__.py
  3. 0
      base_field_validator/demo/ir_model_demo.xml
  4. 31
      base_field_validator/ir_model_field_regex.py
  5. 8
      base_field_validator/models/__init__.py
  6. 15
      base_field_validator/models/ir_model.py
  7. 18
      base_field_validator/models/ir_model_field_regex.py
  8. 0
      base_field_validator/views/ir_model_view.xml

18
base_field_validator/__init__.py

@ -1,21 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Agile Business Group sagl (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# See __openerp__.py about license
#
##############################################################################
from . import ir_model
from . import ir_model_field_regex
from . import models

6
base_field_validator/__openerp__.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright (C) 2014-2015 Lorenzo Battistini - Agile Business Group
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
@ -28,11 +28,11 @@
'license': 'AGPL-3',
"depends": ['base'],
"data": [
'ir_model_view.xml',
'views/ir_model_view.xml',
'security/ir.model.access.csv',
],
"demo": [
'ir_model_demo.xml',
'demo/ir_model_demo.xml',
],
'test': [
'test/validator.yml',

0
base_field_validator/ir_model_demo.xml → base_field_validator/demo/ir_model_demo.xml

31
base_field_validator/ir_model_field_regex.py

@ -1,31 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Agile Business Group sagl (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, fields
class IrModelFieldsRegex(models.Model):
_name = "ir.model.fields.regex"
name = fields.Char('Description', required=True)
regex = fields.Char(
'Regular Expression', required=True,
help="Regular expression used to validate the field. For example, "
"you can add the expression\n%s\nto the email field"
% r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b')

8
base_field_validator/models/__init__.py

@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# See __openerp__.py about license
#
##############################################################################
from . import ir_model
from . import ir_model_field_regex

15
base_field_validator/ir_model.py → base_field_validator/models/ir_model.py

@ -1,20 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Agile Business Group sagl (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# See __openerp__.py about license
#
##############################################################################

18
base_field_validator/models/ir_model_field_regex.py

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# See __openerp__.py about license
#
##############################################################################
from openerp import models, fields
class IrModelFieldsRegex(models.Model):
_name = "ir.model.fields.regex"
name = fields.Char('Description', required=True)
regex = fields.Char(
'Regular Expression', required=True,
help="Regular expression used to validate the field. For example, "
"you can add the expression\n%s\nto the email field"
% r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b')

0
base_field_validator/ir_model_view.xml → base_field_validator/views/ir_model_view.xml

Loading…
Cancel
Save