[IMP]:
1) added missing wizards under Financial Management/Periodical Processing 2) added entry_type on move line for different types of invoices bzr revid: pap@tinyerp.co.in-20100617131758-668hhpu1q1qkmt20
This commit is contained in:
parent
ec23bbbe73
commit
c8a0a2a191
|
@ -1022,7 +1022,7 @@
|
|||
<menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>
|
||||
|
||||
<record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
|
||||
<field name="name">Journal Entries</field>
|
||||
<field name="name">Journal Vouchers</field>
|
||||
<field name="res_model">account.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -1033,7 +1033,7 @@
|
|||
<menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>
|
||||
|
||||
<record id="action_account_moves_sale" model="ir.actions.act_window">
|
||||
<field name="name">Journal Items</field>
|
||||
<field name="name">Receivable Entries</field>
|
||||
<field name="res_model">account.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -1045,7 +1045,7 @@
|
|||
<menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>
|
||||
|
||||
<record id="action_account_moves_purchase" model="ir.actions.act_window">
|
||||
<field name="name">Transaction Journals</field>
|
||||
<field name="name">Payable Entries</field>
|
||||
<field name="res_model">account.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -1167,20 +1167,20 @@
|
|||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" ref="view_bank_statement_reconcile_form"/>
|
||||
</record>
|
||||
<!-- <menuitem-->
|
||||
<!-- id="next_id_30"-->
|
||||
<!-- name="Bank Reconciliation"-->
|
||||
<!-- parent="account.menu_finance_periodical_processing"-->
|
||||
<!-- groups="group_account_user"/>-->
|
||||
<menuitem
|
||||
id="next_id_30"
|
||||
name="Bank Reconciliation"
|
||||
parent="menu_finance_periodical_processing"
|
||||
groups="group_account_user"/>
|
||||
|
||||
<!-- <menuitem action="action_bank_statement_reconciliation_form" id="menu_action_account_bank_reconcile_tree" parent="next_id_30"/>-->
|
||||
<!-- <wizard id="action_account_bank_reconcile_tree" menu="False" model="account.move.line" name="account.move.bank.reconcile" string="Bank reconciliation"/> -->
|
||||
<!-- <menuitem action="action_account_bank_reconcile_tree" id="menu_action_account_bank_reconcile_check_tree" parent="account.next_id_30" type="wizard"/> -->
|
||||
|
||||
<!-- bank reconsilation -->
|
||||
<!-- <menuitem action="action_account_bank_reconcile_tree"-->
|
||||
<!-- id="menu_action_account_bank_reconcile_check_tree"-->
|
||||
<!-- parent="account.next_id_30" />-->
|
||||
<menuitem action="action_account_bank_reconcile_tree"
|
||||
id="menu_action_account_bank_reconcile_check_tree"
|
||||
parent="account.next_id_30" />
|
||||
|
||||
|
||||
<act_window
|
||||
|
|
|
@ -772,11 +772,18 @@ class account_invoice(osv.osv):
|
|||
|
||||
# one move line per tax line
|
||||
iml += ait_obj.move_line_get(cr, uid, inv.id)
|
||||
|
||||
|
||||
entry_type=''
|
||||
if inv.type in ('in_invoice', 'in_refund'):
|
||||
ref = inv.reference
|
||||
entry_type = 'journal_pur_voucher'
|
||||
if inv.type in ('in_refund'):
|
||||
entry_type = 'cont_voucher'
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
entry_type = 'journal_sale_vou'
|
||||
if inv.type in ('out_refund'):
|
||||
entry_type = 'cont_voucher'
|
||||
|
||||
diff_currency_p = inv.currency_id.id <> company_currency
|
||||
# create one move line for the total and possibly adjust the other lines amount
|
||||
|
@ -847,7 +854,7 @@ class account_invoice(osv.osv):
|
|||
|
||||
line = self.finalize_invoice_move_lines(cr, uid, inv, line)
|
||||
|
||||
move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date}
|
||||
move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date, 'type': entry_type}
|
||||
period_id=inv.period_id and inv.period_id.id or False
|
||||
if not period_id:
|
||||
period_ids= self.pool.get('account.period').search(cr,uid,[('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))])
|
||||
|
@ -1070,10 +1077,18 @@ class account_invoice(osv.osv):
|
|||
else:
|
||||
amount_currency = False
|
||||
currency_id = False
|
||||
entry_type=''
|
||||
if invoice.type in ('in_invoice', 'in_refund'):
|
||||
ref = invoice.reference
|
||||
entry_type = 'journal_pur_voucher'
|
||||
if invoice.type in ('in_refund'):
|
||||
entry_type = 'cont_voucher'
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, invoice.number)
|
||||
entry_type = 'journal_sale_vou'
|
||||
if invoice.type in ('out_refund'):
|
||||
entry_type = 'cont_voucher'
|
||||
|
||||
# Pay attention to the sign for both debit/credit AND amount_currency
|
||||
l1 = {
|
||||
'debit': direction * pay_amount>0 and direction * pay_amount,
|
||||
|
@ -1104,7 +1119,7 @@ class account_invoice(osv.osv):
|
|||
l2['name'] = name
|
||||
|
||||
lines = [(0, 0, l1), (0, 0, l2)]
|
||||
move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date}
|
||||
move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date, 'type': entry_type}
|
||||
move_id = self.pool.get('account.move').create(cr, uid, move, context=context)
|
||||
|
||||
line_ids = []
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem action="action_account_subscription_generate" id="menu_generate_subscription" parent="account.menu_finance_periodical_processing" />-->
|
||||
<menuitem action="action_account_subscription_generate" id="menu_generate_subscription" parent="menu_finance_periodical_processing" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<field name="model">account.move.line</field>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem action="action_view_account_use_model" name="Create Entries From Models"-->
|
||||
<!-- parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>-->
|
||||
<menuitem action="action_view_account_use_model" name="Create Entries From Models"
|
||||
parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>
|
||||
|
||||
<record id="view_account_use_model_open_entry" model="ir.ui.view">
|
||||
<field name="name">account.use.model.open.entry.form</field>
|
||||
|
|
Loading…
Reference in New Issue