[IMP] project: add and rework demo data

This commit adds plenty of new demo data showcasing some features that weren't before, and also reworks existing demo data to make is more consistent.

Closes #80102
Task 2669762
This commit is contained in:
Vincent Larcin
2022-01-04 17:03:10 +00:00
parent 522cd83f69
commit 6ec64c6307
11 changed files with 1590 additions and 931 deletions
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -51,7 +51,10 @@
'wizard/project_delete_wizard_views.xml',
'wizard/project_task_type_delete_views.xml',
],
'demo': ['data/project_demo.xml'],
'demo': [
'data/mail_template_demo.xml',
'data/project_demo.xml',
],
'test': [
],
'installable': True,
@@ -0,0 +1,24 @@
<odoo>
<data>
<record id="project_done_email_template" model="mail.template">
<field name="name">Project: Project Completed</field>
<field name="model_id" ref="project.model_project_project"/>
<field name="subject">Project status - {{ object.name }}</field>
<field name="email_from">{{ (object.partner_id.email_formatted if object.partner_id else user.email_formatted) }}</field>
<field name="partner_to" >{{ object.partner_id.id }}</field>
<field name="body_html" type="html">
<div>
Dear <t t-out="object.partner_id.name or 'customer'">Brandon Freeman</t>,<br/>
It is my pleasure to let you know that we have successfully completed the project "<strong t-out="object.name or ''">Renovations</strong>".
<t t-if="user.signature">
<br />
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
</t>
</div>
<br/><span style="margin: 0px 0px 0px 0px; font-size: 12px; opacity: 0.5; color: #454748;">You are receiving this email because your project has been moved to the stage <b t-out="object.stage_id.name or ''">Done</b></span>
</field>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="auto_delete" eval="True"/>
</record>
</data>
</odoo>
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -12,7 +12,9 @@
'data': [
'views/project_project_views.xml',
],
'demo': [],
'demo': [
'data/project_hr_expense_demo.xml',
],
'installable': True,
'auto_install': True,
'license': 'OEEL-1',
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="hr_expense.travel_admin_by_car_expense" model="hr.expense">
<field name="analytic_account_id" ref="project.analytic_office_design"/>
</record>
<record id="hr_expense.travel_demo_by_car_expense" model="hr.expense">
<field name="analytic_account_id" ref="project.analytic_office_design"/>
</record>
</data>
</odoo>
+3
View File
@@ -11,6 +11,9 @@
'data': [
'views/project_views.xml',
],
'demo': [
'data/project_mrp_demo.xml',
],
'application': False,
'auto_install': True,
'license': 'LGPL-3',
@@ -0,0 +1,7 @@
<odoo>
<data noupdate="1">
<record id="mrp.mrp_production_3" model="mrp.production">
<field name="analytic_account_id" ref="project.analytic_office_design"/>
</record>
</data>
</odoo>
+3
View File
@@ -11,6 +11,9 @@
'data': [
'views/project_views.xml',
],
'demo': [
'data/project_purchase_demo.xml',
],
'application': False,
'auto_install': True,
'license': 'LGPL-3',
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<function model="purchase.order.line" name="write">
<value model="purchase.order.line" search="[('product_id', 'in', [ref('product.product_delivery_01'), ref('product.product_product_27')]), ('order_id', '=', ref('purchase.purchase_order_1'))]"/>
<value eval="{'account_analytic_id': ref('project.analytic_office_design')}"/>
</function>
</data>
</odoo>
File diff suppressed because it is too large Load Diff