ajay javiya (OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-base-gengo-resource-aja into lp:~openerp-dev/openobject-addons/trunk-base-gengo.
Requested reviews: Jigar Amin (OpenERP) (jam-openerp) For more details, see: https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-base-gengo-resource-aja/+merge/115128 Hello , Improve in view for res_company and ir_translation in base_gengo module. Thank You. -- https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-base-gengo-resource-aja/+merge/115128 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-base-gengo.
=== modified file 'base_gengo/__init__.py' --- base_gengo/__init__.py 2012-07-11 05:30:16 +0000 +++ base_gengo/__init__.py 2012-07-16 12:46:19 +0000 @@ -19,4 +19,13 @@ # ############################################################################## +import res_company +import ir_translation + + + + + + + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === modified file 'base_gengo/__openerp__.py' --- base_gengo/__openerp__.py 2012-07-11 05:30:16 +0000 +++ base_gengo/__openerp__.py 2012-07-16 12:46:19 +0000 @@ -18,7 +18,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## - { 'name': 'Automated Translations through Gengo API', 'version': '0.1', @@ -30,7 +29,10 @@ 'website': 'http://www.openerp.com', 'depends': ['base'], 'init_xml': [], - 'update_xml': [], + 'update_xml': [ + 'ir_translation.xml', + 'res_company_view.xml' + ], 'demo_xml': [], 'test': [], 'installable': True, === added file 'base_gengo/ir_translation.py' --- base_gengo/ir_translation.py 1970-01-01 00:00:00 +0000 +++ base_gengo/ir_translation.py 2012-07-16 12:46:19 +0000 @@ -0,0 +1,37 @@ +# -*- 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"), + 'gengo_translation':fields.boolean("Translation", help='This term has to be translated by Gengo automatically'), + 'gengo_control':fields.boolean('Active'), + } + + _defaults = { + 'gengo_control':False, + } + === added file 'base_gengo/ir_translation.xml' --- base_gengo/ir_translation.xml 1970-01-01 00:00:00 +0000 +++ base_gengo/ir_translation.xml 2012-07-16 12:46:19 +0000 @@ -0,0 +1,36 @@ +<?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="To Control" domain="[('state','=','translated')]"></filter> + </search> + </field> + </record> + + <!-- ir.translation form view --> + <record model="ir.ui.view" id="view_ir_translation_inherit_base_gengo_form"> + <field name="name">ir.translation.form.inherit</field> + <field name="inherit_id" ref="base.view_translation_form"/> + <field name="model">ir.translation</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <xpath expr="//form[@string='Translations']/sheet" position="inside"> + <group string="comments" col="1"> + <field name="gengo_comment" nolabel="1" placeholder="Add Your comments here for Translation Job...."/> + </group> + <group col="4"> + <field name="gengo_translation" /> + <field name="gengo_control" /> + </group> + </xpath> + </field> + </record> + </data> +</openerp> === added file 'base_gengo/res_company.py' --- base_gengo/res_company.py 1970-01-01 00:00:00 +0000 +++ base_gengo/res_company.py 2012-07-16 12:46:19 +0000 @@ -0,0 +1,42 @@ +# -*- 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",help="Jobs are Automatically Approved by Gengo."), + "fields_ids":fields.many2many('ir.model.fields','fields_company_rel','field_id','model_id','fields'), + } + + _defaults={ + "gengo_tier":"machine", + } === added file 'base_gengo/res_company_view.xml' --- base_gengo/res_company_view.xml 1970-01-01 00:00:00 +0000 +++ base_gengo/res_company_view.xml 2012-07-16 12:46:19 +0000 @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<openerp> + <data> + <!-- res.company form view --> + <record model="ir.ui.view" id="view_company_inherit_base_gengo_form"> + <field name="name">res.company.form.inherit</field> + <field name="inherit_id" ref="base.view_company_form"/> + <field name="model">res.company</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <xpath expr="//notebook[last()]" position="inside"> + <page string="Gengo Parameters"> + <group col="2"> + <group col="1" string="Private Key"> + <field name="gengo_private_key" nolabel="1"/> + </group> + <group col="1" string="Public Key"> + <field name="gengo_public_key" nolabel="1"/> + </group> + </group> + <group col="4"> + <field name="gengo_tier" /> + <field name="gengo_auto_approve"/> + </group> + <group string="Comments" col="1"> + <field name="gengo_comment" nolabel="1" placeholder="Add Your comments here for Translator...."/> + </group> + <group col="1"> + <field name="fields_ids" nolabel="1"/> + </group> + </page> + </xpath> + </field> + </record> + + </data> +</openerp>
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp

