Change to payment receipt privileges
This commit is contained in:
parent
fe8960d21c
commit
4009d96a96
|
|
@ -2785,3 +2785,8 @@ msgstr "موظف العهد"
|
|||
#: model:ir.model.fields,field_description:purchase_requisition_custom.field_purchase_order__refused
|
||||
msgid "Refused "
|
||||
msgstr "رفض"
|
||||
|
||||
#. module: purchase_requisition_custom
|
||||
#: model:res.groups,name:purchase_requisition_custom.group_receive_payment_notification
|
||||
msgid "Receive Payment Notification"
|
||||
msgstr "اشعار السداد للموردين"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class AccountPayment(models.Model):
|
|||
message = '{} '.format(payment.partner_id.name) + _('is successfully paid.') + '\n' + _(
|
||||
'Payment Amount: ') + '{}'.format(payment.amount) + '\n' + _('Ref: ') + '{}'.format(payment.ref) + '\n' + _(
|
||||
'On Date: ') + '{}'.format(payment.date)
|
||||
group = 'purchase.group_purchase_manager'
|
||||
group = 'purchase_requisition_custom.group_receive_payment_notification'
|
||||
# author_id = payment.create_uid.partner_id.id or None
|
||||
author_id = self.env.user.partner_id.id or None
|
||||
self.env.user.partner_id.send_notification_message(subject=subject, body=message, author_id=author_id,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class AccountPayment(models.Model):
|
|||
# Send Notifications
|
||||
subject = _('Payment Notification') + ' - {}'.format(payment.partner_id.name)
|
||||
message = '{} '.format(payment.partner_id.name) + _('is successfully paid.') + '\n' + _('Payment Amount: ') + '{}'.format(payment.amount) + '\n' + _('Ref: ') + '{}'.format(payment.ref) + '\n' + _('On Date: ') + '{}'.format(payment.date)
|
||||
group = 'purchase.group_purchase_manager'
|
||||
group = 'purchase_requisition_custom.group_receive_payment_notification'
|
||||
# author_id = payment.create_uid.partner_id.id or None
|
||||
author_id = self.env.user.partner_id.id or None
|
||||
self.env.user.partner_id.send_notification_message(subject=subject, body=message, author_id=author_id, group=group)
|
||||
|
|
|
|||
|
|
@ -148,5 +148,12 @@
|
|||
<field name="name">Reject PO Committee</field>
|
||||
<field name="category_id" ref="purchase_requisition_custom.module_category_purchase_requisition_custom"/>
|
||||
</record>
|
||||
|
||||
<!-- Receive Payment Notification group -->
|
||||
<record id="group_receive_payment_notification" model="res.groups">
|
||||
<field name="name">Receive Payment Notification</field>
|
||||
<field name="category_id" ref="purchase_requisition_custom.module_category_purchase_requisition_custom"/>
|
||||
<field name="implied_ids" eval="[(4, ref('purchase.group_purchase_manager'))]"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
|
|||
Loading…
Reference in New Issue