openerp-canada team mailing list archive
-
openerp-canada team
-
Mailing list archive
-
Message #00001
lp:~openerp-canada/openobject-addons/account_add_expense_include_field_to_tax into lp:openobject-addons
Maxime Chambreuil (http://www.savoirfairelinux.com) has proposed merging lp:~openerp-canada/openobject-addons/account_add_expense_include_field_to_tax into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Add expense_include field to taxes
--
https://code.launchpad.net/~openerp-canada/openobject-addons/account_add_expense_include_field_to_tax/+merge/40589
Your team OpenERP Canada Team is subscribed to branch lp:~openerp-canada/openobject-addons/account_add_expense_include_field_to_tax.
=== modified file 'account/account.py'
--- account/account.py 2010-11-10 08:20:11 +0000
+++ account/account.py 2010-11-10 23:16:09 +0000
@@ -1702,6 +1702,7 @@
'company_id': fields.many2one('res.company', 'Company', required=True),
'description': fields.char('Tax Code',size=32),
'price_include': fields.boolean('Tax Included in Price', help="Check this if the price you use on the product and invoices includes this tax."),
+ 'expense_include': fields.boolean('Tax Included in Expense', help="Check this if this tax is included in the expense amount."),
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Application', required=True)
}
@@ -1877,7 +1878,7 @@
tin = []
tex = []
for tax in taxes:
- if tax.price_include:
+ if (partner.employee and tax.expense_include) or tax.price_include:
tin.append(tax)
else:
tex.append(tax)
@@ -2973,4 +2974,4 @@
account_bank_accounts_wizard()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'account/account_view.xml'
--- account/account_view.xml 2010-11-10 09:03:41 +0000
+++ account/account_view.xml 2010-11-10 23:16:09 +0000
@@ -899,6 +899,7 @@
<field name="description"/>
<field name="type_tax_use"/>
<field name="price_include"/>
+ <field name="expense_include"/>
<field name="active"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
Follow ups