Fri, 5 Apr 2013 14:40:42 +0200 Cédric Krier <[email protected]>:
>On 05/04/13 13:58 +0200, Udo Spallek wrote:
>> It is hard to extend the
>> get_invoice_line() method when you want to introduce an alternative
>> conception, like account_product_rule[3] does.
>Don't really understand the module but I don't see any modular
>difficulties in this code. It uses function fields that can be
>extended.
So, when I want to deactivate the check, the way to go
would be to overwrite the function fields e.g. supplier_taxes_used[1]
getter[2] to always return true, like this:
class Template:
__name__ = 'product.template'
def get_account(self, name):
return True
With this getter I can short-cut the check in [3].
Is it the proposed way to deactivate this kind function
field and the checks you meant with?
> It uses function fields that can be extended.
TIA and regards
Udo
[1]http://hg.tryton.org/modules/account_product/file/95b9737d01dc/product.py#l185
[2]http://hg.tryton.org/modules/account_product/file/95b9737d01dc/product.py#l232
[3]http://hg.tryton.org/modules/purchase/file/38bca07037aa/purchase.py#l1156
--
_____________________________
virtual things
Preisler & Spallek GbR
München - Aachen
Windeckstr. 77
81375 München
Tel: +49 (89) 710 481 55
Fax: +49 (89) 710 481 56
[email protected]
http://www.virtual-things.biz
signature.asc
Description: PGP signature
