Merge lp:~elbati/account-financial-tools/currency_rate_update_v7 into lp:~account-core-editors/account-financial-tools/7.0

Proposed by Lorenzo Battistini
Status: Merged
Approved by: Joël Grand-Guillaume @ camptocamp
Approved revision: 116
Merged at revision: 111
Proposed branch: lp:~elbati/account-financial-tools/currency_rate_update_v7
Merge into: lp:~account-core-editors/account-financial-tools/7.0
Diff against target: 362 lines (+49/-86)
8 files modified
currency_rate_update/__init__.py (+0/-1)
currency_rate_update/__openerp__.py (+13/-11)
currency_rate_update/company.py (+5/-3)
currency_rate_update/company_view.xml (+5/-4)
currency_rate_update/currency_rate_update.py (+25/-32)
currency_rate_update/currency_rate_update.xml (+0/-4)
currency_rate_update/security/security.xml (+1/-1)
currency_rate_update/wizard/__init__.py (+0/-30)
To merge this branch: bzr merge lp:~elbati/account-financial-tools/currency_rate_update_v7
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp code review, no test Approve
Joël Grand-Guillaume @ camptocamp code review, no test Approve
Guewen Baconnier @ Camptocamp Approve
Review via email: mp+147945@code.launchpad.net

Description of the change

Small changes to make currency_rate_update work with v7

To post a comment you must log in.
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Hi Lorenzo,

Thanks for this MP ! It looks good to me.

Regards,

Joël

review: Approve
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

Please:

* use orm.Model instead of osv.osv in currency_rate_update.py and company.py
* remove unused wizard directory (and the corresponding import in currency_rate_update/__init__.py

review: Needs Fixing (code review, no test)
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

> Please:
>
> * use orm.Model instead of osv.osv in currency_rate_update.py and company.py
> * remove unused wizard directory (and the corresponding import in
> currency_rate_update/__init__.py

also:

* merge init_xml and update_xml in 'data' in __openerp__.py (you need to add a noupdate=1 in the security.xml file)
* rename demo_xml to demo in __openerp__.py

Thanks

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

It seems like I need to improve my review ;) ! Thanks Alex

111. By Lorenzo Battistini

[FIX] use osv.Model

112. By Lorenzo Battistini

[DEL] remove unused wizard directory

113. By Lorenzo Battistini

[FIX] loading xml files

114. By Lorenzo Battistini

[FIX] parameter name

115. By Lorenzo Battistini

[IMP] copyright headers

Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 02/14/2013 01:22 PM, Alexandre Fayolle - camptocamp wrote:
>> Please:
>>
>> * use orm.Model instead of osv.osv in currency_rate_update.py and company.py
>> * remove unused wizard directory (and the corresponding import in
>> currency_rate_update/__init__.py
> also:
>
> * merge init_xml and update_xml in 'data' in __openerp__.py (you need to add a noupdate=1 in the security.xml file)
> * rename demo_xml to demo in __openerp__.py

Done

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

When `logging` is used, the variables should not be substituted in the string directly like this:

    _logger.warning("the rate date from ECB (%s) is not today's date" % rate_date_str)

But rather, given as arguments to the call as follows:

    _logger.warning("the rate date from ECB (%s) is not today's date", rate_date_str)

Thus, they will be interpreted only if the logging is effective.

As nobody noticed that before, I won't mind if you don't change them. But would be nice...

Beside that, seems fine to me.
Thanks

review: Approve
116. By Lorenzo Battistini

[IMP] logging arguments

Revision history for this message
Lorenzo Battistini (elbati) wrote :

2013/2/18 Guewen Baconnier @ Camptocamp <email address hidden>

>
> But rather, given as arguments to the call as follows:
>
> _logger.warning("the rate date from ECB (%s) is not today's date",
> rate_date_str)
>
> Thus, they will be interpreted only if the logging is effective.
>
>
Done

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Hi,

Thanks for the contribs !

Regards,

Joël

review: Approve (code review, no test)
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

LGTM. I'm about to merge.

review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'currency_rate_update/__init__.py'
--- currency_rate_update/__init__.py 2011-08-12 12:35:23 +0000
+++ currency_rate_update/__init__.py 2013-02-21 18:08:22 +0000
@@ -30,4 +30,3 @@
3030
31import currency_rate_update31import currency_rate_update
32import company32import company
33import wizard
3433
=== modified file 'currency_rate_update/__openerp__.py'
--- currency_rate_update/__openerp__.py 2013-01-04 10:31:20 +0000
+++ currency_rate_update/__openerp__.py 2013-02-21 18:08:22 +0000
@@ -3,7 +3,7 @@
3# Copyright (c) 2008 Camtocamp SA3# Copyright (c) 2008 Camtocamp SA
4# @author JB Aubort, Nicolas Bessi, Joel Grand-Guillaume4# @author JB Aubort, Nicolas Bessi, Joel Grand-Guillaume
5# European Central Bank and Polish National Bank invented by Grzegorz Grzelak5# European Central Bank and Polish National Bank invented by Grzegorz Grzelak
6# $Id: $6# Ported to OpenERP 7.0 by Lorenzo Battistini <lorenzo.battistini@agilebg.com>
7#7#
8# WARNING: This program as such is intended to be used by professional8# WARNING: This program as such is intended to be used by professional
9# programmers who take the whole responsability of assessing all potential9# programmers who take the whole responsability of assessing all potential
@@ -29,7 +29,7 @@
29##############################################################################29##############################################################################
30{30{
31 "name" : "Currency Rate Update",31 "name" : "Currency Rate Update",
32 "version" : "0.6",32 "version" : "0.7",
33 "author" : "Camptocamp",33 "author" : "Camptocamp",
34 "website" : "http://camptocamp.com",34 "website" : "http://camptocamp.com",
35 "category" : "Financial Management/Configuration",35 "category" : "Financial Management/Configuration",
@@ -79,14 +79,16 @@
7979
80Thanks to main contributors: Grzegorz Grzelak, Alexis de Lattre80Thanks to main contributors: Grzegorz Grzelak, Alexis de Lattre
81""",81""",
82 "depends" : ["base",82 "depends" : [
83 "account"], #Added to ensure account security groups are present83 "base",
84 "init_xml" : ["security/security.xml"],84 "account", #Added to ensure account security groups are present
85 "update_xml" : [85 ],
86 "currency_rate_update.xml",86 "data" : [
87 "company_view.xml",87 "currency_rate_update.xml",
88 ],88 "company_view.xml",
89 "demo_xml" : [],89 "security/security.xml",
90 ],
91 "demo" : [],
90 "active": False,92 "active": False,
91 'installable': False93 'installable': True
92}94}
9395
=== modified file 'currency_rate_update/company.py'
--- currency_rate_update/company.py 2013-01-04 10:51:23 +0000
+++ currency_rate_update/company.py 2013-02-21 18:08:22 +0000
@@ -29,8 +29,9 @@
29##############################################################################29##############################################################################
3030
31import netsvc31import netsvc
32from osv import fields, osv32from openerp.osv import fields, osv
33class res_company(osv.osv):33
34class res_company(osv.Model):
34 """override company to add currency update"""35 """override company to add currency update"""
35 36
36 def _multi_curr_enable(self, cr, uid, ids, field_name, arg, context={}):37 def _multi_curr_enable(self, cr, uid, ids, field_name, arg, context={}):
@@ -161,4 +162,5 @@
161 ' not set currency is active on two company'162 ' not set currency is active on two company'
162 ),163 ),
163 } 164 }
164res_company()165
166
165167
=== modified file 'currency_rate_update/company_view.xml'
--- currency_rate_update/company_view.xml 2012-02-03 13:53:02 +0000
+++ currency_rate_update/company_view.xml 2013-02-21 18:08:22 +0000
@@ -4,13 +4,14 @@
4 <field name="name">res.company.form.inherit</field>4 <field name="name">res.company.form.inherit</field>
5 <field name="model">res.company</field>5 <field name="model">res.company</field>
6 <field name="inherit_id" ref="base.view_company_form"/>6 <field name="inherit_id" ref="base.view_company_form"/>
7 <field name="type">form</field>
8 <field name="arch" type="xml">7 <field name="arch" type="xml">
9 <notebook position="inside">8 <notebook position="inside">
10 <page string="Currency auto update configuration">9 <page string="Currency auto update configuration">
11 <field name="auto_currency_up" on_change="on_change_auto_currency_up(auto_currency_up)"/> 10 <group>
12 <field name="interval_type" on_change="on_change_intervall(interval_type)"/>11 <field name="auto_currency_up" on_change="on_change_auto_currency_up(auto_currency_up)"/>
13 <field name="multi_company_currency_enable"/>12 <field name="interval_type" on_change="on_change_intervall(interval_type)"/>
13 <field name="multi_company_currency_enable"/>
14 </group>
14 <separator string="Currency updates services" colspan="4"/>15 <separator string="Currency updates services" colspan="4"/>
15 <field name="services_to_use" colspan="4" nolabel="1"/>16 <field name="services_to_use" colspan="4" nolabel="1"/>
16 <button name="button_refresh_currency" string="Refresh currencies" type='object' />17 <button name="button_refresh_currency" string="Refresh currencies" type='object' />
1718
=== modified file 'currency_rate_update/currency_rate_update.py'
--- currency_rate_update/currency_rate_update.py 2012-04-23 12:19:50 +0000
+++ currency_rate_update/currency_rate_update.py 2013-02-21 18:08:22 +0000
@@ -14,6 +14,7 @@
14# For more details, see Launchpad bug #64526314# For more details, see Launchpad bug #645263
15# - mecanism to check if rates given by the webservice are "fresh" enough to be15# - mecanism to check if rates given by the webservice are "fresh" enough to be
16# written in OpenERP ('max_delta_days' parameter for each currency update service)16# written in OpenERP ('max_delta_days' parameter for each currency update service)
17# Ported to OpenERP 7.0 by Lorenzo Battistini <lorenzo.battistini@agilebg.com>
17#18#
18# WARNING: This program as such is intended to be used by professional19# WARNING: This program as such is intended to be used by professional
19# programmers who take the whole responsability of assessing all potential20# programmers who take the whole responsability of assessing all potential
@@ -42,13 +43,15 @@
42# a webservice to the list of currencies supported by the Webservice43# a webservice to the list of currencies supported by the Webservice
43# TODO : implement max_delta_days for Yahoo webservice44# TODO : implement max_delta_days for Yahoo webservice
4445
45from osv import osv, fields46from openerp.osv import fields, osv
46import time47import time
47from datetime import datetime, timedelta48from datetime import datetime, timedelta
48import netsvc49import logging
49from tools.translate import _50from openerp.tools.translate import _
5051
51class Currency_rate_update_service(osv.osv):52_logger = logging.getLogger(__name__)
53
54class Currency_rate_update_service(osv.Model):
52 """Class thats tell for wich services wich currencies 55 """Class thats tell for wich services wich currencies
53 have to be updated"""56 have to be updated"""
54 _name = "currency.rate.update.service"57 _name = "currency.rate.update.service"
@@ -107,9 +110,8 @@
107 (_check_max_delta_days, "'Max delta days' must be >= 0", ['max_delta_days']),110 (_check_max_delta_days, "'Max delta days' must be >= 0", ['max_delta_days']),
108 ]111 ]
109112
110Currency_rate_update_service()
111113
112class Currency_rate_update(osv.osv):114class Currency_rate_update(osv.Model):
113 """Class that handle an ir cron call who will 115 """Class that handle an ir cron call who will
114 update currencies based on a web url"""116 update currencies based on a web url"""
115 _name = "currency.rate.update"117 _name = "currency.rate.update"
@@ -128,7 +130,6 @@
128 'args' : '()', 130 'args' : '()',
129 }131 }
130 132
131 logger = netsvc.Logger()
132 LOG_NAME = 'cron-rates'133 LOG_NAME = 'cron-rates'
133 MOD_NAME = 'c2c_currency_rate_update: '134 MOD_NAME = 'c2c_currency_rate_update: '
134 def get_cron_id(self, cr, uid, context):135 def get_cron_id(self, cr, uid, context):
@@ -151,11 +152,7 @@
151 )152 )
152 cron_id = int(cron_id[0])153 cron_id = int(cron_id[0])
153 except Exception,e :154 except Exception,e :
154 self.logger.notifyChannel(155 _logger.info('warning cron not found one will be created')
155 self.LOG_NAME,
156 netsvc.LOG_INFO,
157 'warning cron not found one will be created'
158 )
159 pass # ignore if the cron is missing cause we are going to create it in db156 pass # ignore if the cron is missing cause we are going to create it in db
160 157
161 #the cron does not exists158 #the cron does not exists
@@ -228,11 +225,10 @@
228 except Exception, e:225 except Exception, e:
229 error_msg = note + "\n%s ERROR : %s"\226 error_msg = note + "\n%s ERROR : %s"\
230 %(datetime.strftime(datetime.today(), '%Y-%m-%d %H:%M:%S'), str(e))227 %(datetime.strftime(datetime.today(), '%Y-%m-%d %H:%M:%S'), str(e))
231 self.logger.notifyChannel(self.LOG_NAME, netsvc.LOG_INFO, str(e))228 _logger.info(str(e))
232 service.write({'note':error_msg})229 service.write({'note':error_msg})
233 230
234 231
235Currency_rate_update()
236232
237### Error Definition as specified in python 2.6 PEP233### Error Definition as specified in python 2.6 PEP
238class AbstractClassError(Exception): 234class AbstractClassError(Exception):
@@ -355,7 +351,7 @@
355 rate_date_str = datetime.strftime(rate_date, '%Y-%m-%d')351 rate_date_str = datetime.strftime(rate_date, '%Y-%m-%d')
356 if rate_date_str != datetime.strftime(datetime.today(), '%Y-%m-%d'):352 if rate_date_str != datetime.strftime(datetime.today(), '%Y-%m-%d'):
357 self.log_info = "WARNING : the rate date from ECB (%s) is not today's date" % rate_date_str353 self.log_info = "WARNING : the rate date from ECB (%s) is not today's date" % rate_date_str
358 netsvc.Logger().notifyChannel("rate_update", netsvc.LOG_WARNING, "the rate date from ECB (%s) is not today's date" % rate_date_str)354 _logger.warning("the rate date from ECB (%s) is not today's date", rate_date_str)
359355
360356
361#Yahoo ################################################################################### 357#Yahoo ###################################################################################
@@ -402,11 +398,10 @@
402 currency_array.remove(main_currency)398 currency_array.remove(main_currency)
403 # Move to new XML lib cf Launchpad bug #645263399 # Move to new XML lib cf Launchpad bug #645263
404 from lxml import etree400 from lxml import etree
405 logger = netsvc.Logger()401 _logger.debug("Admin.ch currency rate service : connecting...")
406 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "Admin.ch currency rate service : connecting...")
407 rawfile = self.get_url(url)402 rawfile = self.get_url(url)
408 dom = etree.fromstring(rawfile)403 dom = etree.fromstring(rawfile)
409 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "Admin.ch sent a valid XML file")404 _logger.debug("Admin.ch sent a valid XML file")
410 adminch_ns = {'def': 'http://www.afd.admin.ch/publicdb/newdb/mwst_kurse'}405 adminch_ns = {'def': 'http://www.afd.admin.ch/publicdb/newdb/mwst_kurse'}
411 rate_date = dom.xpath('/def:wechselkurse/def:datum/text()', namespaces=adminch_ns)[0]406 rate_date = dom.xpath('/def:wechselkurse/def:datum/text()', namespaces=adminch_ns)[0]
412 rate_date_datetime = datetime.strptime(rate_date, '%Y-%m-%d')407 rate_date_datetime = datetime.strptime(rate_date, '%Y-%m-%d')
@@ -416,7 +411,7 @@
416 self.supported_currency_array = [x.upper() for x in self.supported_currency_array]411 self.supported_currency_array = [x.upper() for x in self.supported_currency_array]
417 self.supported_currency_array.append('CHF')412 self.supported_currency_array.append('CHF')
418413
419 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "Supported currencies = " + str(self.supported_currency_array))414 _logger.debug("Supported currencies = " + str(self.supported_currency_array))
420 self.validate_cur(main_currency)415 self.validate_cur(main_currency)
421 if main_currency != 'CHF':416 if main_currency != 'CHF':
422 main_curr_data = self.rate_retrieve(dom, adminch_ns, main_currency)417 main_curr_data = self.rate_retrieve(dom, adminch_ns, main_currency)
@@ -434,7 +429,7 @@
434 else :429 else :
435 rate = main_rate * curr_data['rate_ref'] / curr_data['rate_currency']430 rate = main_rate * curr_data['rate_ref'] / curr_data['rate_currency']
436 self.updated_currency[curr] = rate431 self.updated_currency[curr] = rate
437 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "Rate retrieved : 1 " + main_currency + ' = ' + str(rate) + ' ' + curr)432 _logger.debug("Rate retrieved : 1 " + main_currency + ' = ' + str(rate) + ' ' + curr)
438 return self.updated_currency, self.log_info433 return self.updated_currency, self.log_info
439434
440## ECB getter ############################################################################435## ECB getter ############################################################################
@@ -464,11 +459,10 @@
464 currency_array.remove(main_currency)459 currency_array.remove(main_currency)
465 # Move to new XML lib cf Launchpad bug #645263460 # Move to new XML lib cf Launchpad bug #645263
466 from lxml import etree461 from lxml import etree
467 logger = netsvc.Logger()462 _logger.debug("ECB currency rate service : connecting...")
468 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "ECB currency rate service : connecting...")
469 rawfile = self.get_url(url)463 rawfile = self.get_url(url)
470 dom = etree.fromstring(rawfile)464 dom = etree.fromstring(rawfile)
471 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "ECB sent a valid XML file")465 _logger.debug("ECB sent a valid XML file")
472 ecb_ns = {'gesmes': 'http://www.gesmes.org/xml/2002-08-01', 'def': 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'}466 ecb_ns = {'gesmes': 'http://www.gesmes.org/xml/2002-08-01', 'def': 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'}
473 rate_date = dom.xpath('/gesmes:Envelope/def:Cube/def:Cube/@time', namespaces=ecb_ns)[0]467 rate_date = dom.xpath('/gesmes:Envelope/def:Cube/def:Cube/@time', namespaces=ecb_ns)[0]
474 rate_date_datetime = datetime.strptime(rate_date, '%Y-%m-%d')468 rate_date_datetime = datetime.strptime(rate_date, '%Y-%m-%d')
@@ -476,7 +470,7 @@
476 #we dynamically update supported currencies470 #we dynamically update supported currencies
477 self.supported_currency_array = dom.xpath("/gesmes:Envelope/def:Cube/def:Cube/def:Cube/@currency", namespaces=ecb_ns)471 self.supported_currency_array = dom.xpath("/gesmes:Envelope/def:Cube/def:Cube/def:Cube/@currency", namespaces=ecb_ns)
478 self.supported_currency_array.append('EUR')472 self.supported_currency_array.append('EUR')
479 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "Supported currencies = " + str(self.supported_currency_array))473 _logger.debug("Supported currencies = " + str(self.supported_currency_array))
480 self.validate_cur(main_currency)474 self.validate_cur(main_currency)
481 if main_currency != 'EUR':475 if main_currency != 'EUR':
482 main_curr_data = self.rate_retrieve(dom, ecb_ns, main_currency)476 main_curr_data = self.rate_retrieve(dom, ecb_ns, main_currency)
@@ -491,7 +485,7 @@
491 else:485 else:
492 rate = curr_data['rate_currency'] / main_curr_data['rate_currency']486 rate = curr_data['rate_currency'] / main_curr_data['rate_currency']
493 self.updated_currency[curr] = rate487 self.updated_currency[curr] = rate
494 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "Rate retrieved : 1 " + main_currency + ' = ' + str(rate) + ' ' + curr)488 _logger.debug("Rate retrieved : 1 " + main_currency + ' = ' + str(rate) + ' ' + curr)
495 return self.updated_currency, self.log_info489 return self.updated_currency, self.log_info
496490
497##PL NBP ############################################################################491##PL NBP ############################################################################
@@ -517,12 +511,11 @@
517 currency_array.remove(main_currency)511 currency_array.remove(main_currency)
518 # Move to new XML lib cf Launchpad bug #645263512 # Move to new XML lib cf Launchpad bug #645263
519 from lxml import etree513 from lxml import etree
520 logger = netsvc.Logger()514 _logger.debug("NBP.pl currency rate service : connecting...")
521 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "NBP.pl currency rate service : connecting...")
522 rawfile = self.get_url(url)515 rawfile = self.get_url(url)
523 dom = etree.fromstring(rawfile) # If rawfile is not XML, it crashes here516 dom = etree.fromstring(rawfile) # If rawfile is not XML, it crashes here
524 ns = {} # Cool, there are no namespaces !517 ns = {} # Cool, there are no namespaces !
525 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "NBP.pl sent a valid XML file")518 _logger.debug("NBP.pl sent a valid XML file")
526 #node = xpath.Evaluate("/tabela_kursow", dom) # BEGIN Polish - rates table name519 #node = xpath.Evaluate("/tabela_kursow", dom) # BEGIN Polish - rates table name
527 #if isinstance(node, list) :520 #if isinstance(node, list) :
528 # node = node[0]521 # node = node[0]
@@ -535,7 +528,7 @@
535 #we dynamically update supported currencies528 #we dynamically update supported currencies
536 self.supported_currency_array = dom.xpath('/tabela_kursow/pozycja/kod_waluty/text()', namespaces=ns)529 self.supported_currency_array = dom.xpath('/tabela_kursow/pozycja/kod_waluty/text()', namespaces=ns)
537 self.supported_currency_array.append('PLN')530 self.supported_currency_array.append('PLN')
538 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "Supported currencies = " + str(self.supported_currency_array))531 _logger.debug("Supported currencies = " + str(self.supported_currency_array))
539 self.validate_cur(main_currency)532 self.validate_cur(main_currency)
540 if main_currency != 'PLN':533 if main_currency != 'PLN':
541 main_curr_data = self.rate_retrieve(dom, ns, main_currency)534 main_curr_data = self.rate_retrieve(dom, ns, main_currency)
@@ -553,5 +546,5 @@
553 else:546 else:
554 rate = main_rate * curr_data['rate_ref'] / curr_data['rate_currency']547 rate = main_rate * curr_data['rate_ref'] / curr_data['rate_currency']
555 self.updated_currency[curr] = rate548 self.updated_currency[curr] = rate
556 logger.notifyChannel("rate_update", netsvc.LOG_DEBUG, "Rate retrieved : 1 " + main_currency + ' = ' + str(rate) + ' ' + curr)549 _logger.debug("Rate retrieved : 1 " + main_currency + ' = ' + str(rate) + ' ' + curr)
557 return self.updated_currency, self.log_info550 return self.updated_currency, self.log_info
558551
=== modified file 'currency_rate_update/currency_rate_update.xml'
--- currency_rate_update/currency_rate_update.xml 2011-08-12 12:35:23 +0000
+++ currency_rate_update/currency_rate_update.xml 2013-02-21 18:08:22 +0000
@@ -4,12 +4,10 @@
4 <record model="ir.ui.view" id="currency_rate_update_tree">4 <record model="ir.ui.view" id="currency_rate_update_tree">
5 <field name="name">Update Rates service</field>5 <field name="name">Update Rates service</field>
6 <field name="model">currency.rate.update.service</field>6 <field name="model">currency.rate.update.service</field>
7 <field name="type">tree</field>
8 <field name="arch" type="xml">7 <field name="arch" type="xml">
9 <tree string="Rates">8 <tree string="Rates">
10 <field name="service"/>9 <field name="service"/>
11 <field name="currency_to_update"/>10 <field name="currency_to_update"/>
12 <field name="company_id"/>
1311
14 </tree>12 </tree>
15 </field>13 </field>
@@ -18,11 +16,9 @@
18 <record model="ir.ui.view" id="currency_rate_update_form">16 <record model="ir.ui.view" id="currency_rate_update_form">
19 <field name="name">Update Rates</field>17 <field name="name">Update Rates</field>
20 <field name="model">currency.rate.update.service</field>18 <field name="model">currency.rate.update.service</field>
21 <field name="type">form</field>
22 <field name="arch" type="xml">19 <field name="arch" type="xml">
23 <form string="Rate">20 <form string="Rate">
24 <field name="service"/>21 <field name="service"/>
25 <field name="company_id"/>
26 <field name="max_delta_days"/>22 <field name="max_delta_days"/>
27 <separator string="Currencies to update with this service" colspan="4"/>23 <separator string="Currencies to update with this service" colspan="4"/>
28 <field name="currency_to_update" colspan="4" nolabel="1"/>24 <field name="currency_to_update" colspan="4" nolabel="1"/>
2925
=== modified file 'currency_rate_update/security/security.xml'
--- currency_rate_update/security/security.xml 2011-09-01 13:58:58 +0000
+++ currency_rate_update/security/security.xml 2013-02-21 18:08:22 +0000
@@ -1,6 +1,6 @@
1<?xml version="1.0" ?>1<?xml version="1.0" ?>
2<openerp>2<openerp>
3 <data>3 <data noupdate="1">
4 <record id="ir_model_access_currencyrateupdate0" model="ir.model.access">4 <record id="ir_model_access_currencyrateupdate0" model="ir.model.access">
5 <field name="model_id" ref="currency_rate_update.model_currency_rate_update"/>5 <field name="model_id" ref="currency_rate_update.model_currency_rate_update"/>
6 <field eval="1" name="perm_read"/>6 <field eval="1" name="perm_read"/>
77
=== removed directory 'currency_rate_update/wizard'
=== removed file 'currency_rate_update/wizard/__init__.py'
--- currency_rate_update/wizard/__init__.py 2011-08-12 12:35:23 +0000
+++ currency_rate_update/wizard/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2008 Camtocamp SA
5# @author JB Aubort
6# $Id$
7#
8# WARNING: This program as such is intended to be used by professional
9# programmers who take the whole responsability of assessing all potential
10# consequences resulting from its eventual inadequacies and bugs
11# End users who are looking for a ready-to-use solution with commercial
12# garantees and support are strongly adviced to contract a Free Software
13# Service Company
14#
15# This program is Free Software; you can redistribute it and/or
16# modify it under the terms of the GNU General Public License
17# as published by the Free Software Foundation; either version 2
18# of the License, or (at your option) any later version.
19#
20# This program is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License
26# along with this program; if not, write to the Free Software
27# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28#
29##############################################################################
30

Subscribers

People subscribed via source and target branches