[MOV] base: move res_* data and demo into data/ along with images in static/img

Purpose is to clean the directory before working on it for new demo data
and some model cleaning.
This commit is contained in:
Thibault Delavallée
2017-11-27 11:13:58 +01:00
parent ca1a207aa3
commit d6804a8218
19 changed files with 23 additions and 23 deletions
+9 -9
View File
@@ -12,14 +12,14 @@ The kernel of Odoo, needed for all installation.
""",
'depends': [],
'data': [
'res/res.lang.csv',
'data/res.lang.csv',
'data/base_data.xml',
'res/res_currency_data.xml',
'res/res_country_data.xml',
'data/res_currency_data.xml',
'data/res_country_data.xml',
'security/base_security.xml',
'base_menu.xml',
'res/res_config.xml',
'res/res.country.state.csv',
'data/res.country.state.csv',
'ir/ir_actions.xml',
'ir/ir_config_parameter_view.xml',
'ir/ir_cron_view.xml',
@@ -57,7 +57,7 @@ The kernel of Odoo, needed for all installation.
'res/res_country_view.xml',
'res/res_currency_view.xml',
'res/res_users_view.xml',
'res/res_partner_data.xml',
'data/res_partner_data.xml',
'res/ir_property_view.xml',
'res/res_config_settings_views.xml',
'res/res_security.xml',
@@ -66,10 +66,10 @@ The kernel of Odoo, needed for all installation.
],
'demo': [
'data/base_demo.xml',
'res/res_currency_demo.xml',
'res/res_bank_demo.xml',
'res/res_partner_demo.xml',
'res/res_partner_image_demo.xml',
'data/res_currency_rate_demo.xml',
'data/res_bank_demo.xml',
'data/res_partner_demo.xml',
'data/res_partner_image_demo.xml',
],
'test': [],
'installable': True,
+1 -1
View File
@@ -31,7 +31,7 @@
<field name="phone">+1 555 123 8069</field>
<field name="email">info@yourcompany.example.com</field>
<field name="website">www.example.com</field>
<field name="image" type="base64" file="base/res/res_company_logo.png"/>
<field name="image" type="base64" file="base/static/img/res_company_logo.png"/>
</record>
<record id="main_company" model="res.company">
+1 -1
View File
@@ -27,7 +27,7 @@ class Company(models.Model):
return super(Company, self).copy(default)
def _get_logo(self):
return base64.b64encode(open(os.path.join(tools.config['root_path'], 'addons', 'base', 'res', 'res_company_logo.png'), 'rb') .read())
return base64.b64encode(open(os.path.join(tools.config['root_path'], 'addons', 'base', 'static', 'img', 'res_company_logo.png'), 'rb') .read())
@api.model
def _get_euro(self):
+4 -4
View File
@@ -288,13 +288,13 @@ class Partner(models.Model):
image = parent_image and parent_image.decode('base64') or None
if not image and partner_type == 'invoice':
img_path = get_module_resource('base', 'static/src/img', 'money.png')
img_path = get_module_resource('base', 'static/img', 'money.png')
elif not image and partner_type == 'delivery':
img_path = get_module_resource('base', 'static/src/img', 'truck.png')
img_path = get_module_resource('base', 'static/img', 'truck.png')
elif not image and is_company:
img_path = get_module_resource('base', 'static/src/img', 'company_image.png')
img_path = get_module_resource('base', 'static/img', 'company_image.png')
elif not image:
img_path = get_module_resource('base', 'static/src/img', 'avatar.png')
img_path = get_module_resource('base', 'static/img', 'avatar.png')
colorize = True
if img_path:
+8 -8
View File
@@ -296,11 +296,11 @@
<div class="o_kanban_image">
<img t-if="record.image_small.raw_value" t-att-src="'data:image/png;base64,'+record.image_small.raw_value"/>
<t t-if="!record.image_small.raw_value">
<img t-if="record.type.raw_value === 'delivery'" t-att-src='_s + "/base/static/src/img/truck.png"'/>
<img t-if="record.type.raw_value === 'invoice'" t-att-src='_s + "/base/static/src/img/money.png"'/>
<img t-if="record.type.raw_value === 'delivery'" t-att-src='_s + "/base/static/img/truck.png"'/>
<img t-if="record.type.raw_value === 'invoice'" t-att-src='_s + "/base/static/img/money.png"'/>
<t t-if="record.type.raw_value !== 'invoice' &amp;&amp; record.type.raw_value !== 'delivery'">
<img t-if="record.is_company.raw_value === true" t-att-src='_s + "/base/static/src/img/company_image.png"'/>
<img t-if="record.is_company.raw_value === false" t-att-src='_s + "/base/static/src/img/avatar.png"'/>
<img t-if="record.is_company.raw_value === true" t-att-src='_s + "/base/static/img/company_image.png"'/>
<img t-if="record.is_company.raw_value === false" t-att-src='_s + "/base/static/img/avatar.png"'/>
</t>
</t>
</div>
@@ -453,17 +453,17 @@
</t>
<t t-if="!record.image_small.raw_value">
<t t-if="record.type.raw_value === 'delivery'">
<img t-att-src='_s + "/base/static/src/img/truck.png"' class="o_kanban_image oe_kanban_avatar_smallbox"/>
<img t-att-src='_s + "/base/static/img/truck.png"' class="o_kanban_image oe_kanban_avatar_smallbox"/>
</t>
<t t-if="record.type.raw_value === 'invoice'">
<img t-att-src='_s + "/base/static/src/img/money.png"' class="o_kanban_image oe_kanban_avatar_smallbox"/>
<img t-att-src='_s + "/base/static/img/money.png"' class="o_kanban_image oe_kanban_avatar_smallbox"/>
</t>
<t t-if="record.type.raw_value != 'invoice' &amp;&amp; record.type.raw_value != 'delivery'">
<t t-if="record.is_company.raw_value === true">
<img t-att-src='_s + "/base/static/src/img/company_image.png"'/>
<img t-att-src='_s + "/base/static/img/company_image.png"'/>
</t>
<t t-if="record.is_company.raw_value === false">
<img t-att-src='_s + "/base/static/src/img/avatar.png"'/>
<img t-att-src='_s + "/base/static/img/avatar.png"'/>
</t>
</t>
</t>

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB