mirror of
https://gitlab.com/flectra-community/mis-builder.git
synced 2025-01-27 13:21:46 +00:00
Merge branch '2.0-fixed' into '2.0'
2.0 fixed See merge request flectra-community/mis-builder!5
This commit is contained in:
commit
0f37ef767a
File diff suppressed because it is too large
Load Diff
1752
mis_builder/i18n/sv.po
Normal file
1752
mis_builder/i18n/sv.po
Normal file
File diff suppressed because it is too large
Load Diff
595
mis_builder_budget/i18n/it.po
Normal file
595
mis_builder_budget/i18n/it.po
Normal file
@ -0,0 +1,595 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mis_builder_budget
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: code:addons/mis_builder_budget/models/mis_budget_abstract.py:0
|
||||
#, python-format
|
||||
msgid "%s (copy)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: code:addons/mis_builder_budget/models/mis_budget_item_abstract.py:0
|
||||
#, python-format
|
||||
msgid "%s is not within budget %s date range."
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: code:addons/mis_builder_budget/models/mis_budget_item_abstract.py:0
|
||||
#, python-format
|
||||
msgid "%s overlaps %s in budget %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: code:addons/mis_builder_budget/models/mis_budget_item_abstract.py:0
|
||||
#, python-format
|
||||
msgid "%s start date must not be after end date"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__account_id
|
||||
msgid "Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_needaction
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_needaction
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_needaction
|
||||
msgid "Action Needed"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_report_instance_period__source
|
||||
msgid ""
|
||||
"Actuals: current data, from accounting and other queries.\n"
|
||||
"Actuals (alternative): current data from an alternative source (eg a database view providing look-alike account move lines).\n"
|
||||
"Sum columns: summation (+/-) of other columns.\n"
|
||||
"Compare to column: compare to other column.\n"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__amount
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__analytic_tag_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__analytic_tag_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__analytic_tag_ids
|
||||
msgid "Analytic Tags"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__analytic_account_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__analytic_account_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__analytic_account_id
|
||||
msgid "Analytic account"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_attachment_count
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_attachment_count
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_attachment_count
|
||||
msgid "Attachment Count"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__balance
|
||||
msgid "Balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__budget_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__budget_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__budget_id
|
||||
msgid "Budget"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__budget_date_from
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__budget_date_from
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__budget_date_from
|
||||
msgid "Budget Date From"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__budget_date_to
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__budget_date_to
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__budget_date_to
|
||||
msgid "Budget Date To"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance_period__source_mis_budget_by_account_id
|
||||
msgid "Budget by Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance_period__source_mis_budget_id
|
||||
msgid "Budget by KPI"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model_terms:ir.ui.view,arch_db:mis_builder_budget.mis_budget_by_account_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:mis_builder_budget.mis_budget_form_view
|
||||
msgid "Budget items"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_kpi__budgetable
|
||||
msgid "Budgetable"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model_terms:ir.ui.view,arch_db:mis_builder_budget.mis_budget_by_account_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:mis_builder_budget.mis_budget_form_view
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget__state__cancelled
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget_abstract__state__cancelled
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget_by_account__state__cancelled
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__company_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__company_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__company_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__company_id
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__company_currency_id
|
||||
msgid "Company Currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model_terms:ir.ui.view,arch_db:mis_builder_budget.mis_budget_by_account_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:mis_builder_budget.mis_budget_form_view
|
||||
msgid "Confirm"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget__state__confirmed
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget_abstract__state__confirmed
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget_by_account__state__confirmed
|
||||
msgid "Confirmed"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__create_uid
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__create_uid
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__create_uid
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__create_uid
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__create_date
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__create_date
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__create_date
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__create_date
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__credit
|
||||
msgid "Credit"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__date
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__date_range_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__date_range_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__date_range_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__date_range_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__date_range_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__date_range_id
|
||||
msgid "Date range"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__debit
|
||||
msgid "Debit"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__description
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__description
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__description
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance_period__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_kpi__display_name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_kpi_expression__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget__state__draft
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget_abstract__state__draft
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_budget_by_account__state__draft
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account_item__date
|
||||
msgid ""
|
||||
"Dummy field that adapts searches on date to searches on date_from/date_to."
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_follower_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_follower_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_follower_ids
|
||||
msgid "Followers"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_channel_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_channel_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_channel_ids
|
||||
msgid "Followers (Channels)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_partner_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_partner_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_partner_ids
|
||||
msgid "Followers (Partners)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__date_from
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__date_from
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__date_from
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__date_from
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__date_from
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__date_from
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance_period__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_kpi__id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_kpi_expression__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget__message_needaction
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget__message_unread
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_abstract__message_needaction
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_abstract__message_unread
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account__message_needaction
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account__message_unread
|
||||
msgid "If checked, new messages require your attention."
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget__message_has_error
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget__message_has_sms_error
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_abstract__message_has_error
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_abstract__message_has_sms_error
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account__message_has_error
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account__message_has_sms_error
|
||||
msgid "If checked, some messages have a delivery error."
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_is_follower
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_is_follower
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_is_follower
|
||||
msgid "Is Follower"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__item_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__item_ids
|
||||
msgid "Item"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__kpi_expression_id
|
||||
msgid "KPI"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__seq1
|
||||
msgid "KPI Sequence"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance_period____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_kpi____last_update
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_kpi_expression____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__write_uid
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__write_uid
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__write_uid
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__write_date
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__write_date
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__write_date
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_budget_abstract
|
||||
msgid "MIS Budget (Abstract Base Class)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_budget_item_abstract
|
||||
msgid "MIS Budget Item (Abstract Base Class)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_budget_by_account_item
|
||||
msgid "MIS Budget Item (by Account)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_budget_item
|
||||
msgid "MIS Budget Item (by KPI)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.actions.act_window,name:mis_builder_budget.mis_budget_item_act_window
|
||||
msgid "MIS Budget Items (by KPIs)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.actions.act_window,name:mis_builder_budget.mis_budget_by_account_item_act_window
|
||||
msgid "MIS Budget Items (by accounts)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_budget_by_account
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_report_instance_period__source__mis_budget_by_account
|
||||
msgid "MIS Budget by Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_budget
|
||||
#: model:ir.model.fields.selection,name:mis_builder_budget.selection__mis_report_instance_period__source__mis_budget
|
||||
msgid "MIS Budget by KPI"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.actions.act_window,name:mis_builder_budget.mis_budget_act_window
|
||||
#: model:ir.ui.menu,name:mis_builder_budget.mis_budget_menu
|
||||
msgid "MIS Budgets (by KPIs)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.actions.act_window,name:mis_builder_budget.mis_budget_by_account_act_window
|
||||
#: model:ir.ui.menu,name:mis_builder_budget.mis_budget_by_account_menu
|
||||
msgid "MIS Budgets (by accounts)"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_report_instance
|
||||
msgid "MIS Report Instance"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_report_instance_period
|
||||
msgid "MIS Report Instance Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_report_kpi
|
||||
msgid "MIS Report KPI"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model,name:mis_builder_budget.model_mis_report_kpi_expression
|
||||
msgid "MIS Report KPI Expression"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__report_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__report_id
|
||||
msgid "MIS Report Template"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_main_attachment_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_main_attachment_id
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_main_attachment_id
|
||||
msgid "Main Attachment"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_has_error
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_has_error
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_has_error
|
||||
msgid "Message Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_ids
|
||||
msgid "Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__name
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__name
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_needaction_counter
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_needaction_counter
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_needaction_counter
|
||||
msgid "Number of Actions"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_has_error_counter
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_has_error_counter
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_has_error_counter
|
||||
msgid "Number of errors"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget__message_needaction_counter
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_abstract__message_needaction_counter
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account__message_needaction_counter
|
||||
msgid "Number of messages which requires an action"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget__message_has_error_counter
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_abstract__message_has_error_counter
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account__message_has_error_counter
|
||||
msgid "Number of messages with delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget__message_unread_counter
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_abstract__message_unread_counter
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account__message_unread_counter
|
||||
msgid "Number of unread messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_has_sms_error
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_has_sms_error
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_has_sms_error
|
||||
msgid "SMS Delivery error"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model_terms:ir.ui.view,arch_db:mis_builder_budget.mis_budget_by_account_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:mis_builder_budget.mis_budget_form_view
|
||||
msgid "Set draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_report_instance_period__source
|
||||
msgid "Source"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__state
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__state
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__state
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__seq2
|
||||
msgid "Sub-KPI Sequence"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__date_to
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__date_to
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__date_to
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account_item__date_to
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item__date_to
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_item_abstract__date_to
|
||||
msgid "To"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_unread
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_unread
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_unread
|
||||
msgid "Unread Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__message_unread_counter
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__message_unread_counter
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__message_unread_counter
|
||||
msgid "Unread Messages Counter"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account_item__company_currency_id
|
||||
msgid "Utility field to express amount currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget__website_message_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_abstract__website_message_ids
|
||||
#: model:ir.model.fields,field_description:mis_builder_budget.field_mis_budget_by_account__website_message_ids
|
||||
msgid "Website Messages"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget__website_message_ids
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_abstract__website_message_ids
|
||||
#: model:ir.model.fields,help:mis_builder_budget.field_mis_budget_by_account__website_message_ids
|
||||
msgid "Website communication history"
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.constraint,message:mis_builder_budget.constraint_mis_budget_by_account_item_credit_debit2
|
||||
msgid ""
|
||||
"Wrong credit or debit value in budget item! Credit and debit should be "
|
||||
"positive."
|
||||
msgstr ""
|
||||
|
||||
#. module: mis_builder_budget
|
||||
#: model:ir.model.constraint,message:mis_builder_budget.constraint_mis_budget_by_account_item_credit_debit1
|
||||
msgid ""
|
||||
"Wrong credit or debit value in budget item! Credit or debit should be zero."
|
||||
msgstr ""
|
1
mis_builder_expimp/__init__.py
Normal file
1
mis_builder_expimp/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from . import wizards
|
17
mis_builder_expimp/__manifest__.py
Normal file
17
mis_builder_expimp/__manifest__.py
Normal file
@ -0,0 +1,17 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "MIS Builder Import / Export",
|
||||
"summary": """Import / Export Reports with all dependencies""",
|
||||
"version": "2.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "Jamotion GmbH",
|
||||
"website": "https://gitlab.com/flectra-community/mis-builder",
|
||||
"depends": ["mis_builder"],
|
||||
"data": [
|
||||
"wizards/mis_builder_export_views.xml",
|
||||
"wizards/mis_builder_import_views.xml",
|
||||
"security/ir.model.access.csv",
|
||||
],
|
||||
"installable": True,
|
||||
}
|
3
mis_builder_expimp/security/ir.model.access.csv
Normal file
3
mis_builder_expimp/security/ir.model.access.csv
Normal file
@ -0,0 +1,3 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
access_mis_builder_import_wizard,access_mis_builder_import_wizard,model_mis_builder_import_wizard,account.group_account_manager,1,1,1,1
|
||||
access_mis_builder_export_wizard,access_mis_builder_export_wizard,model_mis_builder_export_wizard,account.group_account_manager,1,1,1,1
|
|
BIN
mis_builder_expimp/static/description/icon.png
Normal file
BIN
mis_builder_expimp/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
69
mis_builder_expimp/static/description/index.html
Normal file
69
mis_builder_expimp/static/description/index.html
Normal file
@ -0,0 +1,69 @@
|
||||
<div class="mt32" style="max-width: 1024px; margin: 0 auto;">
|
||||
<section class="container bg-gray-lighter oe_screenshot">
|
||||
<div class="row oe_spaced">
|
||||
<div class="col-md-12">
|
||||
<!-- The module's display name can differ from its technical name -->
|
||||
<h2 class="oe_slogan" style="color: #FF7E00;">MIS Builder - Import / Export</h2>
|
||||
<h3 class="oe_slogan">Function to import / export MIS Report Templates</h3>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="container">
|
||||
<div class="row oe_spaced">
|
||||
<h2 class="oe_slogan" style="color: #FF7E00;">Full export and import of report template</h2>
|
||||
<div class="col-md-6">
|
||||
<img class="oe_picture oe_screenshot" src="screenshot.png">
|
||||
</div>
|
||||
<div class="col-md-6 text-justify">
|
||||
<p class="oe_mt32">
|
||||
When exporting a report, all related data are exported too:
|
||||
</p>
|
||||
<ul>
|
||||
<li>KPIs</li>
|
||||
<li>SubKPIs</li>
|
||||
<li>Expressions</li>
|
||||
<li>Queries</li>
|
||||
<li>Sub Reports</li>
|
||||
<li>Styles</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="container">
|
||||
<div class="row oe_spaced">
|
||||
<h2 class='oe_slogan' style="color: #FF7E00;">Quick Start</h2>
|
||||
<div class="col-sm-4">
|
||||
<h3 class='oe_slogan'>Installation</h3>
|
||||
<div>
|
||||
<p class="oe_mt32">
|
||||
There are no dependencies other than flectra base modules, so you can simply install the module.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3 class='oe_slogan'>Configuration</h3>
|
||||
<div>
|
||||
<p class="oe_mt32">
|
||||
No configuration options available.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3 class='oe_slogan'>Usage</h3>
|
||||
<div>
|
||||
<p class="oe_mt32">
|
||||
You will find two new menu items at Finance -> Configuration -> MIS Reporting:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Export MIS Report -> shows a PopUp to select the report to export</li>
|
||||
<li>Import MIS Report -> shows a PopUp to select the file of exported report to import</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
BIN
mis_builder_expimp/static/description/screenshot.png
Normal file
BIN
mis_builder_expimp/static/description/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
2
mis_builder_expimp/wizards/__init__.py
Normal file
2
mis_builder_expimp/wizards/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
from . import mis_builder_export_wizard
|
||||
from . import mis_builder_import_wizard
|
45
mis_builder_expimp/wizards/mis_builder_export_views.xml
Normal file
45
mis_builder_expimp/wizards/mis_builder_export_views.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<flectra>
|
||||
<data>
|
||||
<record id="mis_builder_export_wizard_view" model="ir.ui.view">
|
||||
<field name="name">mis.builder.export.wizard.view</field>
|
||||
<field name="model">mis.builder.export.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Export MIS Report">
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<div states="draft">
|
||||
<p>This wizard will export a MIS Report including all dependencies.
|
||||
<br/>After export you can import this file in another system to have the same MIS Report.
|
||||
</p>
|
||||
</div>
|
||||
<group states="draft">
|
||||
<field name="report_id"/>
|
||||
</group>
|
||||
<group states="download">
|
||||
<group>
|
||||
<field name="file_save" filename="name"/>
|
||||
</group>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="export" string="Generate File" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_mis_builder_export_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Export MIS Report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mis.builder.export.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem id="menu_mis_builder_export_action"
|
||||
name="Export MIS Report"
|
||||
parent="mis_builder.mis_report_conf_menu"
|
||||
action="action_mis_builder_export_wizard"
|
||||
sequence="500"/>
|
||||
</data>
|
||||
</flectra>
|
178
mis_builder_expimp/wizards/mis_builder_export_wizard.py
Normal file
178
mis_builder_expimp/wizards/mis_builder_export_wizard.py
Normal file
@ -0,0 +1,178 @@
|
||||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
import base64
|
||||
import json
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from flectra import api, fields, models, _
|
||||
|
||||
QUERY_FIELDS = ['name', 'model_id', 'field_ids', 'aggregate', 'date_field', 'query_context', 'domain']
|
||||
|
||||
REPORT_FIELDS = ['name', 'description', 'account_model', 'subreport_ids']
|
||||
|
||||
KPI_FIELDS = [
|
||||
'name', 'description', 'multi', 'auto_expand_accounts', 'style_expression',
|
||||
'type', 'compare_method', 'accumulation_method', 'sequence',
|
||||
'expression'
|
||||
]
|
||||
|
||||
STYLE_FIELDS = [
|
||||
'name',
|
||||
'color_inherit', 'color',
|
||||
'background_color_inherit', 'background_color',
|
||||
'font_style_inherit', 'font_style',
|
||||
'font_weight_inherit', 'font_weight',
|
||||
'font_size_inherit', 'font_size',
|
||||
'indent_level_inherit', 'indent_level',
|
||||
'prefix_inherit', 'prefix',
|
||||
'suffix_inherit', 'suffix',
|
||||
'dp_inherit', 'dp',
|
||||
'divider_inherit', 'divider',
|
||||
'hide_empty_inherit', 'hide_empty',
|
||||
'hide_always_inherit', 'hide_always',
|
||||
]
|
||||
|
||||
|
||||
class MisBuilderExportWizard(models.TransientModel):
|
||||
_name = "mis.builder.export.wizard"
|
||||
_description = "Export MIS Builder Report"
|
||||
|
||||
report_id = fields.Many2one(
|
||||
comodel_name='mis.report',
|
||||
string='Report',
|
||||
required=True,
|
||||
)
|
||||
|
||||
name = fields.Char(
|
||||
string='File Name',
|
||||
default='mis_report.json',
|
||||
)
|
||||
|
||||
file_save = fields.Binary(
|
||||
string='Settings File',
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
state = fields.Selection([
|
||||
('draft', 'Draft'),
|
||||
('download', 'Download')
|
||||
], default='draft')
|
||||
|
||||
def export(self):
|
||||
self.ensure_one()
|
||||
|
||||
report_data = self._read_subreport_data(self.report_id.subreport_ids)
|
||||
report_data.append(self._read_report_data(self.report_id))
|
||||
|
||||
json_data = json.dumps(report_data, indent=2)
|
||||
# change state of the wizard
|
||||
self.write({
|
||||
'name': '%s.json' % self.report_id.name,
|
||||
'file_save': base64.b64encode(json_data.encode()),
|
||||
'state': 'download'
|
||||
})
|
||||
|
||||
return {
|
||||
'name': _('Save'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': self._name,
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'res_id': self.id,
|
||||
}
|
||||
|
||||
@api.model
|
||||
def _read_subreport_data(self, subreport_ids):
|
||||
report_data = []
|
||||
for subreport_id in subreport_ids:
|
||||
report_data.extend(self._read_subreport_data(subreport_id.subreport_id.subreport_ids))
|
||||
report_data.append(self._read_report_data(subreport_id.subreport_id))
|
||||
|
||||
return report_data
|
||||
|
||||
@api.model
|
||||
def _read_report_data(self, report_id):
|
||||
report_data = report_id.read(self._get_report_fields())[0]
|
||||
del report_data['id']
|
||||
report_data['extid'] = '__export__.mis_report_%s' % report_id.id
|
||||
report_data['move_lines_source'] = report_id.move_lines_source.model
|
||||
if report_id.style_id:
|
||||
report_data['style_id'] = report_id.style_id.read(self._get_style_fields())[0]
|
||||
del report_data['style_id']['id']
|
||||
report_data['style_id']['extid'] = '__export__.mis_report_style_%s' % report_id.style_id.id
|
||||
if report_id.query_ids:
|
||||
report_data['query_ids'] = []
|
||||
for query_id in report_id.query_ids:
|
||||
query_data = query_id.read(self._get_query_fields())[0]
|
||||
del query_data['id']
|
||||
query_data['model_id'] = query_id.model_id.model
|
||||
query_data['field_ids'] = query_id.field_ids.mapped('name')
|
||||
query_data['extid'] = '__export__.mis_report_query_%s' % query_id.id
|
||||
report_data['query_ids'].append(query_data)
|
||||
if report_id.kpi_ids:
|
||||
report_data['kpi_ids'] = []
|
||||
last_kpi_sequence = -1
|
||||
for kpi_id in report_id.kpi_ids.sorted(key=lambda s: s.sequence):
|
||||
kpi_data = kpi_id.read(self._get_kpi_fields())[0]
|
||||
# Fix of sequences to be unique - otherwise there are problems on importing reports with subkpis
|
||||
if kpi_id.sequence <= last_kpi_sequence:
|
||||
kpi_data['sequence'] = last_kpi_sequence + 1
|
||||
last_kpi_sequence = kpi_data['sequence']
|
||||
del kpi_data['id']
|
||||
if kpi_id.style_id:
|
||||
kpi_data['style_id'] = kpi_id.style_id.read(self._get_style_fields())[0]
|
||||
del kpi_data['style_id']['id']
|
||||
kpi_data['style_id']['extid'] = '__export__.mis_report_style_%s' % kpi_id.style_id.id
|
||||
if kpi_id.auto_expand_accounts_style_id:
|
||||
kpi_data['auto_expand_accounts_style_id'] = kpi_id.auto_expand_accounts_style_id.read(self._get_style_fields())[0]
|
||||
del kpi_data['auto_expand_accounts_style_id']['id']
|
||||
kpi_data['auto_expand_accounts_style_id'][
|
||||
'extid'] = '__export__.mis_report_style_%s' % kpi_id.auto_expand_accounts_style_id.id
|
||||
kpi_data['extid'] = '__export__.mis_report_kpi_%s' % kpi_id.id
|
||||
kpi_data['expression_ids'] = []
|
||||
for expression_id in kpi_id.expression_ids:
|
||||
expression_data = expression_id.read(['sequence', 'name'])[0]
|
||||
del expression_data['id']
|
||||
expression_data['extid'] = '__export__.mis_report_kpi_expression_%s' % expression_id.id
|
||||
kpi_data['expression_ids'].append(expression_data)
|
||||
report_data['kpi_ids'].append(kpi_data)
|
||||
if report_id.subkpi_ids:
|
||||
report_data['subkpi_ids'] = []
|
||||
for subkpi_id in report_id.subkpi_ids:
|
||||
subkpi_data = subkpi_id.read(['sequence', 'name', 'description'])[0]
|
||||
del subkpi_data['id']
|
||||
subkpi_data['extid'] = '__export__.mis_report_subkpi_%s' % subkpi_id.id
|
||||
subkpi_data['expression_ids'] = []
|
||||
for expression_id in subkpi_id.expression_ids:
|
||||
expression_data = expression_id.read(['sequence', 'name'])[0]
|
||||
del expression_data['id']
|
||||
expression_data['kpi_id'] = '__export__.mis_report_kpi_%s' % expression_id.kpi_id.id
|
||||
expression_data['extid'] = '__export__.mis_report_kpi_expression_%s' % expression_id.id
|
||||
subkpi_data['expression_ids'].append(expression_data)
|
||||
report_data['subkpi_ids'].append(subkpi_data)
|
||||
if report_id.subreport_ids:
|
||||
report_data['subreport_ids'] = []
|
||||
for subreport_id in report_id.subreport_ids:
|
||||
subreport_data = subreport_id.read(['name'])[0]
|
||||
del subreport_data['id']
|
||||
subreport_data['subreport_id'] = '__export__.mis_report_%s' % subreport_id.subreport_id.id
|
||||
report_data['subreport_ids'].append(subreport_data)
|
||||
return report_data
|
||||
|
||||
@api.model
|
||||
def _get_query_fields(self):
|
||||
return QUERY_FIELDS
|
||||
|
||||
@api.model
|
||||
def _get_report_fields(self):
|
||||
return REPORT_FIELDS
|
||||
|
||||
@api.model
|
||||
def _get_kpi_fields(self):
|
||||
return KPI_FIELDS
|
||||
|
||||
@api.model
|
||||
def _get_style_fields(self):
|
||||
return STYLE_FIELDS
|
34
mis_builder_expimp/wizards/mis_builder_import_views.xml
Normal file
34
mis_builder_expimp/wizards/mis_builder_import_views.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<flectra>
|
||||
<data>
|
||||
<record id="mis_builder_import_wizard_view" model="ir.ui.view">
|
||||
<field name="name">mis.builder.import.wizard.view</field>
|
||||
<field name="model">mis.builder.import.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Import Settings">
|
||||
<div>
|
||||
<p>This wizard will import a MIS report from json File.</p>
|
||||
</div>
|
||||
<field name="file"/>
|
||||
<footer>
|
||||
<button name="import_report" string="Import" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_mis_builder_import_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Import MIS Report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mis.builder.import.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem id="menu_mis_builder_import_action"
|
||||
name="Import MIS Report"
|
||||
parent="mis_builder.mis_report_conf_menu"
|
||||
action="action_mis_builder_import_wizard"
|
||||
sequence="500"/>
|
||||
</data>
|
||||
</flectra>
|
162
mis_builder_expimp/wizards/mis_builder_import_wizard.py
Normal file
162
mis_builder_expimp/wizards/mis_builder_import_wizard.py
Normal file
@ -0,0 +1,162 @@
|
||||
import copy
|
||||
import json
|
||||
import logging
|
||||
import subprocess
|
||||
import sys
|
||||
from io import StringIO
|
||||
from pathlib import Path
|
||||
|
||||
from flectra import models, fields, api, _
|
||||
from flectra.tools import config, etree, base64, convert_xml_import, tempfile
|
||||
|
||||
import os
|
||||
|
||||
from flectra.exceptions import ValidationError
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MisBuilderImportWizard(models.TransientModel):
|
||||
# Private attributes
|
||||
_name = "mis.builder.import.wizard"
|
||||
_description = "Import MIS Builder Report"
|
||||
|
||||
file = fields.Binary(
|
||||
string='Settings File',
|
||||
required=True,
|
||||
)
|
||||
|
||||
def __int__(self):
|
||||
super(MisBuilderImportWizard, self).__int__()
|
||||
|
||||
def import_report(self):
|
||||
self.ensure_one()
|
||||
|
||||
json_data = base64.b64decode(self.file)
|
||||
report_data = json.loads(json_data)
|
||||
|
||||
for report_entry in report_data:
|
||||
report_values = self.__prepare_report_values(report_entry)
|
||||
|
||||
self.__prepare_style_values(report_entry, report_values)
|
||||
|
||||
self.__prepare_subreport_values(report_entry, report_values)
|
||||
|
||||
self.__prepare_query_values(report_values)
|
||||
|
||||
self.__prepare_kpi_values(report_values)
|
||||
|
||||
subkpi_values = []
|
||||
if report_values.get('subkpi_ids'):
|
||||
for subkpi_value in report_values['subkpi_ids']:
|
||||
subkpi_values.append(subkpi_value)
|
||||
del report_values['subkpi_ids']
|
||||
|
||||
new_report = self.env['mis.report'].create(report_values)
|
||||
self._create_external_reference(new_report, report_entry['extid'])
|
||||
|
||||
self.__update_subkpi_values(new_report, report_entry, subkpi_values)
|
||||
|
||||
def __prepare_style_values(self, report_entry, report_values):
|
||||
if report_entry.get('style_id'):
|
||||
report_values['style_id'] = self._create_style(report_values['style_id']).id
|
||||
|
||||
def __prepare_report_values(self, report_entry):
|
||||
result = self.env['ir.model.data'].xmlid_to_res_id(report_entry['extid'])
|
||||
if result:
|
||||
raise ValidationError('Report already exists! Please delete it first before importing')
|
||||
report_values = copy.deepcopy(report_entry)
|
||||
|
||||
del report_values['extid']
|
||||
for kpi in report_values['kpi_ids']:
|
||||
del kpi['extid']
|
||||
for expr in kpi['expression_ids']:
|
||||
del expr['extid']
|
||||
|
||||
report_values['move_lines_source'] = self.env['ir.model'].search([('model', '=', report_values['move_lines_source'])]).id
|
||||
return report_values
|
||||
|
||||
def __update_subkpi_values(self, new_report, report_entry, subkpi_values):
|
||||
temporary_extids = self.env['ir.model.data']
|
||||
subkpi_updates = []
|
||||
if subkpi_values:
|
||||
for kpi_id in new_report.kpi_ids:
|
||||
for kpi_data in report_entry['kpi_ids']:
|
||||
if kpi_id.sequence == kpi_data['sequence']:
|
||||
temporary_extids |= self._create_external_reference(kpi_id, kpi_data['extid'])
|
||||
for subkpi_value in subkpi_values:
|
||||
expression_updates = []
|
||||
for expression_value in subkpi_value['expression_ids']:
|
||||
expression_value['kpi_id'] = self.env.ref(expression_value['kpi_id']).id
|
||||
expression_updates.append((0, False, expression_value))
|
||||
subkpi_value['expression_ids'] = expression_updates
|
||||
subkpi_updates.append((0, False, subkpi_value))
|
||||
if subkpi_updates:
|
||||
new_report.write({'subkpi_ids': subkpi_updates})
|
||||
if temporary_extids:
|
||||
temporary_extids.unlink()
|
||||
|
||||
def __prepare_kpi_values(self, report_values):
|
||||
if report_values.get('kpi_ids'):
|
||||
kpi_values = []
|
||||
for kpi_value in report_values['kpi_ids']:
|
||||
self.__prepare_style_values(kpi_value, kpi_value)
|
||||
if kpi_value.get('auto_expand_accounts_style_id'):
|
||||
kpi_value['auto_expand_accounts_style_id'] = self._create_style(kpi_value['auto_expand_accounts_style_id']).id
|
||||
if report_values.get('subkpi_ids'):
|
||||
del kpi_value['expression']
|
||||
del kpi_value['expression_ids']
|
||||
else:
|
||||
if kpi_value.get('expression_ids'):
|
||||
expression_values = [(0, False, v) for v in kpi_value['expression_ids']]
|
||||
kpi_value['expression_ids'] = expression_values
|
||||
kpi_values.append((0, False, kpi_value))
|
||||
report_values['kpi_ids'] = kpi_values
|
||||
|
||||
def __prepare_query_values(self, report_values):
|
||||
if report_values.get('query_ids'):
|
||||
query_values = []
|
||||
for query_value in report_values['query_ids']:
|
||||
query_model = self.env['ir.model'].search([('model', '=', query_value['model_id'])])
|
||||
query_value['model_id'] = query_model.id
|
||||
query_value['field_ids'] = [(6, 0, [f.id for f in query_model.field_id if f.name in query_value['field_ids']])]
|
||||
query_values.append((0, False, query_value))
|
||||
report_values['query_ids'] = query_values
|
||||
|
||||
def __prepare_subreport_values(self, report_entry, report_values):
|
||||
if report_entry.get('subreport_ids'):
|
||||
subreport_values = []
|
||||
for subreport_value in report_entry['subreport_ids']:
|
||||
subreport_value['subreport_id'] = self.env.ref(subreport_value['subreport_id']).id
|
||||
subreport_values.append((0, False, subreport_value))
|
||||
report_values['subreport_ids'] = subreport_values
|
||||
|
||||
@api.model
|
||||
def _create_style(self, style_data):
|
||||
exit_id = style_data['extid']
|
||||
result = self.env['ir.model.data'].xmlid_to_object(exit_id)
|
||||
if result:
|
||||
return result
|
||||
|
||||
del style_data['extid']
|
||||
new_style = self.env['mis.report.style'].create(style_data)
|
||||
self._create_external_reference(new_style, exit_id)
|
||||
return new_style
|
||||
|
||||
def _create_external_reference(self, obj, extid, temporary=False):
|
||||
module, name = extid.split('.', 1)
|
||||
existing = self.env['ir.model.data'].search([
|
||||
('module', '=', module),
|
||||
('model', '=', obj._name),
|
||||
('name', '=', name),
|
||||
], limit=1)
|
||||
if existing:
|
||||
existing.res_id = obj.id
|
||||
return existing
|
||||
|
||||
return self.env['ir.model.data'].create({
|
||||
'module': module,
|
||||
'model': obj._name,
|
||||
'name': name,
|
||||
'res_id': obj.id,
|
||||
})
|
1
mis_builder_expimp_budget/__init__.py
Normal file
1
mis_builder_expimp_budget/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from . import wizards
|
14
mis_builder_expimp_budget/__manifest__.py
Normal file
14
mis_builder_expimp_budget/__manifest__.py
Normal file
@ -0,0 +1,14 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "MIS Builder Import / Export",
|
||||
"summary": """Import / Export Reports with all dependencies""",
|
||||
"version": "2.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "Jamotion GmbH",
|
||||
"website": "https://gitlab.com/flectra-community/mis-builder",
|
||||
"depends": ["mis_builder_expimp", "mis_builder_budget"],
|
||||
"data": [],
|
||||
"installable": True,
|
||||
"auto_install": True,
|
||||
}
|
3
mis_builder_expimp_budget/security/ir.model.access.csv
Normal file
3
mis_builder_expimp_budget/security/ir.model.access.csv
Normal file
@ -0,0 +1,3 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
access_mis_builder_import_wizard,access_mis_builder_import_wizard,model_mis_builder_import_wizard,account.group_account_manager,1,1,1,1
|
||||
access_mis_builder_export_wizard,access_mis_builder_export_wizard,model_mis_builder_export_wizard,account.group_account_manager,1,1,1,1
|
|
BIN
mis_builder_expimp_budget/static/description/icon.png
Normal file
BIN
mis_builder_expimp_budget/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
69
mis_builder_expimp_budget/static/description/index.html
Normal file
69
mis_builder_expimp_budget/static/description/index.html
Normal file
@ -0,0 +1,69 @@
|
||||
<div class="mt32" style="max-width: 1024px; margin: 0 auto;">
|
||||
<section class="container bg-gray-lighter oe_screenshot">
|
||||
<div class="row oe_spaced">
|
||||
<div class="col-md-12">
|
||||
<!-- The module's display name can differ from its technical name -->
|
||||
<h2 class="oe_slogan" style="color: #FF7E00;">MIS Builder - Import / Export</h2>
|
||||
<h3 class="oe_slogan">Function to import / export MIS Report Templates</h3>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="container">
|
||||
<div class="row oe_spaced">
|
||||
<h2 class="oe_slogan" style="color: #FF7E00;">Full export and import of report template</h2>
|
||||
<div class="col-md-6">
|
||||
<img class="oe_picture oe_screenshot" src="screenshot.png">
|
||||
</div>
|
||||
<div class="col-md-6 text-justify">
|
||||
<p class="oe_mt32">
|
||||
When exporting a report, all related data are exported too:
|
||||
</p>
|
||||
<ul>
|
||||
<li>KPIs</li>
|
||||
<li>SubKPIs</li>
|
||||
<li>Expressions</li>
|
||||
<li>Queries</li>
|
||||
<li>Sub Reports</li>
|
||||
<li>Styles</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="container">
|
||||
<div class="row oe_spaced">
|
||||
<h2 class='oe_slogan' style="color: #FF7E00;">Quick Start</h2>
|
||||
<div class="col-sm-4">
|
||||
<h3 class='oe_slogan'>Installation</h3>
|
||||
<div>
|
||||
<p class="oe_mt32">
|
||||
There are no dependencies other than flectra base modules, so you can simply install the module.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3 class='oe_slogan'>Configuration</h3>
|
||||
<div>
|
||||
<p class="oe_mt32">
|
||||
No configuration options available.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3 class='oe_slogan'>Usage</h3>
|
||||
<div>
|
||||
<p class="oe_mt32">
|
||||
You will find two new menu items at Finance -> Configuration -> MIS Reporting:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Export MIS Report -> shows a PopUp to select the report to export</li>
|
||||
<li>Import MIS Report -> shows a PopUp to select the file of exported report to import</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
BIN
mis_builder_expimp_budget/static/description/screenshot.png
Normal file
BIN
mis_builder_expimp_budget/static/description/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
1
mis_builder_expimp_budget/wizards/__init__.py
Normal file
1
mis_builder_expimp_budget/wizards/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from . import mis_builder_export_wizard
|
@ -0,0 +1,33 @@
|
||||
# Copyright 2014 ACSONE SA/NV (<http://acsone.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
import base64
|
||||
import json
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from flectra import api, fields, models, _
|
||||
|
||||
|
||||
class MisBuilderExportWizard(models.TransientModel):
|
||||
_inherit = "mis.builder.export.wizard"
|
||||
|
||||
@api.model
|
||||
def _get_query_fields(self):
|
||||
result = super(MisBuilderExportWizard, self)._get_query_fields()
|
||||
return result
|
||||
|
||||
@api.model
|
||||
def _get_report_fields(self):
|
||||
result = super(MisBuilderExportWizard, self)._get_report_fields()
|
||||
return result
|
||||
|
||||
@api.model
|
||||
def _get_kpi_fields(self):
|
||||
result = super(MisBuilderExportWizard, self)._get_kpi_fields()
|
||||
result.append('budgetable')
|
||||
return result
|
||||
|
||||
@api.model
|
||||
def _get_style_fields(self):
|
||||
result = super(MisBuilderExportWizard, self)._get_style_fields()
|
||||
return result
|
Loading…
Reference in New Issue
Block a user