report and custody petty expense

This commit is contained in:
mohammed-alkhazrji 2025-07-08 17:49:20 +03:00
parent 17e870f96c
commit 782b5b689c
2 changed files with 18 additions and 2 deletions

View File

@ -691,4 +691,19 @@ msgstr "يجب تحديد الشريك عند تفعيل دفتر العهد."
#: model:ir.model.fields,field_description:employee_custody_request.field_hr_request_pledge__custody_type_id
#: model:ir.ui.menu,name:employee_custody_request.custody_types_menu
msgid "Custody Types"
msgstr "نوع العهده"
msgstr "نوع العهده"
#. module: employee_custody_request
#: code:addons/employee_custody_request/models/hr_expense_sheet.py:0
#: code:addons/odoo/STANDARD_MODULES/test/odex25_accounting/odex25_accounting/employee_custody_request/models/hr_expense_sheet.py:0
#, python-format
msgid ""
"When the payment type is custody, you must set the Custody Partner before "
"submitting."
msgstr "عند اختيار نوع الدفع 'عهدة'، يجب تحديد شريك العهدة قبل الإرسال."
#. module: employee_custody_request
#: model:ir.model.fields.selection,name:employee_custody_request.selection__hr_expense__payment_mode__custody
msgid "Custody"
msgstr "عهده"

View File

@ -39,7 +39,8 @@ class HrExpenseSheetPledge(models.Model):
def action_submit_sheet(self):
for rec in self:
if rec.payment_mode == 'custody' and not rec.custody_partner_id:
raise UserError("عند اختيار نوع الدفع 'custody'، يجب تحديد 'Custody Partner' قبل الإرسال.")
raise UserError(
_("When the payment type is custody, you must set the Custody Partner before submitting."))
return super(HrExpenseSheetPledge, self).action_submit_sheet()
def _get_custody_partner_domain(self):