Skip to content

Commit

Permalink
[FIX] software_reseller: move Properties to new fields
Browse files Browse the repository at this point in the history
In this commit we have replaced the task_properties_definition field to new
fields that is x_client,x_version,x_license_key,x_users,x_odoo_version,x_hosted,x_environment.

Task-3942609
  • Loading branch information
dhrs-odoo committed May 31, 2024
1 parent 5e2e557 commit be5f2ba
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 3 deletions.
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

0 comments on commit be5f2ba

Please sign in to comment.