Expose notes field for purchasing batches
Plus various other tweaks for styles and coding conventions etc.
This commit is contained in:
parent
59799302bd
commit
555935c71e
|
@ -6,3 +6,8 @@
|
|||
div.field-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.field-wrapper.notes .field {
|
||||
line-height: 1.1em;
|
||||
white-space: pre;
|
||||
}
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
<div class="field-error">${error}</div>
|
||||
% endfor
|
||||
${field.label_tag()|n}
|
||||
<div class="field">
|
||||
${field.render()|n}
|
||||
</div>
|
||||
<div class="field">${field.render()|n}</div>
|
||||
% if 'instructions' in field.metadata:
|
||||
<span class="instructions">${field.metadata['instructions']}</span>
|
||||
% endif
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
% if field.requires_label:
|
||||
<div class="field-wrapper ${field.name}">
|
||||
${field.label_tag()|n}
|
||||
<div class="field">
|
||||
${field.render_readonly()}
|
||||
</div>
|
||||
<div class="field">${field.render_readonly()}</div>
|
||||
</div>
|
||||
% endif
|
||||
</%def>
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/newbatch/view.mako" />
|
||||
|
||||
<%def name="extra_styles()">
|
||||
${parent.extra_styles()}
|
||||
${h.stylesheet_link(request.static_url('tailbone:static/css/purchases.css'))}
|
||||
</%def>
|
||||
|
||||
<%def name="head_tags()">
|
||||
${parent.head_tags()}
|
||||
<%def name="extra_javascript()">
|
||||
${parent.extra_javascript()}
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
|
@ -32,6 +27,11 @@
|
|||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="extra_styles()">
|
||||
${parent.extra_styles()}
|
||||
${h.stylesheet_link(request.static_url('tailbone:static/css/purchases.css'))}
|
||||
</%def>
|
||||
|
||||
<%def name="leading_buttons()">
|
||||
% if batch.mode == enum.PURCHASE_BATCH_MODE_ORDERING and not batch.complete and not batch.executed and request.has_perm('purchases.batch.order_form'):
|
||||
<button type="button" id="order-form">Ordering Form</button>
|
||||
|
|
|
@ -143,6 +143,7 @@ class PurchaseBatchView(BatchMasterView):
|
|||
fs.po_number.set(label="PO Number")
|
||||
fs.po_total.set(label="PO Total", readonly=True, renderer=forms.renderers.CurrencyFieldRenderer)
|
||||
fs.invoice_total.set(readonly=True, renderer=forms.renderers.CurrencyFieldRenderer)
|
||||
fs.notes.set(renderer=fa.TextAreaFieldRenderer, size=(80, 10))
|
||||
|
||||
fs.append(fa.Field('vendor_email', readonly=True,
|
||||
value=lambda b: b.vendor.email.address if b.vendor.email else None))
|
||||
|
@ -188,6 +189,7 @@ class PurchaseBatchView(BatchMasterView):
|
|||
fs.invoice_date,
|
||||
fs.invoice_number,
|
||||
fs.invoice_total,
|
||||
fs.notes,
|
||||
fs.created,
|
||||
fs.created_by,
|
||||
fs.complete,
|
||||
|
|
Loading…
Reference in a new issue