[IMP]: accounting and related improvements
bzr revid: mga@tinyerp.com-20100709045454-oex2wcpshaecp85r
This commit is contained in:
parent
096b3ccbd6
commit
e216fa7054
|
@ -2413,6 +2413,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
obj_acc_template = self.pool.get('account.account.template')
|
||||
obj_fiscal_position_template = self.pool.get('account.fiscal.position.template')
|
||||
obj_fiscal_position = self.pool.get('account.fiscal.position')
|
||||
data_pool = self.pool.get('ir.model.data')
|
||||
|
||||
# Creating Account
|
||||
obj_acc_root = obj_multi.chart_template_id.account_root_id
|
||||
|
@ -2523,7 +2524,10 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
|
||||
# Creating Journals
|
||||
vals_journal={}
|
||||
view_id = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Journal View')])[0]
|
||||
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_view')])
|
||||
data = data_pool.browse(cr, uid, data_id[0])
|
||||
view_id = data.res_id
|
||||
|
||||
seq_id = obj_sequence.search(cr, uid, [('name','=','Account Journal')])[0]
|
||||
|
||||
if obj_multi.seq_journal:
|
||||
|
@ -2560,8 +2564,15 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
obj_journal.create(cr,uid,vals_journal)
|
||||
|
||||
# Bank Journals
|
||||
view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal View')])[0] #TOFIX: why put fix name
|
||||
view_id_cur = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal (Multi-Currency) View')])[0] #TOFIX: why put fix name
|
||||
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view')])
|
||||
data = data_pool.browse(cr, uid, data_id[0])
|
||||
view_id_cash = data.res_id
|
||||
#view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal View')])[0] #TOFIX: why put fix name
|
||||
|
||||
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view_multi')])
|
||||
data = data_pool.browse(cr, uid, data_id[0])
|
||||
ref_acc_bank = data.res_id
|
||||
#ref_acc_bank = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal (Multi-Currency) View')])[0] #TOFIX: why put fix name
|
||||
ref_acc_bank = obj_multi.chart_template_id.bank_account_view_id
|
||||
|
||||
current_num = 1
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
|
||||
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Journal Entries Validation" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
|
|
|
@ -358,14 +358,11 @@
|
|||
<separator string="Validations" colspan="4"/>
|
||||
<field name="allow_date" groups="base.group_extended"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Other Configuration" colspan="4"/>
|
||||
<field name="centralisation" groups="base.group_extended"/>
|
||||
<field name="entry_posted"/>
|
||||
<field name="update_posted"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Invoicing Data" colspan="4"/>
|
||||
<field name="invoice_sequence_id" groups="base.group_extended"/>
|
||||
|
@ -1130,10 +1127,6 @@
|
|||
<field name="partner_id" select='1'/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col="10" colspan="4">
|
||||
<field name="journal_id" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
|
||||
<field name="period_id" widget="selection" context="{'period_id':self}"/>
|
||||
</group>
|
||||
<group expand="0" string="Group By..." colspan="12" col="10">
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
|
||||
|
@ -1179,15 +1172,21 @@
|
|||
src_model="account.move"/>
|
||||
|
||||
<record id="action_move_to_review" model="ir.actions.act_window">
|
||||
<field name="name">Journal Entries to Review</field>
|
||||
<field name="name">Journal Entries</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_move_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_filter"/>
|
||||
<field name="domain">[('to_check','=',True)]</field>
|
||||
<field name="domain">[('to_check','=',True), ('state','=','draft')]</field>
|
||||
</record>
|
||||
<menuitem action="action_move_to_review" id="menu_action_move_to_review" parent="periodical_processing_journal_entries_validation"/>
|
||||
|
||||
<menuitem
|
||||
action="action_move_to_review"
|
||||
id="menu_action_move_to_review"
|
||||
parent="periodical_processing_journal_entries_validation"
|
||||
/>
|
||||
|
||||
<!-- <menuitem id="next_id_29" name="Search Entries" parent="account.menu_finance_entries" sequence="40"/>-->
|
||||
<!-- <menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>-->
|
||||
|
||||
|
|
|
@ -169,21 +169,21 @@
|
|||
<!-- Budgets -->
|
||||
<data noupdate="1">
|
||||
<record id="crossovered_budget_budgetoptimistic0" model="crossovered.budget">
|
||||
<field eval=""""+2008"""" name="code"/>
|
||||
<field eval=""""Budget 2008: Optimistic"""" name="name"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""+2011"""" name="code"/>
|
||||
<field eval=""""Budget 2011: Optimistic"""" name="name"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval=""""draft"""" name="state"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
<field name="creating_user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="crossovered_budget_budgetpessimistic0" model="crossovered.budget">
|
||||
<field eval=""""-2008"""" name="code"/>
|
||||
<field eval=""""Budget 2008: Pessimistic"""" name="name"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""-2011"""" name="code"/>
|
||||
<field eval=""""Budget 2011: Pessimistic"""" name="name"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval=""""draft"""" name="state"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
<field name="creating_user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
</data>
|
||||
|
@ -193,70 +193,70 @@
|
|||
<record id="crossovered_budget_lines_0" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_consultancy"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_purchase0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="-500.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_1" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_consultancy"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_purchase0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="-250.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_2" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_consultancy"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="500.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_3" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_consultancy"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-01-07"""" name="date_from"/>
|
||||
<field eval=""""2011-01-07"""" name="date_from"/>
|
||||
<field eval="900.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_4" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_consultancy"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="300.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0"/>
|
||||
<field eval=""""2008-12-06"""" name="date_to"/>
|
||||
<field eval=""""2011-12-06"""" name="date_to"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="crossovered_budget_lines_5" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-09-01"""" name="date_from"/>
|
||||
<field eval=""""2011-09-01"""" name="date_from"/>
|
||||
<field eval="375.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0"/>
|
||||
<field eval=""""2008-12-03"""" name="paid_date"/>
|
||||
<field eval=""""2011-12-03"""" name="paid_date"/>
|
||||
<field eval=""""2208-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_6" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_purchase0"/>
|
||||
<field eval=""""2008-09-01"""" name="date_from"/>
|
||||
<field eval=""""2011-09-01"""" name="date_from"/>
|
||||
<field eval="-150.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_7" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-09-01"""" name="date_from"/>
|
||||
<field eval=""""2011-09-01"""" name="date_from"/>
|
||||
<field eval="375.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0"/>
|
||||
<field eval=""""2008-12-03"""" name="paid_date"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-03"""" name="paid_date"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
|
@ -271,15 +271,15 @@
|
|||
<record id="crossovered_budget_lines_9" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_purchase0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="-5000.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_10" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_purchase0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="-2000.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0"/>
|
||||
<field eval=""""2009-12-31"""" name="date_to"/>
|
||||
|
@ -287,7 +287,7 @@
|
|||
<record id="crossovered_budget_lines_11" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="20000.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0"/>
|
||||
<field eval=""""2010-12-31"""" name="date_to"/>
|
||||
|
@ -295,7 +295,7 @@
|
|||
<record id="crossovered_budget_lines_12" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="20000.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0"/>
|
||||
<field eval=""""2009-12-31"""" name="date_to"/>
|
||||
|
@ -305,34 +305,34 @@
|
|||
<record id="crossovered_budget_lines_13" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_seagate_p2"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_purchase0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="-3000.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_14" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_seagate_p2"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_purchase0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="-1000.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_15" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_seagate_p2"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="10000.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
<record id="crossovered_budget_lines_16" model="crossovered.budget.lines">
|
||||
<field name="analytic_account_id" ref="account.analytic_seagate_p2"/>
|
||||
<field name="general_budget_id" ref="account_budget_post_sales0"/>
|
||||
<field eval=""""2008-01-01"""" name="date_from"/>
|
||||
<field eval=""""2011-01-01"""" name="date_from"/>
|
||||
<field eval="10000.0" name="planned_amount"/>
|
||||
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0"/>
|
||||
<field eval=""""2008-12-31"""" name="date_to"/>
|
||||
<field eval=""""2011-12-31"""" name="date_to"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -153,8 +153,8 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="overdue_msg" nolabel="1" colspan ="4" position="after">
|
||||
<separator string="Follow-up Message" colspan="4"/>
|
||||
<field name="follow_up_msg" nolabel="1" colspan ="4"/>
|
||||
<separator string="Follow-up Message" colspan="4"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -212,10 +212,22 @@ class account_voucher(osv.osv):
|
|||
self.write(cr, uid, ids, {'state':'posted'})
|
||||
return True
|
||||
|
||||
def action_cancel_draft(self, cr, uid, ids, *args):
|
||||
def action_cancel_draft(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'draft'})
|
||||
return True
|
||||
|
||||
def audit_pass(self, cr, uid, ids, context={}):
|
||||
move_pool = self.pool.get('account.move')
|
||||
result = True
|
||||
audit_pass = []
|
||||
for voucher in self.browse(cr, uid, ids):
|
||||
if voucher.move_id and voucher.move_id.state == 'draft':
|
||||
result = result and move_pool.button_validate(cr, uid, [voucher.move_id.id])
|
||||
audit_pass += [voucher.id]
|
||||
|
||||
self.write(cr, uid, audit_pass, {'state':'audit'})
|
||||
return result
|
||||
|
||||
def cancel_voucher(self, cr, uid, ids, context={}):
|
||||
move_pool = self.pool.get('account.move')
|
||||
|
||||
|
@ -258,7 +270,6 @@ class account_voucher(osv.osv):
|
|||
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
diff_currency_p = inv.currency_id.id <> company_currency
|
||||
ref = inv.reference
|
||||
|
||||
journal = journal_pool.browse(cr, uid, inv.journal_id.id)
|
||||
if journal.sequence_id:
|
||||
|
@ -289,7 +300,7 @@ class account_voucher(osv.osv):
|
|||
'journal_id': inv.journal_id.id,
|
||||
'period_id': inv.period_id.id,
|
||||
'partner_id': False,
|
||||
'ref': ref,
|
||||
'ref': inv.reference,
|
||||
'date': inv.date
|
||||
}
|
||||
if diff_currency_p:
|
||||
|
@ -318,7 +329,7 @@ class account_voucher(osv.osv):
|
|||
'journal_id': inv.journal_id.id,
|
||||
'period_id': inv.period_id.id,
|
||||
'partner_id': line.partner_id.id or False,
|
||||
'ref': ref,
|
||||
'ref': line.ref,
|
||||
'date': inv.date,
|
||||
'analytic_account_id': False
|
||||
}
|
||||
|
|
|
@ -206,5 +206,21 @@
|
|||
res_model="account.voucher"
|
||||
src_model="account.journal"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_review_voucher_list">
|
||||
<field name="name">Vouchers Entries</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('state','=','posted')]</field>
|
||||
<field name="context">{'state':'posted'}</field>
|
||||
<field name="search_view_id" ref="view_voucher_filter_new"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_action_review_voucher_list"
|
||||
action="action_review_voucher_list"
|
||||
parent="account.periodical_processing_journal_entries_validation" sequence="2"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -18,16 +18,14 @@
|
|||
<record id="act_proforma" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf"/>
|
||||
<field name="name">proforma</field>
|
||||
<field name="action">write({'state':'proforma'})
|
||||
open_voucher()</field>
|
||||
<field name="action">open_voucher()</field>
|
||||
<field name="kind">function</field>
|
||||
</record>
|
||||
|
||||
<record id="act_done" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf"/>
|
||||
<field name="name">done</field>
|
||||
<field name="action">write({'state':'posted'})
|
||||
proforma_voucher()</field>
|
||||
<field name="action">proforma_voucher()</field>
|
||||
<field name="kind">function</field>
|
||||
</record>
|
||||
|
||||
|
@ -48,7 +46,7 @@
|
|||
<record id="act_audit" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf"/>
|
||||
<field name="name">audit</field>
|
||||
<field name="action">write({'state':'audit'})</field>
|
||||
<field name="action">audit_pass()</field>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="kind">function</field>
|
||||
</record>
|
||||
|
|
|
@ -53,7 +53,6 @@ class account_voucher(osv.osv):
|
|||
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
diff_currency_p = inv.currency_id.id <> company_currency
|
||||
ref = inv.reference
|
||||
|
||||
journal = journal_pool.browse(cr, uid, inv.journal_id.id)
|
||||
if journal.sequence_id:
|
||||
|
@ -84,7 +83,7 @@ class account_voucher(osv.osv):
|
|||
'journal_id': inv.journal_id.id,
|
||||
'period_id': inv.period_id.id,
|
||||
'partner_id': False,
|
||||
'ref': ref,
|
||||
'ref': inv.reference,
|
||||
'date': inv.date
|
||||
}
|
||||
if diff_currency_p:
|
||||
|
@ -113,7 +112,7 @@ class account_voucher(osv.osv):
|
|||
'journal_id': inv.journal_id.id,
|
||||
'period_id': inv.period_id.id,
|
||||
'partner_id': line.partner_id.id or False,
|
||||
'ref': ref,
|
||||
'ref': line.ref,
|
||||
'date': inv.date,
|
||||
'analytic_account_id': False
|
||||
}
|
||||
|
@ -198,7 +197,8 @@ class account_voucher_line(osv.osv):
|
|||
|
||||
res.update({
|
||||
'amount': residual,
|
||||
'account_id': invoice.account_id.id
|
||||
'account_id': invoice.account_id.id,
|
||||
'ref':invoice.number
|
||||
})
|
||||
|
||||
return {
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<field name="city">Lausanne</field>
|
||||
<field name="partner_id" ref="bank"/>
|
||||
<field name="country_id" model="res.country" search="[('code','=','ch')]"/>
|
||||
<field name="title">M.</field>
|
||||
<field name="email">tinyerp@bank.com</field>
|
||||
<field name="phone">+41 24 620 10 12</field>
|
||||
<field name="street">PSE-C</field>
|
||||
|
@ -50,7 +49,6 @@
|
|||
<field name="city">Lausanne</field>
|
||||
<field name="partner_id" ref="camptocamp"/>
|
||||
<field name="country_id" model="res.country" search="[('code','=','ch')]"/>
|
||||
<field name="title">M.</field>
|
||||
<field name="email">tinyerp@camptocamp.com</field>
|
||||
<field name="phone">+41 21 619 10 12</field>
|
||||
<field name="street">PSE-A, EPFL</field>
|
||||
|
@ -63,7 +61,6 @@
|
|||
<field name="city">Carouge</field>
|
||||
<field name="partner_id" ref="prolibre"/>
|
||||
<field name="country_id" model="res.country" search="[('code','=','ch')]"/>
|
||||
<field name="title">M.</field>
|
||||
<field name="email">info@prolibre.com</field>
|
||||
<field name="phone">+41 22 3015383</field>
|
||||
<field name="street">18, rue des Moraines </field>
|
||||
|
@ -77,7 +74,6 @@
|
|||
<field name="city">Lausanne</field>
|
||||
<field name="partner_id" ref="camptocamp"/>
|
||||
<field name="country_id" model="res.country" search="[('name','=','Switzerland')]"/>
|
||||
<field name="title">M.</field>
|
||||
<field name="email">tinyerp@camptocamp.com</field>
|
||||
<field name="phone">+41 21 619 10 12 </field>
|
||||
<field name="street">PSE-A, EPFL</field>
|
||||
|
|
Loading…
Reference in New Issue