summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/account/models/account_move.py1
-rw-r--r--addons/account/wizard/account_invoice_send.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 4bb88b46948..c273bd35c72 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -34,6 +34,7 @@ class AccountMove(models.Model):
_inherit = ['portal.mixin', 'mail.thread', 'mail.activity.mixin', 'sequence.mixin']
_description = "Journal Entries"
_order = 'date desc, name desc, id desc'
+ _mail_post_access = 'read'
@property
def _sequence_monthly_regex(self):
diff --git a/addons/account/wizard/account_invoice_send.py b/addons/account/wizard/account_invoice_send.py
index a4e4a8802b9..7ef17afc7c1 100644
--- a/addons/account/wizard/account_invoice_send.py
+++ b/addons/account/wizard/account_invoice_send.py
@@ -86,7 +86,9 @@ class AccountInvoiceSend(models.TransientModel):
if self.is_email:
self.composer_id.send_mail()
if self.env.context.get('mark_invoice_as_sent'):
- self.mapped('invoice_ids').write({'invoice_sent': True})
+ #Salesman send posted invoice, without the right to write
+ #but they should have the right to change this flag
+ self.mapped('invoice_ids').sudo().write({'invoice_sent': True})
def _print_document(self):
""" to override for each type of models that will use this composer."""