mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Add record rule for currency.rate.update.service
Workaround for bug #151 Add dedicated menu entry for currency.rate.update.service in Accounting > Config > Misc Fix English mistake Clean-up form view structure of currency.rate.update.service
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
"view/service_cron_data.xml",
|
||||
"view/currency_rate_update.xml",
|
||||
"view/company_view.xml",
|
||||
"security/rule.xml",
|
||||
"security/ir.model.access.csv",
|
||||
],
|
||||
"demo": [],
|
||||
|
||||
@@ -27,7 +27,7 @@ msgstr ""
|
||||
|
||||
#. module: currency_rate_update
|
||||
#: help:res.company,auto_currency_up:0
|
||||
msgid "Automatical update of the currencies for this company"
|
||||
msgid "Automatic update of the currencies for this company"
|
||||
msgstr ""
|
||||
|
||||
#. module: currency_rate_update
|
||||
@@ -157,7 +157,7 @@ msgstr ""
|
||||
|
||||
#. module: currency_rate_update
|
||||
#: field:currency.rate.update.service,company_id:0
|
||||
msgid "Linked Company"
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: currency_rate_update
|
||||
|
||||
@@ -44,7 +44,7 @@ class res_company(models.Model):
|
||||
# Activate the currency update
|
||||
auto_currency_up = fields.Boolean(
|
||||
string='Automatic Update',
|
||||
help="Automatical update of the currencies for this company")
|
||||
help="Automatic update of the currencies for this company")
|
||||
# Function field that allows to know the
|
||||
# multi company currency implementation
|
||||
multi_company_currency_enable = fields.Boolean(
|
||||
|
||||
@@ -212,7 +212,7 @@ class Currency_rate_update_service(models.Model):
|
||||
string='Currencies to update with '
|
||||
'this service')
|
||||
# Link with company
|
||||
company_id = fields.Many2one('res.company', 'Linked Company')
|
||||
company_id = fields.Many2one('res.company', 'Company')
|
||||
# Note fileds that will be used as a logger
|
||||
note = fields.Text('Update logs')
|
||||
max_delta_days = fields.Integer(
|
||||
|
||||
13
currency_rate_update/security/rule.xml
Normal file
13
currency_rate_update/security/rule.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="currency_rate_update_service_multicompany_rule" model="ir.rule">
|
||||
<field name="name">Current Rate Update Service multi-company</field>
|
||||
<field name="model_id" ref="model_currency_rate_update_service"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -7,6 +7,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Currency update services">
|
||||
<field name="service"/>
|
||||
<field name="company_id" groups="base.group_multi_company"
|
||||
invisible="not context.get('currency_rate_update_main_view')"/>
|
||||
<field name="currency_to_update"/>
|
||||
<field name="interval_type"/>
|
||||
<field name="interval_number"/>
|
||||
@@ -20,25 +22,40 @@
|
||||
<field name="model">currency.rate.update.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Currency update services">
|
||||
<group>
|
||||
<group>
|
||||
<group name="main">
|
||||
<group name="left">
|
||||
<field name="service"/>
|
||||
<field name="company_id" groups="base.group_multi_company"
|
||||
invisible="not context.get('currency_rate_update_main_view')"
|
||||
required="context.get('currency_rate_update_main_view')"/>
|
||||
<field name="max_delta_days"/>
|
||||
</group>
|
||||
<group>
|
||||
<group name="right">
|
||||
<field name="interval_type"/>
|
||||
<field name="interval_number"/>
|
||||
<field name="next_run"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Currencies to update with this service" colspan="4"/>
|
||||
<field name="currency_list" invisible="1"/>
|
||||
<field name="currency_to_update" colspan="4" nolabel="1" domain="[('id','in', currency_list[0][2])]"/>
|
||||
<separator string="Logs" colspan="4"/>
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
<group string="Currencies to update with this service">
|
||||
<field name="currency_list" invisible="1"/>
|
||||
<field name="currency_to_update" nolabel="1" domain="[('id','in', currency_list[0][2])]"/>
|
||||
</group>
|
||||
<group string="Logs" name="logs">
|
||||
<field name="note" nolabel="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="currency_rate_update_action" model="ir.actions.act_window">
|
||||
<field name="name">Currency Rate Update</field>
|
||||
<field name="res_model">currency.rate.update.service</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'currency_rate_update_main_view': True}</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="currency_rate_update_menu" action="currency_rate_update_action"
|
||||
parent="account.menu_configuration_misc" sequence="21"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user