[MERGE]:Branch trunk-base-gengo-res-tch

bzr revid: aja@tinyerp.com-20120716061306-az2qabiako2izoc4
This commit is contained in:
ajay javiya (OpenERP)
2012-07-16 11:43:06 +05:30
5 changed files with 107 additions and 1 deletions
+9
View File
@@ -19,4 +19,13 @@
#
##############################################################################
import res_company
import ir_translation
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+3 -1
View File
@@ -30,7 +30,9 @@ Automated Translations through Gengo API
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': [],
'update_xml': [],
'update_xml': [
'ir_translation.xml'
],
'demo_xml': [],
'test': [],
'installable': True,
+38
View File
@@ -0,0 +1,38 @@
# -*- 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
class ir_translation(osv.Model):
_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>
+40
View File
@@ -0,0 +1,40 @@
# -*- 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
class res_company(osv.Model):
_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'),
}