[IMP]Adding .py files in base_gengo module

bzr revid: tch@tinyerp.com-20120713121935-8akpxoebe6i9j1ja
This commit is contained in:
Twinkle Christian (OpenERP)
2012-07-13 17:49:35 +05:30
parent 9eda964e6e
commit 07f5aaf242
3 changed files with 101 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# 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 osv import fields,osv,orm
import os
import openerp
import tools
class ir_translation(osv.osv):
_name = "ir.translation"
_description="Translation"
_inherit="ir.translation"
_columns = {
'gengo_comment':fields.text("comments", help="Comment for translators"),
'gengo_translation':fields.boolean("Translation", help='This term has to be translated by Gengo automatically'),
'gengo_control':fields.boolean('Active'),
}
_defaults = {
'gengo_control':False,
}
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_translation_search" model="ir.ui.view">
<field name="name">Translations</field>
<field name="model">ir.translation</field>
<field name="inherit_id" ref="base.view_translation_search"/>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Translations">
<filter icon="terp-project" string="In Progress" domain="[('state','=','inprogress')]"></filter>
<filter string="In Control" domain="[('state','=','translated')]"></filter>
</search>
</field>
</record>
</data>
</openerp>
+43
View File
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# 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 osv import fields,osv,orm
import os
import openerp
import tools
class res_company(osv.osv):
_name = "res.company"
_description = "companies"
_inherit = "res.company"
_columns = {
"gengo_private_key":fields.text("Gengo private key"),
"gengo_public_key":fields.text("Gengo public key"),
"gengo_tier":fields.selection([('machine','Machine'),
('standard','Standard'),
('pro','Pro'),
('ultra','Ultra')],"Tier types", required=True),
"gengo_comment":fields.text("comments"),
"gengo_auto_approve":fields.boolean("Active"),
"fields_ids":fields.many2many('ir.model.fields','fields_company_rel','field_id','model_id'),
}