libracore / erpnextswiss

ERPNext application for Switzerland-specific use cases
GNU Affero General Public License v3.0
74 stars 63 forks source link

get_primary_company_address is undefined #130

Closed swissbyte closed 2 months ago

swissbyte commented 9 months ago

Im using the following:

ERPNext: v15.1.0 ERPNextSwiss: v1.23.1 Frappe Framework: v15.1.0

And it looks like that this function is missing for the salary certificate. Was this a fuction built into older erpnext versions?

<table style="margin-left: 75px; width: 690px; height: 50px; margin-top: 32px; ">
  <!-- Footer -->
  {% set company = frappe.get_doc("Company", employee.company) %}
  {% set address = get_primary_company_address(employee.company) %}
  <tr>
    <td style="width: 230px; padding: 1px !important; "><br><br>
    {% if address.city %}{{ address.city or '' }},&nbsp;{% endif %}
lasalesi commented 8 months ago

This is a jinja function provided by ERPNextSwiss. Currently, there is no tested v15 support (still under development), so maybe the jenv import has failed in v15?

lasalesi commented 2 months ago

The jinja-hook has been renamed in v15 to jinja (rather than 'jenv`)

This is implemented in erpnextswiss:v15 with 22dc8e26