clean up created seprated sql view so no need to added field in model
bzr revid: rgaopenerp-20120627131147-mg94jfo9w4nu9e09
This commit is contained in:
@@ -470,22 +470,6 @@ class account_move_line(osv.osv):
|
||||
for line in move.line_id:
|
||||
result.append(line.id)
|
||||
return result
|
||||
|
||||
def _latest_entry_date(self, cr, uid, ids, prop, unknow_none, context=None):
|
||||
res = {}
|
||||
# ToDo write query to fetch the same date
|
||||
for accout_move_line in self.browse(cr, uid, ids, context=context):
|
||||
ids = self.search(cr, uid, [('partner_id','=',accout_move_line.partner_id.id)], context=context, limit=1, order='date')
|
||||
date = self.browse(cr, uid, ids, context=context)[0].date
|
||||
res[accout_move_line.id] = date
|
||||
return res
|
||||
|
||||
def _rec_progress(self, cr, uid, ids, prop, unknow_none, context=None):
|
||||
#ToDo
|
||||
res = {}
|
||||
for id in ids:
|
||||
res[id] = 0.5
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True),
|
||||
@@ -534,10 +518,6 @@ class account_move_line(osv.osv):
|
||||
'account_tax_id':fields.many2one('account.tax', 'Tax'),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
|
||||
'last_reconciliation_date': fields.related('partner_id', 'last_reconciliation_date', type='datetime', relation='res.partner', string='Latest Reconciliation Date',readonly=True),
|
||||
'lastest_entry': fields.function(_latest_entry_date, type='date', string="Latest Entry"),
|
||||
'reconciliation_progress': fields.function(_rec_progress, string='Progress (%)', type='float')
|
||||
|
||||
}
|
||||
|
||||
def _get_date(self, cr, uid, context=None):
|
||||
|
||||
@@ -974,25 +974,6 @@
|
||||
<!--
|
||||
Entries lines
|
||||
-->
|
||||
<!-- <record id="view_move_line_extended_form_view" model="ir.ui.view">
|
||||
<field name="name">account.move.line.form</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="type">form</field>
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Item" layout="manual" version="7.0">
|
||||
<h3>
|
||||
<field name="partner_id" widget="many2one_pager"/>
|
||||
</h3>
|
||||
<group col="6">
|
||||
<field name = "last_reconciliation_date" col="3"/>
|
||||
<field name = "lastest_entry" col="3"/>
|
||||
<button string="Reconcile" name="%(action_view_account_move_line_reconcile)d" widget="list_button" type="action" />
|
||||
<button string="Nothing to Reconcile" name="%(action_account_unreconcile)d" widget="list_button" type="action"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record> -->
|
||||
<record id="view_move_line_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.tree</field>
|
||||
<field name="model">account.move.line</field>
|
||||
|
||||
Reference in New Issue
Block a user