Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] software_reseller, corporate_gifts: move Properties to new fields #126

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions corporate_gifts/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
'data': [
'data/res_config_settings.xml',
'data/ir_attachment_pre.xml',
'data/ir_model_fields.xml',
'data/ir_ui_view.xml',
'data/mail_template.xml',
'data/product_public_category.xml',
'data/project_task_type.xml',
Expand Down
23 changes: 23 additions & 0 deletions corporate_gifts/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="field_x_color" model="ir.model.fields">
<field name="name">x_color</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="field_description">Number of Colors</field>
<field name="ttype">integer</field>
</record>
<record id="field_x_logo_format" model="ir.model.fields">
<field name="name">x_logo_format</field>
<field name="field_description">Logo Format</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="selection">[('PDF', 'PDF'), ('SVG', 'SVG'), ('Others', 'Others')]</field>
<field name="ttype">selection</field>
</record>
<record id="field_x_print_size" model="ir.model.fields">
<field name="name">x_print_size</field>
<field name="field_description">Print Size</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="selection">[('Pocket', 'Pocket'), ('Back', 'Back'), ('Front', 'Front'), ('Other', 'Other')]</field>
<field name="ttype">selection</field>
</record>
</odoo>
18 changes: 18 additions & 0 deletions corporate_gifts/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="project_task_customization_corporate_gifts" model="ir.ui.view">
<field name="name">project.task.form.customization.corporate_gifts</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="mode">extension</field>
<field name="priority">1000</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="x_color"/>
<field name="x_logo_format"/>
<field name="x_print_size"/>
</xpath>
</field>
</record>
</odoo>
5 changes: 0 additions & 5 deletions corporate_gifts/data/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
<field name="type_ids" eval="[(6, 0, [ref('project_task_type_1'), ref('project_task_type_13'), ref('project_task_type_3'), ref('project_task_type_4')])]" />
<field name="allow_billable" eval="True" />
<field name="documents_folder_id" ref="documents_folder_8" />
<field name="task_properties_definition" eval="[
{'name': 'e969be3bdac9911e', 'type': 'integer', 'string': 'Number of Colors', 'default': 1},
{'name': '2d1d5547a34290dd', 'type': 'selection', 'string': 'Logo Format', 'default': False, 'selection': [['3222f8b2f3741511', 'PDF'], ['9b336bdb918d8657', 'SVG'], ['c91e51732e3d91b0', 'Others']]},
{'name': 'd297c538aa58b985', 'type': 'selection', 'string': 'Print Size', 'default': False, 'selection': [['0a45ff7c4f2cd147', 'Pocket'], ['53a514f2f41e937a', 'Back'], ['b08e665af1ab36d8', 'Front'], ['a344fc53f4bda642', 'Other']]}
]"/>
</record>
<record id="project_project_2" model="project.project" >
<field name="name">Serigraphy</field>
Expand Down
2 changes: 2 additions & 0 deletions software_reseller/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
'data/ir_attachment_pre.xml',
'data/ir_actions_act_window.xml',
'data/ir_ui_menu.xml',
'data/ir_model_fields.xml',
'data/ir_ui_view.xml',
'data/project_task_type.xml',
'data/product_category.xml',
'data/account_analytic_plan.xml',
Expand Down
49 changes: 49 additions & 0 deletions software_reseller/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="field_x_client" model="ir.model.fields">
<field name="name">x_client</field>
<field name="field_description">Client</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="relation">res.partner</field>
<field name="ttype">many2one</field>
</record>
<record id="field_x_version" model="ir.model.fields">
<field name="name">x_version</field>
<field name="field_description">Java Version</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="ttype">char</field>
</record>
<record id="field_x_license_key" model="ir.model.fields">
<field name="name">x_license_key</field>
<field name="field_description">License Key</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="ttype">char</field>
</record>
<record id="field_x_users" model="ir.model.fields">
<field name="name">x_users</field>
<field name="field_description">Number of Users</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="ttype">integer</field>
</record>
<record id="field_x_odoo_version" model="ir.model.fields">
<field name="name">x_odoo_version</field>
<field name="field_description">Odoo Version</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="selection">[('Odoo 14', 'Odoo 14'), ('Odoo 15', 'Odoo 15'), ('Odoo 16', 'Odoo 16'), ('Odoo 17', 'Odoo 17')]</field>
<field name="ttype">selection</field>
</record>
<record id="field_x_hosted" model="ir.model.fields">
<field name="name">x_hosted</field>
<field name="field_description">Hosted On</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="selection">[('On Premise', 'On Premise'), ('Odoo.sh', 'Odoo.sh'), ('Odoo Online', 'Odoo Online')]</field>
<field name="ttype">selection</field>
</record>
<record id="field_x_environment" model="ir.model.fields">
<field name="name">x_environment</field>
<field name="field_description">Environment</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="selection">[('Production', 'Production'), ('Test', 'Test'), ('Development', 'Development')]</field>
<field name="ttype">selection</field>
</record>
</odoo>
22 changes: 22 additions & 0 deletions software_reseller/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="project_task_customization_software_reseller" model="ir.ui.view">
<field name="name">project.task.form.customization.software.reseller</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="mode">extension</field>
<field name="priority">1000</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="x_client"/>
<field name="x_version"/>
<field name="x_license_key"/>
<field name="x_users"/>
<field name="x_odoo_version"/>
<field name="x_hosted"/>
<field name="x_environment"/>
</xpath>
</field>
</record>
</odoo>
3 changes: 0 additions & 3 deletions software_reseller/data/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<field name="is_favorite" eval="False"/>
<field name="analytic_account_id" ref="account_analytic_account_3" />
<field name="type_ids" eval="[(6, 0, [ref('project_task_type_1'), ref('project_task_type_2'), ref('project_task_type_3'), ref('project_task_type_4')])]" />
<field name="task_properties_definition" eval="[{'name': '0199a697eee37d67', 'type': 'many2one', 'domain': False, 'string': 'Client', 'comodel': 'res.partner', 'default': False}, {'name': '92523a6947203790', 'type': 'char', 'string': 'Java Version', 'default': '20'}, {'name': 'b2e92295f220408e', 'type': 'char', 'string': 'License Key', 'default': ''}]" />
</record>
<record id="project_project_2" model="project.project">
<field name="name">Odoo Licenses</field>
Expand All @@ -18,7 +17,6 @@
<field name="is_favorite" eval="False"/>
<field name="analytic_account_id" ref="account_analytic_account_4" />
<field name="type_ids" eval="[(6, 0, [ref('project_task_type_1'), ref('project_task_type_2'), ref('project_task_type_3'), ref('project_task_type_4')])]" />
<field name="task_properties_definition" eval="[{'name': '3b2b9964284a7f63', 'type': 'many2one', 'domain': False, 'string': 'Client', 'comodel': 'res.partner', 'default': False}, {'name': '14e63001c39f0a7c', 'type': 'integer', 'string': 'Number of Users', 'default': 10}, {'name': '5238d6796e605ce9', 'type': 'selection', 'string': 'Odoo Version', 'default': False, 'selection': [['854ed77adce74cd6', 'Odoo 14'], ['5e030d963127e2d2', 'Odoo 15'], ['280c6b03bf099390', 'Odoo 16'], ['d876b1557301d0ef', 'Odoo 17']]}, {'name': '19460db267e8e4c3', 'type': 'selection', 'string': 'Hosted On', 'default': False, 'selection': [['7fc38e587064fa82', 'On Premise'], ['0acee79ccc0c1c8c', 'Odoo.sh'], ['bd1d12f1e743ece6', 'Odoo Online']]}, {'name': '33ae81dcafa5961b', 'type': 'char', 'string': 'License Key', 'default': ''}]" />
</record>
<record id="project_project_3" model="project.project">
<field name="name">Oracle Database Licenses</field>
Expand All @@ -28,7 +26,6 @@
<field name="is_favorite" eval="False"/>
<field name="analytic_account_id" ref="account_analytic_account_5" />
<field name="type_ids" eval="[(6, 0, [ref('project_task_type_1'), ref('project_task_type_2'), ref('project_task_type_3'), ref('project_task_type_4')])]" />
<field name="task_properties_definition" eval="[{'name': '2c8f32560151873d', 'type': 'many2one', 'domain': False, 'string': 'Client', 'comodel': 'res.partner', 'default': False}, {'name': 'cf426b7354e473b8', 'type': 'char', 'string': 'Version', 'default': ''}, {'name': '3e2f0ae0a826c70f', 'type': 'selection', 'string': 'Environment', 'default': '6f5ecfb88e6de484', 'selection': [['f5bd74aad416df9b', 'Production'], ['d5a484bbfb529530', 'Test'], ['6f5ecfb88e6de484', 'Development']]}, {'name': 'c02448c8c029a4a9', 'type': 'char', 'string': 'License Key', 'default': ''}]" />
</record>
<record id="project_project_4" model="project.project">
<field name="name">Consulting Services</field>
Expand Down