Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nursix/eden-core
Browse files Browse the repository at this point in the history
  • Loading branch information
nursix committed Sep 3, 2021
2 parents 7fcda6f + bc35046 commit cdde509
Show file tree
Hide file tree
Showing 42 changed files with 3,828 additions and 9,918 deletions.
2 changes: 0 additions & 2 deletions controllers/budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ def kit_export_pdf():
"""
Export a list of Kits in Adobe PDF format
Uses Geraldo SubReport
@ToDo: Use S3PDF Method
"""
try:
from reportlab.lib.units import cm
Expand Down Expand Up @@ -452,7 +451,6 @@ def item_export_pdf():
"""
Export a list of Items in Adobe PDF format
Uses Geraldo Grouping Report
@ToDo: Use S3PDF Method
"""
try:
from reportlab.lib.units import cm
Expand Down
2 changes: 1 addition & 1 deletion controllers/cms.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def prep(r):
modules = {}
_modules = current.deployment_settings.modules
for module in _modules:
if module in ("appadmin", "errors", "ocr"):
if module in ("appadmin", "errors"):
continue
modules[module] = _modules[module].get("name_nice")
s3db.cms_post_module.field.requires = \
Expand Down
16 changes: 12 additions & 4 deletions languages/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@
'Create Item Pack': 'Packung erstellen',
'Create Item Type': 'Gegenstandsart anlegen',
'Create Item': 'Neuen Artikel anlegen',
'Create Job Title': 'Tätigkeitsbezeichnung erstellen',
'Create Job Title': 'Tätigkeit anlegen',
'Create Kit': 'Ausstattung (Kit) anlegen',
'Create Kitting': 'Kit zusammenstellen',
'Create Layer': 'Kartenebene anlegen',
Expand Down Expand Up @@ -1592,6 +1592,7 @@
'Delete Item from Request': 'Artikel aus Anfrage entfernen',
'Delete Item': 'Eintrag löschen',
'Delete Job Role': 'Tätigkeit löschen',
'Delete Job Title': 'Tätigkeit löschen',
'Delete Key': 'Schlüssel löschen',
'Delete Kit': 'Ausstattung (Kit) löschen',
'Delete Layer': 'Ebene löschen',
Expand Down Expand Up @@ -1943,6 +1944,7 @@
'Edit Item in Request': 'Angefragten Artikel bearbeiten',
'Edit Item': 'Artikel bearbeiten',
'Edit Job Role': 'Tätigkeit bearbeiten',
'Edit Job Title': 'Tätigkeit bearbeiten',
'Edit Key': 'Schlüssel bearbeiten',
'Edit Kit': 'Ausstattung (Kit) bearbeiten',
'Edit Layer': 'Kartenebene bearbeiten',
Expand Down Expand Up @@ -2916,9 +2918,13 @@
'Job Role': 'Tätigkeit',
'Job Roles': 'Tätigkeiten',
'Job Seeking': 'Arbeitssuche',
'Job Title Catalog': 'Katalog der Tätigkeitsbezeichnungen',
'Job Title': 'Tätigkeitsbezeichnung',
'Job Titles': 'Tätigkeitsbezeichnungen',
'Job Title Catalog': 'Tätigkeitskatalog',
'Job Title Details': 'Details zur Tätigkeit',
'Job Title added': 'Tätigkeit hinzugefügt',
'Job Title deleted': 'Tätigkeit gelöscht',
'Job Title updated': 'Tätigkeit aktualisiert',
'Job Title': 'Tätigkeit',
'Job Titles': 'Tätigkeiten',
'Jordan': 'Jordanien',
'Journal Entry Details': 'Details zum Journaleintrag',
'Journal entry added': 'Journaleintrag hinzugefügt',
Expand Down Expand Up @@ -3130,6 +3136,7 @@
'List Items in Stock': 'Liste Bestandsartikel',
'List Items': 'Liste der Artikel',
'List Job Roles': 'Liste der Tätigkeiten',
'List Job Titles': 'Liste Tätigkeiten',
'List Keys': 'Schlüssel auflisten',
'List Kits': 'Liste Ausstattungen (Kits)',
'List Layers': 'Liste Layer',
Expand Down Expand Up @@ -3211,6 +3218,7 @@
'List Skill Types': 'Liste der Typen von Fähigkeiten',
'List Skills': 'Liste Fähigkeiten',
'List Solutions': 'Liste Lösungen',
'List Staff Records': 'Liste Mitarbeiterakten',
'List Staff Types': 'Mitarbeitertypen auflisten',
'List Status': 'Status auflisten',
'List Stock in Warehouse': 'Liste Bestände im Warenlager',
Expand Down
8 changes: 2 additions & 6 deletions models/00_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import s3db.irs
import s3db.member
import s3db.msg
import s3db.ocr
import s3db.org
import s3db.patient
import s3db.po
Expand Down Expand Up @@ -91,10 +90,7 @@
)

# =============================================================================
# Make available for S3Models
# - legacy for backwards compatibility w docs & custom modules
from s3.s3fields import S3ReusableField, s3_comments, s3_meta_fields
s3.comments = s3_comments
s3.meta_fields = s3_meta_fields
# Make available for controllers
from s3 import S3ReusableField, s3_comments, s3_meta_fields

# END =========================================================================
25 changes: 7 additions & 18 deletions models/00_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,19 +229,14 @@ def s3_rest_controller(prefix=None, resourcename=None, **attr):
set_handler("timeplot", s3base.S3TimePlot)
set_handler("xform", s3base.S3XForms)

# Don't load S3PDF unless needed (very slow import with Reportlab)
method = r.method
if method == "import" and r.representation == "pdf":
from s3.s3pdf import S3PDF
set_handler("import", S3PDF(),
http = ("GET", "POST"),
representation = "pdf"
)

# Plugin OrgRoleManager when appropriate
s3base.S3OrgRoleManager.set_method(r)

# List of methods which can have custom action buttons
# List of methods rendering datatables with default action buttons
dt_methods = (None, "datatable", "datatable_f", "summary")

# List of methods rendering datatables with custom action buttons,
# => for these, s3.actions must not be touched, see below
# (defining here allows postp to add a custom method to the list)
s3.action_methods = ("import",
"review",
Expand All @@ -253,14 +248,8 @@ def s3_rest_controller(prefix=None, resourcename=None, **attr):
# Execute the request
output = r(**attr)

if isinstance(output, dict) and \
method in (None,
"report",
"search",
"datatable",
"datatable_f",
"summary",
):
method = r.method
if isinstance(output, dict) and method in dt_methods:

if s3.actions is None:

Expand Down
4 changes: 2 additions & 2 deletions models/zz_last.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
menu.breadcrumbs = S3OptionsMenu.breadcrumbs

# Set up plugins
from plugins import PluginLoader
PluginLoader.setup_all()
#from plugins import PluginLoader
#PluginLoader.setup_all()
3 changes: 0 additions & 3 deletions modules/s3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@
# De-duplication
from .s3merge import S3Merge

# Don't load S3PDF unless needed (very slow import with reportlab)
#from .s3pdf import S3PDF

# Advanced Framework ==========================================================
#
# Tracking System
Expand Down
2 changes: 1 addition & 1 deletion modules/s3/codecs/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ class S3PDFTable(object):
Class to build a table that can then be placed in a pdf document
The table will be formatted so that is fits on the page. This class
doesn't need to be called directly. Rather see S3PDF.addTable()
doesn't need to be called directly. Rather see S3RL_PDF.get_resource_flowable
"""

MIN_COL_WIDTH = 200
Expand Down
5 changes: 0 additions & 5 deletions modules/s3/s3crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,6 @@ def create(self, r, **attr):
else:
session.confirmation = current.T("Data uploaded")

elif representation == "pdf":
from .s3pdf import S3PDF
exporter = S3PDF()
return exporter(r, **attr)

elif representation == "url":
results = self.import_url(r)
return results
Expand Down
Loading

0 comments on commit cdde509

Please sign in to comment.