Public release from ruodoo-project: 19.0 - 2026-05-10 21:19:01 UTC

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

View File

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import hg_templates
from . import project_task

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
class HypergraphTemplates(models.Model):
_name = 'hg.templates'
name = fields.Char(string='Название')
line_ids = fields.One2many(comodel_name='hg.templates.line', inverse_name='template_id', string='Строки шаблона')
class HypergraphTemplatesLine(models.Model):
_name = 'hg.templates.line'
template_id = fields.Many2one(comodel_name='hg.templates', string='Шаблон', required=True, ondelete='cascade')
index_id = fields.Many2one('hg.index', string='Показатель', required=True)
date_due = fields.Date(string='Плановая дата')
value_float_plan = fields.Float(string='Плановая сумма')

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},
}