add active project filter

This commit is contained in:
pawan.sharma 2022-06-22 15:26:37 +05:30
parent be776fd047
commit 75af1d5615
2 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,7 @@ class AccountAnalyticLine(models.Model):
parent_project = fields.Many2one('project.project', related='project_id.parent_project', string='Parent Project')
sub_project = fields.Many2one('project.project', domain="[('is_sub_project', '=', True)]",
string='Sub Project')
active_project = fields.Boolean(related='project_id.active', store=True)
@api.onchange('project_id')
def _onchange_sub_project_id(self):

View File

@ -81,6 +81,7 @@
<!--<field name="parent_project" options="{'no_open': True, 'no_create': True, 'no_create_edit': True}"/>--><!--custom-->
<field name="company_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="active_project" invisible="0"/>
</tree>
</field>
</record>