diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 313ecf60572..44b10ebb708 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -272,6 +272,17 @@ class AccountMove(models.Model):
def open_reconcile_view(self):
return self.line_ids.open_reconcile_view()
+ # FIXME: Clarify me and change me in master
+ @api.multi
+ def action_duplicate(self):
+ self.ensure_one()
+ action = self.env.ref('account.action_move_journal_line').read()[0]
+ action['target'] = 'inline'
+ action['context'] = dict(self.env.context)
+ action['context']['view_no_maturity'] = False
+ action['views'] = [(self.env.ref('account.view_move_form').id, 'form')]
+ action['res_id'] = self.copy().id
+ return action
class AccountMoveLine(models.Model):
_name = "account.move.line"
@@ -436,7 +447,7 @@ class AccountMoveLine(models.Model):
index=True, store=True, copy=False) # related is required
blocked = fields.Boolean(string='No Follow-up', default=False,
help="You can check this box to mark this journal item as a litigation with the associated partner")
- date_maturity = fields.Date(string='Due date', index=True, required=True,
+ date_maturity = fields.Date(string='Due date', index=True, required=True, copy=False,
help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line.")
date = fields.Date(related='move_id.date', string='Date', index=True, store=True, copy=False) # related is required
analytic_line_ids = fields.One2many('account.analytic.line', 'move_id', string='Analytic lines', oldname="analytic_lines")
diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml
index 2fd44c0b155..0d4fec5b886 100644
--- a/addons/account/views/account_view.xml
+++ b/addons/account/views/account_view.xml
@@ -1427,10 +1427,11 @@
account.move.form
account.move
-