endi.models.third_party.services package¶
Submodules¶
endi.models.third_party.services.customer module¶
Customer query service
- class endi.models.third_party.services.customer.CustomerService¶
Bases :
ThirdPartyService- classmethod check_project_id(customer_id, project_id)¶
Check that the given customer is attached to the given project
- classmethod count_tasks(instance)¶
- classmethod get_general_account(instance, prefix='')¶
- classmethod get_project_ids(customer)¶
Collect the ids of the projects attached to the given customer
- classmethod get_tasks(instance, type_str=None)¶
- classmethod get_third_party_account(instance, prefix='')¶
- classmethod has_tva_on_margin_business(instance)¶
endi.models.third_party.services.supplier module¶
- class endi.models.third_party.services.supplier.SupplierService¶
Bases :
ThirdPartyService- classmethod count_orders(instance)¶
- classmethod get_expenselines(instance)¶
- classmethod get_general_account(instance, prefix='')¶
- classmethod get_invoices(instance)¶
- classmethod get_orders(instance, waiting_only=False, invoiced_only=False, pending_invoice_only=False, internal=True)¶
- classmethod get_third_party_account(instance, prefix='')¶
endi.models.third_party.services.third_party module¶
ThirdParty query service
- class endi.models.third_party.services.third_party.ThirdPartyService¶
Bases :
object- classmethod format_name(instance)¶
Format the name of a third_party regarding the available datas :param obj instance: A ThirdParty instance :rtype: str
- classmethod get_address(instance)¶
Return the address suitable for the given instance :param obj instance: A ThirdParty instance :returns: The address :rtype: str
- static get_by_label(cls, label: str, company: Company, case_sensitive: bool = False)¶
Even if case_sensitive == True, exact match is preferred.
- classmethod get_general_account(third_party_instance)¶
- classmethod get_label(instance)¶
Return the label suitable for the given instance :param obj instance: A ThirdParty instance :returns: The label :rtype: str
- classmethod get_third_party_account(third_party_instance)¶
- classmethod label_query(third_party_class)¶
Return a query loading datas needed to compile ThirdParty label