[IMP] improve sales-receipt
bzr revid: pja@tinyerp.com-20120627072822-z7a6i6li0c95gl9r
This commit is contained in:
parent
5fabd6fe48
commit
127ae36646
|
@ -52,15 +52,6 @@ class account_voucher(osv.osv):
|
|||
paid = True
|
||||
res[voucher.id] = paid
|
||||
return res
|
||||
def untaxed_amount(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
amount = 0.0
|
||||
for voucher in self.browse(cr, uid, ids, context=context):
|
||||
for line in voucher.line_cr_ids:
|
||||
amount += line.amount
|
||||
res[voucher.id] = amount
|
||||
return res
|
||||
|
||||
|
||||
def _get_type(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
|
@ -321,7 +312,7 @@ class account_voucher(osv.osv):
|
|||
help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'),
|
||||
'paid_amount_in_company_currency': fields.function(_paid_amount_in_company_currency, string='Paid Amount in Company Currency', type='float', readonly=True),
|
||||
'is_multi_currency': fields.boolean('Multi Currency Voucher', help='Fields with internal purpose only that depicts if the voucher is a multi currency one or not'),
|
||||
'amount_untaxed': fields.function(untaxed_amount, digits_compute=dp.get_precision('Account'), string='Untaxed'),
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'period_id': _get_period,
|
||||
|
|
|
@ -130,20 +130,19 @@
|
|||
<field name="narration" placeholder="Internal Notes" nolabel="1" />
|
||||
</group>
|
||||
<group>
|
||||
<group class="oe_subtotal_footer" string="Total">
|
||||
<field name="amount_untaxed"/>
|
||||
<group class="oe_subtotal_footer">
|
||||
<field name="tax_id"
|
||||
on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
|
||||
widget="selection"
|
||||
domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
|
||||
<field name="tax_amount"/>
|
||||
<field name="amount" class="oe_subtotal_footer_separator" />
|
||||
<button type="object"
|
||||
icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax"
|
||||
attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<button type="object"
|
||||
icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax"
|
||||
attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
</page>
|
||||
<page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
|
||||
<group col="4">
|
||||
|
@ -280,7 +279,6 @@
|
|||
attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<field name="tax_id"
|
||||
on_change="onchange_price(line_dr_ids, tax_id, partner_id)"
|
||||
widget="selection"
|
||||
|
|
Loading…
Reference in New Issue