~initos.com/sale-reports/7.0-fix_lang_for_draft

« back to all changes in this revision

Viewing changes to sale_order_webkit/report/sale_order.mako

  • Committer: Nicolas Bessi
  • Author(s): romain.deheele at camptocamp
  • Date: 2014-02-18 08:51:39 UTC
  • mfrom: (24.1.3 sale-reports)
  • Revision ID: nicolas.bessi@camptocamp.com-20140218085139-f1wvewr8t4390623
 [MRG][IMP] This branch transposes conditional discount printing from official rml addons
  http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/revision/8878:
  when printing the sale order report, do not print the discount column if user doesn't belong to the group that enables to see it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
206
206
                <th class="amount main_col3">${_("UoM")}</th>
207
207
                <th class="amount main_col4">${_("Unit Price")}</th>
208
208
                <th class="main_col5">${_("VAT")}</th>
 
209
                %if show_discount(user.id):
209
210
                <th class="amount main_col6">${_("Disc.(%)")}</th>
 
211
                %endif
210
212
                <th class="amount main_col7">${_("Price")}</th>
211
213
              </tr>
212
214
            </table>
225
227
                    <td class="amount main_col3">${ line.product_uos and line.product_uos.name or line.product_uom.name }</td>
226
228
                    <td class="amount main_col4">${formatLang(line.price_unit)}</td>
227
229
                    <td class="main_col5">${ ', '.join([tax.description or tax.name for tax in line.tax_id]) }</td>
 
230
                    %if show_discount(user.id):
228
231
                    <td class="amount main_col6">${line.discount and formatLang(line.discount, digits=get_digits(dp='Sale Price')) or ''} ${line.discount and '%' or ''}</td>
 
232
                    %endif
229
233
                    <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price'))}&nbsp;${order.pricelist_id.currency_id.symbol}</td>
230
234
                  </tr>
231
235
                  %if line.formatted_note: