[FIX] correct some typos in addon account variable name

bzr revid: ged@openerp.com-20140414093221-qbpxrv2kihsvtafg
This commit is contained in:
Gery Debongnie 2014-04-14 11:32:21 +02:00
parent 2e9ee9c76e
commit ea23d24e87
2 changed files with 4 additions and 4 deletions

View File

@ -163,14 +163,14 @@ class res_partner(osv.osv):
return self._asset_difference_search(cr, uid, obj, name, 'payable', args, context=context)
def _invoice_journal_item_count(self, cr, uid, ids, field_name, arg, context=None):
res = dict(map(lambda x: (x,{'invoice_count': 0, 'journal_item_count': 0, 'cotracts_count': 0 }), ids))
res = dict(map(lambda x: (x,{'invoice_count': 0, 'journal_item_count': 0, 'contracts_count': 0 }), ids))
# the user may not have access rights
try:
for partner in self.browse(cr, uid, ids, context):
res[partner.id] = {
'invoice_count': len(partner.invoice_ids),
'journal_item_count': len(partner.journal_item_ids),
'cotracts_count': len(partner.contract_ids)
'contracts_count': len(partner.contract_ids)
}
except:
pass
@ -205,7 +205,7 @@ class res_partner(osv.osv):
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."),
'debit_limit': fields.float('Payable Limit'),
'invoice_count': fields.function(_invoice_journal_item_count, string="Invoices", type='integer', multi="invoice_journal"),
'cotracts_count': fields.function(_invoice_journal_item_count, string="Contracts", type='integer', multi="invoice_journal"),
'contracts_count': fields.function(_invoice_journal_item_count, string="Contracts", type='integer', multi="invoice_journal"),
'journal_item_ids': fields.one2many('account.move.line', 'partner_id', 'Journal Items'),
'journal_item_count': fields.function(_invoice_journal_item_count, string="Journal Items", type="integer", multi="invoice_journal"),
'property_account_payable': fields.property(

View File

@ -76,7 +76,7 @@
</button>
<button class="oe_inline oe_stat_button" type="action" name="%(account.action_open_partner_analytic_accounts)d"
icon="fa-book" groups="analytic.group_analytic_accounting">
<field string="Contracts" name="cotracts_count" widget="statinfo"/>
<field string="Contracts" name="contracts_count" widget="statinfo"/>
</button>
</xpath>
</field>