[IMP] Account: Account model: remove ref field from model line
bzr revid: mra@mra-laptop-20100906094124-qwt1hq3pdztm4h6w
This commit is contained in:
parent
1b76e5a85e
commit
684f85741d
|
@ -1989,11 +1989,11 @@ class account_model(osv.osv):
|
|||
account_move_obj = self.pool.get('account.move')
|
||||
account_move_line_obj = self.pool.get('account.move.line')
|
||||
pt_obj = self.pool.get('account.payment.term')
|
||||
|
||||
|
||||
if datas.get('date', False):
|
||||
context.update({'date':datas['date']})
|
||||
period_id = self.pool.get('account.period').find(cr, uid, dt=context.get('date', False))
|
||||
|
||||
|
||||
if not period_id:
|
||||
raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !'))
|
||||
period_id = period_id[0]
|
||||
|
@ -2018,7 +2018,7 @@ class account_model(osv.osv):
|
|||
'period_id': period_id,
|
||||
'analytic_account_id': analytic_account_id
|
||||
}
|
||||
|
||||
|
||||
date_maturity = time.strftime('%Y-%m-%d')
|
||||
if line.date_maturity == 'partner':
|
||||
if not line.partner_id:
|
||||
|
@ -2031,7 +2031,7 @@ class account_model(osv.osv):
|
|||
pterm_list = [l[0] for l in pterm_list]
|
||||
pterm_list.sort()
|
||||
date_maturity = pterm_list[-1]
|
||||
|
||||
|
||||
val.update({
|
||||
'name': line.name,
|
||||
'quantity': line.quantity,
|
||||
|
@ -2039,7 +2039,6 @@ class account_model(osv.osv):
|
|||
'credit': line.credit,
|
||||
'account_id': line.account_id.id,
|
||||
'move_id': move_id,
|
||||
'ref': line.ref,
|
||||
'partner_id': line.partner_id.id,
|
||||
'date': context.get('date',time.strftime('%Y-%m-%d')),
|
||||
'date_maturity': date_maturity
|
||||
|
@ -2059,7 +2058,6 @@ class account_model_line(osv.osv):
|
|||
'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account'), help="The optional quantity on entries"),
|
||||
'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
|
||||
'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),
|
||||
'ref': fields.char('Reference', size=16),
|
||||
'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', ondelete="cascade"),
|
||||
'model_id': fields.many2one('account.model', 'Model', required=True, ondelete="cascade", select=True),
|
||||
|
|
|
@ -1553,7 +1553,6 @@
|
|||
<tree string="Journal Entry Model Line" editable="bottom">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="account_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="partner_id"/>
|
||||
|
@ -1573,7 +1572,6 @@
|
|||
<form string="Journal Entry Model Line">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="ref" select="1"/>
|
||||
<field name="account_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="partner_id"/>
|
||||
|
@ -1618,7 +1616,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_model_search" model="ir.ui.view">
|
||||
<field name="name">account.model.search</field>
|
||||
<field name="model">account.model</field>
|
||||
|
@ -1640,7 +1638,7 @@
|
|||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_model_form" model="ir.actions.act_window">
|
||||
<field name="name">Recurring Models</field>
|
||||
<field name="res_model">account.model</field>
|
||||
|
@ -1907,18 +1905,18 @@
|
|||
# Admin config
|
||||
-->
|
||||
|
||||
<act_window
|
||||
id="act_account_journal_2_account_bank_statement"
|
||||
name="Bank statements"
|
||||
<act_window
|
||||
id="act_account_journal_2_account_bank_statement"
|
||||
name="Bank statements"
|
||||
context="{'search_default_journal_id':active_id,}"
|
||||
res_model="account.bank.statement"
|
||||
res_model="account.bank.statement"
|
||||
src_model="account.journal"/>
|
||||
|
||||
<act_window
|
||||
id="act_account_journal_2_account_move_line"
|
||||
name="Journal Items"
|
||||
<act_window
|
||||
id="act_account_journal_2_account_move_line"
|
||||
name="Journal Items"
|
||||
context="{'search_default_journal_id':active_id,}"
|
||||
res_model="account.move.line"
|
||||
res_model="account.move.line"
|
||||
src_model="account.journal"/>
|
||||
|
||||
<act_window context="{'search_default_reconcile_id':False, 'search_default_partner_id':[active_id]}" domain="[('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables & Payables" res_model="account.move.line" src_model="res.partner" groups="base.group_extended"/>
|
||||
|
|
|
@ -31,7 +31,7 @@ class account_use_model(osv.osv_memory):
|
|||
_columns = {
|
||||
'model': fields.many2many('account.model', 'account_use_model_relation', 'account_id', 'model_id', 'Account Model'),
|
||||
}
|
||||
|
||||
|
||||
def view_init(self, cr , uid , fields_list, context=None):
|
||||
account_model_obj = self.pool.get('account.model')
|
||||
if context is None:
|
||||
|
@ -101,7 +101,6 @@ class account_use_model(osv.osv_memory):
|
|||
'credit': line.credit,
|
||||
'account_id': line.account_id.id,
|
||||
'move_id': move_id,
|
||||
'ref': line.ref,
|
||||
'partner_id': line.partner_id.id,
|
||||
'date': time.strftime('%Y-%m-%d'),
|
||||
'date_maturity': date_maturity
|
||||
|
@ -109,7 +108,7 @@ class account_use_model(osv.osv_memory):
|
|||
c = context.copy()
|
||||
c.update({'journal_id': model.journal_id.id,'period_id': period_id})
|
||||
id_line = account_move_line_obj.create(cr, uid, val, context=c)
|
||||
|
||||
|
||||
context.update({'move_ids':move_ids})
|
||||
model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_move_form')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
|
|
Loading…
Reference in New Issue