diff --git a/addons/account/models/account.py b/addons/account/models/account.py
index 0f532a2afdc..197ef0a8b37 100644
--- a/addons/account/models/account.py
+++ b/addons/account/models/account.py
@@ -1054,6 +1054,7 @@ class AccountJournal(models.Model):
'res_model': 'account.move',
'views': [[False, "tree"], [False, "form"]],
'type': 'ir.actions.act_window',
+ 'context': self._context
}
if len(invoices) == 1:
action_vals.update({'res_id': invoices[0].id, 'view_mode': 'form'})
diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py
index 21a206f0da9..afeb9c6c42c 100644
--- a/addons/account/models/account_journal_dashboard.py
+++ b/addons/account/models/account_journal_dashboard.py
@@ -40,6 +40,7 @@ class account_journal(models.Model):
act_type.name as act_type_name,
act_type.category as activity_category,
act.date_deadline,
+ m.date,
CASE WHEN act.date_deadline < CURRENT_DATE THEN 'late' ELSE 'future' END as status
FROM account_move m
LEFT JOIN mail_activity act ON act.res_id = m.id
@@ -54,7 +55,7 @@ class account_journal(models.Model):
'res_id': activity.get('res_id'),
'res_model': activity.get('res_model'),
'status': activity.get('status'),
- 'name': activity.get('summary') or activity.get('act_type_name'),
+ 'name': (activity.get('summary') or activity.get('act_type_name')) + '(' + format_date(activity.get('date'), 'MMM', locale=self._context.get('lang') or 'en_US') + ')',
'activity_category': activity.get('activity_category'),
'date': odoo_format_date(self.env, activity.get('date_deadline'))
})
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 76e90e3cceb..c292b0bbc1f 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -2194,14 +2194,14 @@ class AccountMoveLine(models.Model):
tax_group_id = fields.Many2one(related='tax_line_id.tax_group_id', string='Originator tax group',
readonly=True, store=True,
help='technical field for widget tax-group-custom-field')
- tax_base_amount = fields.Monetary(string="Base Amount", store=True,
+ tax_base_amount = fields.Monetary(string="Base Amount", store=True, readonly=True,
currency_field='company_currency_id')
- tax_exigible = fields.Boolean(string='Appears in VAT report', default=True,
+ tax_exigible = fields.Boolean(string='Appears in VAT report', default=True, readonly=True,
help="Technical field used to mark a tax line as exigible in the vat report or not (only exigible journal items"
" are displayed). By default all new journal items are directly exigible, but with the feature cash_basis"
" on taxes, some will become exigible only when the payment is recorded.")
tax_repartition_line_id = fields.Many2one(comodel_name='account.tax.repartition.line',
- string="Originator Tax Repartition Line", ondelete='restrict',
+ string="Originator Tax Repartition Line", ondelete='restrict', readonly=True,
help="Tax repartition line that caused the creation of this move line, if any")
tag_ids = fields.Many2many(string="Tags", comodel_name='account.account.tag', ondelete='restrict',
help="Tags assigned to this line by the tax creating it, if any. It determines its impact on financial reports.")
diff --git a/addons/account/static/src/js/bills_tree_upload.js b/addons/account/static/src/js/bills_tree_upload.js
index 2287ca09d7c..3e36b495e1a 100644
--- a/addons/account/static/src/js/bills_tree_upload.js
+++ b/addons/account/static/src/js/bills_tree_upload.js
@@ -99,6 +99,22 @@ odoo.define('account.dashboard.kanban', function (require) {
'click .o_button_upload_bill': '_onUpload',
'change .o_vendor_bill_upload .o_form_binary_form': '_onAddAttachment',
}),
+ /**
+ * We override _onUpload (from the upload bill mixin) to pass default_journal_id
+ * and default_type in context.
+ *
+ * @override
+ */
+ _onUpload: function (event) {
+ var kanbanRecord = $(event.currentTarget).closest('.o_kanban_record').data('record');
+ this.initialState.context['default_journal_id'] = kanbanRecord.id;
+ if ($(event.currentTarget).attr('journal_type') == 'sale') {
+ this.initialState.context['default_type'] = 'out_invoice'
+ } else if ($(event.currentTarget).attr('journal_type') == 'purchase') {
+ this.initialState.context['default_type'] = 'in_invoice'
+ }
+ UploadBillMixin._onUpload.apply(this, arguments);
+ }
});
var DashboardKanbanView = KanbanView.extend({
diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml
index 7f0793e469e..6948039af5d 100644
--- a/addons/account/views/account_journal_dashboard_view.xml
+++ b/addons/account/views/account_journal_dashboard_view.xml
@@ -294,9 +294,15 @@
+
-
diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml
index 81febe7ccd5..bd0cbd95093 100644
--- a/addons/account/views/account_move_views.xml
+++ b/addons/account/views/account_move_views.xml
@@ -809,9 +809,9 @@
-
-
-
+
+
+