Auto Repeat override
Purpose
Section titled “Purpose”Ensure Auto Repeat documents inherit company from the referenced Sales Invoice when the reference is a sales invoice.
Scope in codebase
Section titled “Scope in codebase”leekimerp/leekimerp/override/auto_repeat.py- Class:
OverrideAutoRepeat(AutoRepeat)
Methods
Section titled “Methods”| Method | Behavior |
|---|---|
validate | super().validate() then _set_company_from_reference() |
_set_company_from_reference | If reference_doctype == "Sales Invoice" and reference_document is set, sets self.company from that invoice’s company field |
Entry points
Section titled “Entry points”- Desk: Auto Repeat form when reference is a Sales Invoice
Dependencies
Section titled “Dependencies”frappe.automation.doctype.auto_repeat.auto_repeat.AutoRepeat
Operational notes
Section titled “Operational notes”- If reference is not Sales Invoice, company is unchanged by this hook.