This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class gym_body_parts_config(models.Model): | |
_name = 'gym.body.parts.config' | |
sequence = fields.Integer(default=10,help="Gives the sequence order when displaying a list of records.") | |
name = fields.Char(string="Name", required=True) | |
progress_bar = fields.Integer(compute='_compute_progress_bar') | |
@api.depends('name','sequence') | |
def _compute_progress_bar(self): | |
for u in self: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<record id="inherit_view_task_kanban" model="ir.ui.view"> | |
<field name="name">inherit.project.task.kanban</field> | |
<field name="model">project.task</field> | |
<field name="inherit_id" ref="project.view_task_kanban" /> | |
<field name="arch" type="xml"> | |
<xpath expr="//kanban" position="attributes"> | |
<attribute name="group_create">0</attribute> | |
<attribute name="group_delete">0</attribute> | |
<attribute name="group_edit">0</attribute> | |
<attribute name="archivable">0</attribute> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<record id="inherit_project_task_view_form" model="ir.ui.view"> | |
<field name="name">project.task.view.inherit.form</field> | |
<field name="model">project.task</field> | |
<field name="inherit_id" ref="project_enterprise.project_task_view_form"/> | |
<field name="arch" type="xml"> | |
<xpath expr="//label[@for='planned_date_begin']" position="attributes"> | |
<attribute name="invisible">1</attribute> | |
</xpath> | |
<xpath expr="//div[hasclass('w-100')]" position="attributes"> | |
<attribute name="invisible">1</attribute> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Inherit task tree view --> | |
<record id="inherit_project_task_tree" model="ir.ui.view"> | |
<field name="name">project.task.tree.inherit</field> | |
<field name="model">project.task</field> | |
<field name="inherit_id" ref="project.view_task_tree2"/> | |
<field name="arch" type="xml"> | |
<xpath expr="//tree" position="attributes"> | |
<attribute name="delete">1</attribute> | |
</xpath> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Inherit task search view --> | |
<record id="inherit_task_search_view" model="ir.ui.view"> | |
<field name="name">project.task.search.form</field> | |
<field name="model">project.task</field> | |
<field name="inherit_id" ref="project.view_task_search_form"/> | |
<field name="arch" type="xml"> | |
<!--Below example shows how to visible invisible fields in search view --> | |
<xpath expr="//search/field[@name='name']" position="attributes"> | |
<attribute name="string">You can change string or label of a field</attribute> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<record id="inherited_view_project_project_filter" model="ir.ui.view"> | |
<field name="name">inherited.project.project.select</field> | |
<field name="model">project.project</field> | |
<field name="inherit_id" ref="project.view_project_project_filter"/> | |
<field name="arch" type="xml"> | |
<!--Below example shows how to visible invisible fields in search view --> | |
<xpath expr="//search/field[@name='user_id']" position="attributes"> | |
<attribute name="invisible">1</attribute> | |
</xpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.sitemaps import Sitemap | |
from .models import Your_Model_Name | |
class MySitemap(Sitemap): | |
changefreq = "weekly" | |
priority = 0.8 | |
protocol = 'http' | |
def items(self): |