diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-12-10 11:29:02 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-12-10 11:29:02 +0100 |
commit | 22d25cd2ebe2d6023e430512db989f8a6b16dc7d (patch) | |
tree | ad2a67c9c118abb0ed734394bc1945974e74477c /archaeological_finds/models_treatments.py | |
parent | 5607545254aac2c470627f601627726034815075 (diff) | |
download | Ishtar-22d25cd2ebe2d6023e430512db989f8a6b16dc7d.tar.bz2 Ishtar-22d25cd2ebe2d6023e430512db989f8a6b16dc7d.zip |
Document generation: WIP on basket
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r-- | archaeological_finds/models_treatments.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 080d2cc50..3d3827596 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -853,6 +853,15 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem, for attr in ('year', 'index', 'internal_reference', 'name') if getattr(self, attr)]) + def get_values(self, prefix=''): + values = super(TreatmentFile, self).get_values(prefix=prefix) + if not self.associated_basket: + return + values[prefix + "basket"] = [ + find.get_values() for find in self.associated_basket.items.all() + ] + return values + def get_extra_actions(self, request): # url, base_text, icon, extra_text, extra css class, is a quick action actions = [] |