Skip to content

Commit

Permalink
[ADD] p13n_cmr: sipreco_subsidies
Browse files Browse the repository at this point in the history
  • Loading branch information
mav-adhoc committed Feb 6, 2024
1 parent b95a119 commit bcf6eef
Show file tree
Hide file tree
Showing 23 changed files with 1,183 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public_budget/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
'name': 'Public Budget',
'license': 'AGPL-3',
'version': "15.0.1.12.0",
'version': "15.0.1.13.0",
'author': 'ADHOC SA,Odoo Community Association (OCA)',
'website': 'www.adhoc.com.ar',
'category': 'Accounting & Finance',
Expand Down
6 changes: 3 additions & 3 deletions public_budget/models/expedient.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ def _compute_year(self):
@api.depends('supplier_ids', 'description')
def _compute_cover(self):
for rec in self:
supplier_names = [x.name for x in rec.supplier_ids]
# supplier_names = [x.name for x in rec.supplier_ids]
cover = rec.description
if supplier_names:
cover += ' - ' + ', '.join(supplier_names)
# if supplier_names:
# cover += ' - ' + ', '.join(supplier_names)
rec.cover = cover

def action_cancel_open(self):
Expand Down
1 change: 1 addition & 0 deletions public_budget/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ access_public_budget_advance_request_analysis_secretaria_dir,access_public_budge
access_public_budget_expedient_portal_expedient,public_budget_expedient.portal_expedient,model_public_budget_expedient,group_portal_expedient,1,1,1,1
access_public_budget_location_portal_expedient,public_budget_location.portal_expedient,model_public_budget_location,group_portal_expedient,1,0,0,0
access_public_budget_location_portal_asset,public_budget_location.portal_asset,model_public_budget_location,group_portal_asset,1,0,0,0
access_public_budget_location_portal_subsidy,public_budget_location.portal_asset,model_public_budget_location,group_portal_subsidy,0,0,0,0
access_public_budget_remit_portal_expedient,public_budget_remit.portal_expedient,model_public_budget_remit,group_portal_expedient,1,1,1,1
access_account_payment_group_secretaria_usuario,access_account_payment_group_secretaria_usuario,account_payment_group.model_account_payment_group,group_secretary_usuario,1,1,1,0
access_account_payment_group_habilitacion_usuario,access_account_payment_group_habilitacion_usuario,account_payment_group.model_account_payment_group,group_habilitacion_usuario,1,1,1,0
Expand Down
7 changes: 7 additions & 0 deletions public_budget/security/public_budget_group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
<field name="category_id" ref="category_public_budget_portal"/>
</record>

<record id="group_portal_subsidy" model="res.groups">
<field name="name">Portal - Subsidios</field>
<field name="share" eval="True"/>
<field name="implied_ids" eval="[(6, 0, [ref('base.group_portal')])]"/>
<field name="category_id" ref="category_public_budget_portal"/>
</record>

<record model="ir.module.category" id="category_secretaria">
<field name="name">Secretaria</field>
<field name="description">Secretaria</field>
Expand Down
2 changes: 1 addition & 1 deletion public_budget/views/expedient_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<field name="final_location" states="closed,annulled"/>
<field name="pages"/>
<field name="parliamentary_expedient"/>
<field name="subsidy_expedient"/>
<field name="subsidy_expedient" invisible="1"/>
<field name="subsidy_recipient_doc" attrs="{'invisible': [('subsidy_expedient', '!=', True)]}" />
<field name="subsidy_amount" attrs="{'invisible': [('subsidy_expedient', '!=', True)]}" />
<field name="subsidy_approved" attrs="{'invisible': [('subsidy_expedient', '!=', True)]}" />
Expand Down
1 change: 1 addition & 0 deletions sipreco_subsidy_management/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import models
from . import wizards
10 changes: 9 additions & 1 deletion sipreco_subsidy_management/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
'name': 'Public Budget Subsidy Management',
'version': "15.0.1.0.0",
'version': "15.0.1.1.0",
'author': 'ADHOC SA,Odoo Community Association (OCA)',
'website': 'www.adhoc.com.ar',
'category': 'Accounting & Finance',
Expand All @@ -12,22 +12,30 @@
'reports/subsidy_form_report.xml',
'reports/subsidy_report.xml',
'reports/subsidy_report_resolution.xml',
'reports/report_ticket_template.xml',
'views/subsidy_views.xml',
'views/subsidy_ticket_views.xml',
'views/transaction_type_views.xml',
'views/subsidy_approval_arrangement_views.xml',
'views/subsidy_note_type_views.xml',
'views/subsidy_resolution_views.xml',
'views/subsidy_ticket_director_views.xml',
'security/ir.model.access.csv',
'data/sequence_data.xml',
'data/subsidy_note_type_data.xml',
'data/cron.xml',
'data/ir_actions_server_data.xml',
'wizards/create_expedients_wizard_views.xml',
'views/expedient_views.xml'
],
'demo': [
'demo/public_budget.transaction_type.csv',
'demo/subsidy_demo.xml',
'demo/helpdesk_demo.xml',
],
'depends': [
'public_budget',
'helpdesk'
],
'installable': True,
}
16 changes: 16 additions & 0 deletions sipreco_subsidy_management/data/ir_actions_server_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Generar expédientes -->
<record model="ir.actions.server" id="action_generate_expedient">
<field name="name">Generar Tramite Administrativo</field>
<field name="model_id" ref="helpdesk.model_helpdesk_ticket"/>
<field name="binding_model_id" ref="helpdesk.model_helpdesk_ticket"/>
<field name="state">code</field>
<field name="code">
action = env["ir.actions.act_window"]._for_xml_id('sipreco_subsidy_management.action_create_expedients_wizard')
helpdesk_tickets = records.filtered(lambda x: x.stage_id.name in ['Ticket', 'Aprobado'])
action['context'] = {'active_ids': helpdesk_tickets.ids}
</field>
</record>

</odoo>

0 comments on commit bcf6eef

Please sign in to comment.