Hi,
in my first module I receive the follwoing error:
TypeError: <class 'odoo.addons.activity_logs.models.models.activity_logs'> transforms the model 'crm.activity.log' into a transient model. That class should either inherit from Model, or set a different '_name'.
My Class:
class activity_logs(models.TransientModel):
_inherit = 'crm.activity.log'
x_duration_minutes = fields.Integer(string='Duration Minutes')
x_duration_hours = fields.Integer(string='Duration Hours')
x_assigned_user_id = fields.Many2one(string='Assignee')
x_deleted = fields.Boolean(string='Deleted')
x_date_start = fields.Date(string='Start')
x_external_id_1 = fields.Char(string='External ID')
x_reminder_time = fields.Integer(string='Remind')
My view:
<?xml version="1.0" encoding="UTF-8"?> <odoo> <data> <record model="ir.actions.act_window" id="crm_activitiy_logs_list_action"> <field name="name">CRM Activitiy Log</field> <field name="res_model">crm.activity.logs</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> <field name="help" type="html"> <p class="oe_view_nocontent_create">View Activity Log </p> </field> </record> <record id="crm_activity_view_form" model="ir.ui.view"> <field name="name">crm.activity.logs.form</field> <field name="model">crm.activity.logs</field> <field name="arch" type="xml"> <form string="Activities"> <div class="oe_title"> <label for="title_action" class="oe_edit_only" /> <h1> <field name="title_action" > <attribute name="readonly">1</attribute> </field> </h1> </div> <group> <group> <field name="team_id" > <attribute name="readonly">1</attribute> </field> <field name="note" > <attribute name="readonly">1</attribute> </field> <field name="x_duration_minutes" > <attribute name="readonly">1</attribute> </field> <field name="note" > <attribute name="readonly">1</attribute> </field> </group> <group> <field name="recommended_activity_id" widget="many2many_tags" > <attribute name="readonly">1</attribute> </field> </group> </group> </form> </field> </record> <record id="crm_activity_logs_tree_view" model="ir.ui.view"> <field name="name">crm.activity.logs.tree</field> <field name="model">crm.activity.logs</field> <field name="arch" type="xml"> <tree string="Activitiy Log Entries"> <field name="date_deadline" invisible="1"/> <field name="create_date"/> <field name="title_action" string="Name"/> <field name="planned_revenue"/> <field name="x_duration_minutes"/> <field name="x_duration_hours"/> <field name="x_assigned_user_id"/> <field name="x_deleted"/> <field name="x_date_start"/> <field name="x_external_id_1"/> <field name="x_reminder_time"/> </tree> </field> </record> <menuitem id="crm_activity_logs_menu" name="Activity Logs" action="crm_activitiy_logs_list_action" parent="crm.menu_crm_config_lead"/> </data> </odoo> |
After I have change the standard crm.activity.log from models.TransientModel to models.Model it was at least installing.
Can someone help?
Thanks in advance
Jo