Browse Source

Merge pull request #1 from CybroOdoo/13.0

13.0
pull/193/head
Pedro Jhosua Acosta Pilataxi 4 years ago
committed by GitHub
parent
commit
737011f0ba
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      crm_dashboard/__manifest__.py
  2. 6
      crm_dashboard/models/crm_dashboard.py
  3. 2
      dynamic_accounts_report/__manifest__.py
  4. 10
      dynamic_accounts_report/doc/RELEASE_NOTES.md
  5. 1450
      dynamic_accounts_report/i18n/ar_001.po
  6. 43
      dynamic_accounts_report/static/src/js/ageing.js
  7. 53
      dynamic_accounts_report/static/src/js/cash_flow.js
  8. 55
      dynamic_accounts_report/static/src/js/daybook.js
  9. 56
      dynamic_accounts_report/static/src/js/financial_reports.js
  10. 56
      dynamic_accounts_report/static/src/js/general_ledger.js
  11. 54
      dynamic_accounts_report/static/src/js/partner_ledger.js
  12. 54
      dynamic_accounts_report/static/src/js/trial_balance.js
  13. 52
      dynamic_accounts_report/static/src/xml/ageing.xml
  14. 93
      dynamic_accounts_report/static/src/xml/cash_flow_view.xml
  15. 50
      dynamic_accounts_report/static/src/xml/daybook.xml
  16. 91
      dynamic_accounts_report/static/src/xml/financial_reports_view.xml
  17. 67
      dynamic_accounts_report/static/src/xml/general_ledger_view.xml
  18. 57
      dynamic_accounts_report/static/src/xml/partner_ledger_view.xml
  19. 66
      dynamic_accounts_report/static/src/xml/trial_balance_view.xml
  20. 153
      dynamic_accounts_report/wizard/ageing.py
  21. 13
      dynamic_accounts_report/wizard/balance_sheet.py
  22. 1
      dynamic_accounts_report/wizard/balance_sheet_config.py
  23. 14
      dynamic_accounts_report/wizard/general_ledger.py

2
crm_dashboard/__manifest__.py

@ -24,7 +24,7 @@
'description': """CRM Dashboard, Detailed Dashboard View for CRM, CRM, Dashboard, odoo13""",
'summary': """Detailed Dashboard View for CRM""",
'category': 'Sales',
'version': '13.0.1.0.0',
'version': '13.0.1.0.1',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',

6
crm_dashboard/models/crm_dashboard.py

@ -541,7 +541,11 @@ class CRMLead(models.Model):
if len(data) != 3:
del data
else:
ratio = round(data[1] / data[2], 2)
data[1] = 0
if data[2] == 0:
ratio = 0
else:
ratio = round(data[1] / data[2], 2)
data.append(str(ratio))
country_wise_ratio.append(data)

2
dynamic_accounts_report/__manifest__.py

@ -22,7 +22,7 @@
{
'name': 'Dynamic Financial Reports',
'version': '13.0.1.0.1',
'version': '13.0.1.0.3',
'category': 'Accounting',
'summary': """Dynamic Financial Reports with drill
down and filters Community Edition""",

10
dynamic_accounts_report/doc/RELEASE_NOTES.md

@ -11,5 +11,15 @@
#### UPDT
- Updated
#### 20.12.2021
#### Version 13.0.1.0.2
#### UPDT
- Translation issue and Calendar format issue
#### 15.01.2022
#### Version 13.0.1.0.3
#### UPDT
- Arabic Translation added

1450
dynamic_accounts_report/i18n/ar_001.po

File diff suppressed because it is too large

43
dynamic_accounts_report/static/src/js/ageing.js

@ -9,6 +9,9 @@ odoo.define('dynamic_accounts_report.ageing', function (require) {
var QWeb = core.qweb;
var _t = core._t;
var datepicker = require('web.datepicker');
var time = require('web.time');
window.click_num = 0;
var PartnerAgeing = AbstractAction.extend({
template: 'AgeingTemp',
@ -20,6 +23,7 @@ odoo.define('dynamic_accounts_report.ageing', function (require) {
'click #xlsx': 'print_xlsx',
'click .gl-line': 'show_drop_down',
'click .view-account-move': 'view_acc_move',
'mousedown div.input-group.date[data-target-input="nearest"]': '_onCalendarIconClick',
},
init: function(parent, action) {
@ -48,6 +52,35 @@ odoo.define('dynamic_accounts_report.ageing', function (require) {
})
},
_onCalendarIconClick: function (ev) {
var $calendarInputGroup = $(ev.currentTarget);
var calendarOptions = {
minDate: moment({ y: 1000 }),
maxDate: moment().add(200, 'y'),
calendarWeeks: true,
defaultDate: moment().format(),
sideBySide: true,
buttons: {
showClear: true,
showClose: true,
showToday: true,
},
icons : {
date: 'fa fa-calendar',
},
locale : moment.locale(),
format : time.getLangDateFormat(),
widgetParent: 'body',
allowInputToggle: true,
};
$calendarInputGroup.datetimepicker(calendarOptions);
},
load_data: function (initial_render = true) {
@ -315,10 +348,14 @@ odoo.define('dynamic_accounts_report.ageing', function (require) {
var filter_data_selected = {};
if ($("#date_from").val()) {
var dateString = $("#date_from").val();
// if ($("#date_from").val()) {
// var dateString = $("#date_from").val();
//
// filter_data_selected.date_from= dateString;
// }
filter_data_selected.date_from= dateString;
if (this.$el.find('.datetimepicker-input[name="date_from"]').val()) {
filter_data_selected.date_from = moment(this.$el.find('.datetimepicker-input[name="date_from"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
var partner_ids = [];
var partner_text = [];

53
dynamic_accounts_report/static/src/js/cash_flow.js

@ -9,6 +9,9 @@ odoo.define('dynamic_cash_flow_statements.cash_flow', function (require) {
var QWeb = core.qweb;
var _t = core._t;
var datepicker = require('web.datepicker');
var time = require('web.time');
window.click_num = 0;
var CashFlow = AbstractAction.extend({
template: 'CFTemp',
@ -19,6 +22,7 @@ odoo.define('dynamic_cash_flow_statements.cash_flow', function (require) {
'click #pdf': 'print_pdf',
'click #xlsx': 'print_xlsx',
'click .cf-line': 'get_move_lines',
'mousedown div.input-group.date[data-target-input="nearest"]': '_onCalendarIconClick',
},
init: function(parent, action) {
@ -44,6 +48,35 @@ odoo.define('dynamic_cash_flow_statements.cash_flow', function (require) {
})
},
_onCalendarIconClick: function (ev) {
var $calendarInputGroup = $(ev.currentTarget);
var calendarOptions = {
minDate: moment({ y: 1000 }),
maxDate: moment().add(200, 'y'),
calendarWeeks: true,
defaultDate: moment().format(),
sideBySide: true,
buttons: {
showClear: true,
showClose: true,
showToday: true,
},
icons : {
date: 'fa fa-calendar',
},
locale : moment.locale(),
format : time.getLangDateFormat(),
widgetParent: 'body',
allowInputToggle: true,
};
$calendarInputGroup.datetimepicker(calendarOptions);
},
get_move_lines: function(event) {
event.preventDefault();
var self = this;
@ -292,13 +325,21 @@ odoo.define('dynamic_cash_flow_statements.cash_flow', function (require) {
}
}
if ($("#date_from").val()) {
var dateString = $("#date_from").val();
filter_data_selected.date_from = dateString;
// if ($("#date_from").val()) {
// var dateString = $("#date_from").val();
// filter_data_selected.date_from = dateString;
// }
// if ($("#date_to").val()) {
// var dateString = $("#date_to").val();
// filter_data_selected.date_to = dateString;
// }
if (this.$el.find('.datetimepicker-input[name="date_from"]').val()) {
filter_data_selected.date_from = moment(this.$el.find('.datetimepicker-input[name="date_from"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($("#date_to").val()) {
var dateString = $("#date_to").val();
filter_data_selected.date_to = dateString;
if (this.$el.find('.datetimepicker-input[name="date_to"]').val()) {
filter_data_selected.date_to = moment(this.$el.find('.datetimepicker-input[name="date_to"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($(".target_move").length) {

55
dynamic_accounts_report/static/src/js/daybook.js

@ -9,6 +9,9 @@ odoo.define('dynamic_partner_daybook.daybook', function (require) {
var QWeb = core.qweb;
var _t = core._t;
var datepicker = require('web.datepicker');
var time = require('web.time');
window.click_num = 0;
var DayBook = AbstractAction.extend({
template: 'DaybookTemp',
@ -20,6 +23,7 @@ odoo.define('dynamic_partner_daybook.daybook', function (require) {
'click #xlsx': 'print_xlsx',
'click .db-line': 'show_drop_down',
'click .view-account-move': 'view_acc_move',
'mousedown div.input-group.date[data-target-input="nearest"]': '_onCalendarIconClick',
},
init: function(parent, action) {
@ -45,6 +49,35 @@ odoo.define('dynamic_partner_daybook.daybook', function (require) {
})
},
_onCalendarIconClick: function (ev) {
var $calendarInputGroup = $(ev.currentTarget);
var calendarOptions = {
minDate: moment({ y: 1000 }),
maxDate: moment().add(200, 'y'),
calendarWeeks: true,
defaultDate: moment().format(),
sideBySide: true,
buttons: {
showClear: true,
showClose: true,
showToday: true,
},
icons : {
date: 'fa fa-calendar',
},
locale : moment.locale(),
format : time.getLangDateFormat(),
widgetParent: 'body',
allowInputToggle: true,
};
$calendarInputGroup.datetimepicker(calendarOptions);
},
load_data: function (initial_render = true) {
var self = this;
@ -344,14 +377,22 @@ odoo.define('dynamic_partner_daybook.daybook', function (require) {
}
filter_data_selected.journal_ids = journal_ids
if ($("#date_from").val()) {
var dateString = $("#date_from").val();
filter_data_selected.date_from = dateString;
// if ($("#date_from").val()) {
// var dateString = $("#date_from").val();
//
// filter_data_selected.date_from = dateString;
// }
// if ($("#date_to").val()) {
// var dateString = $("#date_to").val();
// filter_data_selected.date_to = dateString;
// }
if (this.$el.find('.datetimepicker-input[name="date_from"]').val()) {
filter_data_selected.date_from = moment(this.$el.find('.datetimepicker-input[name="date_from"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($("#date_to").val()) {
var dateString = $("#date_to").val();
filter_data_selected.date_to = dateString;
if (this.$el.find('.datetimepicker-input[name="date_to"]').val()) {
filter_data_selected.date_to = moment(this.$el.find('.datetimepicker-input[name="date_to"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($(".target_move").length) {

56
dynamic_accounts_report/static/src/js/financial_reports.js

@ -9,6 +9,9 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) {
var QWeb = core.qweb;
var _t = core._t;
var datepicker = require('web.datepicker');
var time = require('web.time');
window.click_num = 0;
var ProfitAndLoss = AbstractAction.extend({
template: 'dfr_template_new',
@ -19,6 +22,7 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) {
'click #pdf': 'print_pdf',
'click #xlsx': 'print_xlsx',
'click .show-gl': 'show_gl',
'mousedown div.input-group.date[data-target-input="nearest"]': '_onCalendarIconClick',
},
init: function(parent, action) {
@ -41,6 +45,35 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) {
})
},
_onCalendarIconClick: function (ev) {
var $calendarInputGroup = $(ev.currentTarget);
var calendarOptions = {
minDate: moment({ y: 1000 }),
maxDate: moment().add(200, 'y'),
calendarWeeks: true,
defaultDate: moment().format(),
sideBySide: true,
buttons: {
showClear: true,
showClose: true,
showToday: true,
},
icons : {
date: 'fa fa-calendar',
},
locale : moment.locale(),
format : time.getLangDateFormat(),
widgetParent: 'body',
allowInputToggle: true,
};
$calendarInputGroup.datetimepicker(calendarOptions);
},
load_data: function (initial_render = true) {
var self = this;
var action_title = self._title;
@ -53,6 +86,7 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) {
args: [[this.wizard_id], action_title],
}).then(function(datas) {
if (initial_render) {
self.$('.filter_view_dfr').html(QWeb.render('DfrFilterView', {
filter_data: datas['filters'],
@ -76,6 +110,7 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) {
}
var child=[];
self.$('.table_view_dfr').html(QWeb.render('dfr_table', {
report_lines : datas['report_lines'],
@ -86,6 +121,7 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) {
debit_balance : datas['debit_balance'],
bs_lines : datas['bs_lines'],
}));
});
}
catch (el) {
@ -317,13 +353,21 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) {
filter_data_selected.analytic_tag_ids = analytic_tag_ids
if ($("#date_from").val()) {
var dateString = $("#date_from").val();
filter_data_selected.date_from = dateString;
// if ($("#date_from").val()) {
// var dateString = $("#date_from").val();
// filter_data_selected.date_from = dateString;
// }
// if ($("#date_to").val()) {
// var dateString = $("#date_to").val();
// filter_data_selected.date_to = dateString;
// }
if (this.$el.find('.datetimepicker-input[name="date_from"]').val()) {
filter_data_selected.date_from = moment(this.$el.find('.datetimepicker-input[name="date_from"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($("#date_to").val()) {
var dateString = $("#date_to").val();
filter_data_selected.date_to = dateString;
if (this.$el.find('.datetimepicker-input[name="date_to"]').val()) {
filter_data_selected.date_to = moment(this.$el.find('.datetimepicker-input[name="date_to"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($(".target_move").length) {

56
dynamic_accounts_report/static/src/js/general_ledger.js

@ -9,6 +9,9 @@ odoo.define('dynamic_cash_flow_statements.general_ledger', function (require) {
var QWeb = core.qweb;
var _t = core._t;
var datepicker = require('web.datepicker');
var time = require('web.time');
window.click_num = 0;
var GeneralLedger = AbstractAction.extend({
template: 'GeneralTemp',
@ -20,6 +23,7 @@ odoo.define('dynamic_cash_flow_statements.general_ledger', function (require) {
'click #xlsx': 'print_xlsx',
'click .gl-line': 'show_drop_down',
'click .view-account-move': 'view_acc_move',
'mousedown div.input-group.date[data-target-input="nearest"]': '_onCalendarIconClick',
},
init: function(parent, action) {
@ -60,6 +64,36 @@ odoo.define('dynamic_cash_flow_statements.general_ledger', function (require) {
}
},
_onCalendarIconClick: function (ev) {
var $calendarInputGroup = $(ev.currentTarget);
var calendarOptions = {
minDate: moment({ y: 1000 }),
maxDate: moment().add(200, 'y'),
calendarWeeks: true,
defaultDate: moment().format(),
sideBySide: true,
buttons: {
showClear: true,
showClose: true,
showToday: true,
},
icons : {
date: 'fa fa-calendar',
},
locale : moment.locale(),
format : time.getLangDateFormat(),
widgetParent: 'body',
allowInputToggle: true,
};
$calendarInputGroup.datetimepicker(calendarOptions);
},
load_data: function (initial_render = true) {
var self = this;
@ -414,14 +448,22 @@ odoo.define('dynamic_cash_flow_statements.general_ledger', function (require) {
}
filter_data_selected.analytic_tag_ids = analytic_tag_ids
if ($("#date_from").val()) {
var dateString = $("#date_from").val();
filter_data_selected.date_from = dateString;
// if ($("#date_from").val()) {
//
// var dateString = $("#date_from").val();
// filter_data_selected.date_from = dateString;
// }
// if ($("#date_to").val()) {
// var dateString = $("#date_to").val();
// filter_data_selected.date_to = dateString;
// }
if (this.$el.find('.datetimepicker-input[name="gen_date_from"]').val()) {
filter_data_selected.date_from = moment(this.$el.find('.datetimepicker-input[name="gen_date_from"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($("#date_to").val()) {
var dateString = $("#date_to").val();
filter_data_selected.date_to = dateString;
if (this.$el.find('.datetimepicker-input[name="gen_date_to"]').val()) {
filter_data_selected.date_to = moment(this.$el.find('.datetimepicker-input[name="gen_date_to"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($(".target_move").length) {

54
dynamic_accounts_report/static/src/js/partner_ledger.js

@ -9,6 +9,9 @@ odoo.define('dynamic_accounts_report.partner_ledger', function (require) {
var QWeb = core.qweb;
var _t = core._t;
var datepicker = require('web.datepicker');
var time = require('web.time');
window.click_num = 0;
var PartnerLedger = AbstractAction.extend({
template: 'PartnerTemp',
@ -20,6 +23,7 @@ odoo.define('dynamic_accounts_report.partner_ledger', function (require) {
'click #xlsx': 'print_xlsx',
'click .pl-line': 'show_drop_down',
'click .view-account-move': 'view_acc_move',
'mousedown div.input-group.date[data-target-input="nearest"]': '_onCalendarIconClick',
},
@ -44,6 +48,36 @@ odoo.define('dynamic_accounts_report.partner_ledger', function (require) {
})
},
_onCalendarIconClick: function (ev) {
var $calendarInputGroup = $(ev.currentTarget);
var calendarOptions = {
minDate: moment({ y: 1000 }),
maxDate: moment().add(200, 'y'),
calendarWeeks: true,
defaultDate: moment().format(),
sideBySide: true,
buttons: {
showClear: true,
showClose: true,
showToday: true,
},
icons : {
date: 'fa fa-calendar',
},
locale : moment.locale(),
format : time.getLangDateFormat(),
widgetParent: 'body',
allowInputToggle: true,
};
$calendarInputGroup.datetimepicker(calendarOptions);
},
load_data: function (initial_render = true) {
var self = this;
self.$(".categ").empty();
@ -380,13 +414,21 @@ odoo.define('dynamic_accounts_report.partner_ledger', function (require) {
}
filter_data_selected.partner_category_ids = partner_category_ids
if ($("#date_from").val()) {
var dateString = $("#date_from").val();
filter_data_selected.date_from = dateString;
// if ($("#date_from").val()) {
// var dateString = $("#date_from").val();
// filter_data_selected.date_from = dateString;
// }
// if ($("#date_to").val()) {
// var dateString = $("#date_to").val();
// filter_data_selected.date_to = dateString;
// }
if (this.$el.find('.datetimepicker-input[name="date_from"]').val()) {
filter_data_selected.date_from = moment(this.$el.find('.datetimepicker-input[name="date_from"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($("#date_to").val()) {
var dateString = $("#date_to").val();
filter_data_selected.date_to = dateString;
if (this.$el.find('.datetimepicker-input[name="date_to"]').val()) {
filter_data_selected.date_to = moment(this.$el.find('.datetimepicker-input[name="date_to"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($(".reconciled").length){

54
dynamic_accounts_report/static/src/js/trial_balance.js

@ -9,6 +9,9 @@ odoo.define('dynamic_cash_flow_statements.trial', function (require) {
var QWeb = core.qweb;
var _t = core._t;
var datepicker = require('web.datepicker');
var time = require('web.time');
window.click_num = 0;
var TrialBalance = AbstractAction.extend({
template: 'TrialTemp',
@ -19,6 +22,7 @@ odoo.define('dynamic_cash_flow_statements.trial', function (require) {
'click #pdf': 'print_pdf',
'click #xlsx': 'print_xlsx',
'click .show-gl': 'show_gl',
'mousedown div.input-group.date[data-target-input="nearest"]': '_onCalendarIconClick',
},
init: function(parent, action) {
@ -44,6 +48,36 @@ odoo.define('dynamic_cash_flow_statements.trial', function (require) {
})
},
_onCalendarIconClick: function (ev) {
var $calendarInputGroup = $(ev.currentTarget);
var calendarOptions = {
// minDate: moment({ y: 1000 }),
// maxDate: moment().add(200, 'y'),
// calendarWeeks: true,
// defaultDate: moment().format(),
// sideBySide: true,
// buttons: {
// showClear: true,
// showClose: true,
// showToday: true,
// },
icons : {
date: 'fa fa-calendar',
},
locale : moment.locale(),
format : time.getLangDateFormat(),
widgetParent: 'body',
allowInputToggle: true,
};
$calendarInputGroup.datetimepicker(calendarOptions);
},
load_data: function (initial_render = true) {
var self = this;
@ -223,13 +257,21 @@ odoo.define('dynamic_cash_flow_statements.trial', function (require) {
}
filter_data_selected.journal_ids = journal_ids
if ($("#date_from").val()) {
var dateString = $("#date_from").val();
filter_data_selected.date_from = dateString;
// if ($("#date_from").val()) {
// var dateString = $("#date_from").val();
// filter_data_selected.date_from = dateString;
// }
// if ($("#date_to").val()) {
// var dateString = $("#date_to").val();
// filter_data_selected.date_to = dateString;
// }
if (this.$el.find('.datetimepicker-input[name="date_from"]').val()) {
filter_data_selected.date_from = moment(this.$el.find('.datetimepicker-input[name="date_from"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($("#date_to").val()) {
var dateString = $("#date_to").val();
filter_data_selected.date_to = dateString;
if (this.$el.find('.datetimepicker-input[name="date_to"]').val()) {
filter_data_selected.date_to = moment(this.$el.find('.datetimepicker-input[name="date_to"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD');
}
if ($(".target_move").length) {

52
dynamic_accounts_report/static/src/xml/ageing.xml

@ -219,38 +219,41 @@
<t t-name="AgeingFilterView">
<div class="" style="position: relative;">
<div class="sub_container_left">
<div class="row" style="margin-right: 10px; margin-left: 10px;">
<div class="sub_container_left" style="width:70%;">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Print (PDF)
</button>
<button type="button" class="btn btn-primary" id="xlsx"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Export (XLSX)
</button>
</div>
</div>
<br></br>
<div class="sub_container_right" style="width:50%;height:3%;right:0px;top:0px;position: absolute;">
<div class="" style="right:80x;">
<div class="sub_container_right row" style="width:30%;height:3%;top:0px;position: relative;">
<br></br>
<div class="row" style="right:100px;top:0px;position: absolute;width:50;">
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" >
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
As On Date
As on Date
</a>
<div class="dropdown-menu" role="menu">
<div class="">
<label class="" for="date_from">As On Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_from"></input>
<div class="form-group">
<label class="" for="date_from">As on Date :</label>
<div class="input-group date" id="date_from" data-target-input="nearest">
<input type="text" name="date_from" class="form-control datetimepicker-input" data-target="#date_from" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_from" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
@ -314,16 +317,17 @@
</select>
<span id="post_res"></span>
</div>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</div>
</t>

93
dynamic_accounts_report/static/src/xml/cash_flow_view.xml

@ -139,41 +139,53 @@
<t t-name="CashFilterView">
<div class="" style="position: relative;">
<div class="sub_container_left">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf" style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">Print (PDF)</button>
<button type="button" class="btn btn-primary" id="xlsx" style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">Export (XLSX)</button>
</div>
</div>
<br></br>
<div class="sub_container_right" style="width:50%;height:3%;right:0px;top:0px;position: absolute;">
<div class="" style="right:80x;">
<br></br>
<div class="row" style="right:80px;top:0px;position: absolute;width:50;">
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="" >
<label class="" for="date_from">Start Date :</label>
<div class="">
<div class="" aria-atomic="true" id="" >
<input type="date" id="date_from"></input>
</div>
</div>
<label class="" for="date_to">End Date :</label>
<div class="">
<div class="" aria-atomic="true" id="" >
<input type="date" id="date_to"></input>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-right: 10px; margin-left: 10px;">
<div class="sub_container_left" style="width:70%;">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf"
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Print (PDF)
</button>
<button type="button" class="btn btn-primary" id="xlsx"
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Export (XLSX)
</button>
</div>
</div>
<br></br>
<div class="sub_container_right row" style="width:30%;height:3%;top:0px;position: relative;">
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" >
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="form-group">
<label class="" for="date_from">Start Date :</label>
<div class="input-group date" id="date_from" data-target-input="nearest">
<input type="text" name="date_from" class="form-control datetimepicker-input" data-target="#date_from" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_from" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
<label class="" for="date_to">End Date :</label>
<div class="input-group date" id="date_to" data-target-input="nearest">
<input type="text" name="date_to" class="form-control datetimepicker-input" data-target="#date_to" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_to" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="search-Target-move" style="">
@ -202,15 +214,16 @@ Level:
</select>
<span id="level_res"> </span>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary" style="top:0px;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD;">Apply</button>
</div>
</div>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary" style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">Apply</button>
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</div>
</t>

50
dynamic_accounts_report/static/src/xml/daybook.xml

@ -111,45 +111,50 @@
<t t-name="DayFilterView">
<div class="" style="position: relative;">
<div class="sub_container_left">
<div class="row" style="margin-right: 10px; margin-left: 10px;">
<div class="sub_container_left" style="width:70%;">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Print (PDF)
</button>
<button type="button" class="btn btn-primary" id="xlsx"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Export (XLSX)
</button>
</div>
</div>
<br></br>
<div class="sub_container_right" style="width:50%;height:3%;right:0px;top:0px;position: absolute;">
<div class="sub_container_right row" style="width:30%;height:3%;top:0px;position: relative;">
<div class="" style="right:80x;">
<br></br>
<div class="row" style="right:80px;top:0px;position: absolute;width:50;">
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" >
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="">
<div class="form-group">
<label class="" for="date_from">Start Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_from"></input>
<div class="input-group date" id="date_from" data-target-input="nearest">
<input type="text" name="date_from" class="form-control datetimepicker-input" data-target="#date_from" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_from" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
<label class="" for="date_to">End Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_to"></input>
<div class="input-group date" id="date_to" data-target-input="nearest">
<input type="text" name="date_to" class="form-control datetimepicker-input" data-target="#date_to" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_to" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
</div>
</div>
@ -196,16 +201,17 @@
</select>
<span id="post_res"></span>
</div>
</div>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">
style="top:0px;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</t>

91
dynamic_accounts_report/static/src/xml/financial_reports_view.xml

@ -65,8 +65,6 @@
<td t-att-style="fr_padding"><t t-esc="a['m_credit']" t-att-style="style"/></td>
<td t-att-style="fr_padding"><t t-esc="a['m_balance']" t-att-style="style"/></td>
<t t-set="common_id" t-value="'a'+account['id']"/>
</tr>
</t>
@ -117,49 +115,53 @@
</h1>
</div>
<div class="" style="position: relative;">
<div class="sub_container_left">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD;
padding:3px;">
<div class="row" style="margin-right: 10px; margin-left: 10px;">
<div class="sub_container_left" style="width:70%;">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf"
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Print (PDF)
</button>
<button type="button" class="btn btn-primary" id="xlsx"
style="left:20px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Export (XLSX)
</button>
</div>
</div>
<br></br>
<div class="sub_container_right" style="width:50%;height:3%;right:0px;top:0px;position: absolute;">
<div class="" style="right:80x;">
</div>
</div>
<br></br>
<div class="sub_container_right row" style="width:30%;height:3%;top:0px;position: relative;">
<br></br>
<div class="row" style="right:80px;top:0px;position: absolute;width:50;">
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="" >
<label class="" for="date_from">Start Date :</label>
<div class="">
<div class="" aria-atomic="true" id="" >
<input type="date" id="date_from"></input>
</div>
</div>
<label class="" for="date_to">End Date :</label>
<div class="">
<div class="" aria-atomic="true" id="" >
<input type="date" id="date_to"></input>
</div>
</div>
</div>
</div>
</div>
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" >
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="form-group">
<label class="" for="date_from">Start Date :</label>
<div class="input-group date" id="date_from" data-target-input="nearest">
<input type="text" name="date_from" class="form-control datetimepicker-input" data-target="#date_from" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_from" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
<label class="" for="date_to">End Date :</label>
<div class="input-group date" id="date_to" data-target-input="nearest">
<input type="text" name="date_to" class="form-control datetimepicker-input" data-target="#date_to" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_to" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="journals_filter" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown">
<span class="fa fa-book"></span>
@ -249,17 +251,18 @@ Target Move:
</select>
<span id="post_res"></span>
</div>
</div>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">
style="top:0px;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
</div>
</div>
<!-- </div>-->
<!-- -->
<!-- </div>-->
</div>
</t>

67
dynamic_accounts_report/static/src/xml/general_ledger_view.xml

@ -134,47 +134,54 @@
</h1>
</div>
<div class="" style="position: relative;">
<div class="sub_container_left">
<div class="row" style="margin-right: 10px; margin-left: 10px;">
<div class="sub_container_left" style="width:70%;">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Print (PDF)
</button>
<button type="button" class="btn btn-primary" id="xlsx"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Export (XLSX)
</button>
</div>
</div>
<br></br>
<div class="sub_container_right" style="width:50%;height:3%;right:0px;top:0px;position: absolute;">
<div class="" style="right:80x;">
<div class="sub_container_right row" style="width:30%;height:3%;top:0px;position: relative;">
<br></br>
<div class="row" style="right:80px;top:0px;position: absolute;width:50;">
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" >
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="">
<label class="" for="date_from">Start Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_from"></input>
<div class="form-group">
<label class="" for="gen_date_from">Start Date :</label>
<div class="input-group date" id="gen_date_from" data-target-input="nearest">
<input type="text" name="gen_date_from" class="form-control datetimepicker-input" data-target="#gen_date_from" t-att-name="prefix"/>
<div class="input-group-append" data-target="#gen_date_from" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
<label class="" for="date_to">End Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_to"></input>
<div class="input-group date" id="gen_date_to" data-target-input="nearest">
<input type="text" name="gen_date_to" class="form-control datetimepicker-input" data-target="#gen_date_to" t-att-name="prefix"/>
<div class="input-group-append" data-target="#gen_date_to" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
</div>
</div>
<t t-if="title == 'General Ledger'">
<div class="journals_filter" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown">
<span class="fa fa-book"></span>
@ -190,6 +197,7 @@
</select>
<span id="journal_res"></span>
</div>
</t>
<div class="accounts_filter">
<a type="button" class="dropdown-toggle" data-toggle="dropdown">
@ -249,17 +257,24 @@
</select>
<span id="post_res"></span>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
</div>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
<!-- </div>-->
<!-- <div style="">-->
<!-- <button type="button" id="apply_filter" class="btn btn-primary"-->
<!-- style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">-->
<!-- Apply-->
<!-- </button>-->
</div>
</div>
<!-- </div>-->
<!-- </div>-->
</div>
</t>

57
dynamic_accounts_report/static/src/xml/partner_ledger_view.xml

@ -91,44 +91,50 @@
</t>
<t t-name="PLFilterView">
<div class="" style="position: relative;">
<div class="sub_container_left">
<div class="row" style="margin-right: 10px; margin-left: 10px;">
<div class="sub_container_left" style="width:70%;">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Print (PDF)
</button>
<button type="button" class="btn btn-primary" id="xlsx"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Export (XLSX)
</button>
</div>
</div>
<br></br>
<div class="sub_container_right" style="width:50%;height:3%;right:0px;top:0px;position: absolute;">
<div class="" style="right:80x;">
<div class="sub_container_right row" style="width:30%;height:3%;top:0px;position: relative;">
<br></br>
<div class="row" style="right:80px;top:0px;position: absolute;width:50;">
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" >
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="">
<div class="form-group">
<label class="" for="date_from">Start Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_from"></input>
<div class="input-group date" id="date_from" data-target-input="nearest">
<input type="text" name="date_from" class="form-control datetimepicker-input" data-target="#date_from" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_from" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
<label class="" for="date_to">End Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_to"></input>
<div class="input-group date" id="date_to" data-target-input="nearest">
<input type="text" name="date_to" class="form-control datetimepicker-input" data-target="#date_to" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_to" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
</div>
</div>
@ -224,16 +230,17 @@
</select>
<span id="post_res"></span>
</div>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</div>
</t>

66
dynamic_accounts_report/static/src/xml/trial_balance_view.xml

@ -196,45 +196,53 @@
<t t-name="TrialFilterView">
<div class="" style="position: relative;">
<div class="sub_container_left">
<div class="row" style="margin-right: 10px; margin-left: 10px;">
<div class="sub_container_left" style="width:70%;">
<div class="report_print">
<button type="button" class="btn btn-primary" id="pdf"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Print (PDF)
</button>
<button type="button" class="btn btn-primary" id="xlsx"
style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
style="position: relative;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
Export (XLSX)
</button>
</div>
</div>
<br></br>
<div class="sub_container_right" style="width:50%;height:3%;right:0px;top:0px;position: absolute;">
<div class="" style="right:80x;">
<div class="sub_container_right row" style="width:30%;height:3%;top:0px;position: relative;">
<br></br>
<div class="row" style="right:80px;top:0px;position: absolute;width:50;">
<div class="time_range" style="">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<a type="button" class="dropdown-toggle" data-toggle="dropdown" >
<span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="">
<div class="form-group">
<label class="" for="date_from">Start Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_from"></input>
<div class="input-group date" id="date_from" data-target-input="nearest">
<!-- <t t-set='date_formatted'><t t-options='{"widget": "date"}' t-esc="filter_data.date_from"/></t>-->
<!-- <input type="text" name="date_from" class="form-control datetimepicker-input" t-att-value="date_formatted" data-target="#date_from" t-att-name="prefix"/>-->
<input type="text" name="date_from" class="form-control datetimepicker-input" data-target="#date_from" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_from" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
<label class="" for="date_to">End Date :</label>
<div class="">
<div class="" aria-atomic="true" id="">
<input type="date" id="date_to"></input>
<div class="input-group date" id="date_to" data-target-input="nearest">
<input type="text" name="date_to" class="form-control datetimepicker-input" data-target="#date_to" t-att-name="prefix"/>
<div class="input-group-append" data-target="#date_to" data-toggle="datetimepicker">
<span class="input-group-text">
<span class="fa fa-calendar" role="img" aria-label="Calendar"></span>
</span>
</div>
</div>
</div>
</div>
</div>
@ -261,21 +269,23 @@
</a>
<select id="entries" class="dropdown-menu target_move" name="states[]">
<div role="separator" class="dropdown-divider"></div>
<option value="posted">Posted Entries</option>
<option value="all">All Entries</option>
<option value="Posted">Posted Entries</option>
<option value="All">All Entries</option>
</select>
<span id="post_res"></span>
</div>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
<div style="">
<button type="button" id="apply_filter" class="btn btn-primary"
style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">
Apply
</button>
</div>
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</div>
</t>

153
dynamic_accounts_report/wizard/ageing.py

@ -397,88 +397,93 @@ class AgeingView(models.TransientModel):
partners_amount[partner_id] += line_amount
if i + 1 == 5:
period5 = i + 1
lines[partner_id].append({
'period5': period5,
'line': line,
'partner_id': partner_id,
'move': move_name,
'currency': currency_id,
'symbol': currency_symbol,
'jrnl': jrnl_id,
'acc_name': account_id,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
if partner_id:
lines[partner_id].append({
'period5': period5,
'line': line,
'partner_id': partner_id,
'move': move_name,
'currency': currency_id,
'symbol': currency_symbol,
'jrnl': jrnl_id,
'acc_name': account_id,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
elif i + 1 == 4:
period4 = i + 1
lines[partner_id].append({
'period4': period4,
'line': line,
'partner_id': partner_id,
'move': move_name,
'jrnl': jrnl_id,
'acc_name': account_id,
'currency': currency_id,
'symbol': currency_symbol,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
if partner_id:
lines[partner_id].append({
'period4': period4,
'line': line,
'partner_id': partner_id,
'move': move_name,
'jrnl': jrnl_id,
'acc_name': account_id,
'currency': currency_id,
'symbol': currency_symbol,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
elif i + 1 == 3:
period3 = i + 1
lines[partner_id].append({
'period3': period3,
'line': line,
'partner_id': partner_id,
'move': move_name,
'jrnl': jrnl_id,
'acc_name': account_id,
'currency': currency_id,
'symbol': currency_symbol,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
if partner_id:
lines[partner_id].append({
'period3': period3,
'line': line,
'partner_id': partner_id,
'move': move_name,
'jrnl': jrnl_id,
'acc_name': account_id,
'currency': currency_id,
'symbol': currency_symbol,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
elif i + 1 == 2:
period2 = i + 1
lines[partner_id].append({
'period2': period2,
'line': line,
'partner_id': partner_id,
'move': move_name,
'jrnl': jrnl_id,
'acc_name': account_id,
'currency': currency_id,
'symbol': currency_symbol,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
if partner_id:
lines[partner_id].append({
'period2': period2,
'line': line,
'partner_id': partner_id,
'move': move_name,
'jrnl': jrnl_id,
'acc_name': account_id,
'currency': currency_id,
'symbol': currency_symbol,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
else:
period1 = i + 1
lines[partner_id].append({
'period1': period1,
'line': line,
'partner_id': partner_id,
'move': move_name,
'jrnl': jrnl_id,
'acc_name': account_id,
'currency': currency_id,
'symbol': currency_symbol,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
if partner_id:
lines[partner_id].append({
'period1': period1,
'line': line,
'partner_id': partner_id,
'move': move_name,
'jrnl': jrnl_id,
'acc_name': account_id,
'currency': currency_id,
'symbol': currency_symbol,
'mov_id': move_id,
'acc_code': account_code,
'date': date_maturity,
'amount': line_amount,
})
history.append(partners_amount)

13
dynamic_accounts_report/wizard/balance_sheet.py

@ -38,6 +38,7 @@ class BalanceSheetView(models.TransientModel):
@api.model
def view_report(self, option, tag):
r = self.env['dynamic.balance.sheet.report'].search(
[('id', '=', option[0])])
data = {
@ -83,9 +84,15 @@ class BalanceSheetView(models.TransientModel):
new_records = list(filter(filter_code, records['Accounts']))
records['Accounts'] = new_records
trans_tag = self.env['ir.translation'].search([('value', '=', tag), ('module', '=', 'dynamic_accounts_report')],
limit=1).src
if trans_tag:
tag_upd = trans_tag
else:
tag_upd = tag
account_report_id = self.env['account.financial.report'].search([
('name', 'ilike', tag)])
account_report_id = self.env['account.financial.report'].with_context(lang='en_US').search([
('name', 'ilike', tag_upd)])
new_data = {'id': self.id, 'date_from': False,
'enable_filter': True,
@ -161,7 +168,6 @@ class BalanceSheetView(models.TransientModel):
parent_list = list(set(parent_list))
final_report_lines = []
for rec in report_lines_move:
if rec['report_type'] != 'accounts':
if rec['r_id'] in parent_list:
@ -220,7 +226,6 @@ class BalanceSheetView(models.TransientModel):
rec['m_credit'] = "{:,.2f}".format(rec['credit']) + " " + symbol
rec['m_balance'] = "{:,.2f}".format(
rec['balance']) + " " + symbol
return {
'name': tag,
'type': 'ir.actions.client',

1
dynamic_accounts_report/wizard/balance_sheet_config.py

@ -39,7 +39,6 @@ class BalanceSheet(models.TransientModel):
item['level'] = set_report_level(item)
data['journal_items'] = journal_items
data['report_lines'] = report_lines
return data
def _compute_account_balance(self, accounts):

14
dynamic_accounts_report/wizard/general_ledger.py

@ -42,18 +42,20 @@ class GeneralView(models.TransientModel):
def view_report(self, option, title):
r = self.env['account.general.ledger'].search([('id', '=', option[0])])
new_title = ''
trans_title = self.env['ir.translation'].search([('value', '=', title), ('module', '=', 'dynamic_accounts_report')], limit=1).src
journals = r.journal_ids
if title == 'General Ledger':
if title == 'General Ledger' or trans_title == 'General Ledger':
journals = r.journal_ids
new_title = 'General Ledger'
if title == 'Bank Book':
new_title = title
if title == 'Bank Book' or trans_title == 'Bank Book':
journals = self.env['account.journal'].search([('type', '=', 'bank')],
limit=1)
new_title = 'Bank Book'
if title == 'Cash Book':
new_title = title
if title == 'Cash Book' or trans_title == 'Cash Book':
journals = self.env['account.journal'].search([('type', '=', 'cash')],
limit=1)
new_title = 'Cash Book'
new_title = title
r.write({
'titles': new_title,
})

Loading…
Cancel
Save