[IMP]: Improve in base_gengo module
bzr revid: aja@tinyerp.com-20120716124135-k2gyo052r460c3fv
This commit is contained in:
parent
fb97ac88ca
commit
be6cb0c3ca
|
@ -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',
|
||||
|
@ -31,7 +30,8 @@ Automated Translations through Gengo API
|
|||
'depends': ['base'],
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'ir_translation.xml'
|
||||
'ir_translation.xml',
|
||||
'res_company_view.xml'
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': [],
|
||||
|
|
|
@ -26,10 +26,9 @@ class ir_translation(osv.Model):
|
|||
_description="Translation"
|
||||
_inherit="ir.translation"
|
||||
_columns = {
|
||||
'gengo_comment':fields.text("comments", help="Comment for translators"),
|
||||
'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 = {
|
||||
|
|
|
@ -9,9 +9,28 @@
|
|||
<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>
|
||||
<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>
|
||||
|
|
|
@ -23,7 +23,7 @@ from osv import fields,osv
|
|||
|
||||
class res_company(osv.Model):
|
||||
_name = "res.company"
|
||||
_description = "companies"
|
||||
_description = "Companies"
|
||||
_inherit = "res.company"
|
||||
_columns = {
|
||||
"gengo_private_key":fields.text("Gengo private key"),
|
||||
|
@ -33,8 +33,10 @@ class res_company(osv.Model):
|
|||
('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'),
|
||||
|
||||
"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",
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue