Skip to content

Auto Repeat override

Ensure Auto Repeat documents inherit company from the referenced Sales Invoice when the reference is a sales invoice.

  • leekimerp/leekimerp/override/auto_repeat.py
  • Class: OverrideAutoRepeat(AutoRepeat)
MethodBehavior
validatesuper().validate() then _set_company_from_reference()
_set_company_from_referenceIf reference_doctype == "Sales Invoice" and reference_document is set, sets self.company from that invoice’s company field
  • Desk: Auto Repeat form when reference is a Sales Invoice
  • frappe.automation.doctype.auto_repeat.auto_repeat.AutoRepeat
  • If reference is not Sales Invoice, company is unchanged by this hook.