removed lot of stuff
bzr revid: nicolas.vanhoren@openerp.com-20120917151031-h3gofzqv23k6g0t7
This commit is contained in:
parent
57ffffbdba
commit
cd12a0faf5
|
@ -38,6 +38,5 @@ import company
|
||||||
import res_currency
|
import res_currency
|
||||||
import edi
|
import edi
|
||||||
import res_config
|
import res_config
|
||||||
import account_move_reconciliation
|
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -65,7 +65,6 @@ for a particular financial year and for preparation of vouchers there is a modul
|
||||||
'wizard/account_period_close_view.xml',
|
'wizard/account_period_close_view.xml',
|
||||||
'wizard/account_reconcile_view.xml',
|
'wizard/account_reconcile_view.xml',
|
||||||
'wizard/account_unreconcile_view.xml',
|
'wizard/account_unreconcile_view.xml',
|
||||||
'account_move_reconciliation.xml',
|
|
||||||
'account_view.xml',
|
'account_view.xml',
|
||||||
'account_report.xml',
|
'account_report.xml',
|
||||||
'account_financial_report_data.xml',
|
'account_financial_report_data.xml',
|
||||||
|
@ -135,7 +134,7 @@ for a particular financial year and for preparation of vouchers there is a modul
|
||||||
],
|
],
|
||||||
'css':['static/src/css/account_move_reconciliation.css'
|
'css':['static/src/css/account_move_reconciliation.css'
|
||||||
],
|
],
|
||||||
'demo_xml': [
|
'demo': [
|
||||||
'demo/account_demo.xml',
|
'demo/account_demo.xml',
|
||||||
'project/project_demo.xml',
|
'project/project_demo.xml',
|
||||||
'project/analytic_account_demo.xml',
|
'project/analytic_account_demo.xml',
|
||||||
|
|
|
@ -701,8 +701,6 @@ class account_move_line(osv.osv):
|
||||||
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
if context and context.get('account_type', False):
|
|
||||||
args.append(('account_id.type', '=', context.get('account_type', False)))
|
|
||||||
if context and context.get('next_partner_only', False):
|
if context and context.get('next_partner_only', False):
|
||||||
if not context.get('partner_id', False):
|
if not context.get('partner_id', False):
|
||||||
partner = self.get_next_partner_only(cr, uid, offset, context)
|
partner = self.get_next_partner_only(cr, uid, offset, context)
|
||||||
|
|
|
@ -1047,6 +1047,7 @@
|
||||||
<!--
|
<!--
|
||||||
Entries lines
|
Entries lines
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<record id="view_move_line_tree" model="ir.ui.view">
|
<record id="view_move_line_tree" model="ir.ui.view">
|
||||||
<field name="name">account.move.line.tree</field>
|
<field name="name">account.move.line.tree</field>
|
||||||
<field name="model">account.move.line</field>
|
<field name="model">account.move.line</field>
|
||||||
|
@ -1054,12 +1055,12 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" editable="top" on_write="on_create_write">
|
<tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" editable="top" on_write="on_create_write">
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="period_id" invisible="1"/>
|
<field name="period_id"/>
|
||||||
<field name="move_id"/>
|
<field name="move_id"/>
|
||||||
<field name="ref"/>
|
<field name="ref"/>
|
||||||
<field name="invoice" invisible="1"/>
|
<field name="invoice"/>
|
||||||
<field name="name" invisible="1" />
|
<field name="name"/>
|
||||||
<field name="partner_id" invisible="1" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
|
<field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
|
||||||
<field name="account_id" domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]"/>
|
<field name="account_id" domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]"/>
|
||||||
<field name="journal_id"/>
|
<field name="journal_id"/>
|
||||||
<field name="debit" sum="Total debit"/>
|
<field name="debit" sum="Total debit"/>
|
||||||
|
@ -1540,6 +1541,20 @@
|
||||||
<field name="act_window_id" ref="action_move_line_search"/>
|
<field name="act_window_id" ref="action_move_line_search"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<act_window
|
||||||
|
context="{'search_default_next_partner':1,'view_mode':True}"
|
||||||
|
id="action_account_manual_reconcile" name="Journal Items"
|
||||||
|
res_model="account.move.line"
|
||||||
|
view_id="view_move_line_tree"/>
|
||||||
|
|
||||||
|
|
||||||
|
<menuitem
|
||||||
|
name="Manual Reconciliation" icon="STOCK_EXECUTE"
|
||||||
|
action="action_account_manual_reconcile"
|
||||||
|
id="menu_manual_reconcile"
|
||||||
|
parent="account.periodical_processing_reconciliation"/>
|
||||||
|
|
||||||
|
|
||||||
<act_window
|
<act_window
|
||||||
id="act_account_acount_move_line_open"
|
id="act_account_acount_move_line_open"
|
||||||
name="Entries"
|
name="Entries"
|
||||||
|
|
|
@ -97,7 +97,7 @@ class account_move_line_reconcile(osv.osv_memory):
|
||||||
debit_ml_ids.remove(ml_id)
|
debit_ml_ids.remove(ml_id)
|
||||||
if ml_id in credit_ml_ids:
|
if ml_id in credit_ml_ids:
|
||||||
credit_ml_ids.remove(ml_id)
|
credit_ml_ids.remove(ml_id)
|
||||||
if not debit_ml_ids and not credit_ml_ids:
|
if not debit_ml_ids and credit_ml_ids:
|
||||||
context.update({'stop_reconcile': True})
|
context.update({'stop_reconcile': True})
|
||||||
account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id,
|
account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id,
|
||||||
period_id, journal_id, context=context)
|
period_id, journal_id, context=context)
|
||||||
|
|
|
@ -7,15 +7,18 @@
|
||||||
<field name="model">account.move.line.reconcile</field>
|
<field name="model">account.move.line.reconcile</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Reconciliation" version="7.0">
|
<form string="Reconciliation" version="7.0">
|
||||||
<group col="2" string="Reconciliation Transactions">
|
<group col="4" string="Reconciliation Transactions">
|
||||||
|
<field name="trans_nbr"/>
|
||||||
|
<newline/>
|
||||||
<field name="credit"/>
|
<field name="credit"/>
|
||||||
<field name="debit"/>
|
<field name="debit"/>
|
||||||
|
</group><group string="Write-Off">
|
||||||
<field name="writeoff"/>
|
<field name="writeoff"/>
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
<button string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1" attrs="{'invisible':[('writeoff','!=',0)]}" class="oe_highlight"/>
|
<button string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1" attrs="{'invisible':[('writeoff','!=',0)]}" class="oe_highlight"/>
|
||||||
<button string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" attrs="{'invisible':[('writeoff','==',0)]}" class="oe_highlight"/>
|
<button string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" attrs="{'invisible':[('writeoff','==',0)]}" class="oe_highlight"/>
|
||||||
<button string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object" attrs="{'invisible':[('writeoff','==',0)]}" class="oe_highlight"/>
|
<button string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object" attrs="{'invisible':[('writeoff','==',0)]}" class="oe_highlight"/>
|
||||||
or
|
or
|
||||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -22,6 +22,5 @@
|
||||||
import account_followup
|
import account_followup
|
||||||
import wizard
|
import wizard
|
||||||
import report
|
import report
|
||||||
import account_move_reconciliation
|
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -55,7 +55,6 @@ Note that if you want to check the follow-up level for a given partner/account e
|
||||||
'report/account_followup_report.xml',
|
'report/account_followup_report.xml',
|
||||||
'account_followup_demo.xml', # Defined by default
|
'account_followup_demo.xml', # Defined by default
|
||||||
'account_followup_view.xml',
|
'account_followup_view.xml',
|
||||||
'account_move_reconciliation.xml',
|
|
||||||
'account_followup_data.xml',
|
'account_followup_data.xml',
|
||||||
],
|
],
|
||||||
'demo': [],
|
'demo': [],
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from osv import fields, osv
|
from osv import fields, osv
|
||||||
import tools
|
|
||||||
|
|
||||||
class followup(osv.osv):
|
class followup(osv.osv):
|
||||||
_name = 'account_followup.followup'
|
_name = 'account_followup.followup'
|
||||||
|
|
|
@ -334,15 +334,9 @@ class account_voucher(osv.osv):
|
||||||
}
|
}
|
||||||
|
|
||||||
def create(self, cr, uid, vals, context=None):
|
def create(self, cr, uid, vals, context=None):
|
||||||
if context is None:
|
voucher = super(account_voucher, self).create(cr, uid, vals, context=context)
|
||||||
context = {}
|
self.create_send_note(cr, uid, [voucher], context=context)
|
||||||
bank_line_id = context.get('bank_statement_line_id', False)
|
return voucher
|
||||||
bank_line_obj = self.pool.get("account.bank.statement.line")
|
|
||||||
voucher_id = super(account_voucher, self).create(cr, uid, vals, context=context)
|
|
||||||
if bank_line_id:
|
|
||||||
bank_line_obj.write(cr, uid, bank_line_id, {'voucher_id': voucher_id})
|
|
||||||
self.create_send_note(cr, uid, [voucher_id], context=context)
|
|
||||||
return voucher_id
|
|
||||||
|
|
||||||
def compute_tax(self, cr, uid, ids, context=None):
|
def compute_tax(self, cr, uid, ids, context=None):
|
||||||
tax_pool = self.pool.get('account.tax')
|
tax_pool = self.pool.get('account.tax')
|
||||||
|
@ -1502,37 +1496,7 @@ account_bank_statement()
|
||||||
|
|
||||||
class account_bank_statement_line(osv.osv):
|
class account_bank_statement_line(osv.osv):
|
||||||
_inherit = 'account.bank.statement.line'
|
_inherit = 'account.bank.statement.line'
|
||||||
|
|
||||||
def action_payment_reconcile(self, cr, uid, ids, context=None):
|
|
||||||
if context is None:
|
|
||||||
context = {}
|
|
||||||
ctx = dict(context)
|
|
||||||
statement_id = ids[0]
|
|
||||||
statement = self.browse(cr, uid, statement_id, context=context)
|
|
||||||
ctx['bank_statement_line_id'] = statement.id
|
|
||||||
ctx.update({
|
|
||||||
'line_type': statement.type,
|
|
||||||
'type': statement.amount > 0 and 'payment' or 'receipt',
|
|
||||||
'partner_id': statement.partner_id and statement.partner_id.id or False,
|
|
||||||
'journal_id': statement.statement_id.journal_id and statement.statement_id.journal_id.id or False,
|
|
||||||
'amount': abs(statement.amount),
|
|
||||||
'reference': statement.ref,
|
|
||||||
'date': statement.date,
|
|
||||||
'name': statement.name
|
|
||||||
})
|
|
||||||
voucher = statement.voucher_id or False
|
|
||||||
voucher_id = voucher and voucher.id or False
|
|
||||||
return {
|
|
||||||
'name': _('Payment Entry'),
|
|
||||||
'res_model': 'account.voucher',
|
|
||||||
'view_type': 'form',
|
|
||||||
'view_mode': 'form',
|
|
||||||
'target':'new',
|
|
||||||
'context': ctx,
|
|
||||||
'res_id':voucher_id,
|
|
||||||
'type': 'ir.actions.act_window'
|
|
||||||
}
|
|
||||||
|
|
||||||
def _amount_reconciled(self, cursor, user, ids, name, args, context=None):
|
def _amount_reconciled(self, cursor, user, ids, name, args, context=None):
|
||||||
if not ids:
|
if not ids:
|
||||||
return {}
|
return {}
|
||||||
|
@ -1557,11 +1521,6 @@ class account_bank_statement_line(osv.osv):
|
||||||
]
|
]
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'voucher_state': fields.related('voucher_id', 'state', type="selection", selection= [('draft','Draft'),
|
|
||||||
('cancel','Cancelled'),
|
|
||||||
('proforma','Pro-forma'),
|
|
||||||
('posted','Posted')
|
|
||||||
], string='Voucher State'),
|
|
||||||
'amount_reconciled': fields.function(_amount_reconciled,
|
'amount_reconciled': fields.function(_amount_reconciled,
|
||||||
string='Amount reconciled', type='float'),
|
string='Amount reconciled', type='float'),
|
||||||
'voucher_id': fields.many2one('account.voucher', 'Payment'),
|
'voucher_id': fields.many2one('account.voucher', 'Payment'),
|
||||||
|
|
|
@ -213,8 +213,7 @@
|
||||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
|
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
|
||||||
<button class="reconcile_btn" attrs="{'readonly':[('voucher_state','=','posted')]}" name="action_payment_reconcile" string="Reconcile" type="object"/>
|
<field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
|
||||||
<field name="voucher_state" invisible="1"/>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -53,9 +53,7 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Bill Payment" version="7.0">
|
<form string="Bill Payment" version="7.0">
|
||||||
<group col="6">
|
<group col="6">
|
||||||
<field name="company_id" invisible="1" />
|
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1, 'invoice_currency': currency_id}"/>
|
||||||
<field name="state" invisible="1" />
|
|
||||||
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1, 'invoice_currency': currency_id}" />
|
|
||||||
<field name="amount" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
<field name="amount" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
||||||
<field name="journal_id"
|
<field name="journal_id"
|
||||||
domain="[('type','in',['bank', 'cash'])]"
|
domain="[('type','in',['bank', 'cash'])]"
|
||||||
|
|
Loading…
Reference in New Issue