diff --git a/account_accountant_ux/README.rst b/account_accountant_ux/README.rst
index ea51af49..3d1fb824 100644
--- a/account_accountant_ux/README.rst
+++ b/account_accountant_ux/README.rst
@@ -15,10 +15,12 @@ Accounting Reports UX
=====================
#. Mueve el menu "Caja y bancos" a nuevo menú de Accounting
-#. This module add to set the company in the wizard to set the account lock date.
+#. Agrega el parámetro "Compañía" en el wizard de Fechas Bloqueadas.
#. Add an option to force company currency on follow ups
#. Mejorar que para asientos migrados desde 13 que están vinculados a un pago y linea de extracto a la vez, el botón "pagos" te lleve efectivamente al pago (odoo te lleva a la linea de extracto pero ya existe un botón para esto)
#. Ajustar conciliacion bancaria para compatibilidad con la opción "reconcile_on_company_currency"
+#. Agrega filtros de "Igual Monto", "Monto Aproximado" y "Monto Menor" en el asistente de conciliación.
+#. Determina por defecto el filtro "Igual Monto" en el asistente de conciliación.
Installation
============
diff --git a/account_accountant_ux/__manifest__.py b/account_accountant_ux/__manifest__.py
index df51efa4..1a4286b0 100644
--- a/account_accountant_ux/__manifest__.py
+++ b/account_accountant_ux/__manifest__.py
@@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Accounting Accountant UX',
- 'version': "16.0.2.1.0",
+ 'version': "17.0.1.0.0",
'category': 'Accounting',
'sequence': 14,
'summary': '',
@@ -31,7 +31,6 @@
'depends': [
'account_reports',
'account_followup',
- 'account_payment_group',
],
'data': [
'views/res_partner_view.xml',
@@ -39,11 +38,10 @@
'views/account_move_line.xml',
'wizards/account_change_lock_date_views.xml',
'wizards/res_config_settings_views.xml',
- 'data/account_accountant_data.xml',
],
'demo': [
],
- 'installable': False,
+ 'installable': True,
'auto_install': True,
'application': False,
}
diff --git a/account_accountant_ux/data/account_accountant_data.xml b/account_accountant_ux/data/account_accountant_data.xml
deleted file mode 100644
index 27913ecf..00000000
--- a/account_accountant_ux/data/account_accountant_data.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/account_accountant_ux/models/account_followup_report.py b/account_accountant_ux/models/account_followup_report.py
index 25b1868b..284ea018 100644
--- a/account_accountant_ux/models/account_followup_report.py
+++ b/account_accountant_ux/models/account_followup_report.py
@@ -44,7 +44,8 @@ def _get_followup_report_lines(self, options):
invoice_date = {
'name': format_date(self.env, aml.move_id.invoice_date or aml.date, lang_code=lang_code),
'class': 'date',
- 'style': 'white-space:nowrap;text-align:center;'
+ 'style': 'white-space:nowrap;text-align:left;',
+ 'template': 'account_followup.cell_template_followup_report',
}
date_due = format_date(self.env, aml.date_maturity or aml.move_id.invoice_date or aml.date, lang_code=lang_code)
total += not aml.blocked and amount or 0
@@ -52,16 +53,25 @@ def _get_followup_report_lines(self, options):
is_payment = aml.payment_id
if is_overdue or is_payment:
total_issued += not aml.blocked and amount or 0
- date_due = {'name': date_due, 'class': 'date', 'style': 'white-space:nowrap;text-align:center;'}
+ date_due = {
+ 'name': date_due, 'class': 'date',
+ 'style': 'white-space:nowrap;text-align:left;',
+ 'template': 'account_followup.cell_template_followup_report',
+ }
if is_overdue:
date_due['style'] += 'color: red;'
if is_payment:
date_due = ''
move_line_name = {
'name': self._followup_report_format_aml_name(aml.name, aml.move_id.ref),
- 'style': 'text-align:right; white-space:normal;'
+ 'style': 'text-align:left; white-space:normal;',
+ 'template': 'account_followup.cell_template_followup_report',
+ }
+ amount = {
+ 'name': formatLang(self.env, amount, currency_obj=currency),
+ 'style': 'text-align:right; white-space:normal;',
+ 'template': 'account_followup.cell_template_followup_report',
}
- amount = formatLang(self.env, amount, currency_obj=currency)
line_num += 1
invoice_origin = aml.move_id.invoice_origin or ''
if len(invoice_origin) > 43:
@@ -69,6 +79,7 @@ def _get_followup_report_lines(self, options):
invoice_origin = {
'name': invoice_origin,
'style': 'text-align:center; white-space:normal;',
+ 'template': 'account_followup.cell_template_followup_report',
}
columns = [
invoice_date,
@@ -84,11 +95,22 @@ def _get_followup_report_lines(self, options):
'move_id': aml.move_id.id,
'type': is_payment and 'payment' or 'unreconciled_aml',
'unfoldable': False,
- 'columns': [isinstance(v, dict) and v or {'name': v} for v in columns],
- 'template': 'account_followup.cell_template_followup_report',
+ 'columns': [isinstance(v, dict) and v or {'name': v, 'template': 'account_followup.cell_template_followup_report'} for v in columns],
})
total_due = formatLang(self.env, total, currency_obj=currency)
line_num += 1
+
+ cols = \
+ [{
+ 'name': v,
+ 'template': 'account_followup.cell_template_followup_report',
+ } for v in [''] * 3] + \
+ [{
+ 'name': v,
+ 'style': 'text-align:right; white-space:normal; font-weight: bold;',
+ 'template': 'account_followup.cell_template_followup_report',
+ } for v in [total >= 0 and _('Total Due') or '', total_due]]
+
lines.append({
'id': line_num,
'name': '',
@@ -96,20 +118,30 @@ def _get_followup_report_lines(self, options):
'style': 'border-top-style: double',
'unfoldable': False,
'level': 3,
- 'columns': [{'name': v} for v in [''] * 3 + [total >= 0 and _('Total Due') or '', total_due]],
- 'template': 'account_followup.cell_template_followup_report',
+ 'columns': cols,
})
if total_issued > 0:
total_issued = formatLang(self.env, total_issued, currency_obj=currency)
line_num += 1
+
+ cols = \
+ [{
+ 'name': v,
+ 'template': 'account_followup.cell_template_followup_report',
+ } for v in [''] * 3] + \
+ [{
+ 'name': v,
+ 'style': 'text-align:right; white-space:normal; font-weight: bold;',
+ 'template': 'account_followup.cell_template_followup_report',
+ } for v in [_('Total Overdue'), total_issued]]
+
lines.append({
'id': line_num,
'name': '',
'class': 'total',
'unfoldable': False,
'level': 3,
- 'columns': [{'name': v} for v in [''] * 3 + [_('Total Overdue'), total_issued]],
- 'template': 'account_followup.cell_template_followup_report',
+ 'columns': cols,
})
# Add an empty line after the total to make a space between two currencies
line_num += 1
@@ -120,10 +152,16 @@ def _get_followup_report_lines(self, options):
'style': 'border-bottom-style: none',
'unfoldable': False,
'level': 0,
- 'columns': [{} for col in columns],
- 'template': 'account_followup.cell_template_followup_report',
+ 'columns': [{'template': 'account_followup.cell_template_followup_report'} for col in columns],
})
# Remove the last empty line
if lines:
lines.pop()
+
+ # Catch negative numbers when present
+ for line in lines:
+ for col in line['columns']:
+ if self.env.company.currency_id.compare_amounts(col.get('no_format', 0.0), 0.0) == -1:
+ col['class'] = 'number color-red'
+
return lines
diff --git a/account_accountant_ux/models/account_move_line.py b/account_accountant_ux/models/account_move_line.py
index d7ef4fab..1bd4701c 100644
--- a/account_accountant_ux/models/account_move_line.py
+++ b/account_accountant_ux/models/account_move_line.py
@@ -6,7 +6,7 @@ class AccountMovetLine(models.Model):
_inherit = 'account.move.line'
filter_amount = fields.Float(compute="compute_filter_amout", search='_search_filter_amount')
-
+
def compute_filter_amout(self):
self.filter_amount = False
diff --git a/account_accountant_ux/models/bank_rec_widget.py b/account_accountant_ux/models/bank_rec_widget.py
index 4d0623bf..8e6c935c 100644
--- a/account_accountant_ux/models/bank_rec_widget.py
+++ b/account_accountant_ux/models/bank_rec_widget.py
@@ -6,33 +6,24 @@
class BankRecWidget(models.Model):
_inherit = "bank.rec.widget"
- @api.depends('st_line_id')
- def _compute_amls_widget(self):
- for wizard in self:
- super()._compute_amls_widget()
- amls_widget = wizard.amls_widget
- amls_widget['context']['default_st_line_id'] = wizard.st_line_id.id
- amls_widget['context']['search_default_same_amount'] = True
- wizard.amls_widget = amls_widget
+ def _prepare_embedded_views_data(self):
+ data = super()._prepare_embedded_views_data()
+ data['amls']['context']['default_st_line_id'] = self.st_line_id.id
+ data['amls']['context']['search_default_same_amount'] = True
+ return data
- def collect_global_info_data(self, journal_id):
+ # def collect_global_info_data(self, journal_id):
- # Por ahora no mostramos el valor en el kanban. Porque confunde al cliente
- # Deberiaamos aplicar este Cambio a como esta en master 17 ¿usar patch?
- # Ver commit
- # https://github.com/odoo/enterprise/commit/e1f0f66a7237d8c8b056cdf2636ccc019818a17d#diff-ee342c09ffb6b8de7f51c4a0ed66fee056e8975e7416d0f85ae0d2b6b1883dfdR1467
+ # journal = self.env['account.journal'].browse(journal_id)
+ # balance = formatLang(self.env,
+ # journal.current_statement_balance,
+ # currency_obj=journal.currency_id or journal.company_id.currency_id)
+ # return {
+ # 'balance_amount': balance,
+ # }
- # journal = self.env['account.journal'].browse(journal_id)
- # balance = formatLang(self.env,
- # journal.current_statement_balance,
- # currency_obj=journal.currency_id or journal.company_id.currency_id)
- # return {
- # 'balance_amount': balance,
- # }
- return {'balance_amount': None}
-
- def _lines_widget_recompute_exchange_diff(self):
+ def _lines_recompute_exchange_diff(self):
self.ensure_one()
self._ensure_loaded_lines()
@@ -62,4 +53,4 @@ def _lines_widget_recompute_exchange_diff(self):
self.line_ids = line_ids_commands
return
- super()._lines_widget_recompute_exchange_diff()
+ super()._lines_recompute_exchange_diff()
diff --git a/account_accountant_ux/views/account_move_line.xml b/account_accountant_ux/views/account_move_line.xml
index 04ac6ab0..9f82e5b5 100644
--- a/account_accountant_ux/views/account_move_line.xml
+++ b/account_accountant_ux/views/account_move_line.xml
@@ -2,7 +2,7 @@
account.move.line.search.bank_rec_widgetaccount.move.line
-
+
diff --git a/account_accountant_ux/views/res_partner_view.xml b/account_accountant_ux/views/res_partner_view.xml
index 7b760af2..4744d8f1 100644
--- a/account_accountant_ux/views/res_partner_view.xml
+++ b/account_accountant_ux/views/res_partner_view.xml
@@ -18,7 +18,7 @@
icon="fa-list"
name="%(account.action_account_moves_ledger_partner)d"
string="Partner Ledger"
- context="{'search_default_partner_id': active_id}"
+ context="{'search_default_partner_id': id}"
>
diff --git a/account_accountant_ux/wizards/res_config_settings_views.xml b/account_accountant_ux/wizards/res_config_settings_views.xml
index 8b043659..50d709e5 100644
--- a/account_accountant_ux/wizards/res_config_settings_views.xml
+++ b/account_accountant_ux/wizards/res_config_settings_views.xml
@@ -7,21 +7,12 @@
res.config.settings
-
-
-
-
-
-
-
-
-
- By default Odoo Follow up will open the debt per currency.
- If you set this option all the debt will be grouped on one section and using the company currency.
-