Browse Source

[FIX] move country=FR from demo data to test file

Case:
When base_phone is installed --before-- account, account module installs
l10n_fr (generate fiscal year and periods
    (see https://github.com/odoo/odoo/blob/8.0/addons/account/account_pre_install.yml and
     https://github.com/odoo/odoo/blob/8.0/addons/account/installer.py#L163))
and then account_demo.xml fails because fiscalyear and periods already
exists.
pull/78/head
Damien Crier 8 years ago
parent
commit
50814b1ab7
  1. 1
      base_phone/__openerp__.py
  2. 18
      base_phone/base_phone_demo.xml
  3. 5
      base_phone/test/phonenum.yml

1
base_phone/__openerp__.py

@ -76,7 +76,6 @@ for any help or question about this module.
'web_phone.xml',
],
'qweb': ['static/src/xml/*.xml'],
'demo': ['base_phone_demo.xml'],
'test': ['test/phonenum.yml'],
'images': [],
'installable': True,

18
base_phone/base_phone_demo.xml

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 Alexis de Lattre
@author Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __openerp__.py
-->
<openerp>
<data noupdate="1">
<!-- I need a country on the company, because otherwize it raises an error -->
<record id="base.main_company" model="res.company">
<field name="country_id" ref="base.fr"/>
</record>
</data>
</openerp>

5
base_phone/test/phonenum.yml

@ -1,3 +1,8 @@
-
Write country = FR for the main company
-
!record {model: res.company, id: base.main_company}:
country_id: base.fr
-
Write french phone numbers in national format
-

Loading…
Cancel
Save