Public release from ruodoo-project: 19.0 - 2026-05-31 21:19:12 UTC

This commit is contained in:
CI Publish Bot
2026-05-31 21:19:21 +00:00
commit aa4214c195
1213 changed files with 183945 additions and 0 deletions

View File

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class ProjectTask(models.Model):
_inherit = 'project.task'
# Смета-анализ
def action_estimate_analysis(self):
context = dict(self.env.context or {})
domain = [('index_id', 'in', self.index_ids.ids)]
return {
'name': 'Смета-Анализ',
'type': 'ir.actions.act_window',
'res_model': 'hg.value',
'view_mode': 'pivot',
'target': 'new',
'views': [(self.env.ref('mklab_base_indicators_extended.view_estimate_pivot').id, 'pivot')],
'domain': domain,
'context': context,
}
# Править смету
def action_edit_estimate(self):
if self.index_ids:
context = dict(self.env.context or {})
domain = [('index_id', 'in', self.index_ids.ids)]
return {
'name': 'Править смету',
'type': 'ir.actions.act_window',
'res_model': 'hg.value',
'view_mode': 'list',
'target': 'new',
'views': [(self.env.ref('mklab_base_indicators_extended.view_edit_estimate_list').id, 'list')],
'domain': domain,
'context': context,
}
else:
return {
'name': 'Выбор шаблона сметы',
'type': 'ir.actions.act_window',
'res_model': 'estimate.wizard',
'view_mode': 'form',
'target': 'new',
'context': {'default_template_id': False, 'active_id': self.id},
}