diff --git a/tailbone/templates/mobile/receiving/view_row.mako b/tailbone/templates/mobile/receiving/view_row.mako index fe2aacc9..f4978aa6 100644 --- a/tailbone/templates/mobile/receiving/view_row.mako +++ b/tailbone/templates/mobile/receiving/view_row.mako @@ -7,7 +7,7 @@ <%def name="page_title()">${h.link_to("Receiving", url('mobile.receiving'))} » ${h.link_to(batch.id_str, url('mobile.receiving.view', uuid=batch.uuid))} » ${master.render_product_key_value(row)} -
+
% if instance.product:

${instance.brand_name or ""}

@@ -19,11 +19,11 @@

${instance.description}

% endif
-
- % if product_image_url: - ${h.image(product_image_url, "product image")} - % endif -
+ % if product_image_url: +
+ ${h.image(product_image_url, "product image")} +
+ % endif
diff --git a/tailbone/views/purchasing/receiving.py b/tailbone/views/purchasing/receiving.py index b61c53af..62048038 100644 --- a/tailbone/views/purchasing/receiving.py +++ b/tailbone/views/purchasing/receiving.py @@ -1109,11 +1109,16 @@ class ReceivingBatchView(PurchasingBatchView): return self.redirect(self.get_row_action_url('view', row, mobile=mobile)) return super(ReceivingBatchView, self).redirect_after_quick_row(row, mobile=mobile) + def get_row_image_url(self, row): + if self.rattail_config.getbool('rattail.batch', 'purchase.mobile_images', default=True): + return pod.get_image_url(self.rattail_config, row.upc) + def mobile_view_row(self): """ Mobile view for receiving batch row items. Note that this also handles updating a row. """ + self.mobile = True self.viewing = True row = self.get_row_instance() batch = row.batch @@ -1126,7 +1131,7 @@ class ReceivingBatchView(PurchasingBatchView): 'instance': row, 'instance_title': self.get_row_instance_title(row), 'parent_model_title': self.get_model_title(), - 'product_image_url': pod.get_image_url(self.rattail_config, row.upc), + 'product_image_url': self.get_row_image_url(row), 'form': form, 'allow_expired': self.handler.allow_expired_credits(), 'allow_cases': self.handler.allow_cases(),