我尝试在帐户发票表单中显示两列:
发票行总计,不含税
总发票行,含税。
我知道可以将税收对象设置为包含或排除在产品价格中,但我看不到在发票表单中显示两者的方式。
我已经扩展 account.invoice.line 如下:
from openerp import api, models, fields
import openerp.addons.decimal_precision as dp
class cap_account_invoice_line(models.Model):
_inherit = 'account.invoice.line'
price_with_tax = fields.Float(string='Prix TTC', digits= dp.get_precision('Product Price'), store=True, readonly=True,)
"""
@api.multi
def button_reset_taxes(self):
#I guess I should override this method but i don't know how
#to calculate and load the total line with included tax
#into the field 'price_with_tax'
"""
预先感谢您的帮助
胜利者