[MERGE]: Merge with account-view-imp

bzr revid: atp@tinyerp.com-20120716112849-xqtvh4n5636snomt
This commit is contained in:
Atul Patel (OpenERP) 2012-07-16 16:58:49 +05:30
commit ddbb0b06e9
39 changed files with 668 additions and 500 deletions

View File

@ -197,7 +197,7 @@ class account_cash_statement(osv.osv):
'account.bank.statement.line': (_get_statement, ['amount'], 10),
}),
'closing_date': fields.datetime("Closed On"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Closing Balance', help="Closing balance based on cashBox"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Total', help="Closing balance based on cashBox"),
'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
'user_id': fields.many2one('res.users', 'Responsible', required=False),

View File

@ -177,11 +177,11 @@
domain="[('supplier', '=', True)]"/>
<field name="fiscal_position" widget="selection"/>
<field name="origin"/>
<label for="reference_type"/>
<div>
<label for="reference_type"/>
<div>
<field name="reference_type" class="oe_inline oe_edit_only"/>
<field name="reference" class="oe_inline"/>
</div>
</div>
</group>
<group>
<field name="date_invoice"/>
@ -322,11 +322,9 @@
<field name="fiscal_position" widget="selection" />
</group>
<group>
<field name="date_invoice"/>
<field name="journal_id" groups="account.group_account_user"
on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]"
name="account_id" groups="account.group_account_user"/>
@ -342,7 +340,6 @@
</group>
</group>
<field name="sent" invisible="1"/>
<notebook colspan="4">
<page string="Invoice Lines">
<field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}"/>

View File

@ -17,7 +17,6 @@
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar" nolabel="1" />
</header>
<sheet string="Fiscalyear" >
<group>
<group>
<field name="name"/>
@ -38,10 +37,10 @@
<field name="date_start"/>
<field name="date_stop"/>
<field name="special"/>
<field name="state" invisible="1"/>
</group>
</form>
</field>
</sheet>
</form>
</field>
</record>
@ -99,21 +98,29 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="action_draft" states="done" string="Set to Draft" type="object" groups="account.group_account_manager"/>
<field name="state" widget="statusbar" nolabel="1"/>
</header>
<sheet>
<group col="4">
<field name="name"/>
<field name="code"/>
<field name="date_start"/>
<field name="date_stop"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="fiscalyear_id" widget="selection"/>
<field name="special"/>
</group>
</sheet>
<header>
<button name="action_draft" states="done" string="Set to Draft" type="object" groups="account.group_account_manager"/>
<field name="state" widget="statusbar" nolabel="1"/>
</header>
<sheet>
<group>
<group>
<field name="name"/>
<field name="fiscalyear_id" widget="selection"/>
<label for="date_start" string="Duration" />
<div>
<field name="date_start" class="oe_inline" nolabel="1"/>
<span attr="{'invisible': [('date_stop','=',False)]}"> - </span>
<field name="date_stop" nolabel="1" class="oe_inline"/>
</div>
</group>
<group>
<field name="code"/>
<field name="special"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
@ -464,41 +471,39 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Journal" version="7.0">
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<label for="type" class="oe_edit_only"/>
<h2><field name="type" on_change="onchange_type(type, currency, context)"/></h2>
</div>
<group>
<field name="name"/>
<field name="type" on_change="onchange_type(type, currency, context)"/>
</group>
<notebook>
<page string="Journal Configuration">
<group>
<group>
<field name="code"/>
<field name="currency"/>
</group>
<group>
<field name="company_id" groups="base.group_multi_company"/>
<field name="user_id"/>
</group>
<group>
<field name="default_debit_account_id" attrs="{'required':[('type','in', ('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="view_id" widget="selection"/>
<field name="sequence_id" required="0"/>
</group>
<group>
<field name="centralisation"/>
<field name="entry_posted"/>
<field name="allow_date"/>
<field name="group_invoice_lines"/>
</group>
<group>
<field name="type_control_ids" widget="many2many_tags"/>
<field name="account_control_ids" widget="many2many_tags"/>
</group>
</group>
</page>
<page string="Journal Configuration">
<group>
<group>
<field name="code"/>
<field name="currency"/>
</group>
<group>
<field name="company_id" groups="base.group_multi_company"/>
<field name="user_id"/>
</group>
<group>
<field name="default_debit_account_id" attrs="{'required':[('type','in', ('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="view_id" widget="selection"/>
<field name="sequence_id" required="0"/>
</group>
<group>
<field name="centralisation"/>
<field name="entry_posted"/>
<field name="allow_date"/>
<field name="group_invoice_lines"/>
</group>
<group>
<field name="type_control_ids" widget="many2many_tags"/>
<field name="account_control_ids" widget="many2many_tags"/>
</group>
</group>
</page>
</notebook>
</form>
</field>
@ -598,14 +603,24 @@
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
</header>
<sheet>
<div class="oe_right oe_button_box" name="import_buttons">
<!-- Put here related buttons -->
</div>
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" class="oe_inline"/>-
<field name="period_id" class="oe_inline"/>
</h1>
<label for="journal_id" class="oe_edit_only"/>
<h2>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
</h2>
<group>
<group>
<field name="name"/>
<field name="date" on_change="onchange_date(date, company_id)"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="period_id"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
</group><group>
</group>
<group>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="currency" invisible="1"/>
@ -1011,69 +1026,74 @@
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<form string="Journal Item" version="7.0">
<group col="6">
<field name="name"/>
<field name="ref"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
</group>
<notebook colspan="4">
<page string="Information">
<group>
<group string="Amount">
<field name="account_id" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
<field name="debit"/>
<field name="credit"/>
<field name="quantity"/>
</group>
<group string="Accounting Documents">
<field name="invoice" readonly="True"/>
<field name="move_id" required="False"/>
<field name="statement_id" readonly="True"/>
</group>
<group string="Dates">
<field name="date"/>
<field name="date_maturity"/>
<field name="date_created" readonly="True"/>
</group>
<group string="Taxes">
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
</group>
<group attrs="{'readonly':[('state','=','valid')]}" string="Currency">
<field name="currency_id"/>
<field name="amount_currency"/>
</group>
<group string="Reconciliation">
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
</group>
<group string="States">
<field name="state"/>
<field name="blocked"/>
</group>
<group groups="analytic.group_analytic_accounting" string="Analytic">
<field name="analytic_account_id" domain="[('parent_id','!=',False)]"/>
</group>
</group>
<separator string="Internal Note" colspan="4"/>
<field name="narration" colspan="4" nolabel="1"/>
</page>
<page string="Analytic Lines" groups="analytic.group_analytic_accounting">
<field name="analytic_lines" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
</page>
</notebook>
<sheet>
<group>
<group>
<field name="name"/>
<field name="ref"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
</group>
<group>
<field name="journal_id"/>
<field name="period_id"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
</group>
</group>
<notebook colspan="4">
<page string="Information">
<group>
<group string="Amount">
<field name="account_id" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
<field name="debit"/>
<field name="credit"/>
<field name="quantity"/>
</group>
<group string="Accounting Documents">
<field name="invoice" readonly="True"/>
<field name="move_id" required="False"/>
<field name="statement_id" readonly="True"/>
</group>
<group string="Dates">
<field name="date"/>
<field name="date_maturity"/>
<field name="date_created" readonly="True"/>
</group>
<group string="Taxes">
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
</group>
<group attrs="{'readonly':[('state','=','valid')]}" string="Currency">
<field name="currency_id"/>
<field name="amount_currency"/>
</group>
<group string="Reconciliation">
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
</group>
<group string="States">
<field name="state"/>
<field name="blocked"/>
</group>
<group groups="analytic.group_analytic_accounting" string="Analytic">
<field name="analytic_account_id" domain="[('parent_id','!=',False)]"/>
</group>
</group>
<separator string="Internal Note" colspan="4"/>
<field name="narration" colspan="4" nolabel="1"/>
</page>
<page string="Analytic Lines" groups="analytic.group_analytic_accounting">
<field name="analytic_lines" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@ -1273,16 +1293,20 @@
<field name="state" widget="statusbar"/>
</header>
<sheet string="Journal Entries" >
<group col="4">
<field name="name" readonly="True"/>
<field name="ref"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="to_check"/>
<field name="date"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="partner_id" invisible="1"/>
<field name="amount" invisible="1"/>
<group>
<group>
<field name="name" readonly="True"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="partner_id" invisible="1"/>
</group>
<group>
<field name="ref"/>
<field name="date"/>
<field name="to_check"/>
<field name="amount" invisible="1"/>
</group>
</group>
<notebook>
<page string="Journal Items">
@ -1374,8 +1398,7 @@
<field name="reconcile_partial_id"/>
</tree>
</field>
<separator string="Internal Note"/>
<field name="narration" colspan="4" nolabel="1" height="50"/>
<field name="narration" colspan="4" placeholder="Add an internal note." nolabel="1" height="50"/>
</page>
</notebook>
</sheet>
@ -1835,16 +1858,11 @@
<field name="model_id"/>
<field name="ref"/>
</group>
<newline/>
<group string="Starts on">
<group>
<field name="date_start"/>
<field name="period_total"/>
</group>
<group string="Valid Up to">
<field name="period_nbr"/>
<field name="period_type"/>
<field name="period_nbr"/>
<field name="period_total"/>
</group>
</group>
<separator string="Subscription Lines"/>
@ -2547,15 +2565,24 @@ action = pool.get('res.config').next(cr, uid, [], context)
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</header>
<sheet string="Statement">
<group col="4">
<field name="name"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="user_id" readonly="1"/>
<field name="period_id"/>
<field name="currency" invisible="1"/>
<label for="name" class="oe_edit_only"/>
<h1><field name="name" class="oe_inline"/>-<field name="period_id" class="oe_inline"/></h1>
<label for="journal_id" class="oe_edit_only"/>
<h2>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
</h2>
<group>
<group>
<field name="user_id" readonly="1" string="Responsible"/>
<field name="total_entry_encoding"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
</group>
<group>
<field name="date" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_date(date, company_id)"/>
<field name="closing_date" readonly="1"/>
<field name="currency" invisible="1"/>
</group>
</group>
<notebook>
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
<field name="line_ids" context="{'date':date}">
@ -2588,51 +2615,55 @@ action = pool.get('res.config').next(cr, uid, [], context)
</field>
</page>
<page string="CashBox">
<group>
<field name="starting_details_ids" attrs="{'readonly':[('state','!=','draft')]}" nolabel="1">
<tree string = "Opening Balance" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Opening Balance" version="7.0">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
<field name="ending_details_ids" attrs="{'readonly':[('state','!=','open')]}" nolabel="1">
<tree string = "Closing Balance" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Closing Balance" version="7.0">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
<group col="4">
<group>
<group string="Opening Operations">
<field name="starting_details_ids" attrs="{'readonly':[('state','!=','draft')]}" nolabel="1">
<tree string = "Opening Balance" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Opening Balance" version="7.0">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
</group>
<newline/>
<group class="oe_subtotal_footer oe_right">
<field name="balance_start" readonly="1" string="Total"/>
<field name="total_entry_encoding"/>
</group>
</group>
<group>
<group string="Closing Operations">
<field name="ending_details_ids" attrs="{'readonly':[('state','!=','open')]}" nolabel="1">
<tree string = "Closing Balance" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal" sum="Total"/>
</tree>
<form string = "Closing Balance" version="7.0">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
<field name="subtotal"/>
</form>
</field>
</group>
<newline/>
<group class="oe_subtotal_footer oe_right">
<field name="balance_end" />
<field name="balance_end_cash"/>
</group>
</group>
</group>
</page>
<page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
<field name="move_line_ids" string="Journal Entries"/>
</page>
</notebook>
<group col="3">
<group string="Dates">
<field name="date" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_date(date, company_id)"/>
<field name="closing_date" readonly="1"/>
</group>
<group string="Opening Balance">
<field name="balance_start" readonly="1" string="Opening Balance"/>
<field name="total_entry_encoding"/>
</group>
<group string="Closing Balance">
<field name="balance_end"/>
<field name="balance_end_cash"/>
</group>
</group>
</sheet>
</form>
</field>

View File

@ -8,8 +8,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reconciliation" version="7.0">
<separator string="Reconciliation"/>
<label string="For an invoice to be considered as paid, the invoice entries must be reconciled with counterparts, usually payments. With the automatic reconciliation functionality, OpenERP makes its own search for entries to reconcile in a series of accounts. It finds entries for each partner where the amounts correspond."/>
<field name="account_ids" domain="[('reconcile','=',1)]"/>
<group col="4">
<field name="power"/>

View File

@ -7,13 +7,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account charts" version="7.0">
<group colspan="4">
<field name="fiscalyear" on_change="onchange_fiscalyear(fiscalyear)"/>
<group>
<label for="fiscalyear"/>
<div>
<field name="fiscalyear" on_change="onchange_fiscalyear(fiscalyear)" class="oe_inline"/>
<label align="0.7" string="(If you do not select Fiscal year it will take all open fiscal years)" class="oe_inline"/>
</div>
<field name="target_move"/>
<label align="0.7" colspan="4" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
<separator string="Periods" colspan="4"/>
<field name="period_from"/>
<field name="period_to"/>
<label for="period_from" string="Periods"/>
<div>
<field name="period_from" class="oe_inline"/>-
<field name="period_to" class="oe_inline"/>
</div>
</group>
<footer>
<button string="Open Charts" name="account_chart_open_window" type="object" class="oe_highlight"/>
@ -25,7 +30,7 @@
</record>
<record id="action_account_chart" model="ir.actions.act_window">
<field name="name">Chart of Accounts</field>
<field name="name">Select an Accounting Setup</field>
<field name="res_model">account.chart</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@ -36,6 +41,7 @@
<menuitem icon="STOCK_INDENT" action="action_account_chart"
id="menu_action_account_tree2"
name="Chart of Accounts"
parent="account.menu_finance_charts" />
</data>
</openerp>

View File

@ -30,7 +30,7 @@ class account_fiscalyear_close_state(osv.osv_memory):
_description = "Fiscalyear Close state"
_columns = {
'fy_id': fields.many2one('account.fiscalyear', \
'Fiscal Year to close', required=True, help="Select a fiscal year to close"),
'Fiscal Year to Close', required=True, help="Select a fiscal year to close"),
}
def data_save(self, cr, uid, ids, context=None):

View File

@ -7,15 +7,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Close states of Fiscal year and periods" version="7.0">
<header>
<button icon="terp-locked" string="Close Fiscalyear" name="data_save" type="object" class="oe_highlight" />
</header>
<separator string="Close states of Fiscal year and periods"/>
<label string ="If no additional entries should be recorded on a fiscal year, you can close it from here. It will close all opened periods in this year that will make impossible any new entry record. Close a fiscal year when you need to finalize your end of year results definitive "/>
<group>
<field name="fy_id" domain="[('state','=','draft')]"/>
</group>
</form>
<footer>
<button icon="terp-locked" string="Close Fiscal Year" name="data_save" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>

View File

@ -7,8 +7,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Generate Fiscal Year Opening Entries" version="7.0">
<separator string="Generate Fiscal Year Opening Entries"/>
<label string="This wizard will generate the end of year journal entries of selected fiscal year. Note that you can run this wizard many times for the same fiscal year: it will simply replace the old opening entries with the new ones."/>
<newline/>
<group col="4">
<field name="fy_id" domain = "[('state','=','draft')]"/>

View File

@ -102,22 +102,21 @@ class account_move_journal(osv.osv_memory):
period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name']
period_string = _("Period: %s") % tools.ustr(period)
separator_string = _("Open Journal Items !")
open_string = _("Open")
view = """<?xml version="1.0" encoding="utf-8"?>
<form string="Standard entries" version="7.0">
<header>
<button string="%s" name="action_open_window" default_focus="1" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<group string="%s">
<field name="target_move" />
<group>
<field name="target_move"/>
</group>
<label width="300" string="%s"/>
<newline/>
<label width="300" string="%s"/>
</form>""" % (open_string, separator_string, journal_string, period_string)
<footer>
<button string="%s" name="action_open_window" default_focus="1" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>""" % (journal_string, period_string, open_string)
view = etree.fromstring(view.encode('utf8'))
xarch, xfields = self._view_look_dom_arch(cr, uid, view, view_id, context=context)

View File

@ -13,10 +13,6 @@
<xpath expr="//field[@name='journal_ids']" position="replace">
<field name="journal_ids" colspan="4" nolabel="1" required="0" readonly="1"/>
</xpath>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="Trial Balance" colspan="4"/>
<label nolabel="1" colspan="4" string="This report allows you to print or generate a pdf of your trial balance allowing you to quickly check the balance of each of your accounts in a single report"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after">
<field name="display_account"/>
<newline/>

View File

@ -20,13 +20,13 @@
<group col="4">
<field name="filter" on_change="onchange_filter(filter, fiscalyear_id)"/>
</group>
<group string="Dates" col="4">
<field name="date_from" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/>
<field name="date_to" attrs="{'readonly':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" colspan="4"/>
<group string="Dates" attrs="{'invisible':[('filter', '!=', 'filter_date')], 'required':[('filter', '=', 'filter_date')]}" col="4" >
<field name="date_from" colspan="4"/>
<field name="date_to" colspan="4"/>
</group>
<group string="Periods" col="4">
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" colspan="4"/>
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]" attrs="{'readonly':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" colspan="4"/>
<group string="Periods" attrs="{'invisible':[('filter','!=','filter_period')], 'required':[('filter', '=', 'filter_period')]}" col="4">
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]" colspan="4"/>
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]" colspan="4"/>
</group>
</page>
<page string="Journals" name="journal_ids">

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml">
<data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="General Journals" colspan="4"/>
<label nolabel="1" colspan="4" string="This report gives you an overview of the situation of your general journals"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after">
<field name="amount_currency"/>
<newline/>

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml">
<data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="General Ledger" colspan="4"/>
<label nolabel="1" colspan="4" string="This report allows you to print or generate a pdf of your general ledger with details of all your account journals"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after">
<field name="display_account"/>
<field name="sortby"/>

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml">
<data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="Partner Balance" colspan="4"/>
<label nolabel="1" colspan="4" string="This report is an analysis done by a partner. It is a PDF report containing one line per partner representing the cumulative credit balance"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after">
<field name="result_selection"/>
<field name="display_partner"/>

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml">
<data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="Partner Ledger" colspan="4"/>
<label nolabel="1" colspan="4" string="This report is an analysis done by a partner. It is a PDF report containing one line per partner representing the cumulative credit balance"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after">
<field name="result_selection"/>
<field name="amount_currency"/>

View File

@ -9,10 +9,6 @@
<field name="inherit_id" ref="account_common_report_view" />
<field name="arch" type="xml">
<data>
<xpath expr="/form/label[@string='']" position="replace">
<separator string="Journals" colspan="4"/>
<label nolabel="1" colspan="4" string="This report gives you an overview of the situation of a specific journal"/>
</xpath>
<xpath expr="//field[@name='target_move']" position="after">
<field name="sort_selection"/>
<field name="amount_currency"/>

View File

@ -28,7 +28,7 @@ class account_subscription_generate(osv.osv_memory):
_name = "account.subscription.generate"
_description = "Subscription Compute"
_columns = {
'date': fields.date('Date', required=True),
'date': fields.date('Generate Entries Before', required=True),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),

View File

@ -8,8 +8,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Subscription Compute" version="7.0">
<separator string="Generate Entries before:"/>
<label string ="Automatically generate entries based on what has been entered in the system before a specific date."/>
<group>
<field name="date"/>
</group>

View File

@ -9,10 +9,13 @@
<field name="arch" type="xml">
<form string="Account tax charts" version="7.0">
<group>
<field name="period_id"/>
<label colspan="4" string="(If you do not select period it will take all open periods)"/>
<label for="period_id"/>
<div>
<field name="period_id" class="oe_inline"/>
<label string="(If you do not select period it will take all open periods)" class="oe_inline"/>
</div>
<field name="target_move"/>
</group>
</group>
<footer>
<button string="Open Charts" name="account_tax_chart_open_window" type="object" class="oe_highlight"/>
or

View File

@ -8,10 +8,8 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Entries From Models" version="7.0">
<separator string="This wizard will create recurring accounting entries"/>
<label string="Create manual recurring entries in a chosen journal."/>
<group>
<field name="model"/>
<group string="Create Entries From Models">
<field name="model" nolabel="1"/>
</group>
<footer>
<button string="Create Entries" name="create_entries" type="object" class="oe_highlight"/>

View File

@ -9,8 +9,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Post Journal Entries" version="7.0">
<separator string="Post Journal Entries of a Journal"/>
<label string="All draft account entries in this journal and period will be validated. It means you won't be able to modify their accounting fields anymore."/>
<group>
<field name="journal_id"/>
<field name="period_id"/>
@ -25,7 +23,7 @@
</record>
<record id="action_validate_account_move" model="ir.actions.act_window">
<field name="name">Open Journal</field>
<field name="name">Post Journal Entries</field>
<field name="res_model">validate.account.move</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>

View File

@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- rename root menu "Accounting" -->
<record id="account.menu_finance" model="ir.ui.menu">
<field name="name">Accounting</field>
</record>
<!--
It's easier for new users to not activate this (ex: they misconfigure
header and footer.)

View File

@ -213,13 +213,13 @@ class account_asset_asset(osv.osv):
_columns = {
'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
'name': fields.char('Asset', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
'name': fields.char('Asset Name', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}),
'purchase_value': fields.float('Gross value ', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'purchase_value': fields.float('Gross Value', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'note': fields.text('Note'),
'category_id': fields.many2one('account.asset.category', 'Asset category', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
'category_id': fields.many2one('account.asset.category', 'Asset Category', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
'parent_id': fields.many2one('account.asset.asset', 'Parent Asset', readonly=True, states={'draft':[('readonly',False)]}),
'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'),
'purchase_date': fields.date('Purchase Date', required=True, readonly=True, states={'draft':[('readonly',False)]}),
@ -316,6 +316,16 @@ class account_asset_asset(osv.osv):
asset_id = super(account_asset_asset, self).create(cr, uid, vals, context=context)
self.compute_depreciation_board(cr, uid, [asset_id], context=context)
return asset_id
def open_entries(self, cr, uid, ids, context=None):
return {
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.move.line',
'view_id': False,
'type': 'ir.actions.act_window',
'context':{'search_default_asset_id': ids, 'default_asset_id': ids},
}
account_asset_asset()
@ -331,7 +341,7 @@ class account_asset_depreciation_line(osv.osv):
_columns = {
'name': fields.char('Depreciation Name', size=64, required=True, select=1),
'sequence': fields.integer('Sequence of the depreciation', required=True),
'sequence': fields.integer('Sequence', required=True),
'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True),
'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
'amount': fields.float('Depreciation Amount', required=True),

View File

@ -70,7 +70,7 @@
</search>
</field>
</record>
<!--
Asset
-->
@ -88,60 +88,87 @@
<field name="state" widget="statusbar" statusbar_visible="draft,open"/>
</header>
<sheet>
<label for="name"/>
<h1><field name="name"/></h1>
<label for="category_id"/>
<h2><field name="category_id" on_change="onchange_category_id(category_id)"/></h2>
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" class="oe_inline"/> -
<field name="code" class="oe_inline" placeholder="Reference"/>
<button name="open_entries" string="Entries" type="object" class="oe_inline"/>
</h1>
<label for="category_id" class="oe_edit_only"/>
<h2>
<field name="category_id" on_change="onchange_category_id(category_id)"/>
</h2>
<group>
<group>
<field name="parent_id"/>
<field name="partner_id"/>
</group>
<group>
<field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
<field name="purchase_date"/>
<field name="currency_id"/>
</group>
</group>
<notebook colspan="4">
<page string="General">
<group>
<group>
<field name="code"/>
<field name="company_id" widget="selection"
groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
</group>
<group>
<field name="purchase_value"/>
<field name="salvage_value"/>
<field name="value_residual"/>
<field name="currency_id"/>
</group>
<group>
<field name="partner_id"/>
<field name="purchase_date"/>
<field name="parent_id"/>
</group>
<group>
<field name="method_time" on_change="onchange_method_time(method_time)"/>
<field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/>
<field name="method_period"/>
<field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
<button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" colspan="2"/>
</group>
<group>
<field name="method"/>
<field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
<field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
</group>
</group>
<group>
<group>
<field name="purchase_value"/>
<field name="salvage_value"/>
<field name="value_residual"/>
</group>
<group>
<field name="method"/>
<field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
<field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
</group>
</group>
<group>
<group>
<field name="method_time" on_change="onchange_method_time(method_time)"/>
<field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/>
<field name="method_period"/>
<field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
<button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" colspan="2"/>
</group>
</group>
</page>
<page string="Depreciation Board">
<field name="depreciation_line_ids" mode="tree,graph">
<tree string="Depreciation Lines" colors="blue:(move_check == False);black:(move_check == True)">
<field name="depreciation_date"/>
<field name="sequence" invisible="1"/>
<field name="depreciated_value" readonly="1"/>
<field name="amount"/>
<field name="remaining_value" readonly="1"/>
<field name="move_check"/>
<field name="parent_state" invisible="1"/>
<button name="create_move" attrs="{'invisible':['|',('move_check','!=',False),('parent_state','!=','open')]}" icon="gtk-execute" string="Create Move" type="object"/>
</tree>
<graph type="bar">
<field name="name"/>
<field name="amount"/>
<field name="depreciated_value"/>
</graph>
<tree string="Depreciation Lines" colors="blue:(move_check == False);black:(move_check == True)">
<field name="depreciation_date"/>
<field name="sequence" invisible="1"/>
<field name="depreciated_value" readonly="1"/>
<field name="amount"/>
<field name="remaining_value" readonly="1"/>
<field name="move_check"/>
<field name="parent_state" invisible="1"/>
<button name="create_move" attrs="{'invisible':['|',('move_check','!=',False),('parent_state','!=','open')]}" icon="gtk-execute" string="Create Move" type="object"/>
</tree>
<form string="Depriciation Lines">
<group>
<group>
<field name="asset_id" invisible="1"/>
<field name="parent_state" invisible="1"/>
<field name="name"/>
<field name="amount"/>
<field name="move_id"/>
<field name="move_check"/>
<field name="parent_state" invisible="1"/>
</group>
<group>
<field name="sequence"/>
<field name="depreciation_date"/>
<field name="depreciated_value" readonly="1"/>
<field name="remaining_value" readonly="1"/>
</group>
</group>
</form>
<graph type="bar">
<field name="name"/>
<field name="amount"/>
<field name="depreciated_value"/>
</graph>
</field>
<button type="object" name="compute_depreciation_board" string="Compute" icon="terp-stock_format-scientific" colspan="2" attrs="{'invisible':[('state','=','close')]}"/>
</page>
@ -153,11 +180,11 @@
<field name="note"/>
</page>
</notebook>
</sheet>
</form>
</field>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_account_asset_asset_tree">
<field name="name">account.asset.asset.tree</field>
<field name="model">account.asset.asset</field>

View File

@ -7,8 +7,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Compute Asset" version="7.0">
<separator string="Post Depreciation Lines"/>
<label string="This wizard will post the depreciation lines of running assets that belong to the selected period."/>
<group>
<field name="period_id"/>
</group>

View File

@ -108,48 +108,68 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form version="7.0">
<header>
<button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
<button string="Approve" name="validate" states="confirm" type="workflow" class="oe_highlight"/>
<button string="Done" name="done" states="validate" type="workflow" class="oe_highlight"/>
<button name="draft" states="cancel" string="Reset to Draft" type="workflow" />
<button string="Cancel" name="cancel" states="confirm,validate" type="workflow"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
</header>
<sheet string="Budget">
<group col="4">
<field name="name" colspan="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="code" colspan="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="date_from" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="date_to" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="crossovered_budget_line" colspan="4" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
<tree string="Budget Lines">
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="general_budget_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="paid_date"/>
<field name="planned_amount" sum="Planned Amount"/>
<field name="practical_amount" sum="Practical Amount"/>
<field name="theoritical_amount" sum="Theoretical Amount"/>
<field name="percentage"/>
</tree>
<form string="Budget Lines" version="7.0">
<group col="4">
<header>
<button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
<button string="Approve" name="validate" states="confirm" type="workflow" class="oe_highlight"/>
<button string="Done" name="done" states="validate" type="workflow" class="oe_highlight"/>
<button name="draft" states="cancel" string="Reset to Draft" type="workflow" />
<button string="Cancel" name="cancel" states="confirm,validate" type="workflow"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
</header>
<sheet string="Budget">
<group col="4">
<group>
<field name="name" colspan="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="creating_user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="validating_user_id" readonly="True" attrs="{'readonly':[('state','!=','draft')]}"/>
</group>
<group>
<field name="code" colspan="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<label for="date_from" string="Duration"/>
<div>
<field name="date_from" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}"/>
<span attrs="{'invisible':[('date_to','=',False)]}" class="oe_inline"> - </span>
<field name="date_to" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}" nolabel="1"/>
</div>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
</group>
<notebook>
<page string="Budget Lines">
<field name="crossovered_budget_line" colspan="4" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
<tree string="Budget Lines">
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="general_budget_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="paid_date"/>
<field name="planned_amount"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</form>
</field>
</group>
<field name="planned_amount" sum="Planned Amount"/>
<field name="practical_amount" sum="Practical Amount"/>
<field name="theoritical_amount" sum="Theoretical Amount"/>
<field name="percentage"/>
</tree>
<form string="Budget Lines" version="7.0">
<group>
<group>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="general_budget_id"/>
<field name="planned_amount"/>
<label for="date_from" string="Duration"/>
<div>
<field name="date_from" class="oe_inline"/>
<span attrs="{'invisible':[('date_to','=',False)]}" class="oe_inline"> - </span>
<field name="date_to" class="oe_inline"/>
</div>
</group>
<group>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="paid_date"/>
</group>
</group>
</form>
</field>
</page>
</notebook>
</sheet>
</form>
</field>

View File

@ -2,26 +2,140 @@
<openerp>
<data>
<!-- Supplier voucher view -->
<!-- Supplier write check view -->
<record model="ir.ui.view" id="view_vendor_payment_check_form">
<field name="name">account.voucher.payment.check.form</field>
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="inherit_id" ref="account_voucher.view_vendor_payment_form" />
<field name="arch" type="xml">
<field name="journal_id" position="after">
<newline/>
<field name="allow_check" invisible="1"/>
<field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="6"/>
<newline/>
</field>
<field name="number" position="replace">
<field name="number" attrs="{'readonly':[('allow_check','!=',1)]}" />
</field>
<button name="proforma_voucher" position="after">
<button name="print_check" icon="gtk-print" string="Print Check" type="object" attrs="{'invisible':['|',('allow_check','!=',1),('state','!=','posted') ]}" class="oe_highlight"/>
</button>
<form version="7.0">
<header>
<button name="proforma_voucher" string="Validate" states="draft" invisible="context.get('line_type', False)"/>
<button name="print_check" icon="gtk-print" string="Print Check" type="object" attrs="{'invisible':['|',('allow_check','!=',1),('state','!=','posted') ]}" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" invisible="context.get('line_type', False)"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet string="Bill Payment">
<group>
<group>
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id, 'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" string="Supplier"/>
<label for="amount" string="Total"/>
<div>
<field name="amount" class="oe_inline" invisible="context.get('line_type', False)" 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_in_word" class="oe_inline" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="1"/>
</div>
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
</group>
<group>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection"
on_change="onchange_journal(journal_id, line_dr_ids, False, partner_id, date, amount, type, company_id, context)"
string="Payment Method"/>
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="003/10"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="Invoice SAJ/0042"/>
<field name="allow_check" invisible="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="account_id"
widget="selection"
invisible="True"/>
<field name="pre_line" invisible="1"/>
<field name="type" invisible="True"/>
<field name="currency_id" invisible="1" colspan="4"/>
</group>
</group>
<notebook>
<page string="Payment Information">
<field name="line_dr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
<tree string="Supplier Invoices and Outstanding transactions" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"
/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','payable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)"/>
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)"/>
</tree>
</field>
<field name="line_cr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}">
<tree string="Credits" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"
/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','payable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)"/>
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)"/>
</tree>
</field>
<group>
<group string="Internal Notes">
<field name="narration" colspan="2" nolabel="1"/>
</group>
<group>
<group col="4" attrs="{'invisible':[('currency_id','=',False),('is_multi_currency','=',False)]}">
<separator string="Currency Options" colspan="4"/>
<field name="is_multi_currency" invisible="1"/>
<field name="payment_rate" required="1" on_change="onchange_rate(payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context)" colspan="3"/>
<field name="payment_rate_currency_id" colspan="1" nolabel="1" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)"/>
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
</group>
<group col="2">
<separator string="Payment Options" colspan="2"/>
<field name="writeoff_amount"/>
<field name="payment_option" required="1"/>
<field name="writeoff_acc_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
domain="[('type','=','other')]"/>
<field name="comment"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="analytic_id"
groups="analytic.group_analytic_accounting"/>
</group>
</group>
</group>
</page>
<page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
<group col="4">
<field name="period_id"/>
<field name="audit"/>
<field name="number" attrs="{'readonly':[('allow_check','!=',1)]}" />
</group>
<field name="move_ids" readonly="1">
<tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
<field name="amount_currency"/>
<field name="currency_id"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

View File

@ -14,7 +14,7 @@
or
<button string="Cancel" class="oe_link" special="cancel"/>
</header>
<group col="2" string="Select Your File :">
<group col="2">
<field name="coda_data" filename="coda_fname"/>
<field name="coda_fname"/>
</group>

View File

@ -31,7 +31,7 @@ class account_followup_print(osv.osv_memory):
_description = 'Print Follow-up & Send Mail to Customers'
_columns = {
'date': fields.date('Follow-up Sending Date', required=True, help="This field allow you to select a forecast date to plan your follow-ups"),
'followup_id': fields.many2one('account_followup.followup', 'Follow-up', required=True),
'followup_id': fields.many2one('account_followup.followup', 'Follow-Up', required=True),
}
def _get_followup(self, cr, uid, context=None):
@ -121,10 +121,10 @@ class account_followup_print_all(osv.osv_memory):
_description = 'Print Follow-up & Send Mail to Customers'
_columns = {
'partner_ids': fields.many2many('account_followup.stat.by.partner', 'partner_stat_rel', 'osv_memory_id', 'partner_id', 'Partners', required=True),
'email_conf': fields.boolean('Send email confirmation'),
'email_conf': fields.boolean('Send Email Confirmation'),
'email_subject': fields.char('Email Subject', size=64),
'partner_lang': fields.boolean('Send Email in Partner Language', help='Do not change message text, if you want to send email in partner language, or configure from company'),
'email_body': fields.text('Email body'),
'email_body': fields.text('Email Body'),
'summary': fields.text('Summary', required=True, readonly=True),
'test_print': fields.boolean('Test Print', help='Check if you want to print follow-ups without changing follow-ups level.')
}

View File

@ -8,8 +8,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Send follow-ups" version="7.0">
<separator string="Send Follow-ups"/>
<label string ="This feature allows you to send reminders to partners with pending invoices. You can send them the default message for unpaid invoices or manually enter a message should you need to remind them of a specific information."/>
<group col="4">
<field name="followup_id"/>
<field name="date"/>
@ -24,7 +22,7 @@
</record>
<record id="action_account_followup_print" model="ir.actions.act_window">
<field name="name">Send follow-ups</field>
<field name="name">Send Follow-Ups</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.followup.print</field>
<field name="view_type">form</field>
@ -76,7 +74,7 @@
<field name="model">account.followup.print.all</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Send follow-ups" version="7.0">
<form string="Send Follow-Ups" version="7.0">
<header>
<button name="do_mail" string="Send Mails" type="object" class="oe_highlight"/>
<button name="do_print" string="Print Follow Ups" type="object" class="oe_highlight"/>
@ -93,7 +91,6 @@
<field name="partner_lang" colspan="4"/>
<field name="test_print" colspan="4"/>
<field name="email_subject" colspan="4"/>
<separator string="Email Body" colspan="4" />
<field name="email_body" colspan="4" nolabel="1"/>
</group>
<group string="Legend">
@ -125,7 +122,7 @@
</record>
<record id="action_account_followup_print_all" model="ir.actions.act_window">
<field name="name">Send follow-ups</field>
<field name="name">Send Follow-Ups</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.followup.print.all</field>
<field name="view_type">form</field>

View File

@ -87,9 +87,9 @@ class payment_order(osv.osv):
return res
_columns = {
'date_scheduled': fields.date('Scheduled date if fixed', states={'done':[('readonly', True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
'date_scheduled': fields.date('Scheduled Date', states={'done':[('readonly', True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
'reference': fields.char('Reference', size=128, required=1, states={'done': [('readonly', True)]}),
'mode': fields.many2one('payment.mode', 'Payment mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'),
'mode': fields.many2one('payment.mode', 'Payment Mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'),
'state': fields.selection([
('draft', 'Draft'),
('cancel', 'Cancelled'),
@ -98,14 +98,14 @@ class payment_order(osv.osv):
help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'),
'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
'total': fields.function(_total, string="Total", type='float'),
'user_id': fields.many2one('res.users', 'User', required=True, states={'done': [('readonly', True)]}),
'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),
'date_prefered': fields.selection([
('now', 'Directly'),
('due', 'Due date'),
('fixed', 'Fixed date')
], "Preferred date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
'date_created': fields.date('Creation date', readonly=True),
'date_done': fields.date('Execution date', readonly=True),
], "Preferred Date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
'date_created': fields.date('Creation Date', readonly=True),
'date_done': fields.date('Execution Date', readonly=True),
'company_id': fields.related('mode', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}

View File

@ -112,16 +112,20 @@
<button name="cancel" states="draft,open" string="Cancel"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open"/>
</header>
<sheet string="Payment order" >
<group col="4">
<field name="reference"/>
<field name="mode" widget='selection'/>
<field name="user_id"/>
<field name="date_prefered"/>
<field name="date_scheduled" attrs="{'readonly':[('date_prefered','!=','fixed')]}" />
<field name="company_id" widget='selection' groups="base.group_multi_company"/>
<button name="%(action_create_payment_order)d" string="Select Invoices to Pay"
type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
<sheet string="Payment order">
<group>
<group>
<field name="reference"/>
<field name="user_id"/>
<field name="mode"/>
<button name="%(action_create_payment_order)d" string="Select Invoices to Pay"
type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
</group>
<group>
<field name="date_prefered"/>
<field name="date_scheduled" attrs="{'readonly':[('date_prefered','!=','fixed')]}"/>
<field name="company_id" widget='selection' groups="base.group_multi_company"/>
</group>
</group>
<field name="line_ids" context="{'order_id': active_id or False}" >
<form string="Payment Line" version="7.0">
@ -330,9 +334,9 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<field name="journal_id" position="after">
<button name="%(action_account_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import payment lines" type="action" icon="gtk-execute"/>
</field>
<xpath expr="//div[@name='import_buttons']" position="inside">
<button name="%(action_account_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import Payment Lines" type="action" icon="gtk-execute"/>
</xpath>
</field>
</record>

View File

@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<field name="to_check" position="after">
<field name="period_id" position="after">
<field name="internal_sequence_number"/>
</field>
</field>
@ -44,7 +44,7 @@
<field name="inherit_id" ref="account.view_account_move_filter"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='ref']" position="before">
<xpath expr="//field[@name='name']" position="before">
<field name="internal_sequence_number"/>
</xpath>
</data>

View File

@ -42,82 +42,83 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="proforma_voucher" string="Post" states="draft" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to unreconcile this record?"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" />
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet string="Accounting Voucher">
<group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/>
<field name="journal_id" widget="selection" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="type" required="1"/>
<field name="name" colspan="2"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="reference"/>
<field name="account_id" widget="selection" invisible="True"/>
</group>
<notebook colspan="4">
<page string="Voucher Entry">
<field name="line_ids" on_change="onchange_price(line_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
<tree string="Voucher Items" editable="bottom">
<field name="account_id"/>
<field name="name"/>
<field name="amount" sum="Total Amount"/>
<field name="type"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</tree>
</field>
<group col="3">
<group string="Internal Notes">
<field name="narration" colspan="2" nolabel="1"/>
</group>
<group string="Other Information">
<field name="number"/>
<field name="currency_id"/>
</group>
<group col="4" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
<separator string="Total" colspan="4"/>
<field name="tax_id" on_change="onchange_price(line_ids, tax_id, partner_id)" widget="selection"/>
<field name="tax_amount" nolabel="1"/>
<button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
<label colspan="1" string=""/><field name="amount" string="Total"/>
</group>
</group>
</page>
<page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
<group col="4">
<field name="period_id"/>
<field name="audit"/>
</group>
<field name="move_ids" readonly="1">
<tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
</div>
<header>
<button name="proforma_voucher" string="Post" states="draft" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to unreconcile this record?"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" />
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet string="Accounting Voucher">
<group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="payment_rate_currency_id" invisible="1"/>
<field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/>
<field name="journal_id" widget="selection" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="type" required="1"/>
<field name="name" colspan="2"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="reference"/>
<field name="account_id" widget="selection" invisible="True"/>
</group>
<notebook colspan="4">
<page string="Voucher Entry">
<field name="line_ids" on_change="onchange_price(line_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
<tree string="Voucher Items" editable="bottom">
<field name="account_id"/>
<field name="name"/>
<field name="amount" sum="Total Amount"/>
<field name="type"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</tree>
</field>
<group col="3">
<group string="Internal Notes">
<field name="narration" colspan="2" nolabel="1"/>
</group>
<group string="Other Information">
<field name="number"/>
<field name="currency_id"/>
</group>
<group col="4" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
<separator string="Total" colspan="4"/>
<field name="tax_id" on_change="onchange_price(line_ids, tax_id, partner_id)" widget="selection"/>
<field name="tax_amount" nolabel="1"/>
<button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
<label colspan="1" string=""/><field name="amount" string="Total"/>
</group>
</group>
</page>
<page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
<group col="4">
<field name="period_id"/>
<field name="audit"/>
</group>
<field name="move_ids" readonly="1">
<tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_voucher_filter" model="ir.ui.view">
<field name="name">account.voucher.select</field>
<field name="model">account.voucher</field>
@ -209,11 +210,11 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<field name="currency" invisible="1" position="after">
<button name="%(action_view_account_statement_from_invoice_lines)d"
<xpath expr="//div[@name='import_buttons']" position="inside">
<button name="%(action_view_account_statement_from_invoice_lines)d"
string="Import Invoices" type="action" icon="gtk-execute"
attrs="{'invisible':[('state','=','confirm')]}"/>
</field>
</xpath>
</field>
</record>

View File

@ -113,7 +113,7 @@
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</tree>
</field>
<group>
<group>
<field name="narration" placeholder="Internal Notes" nolabel="1"/>
<group class="oe_subtotal_footer oe_right">
<field name="tax_id"
@ -125,11 +125,11 @@
<button type="object" class="oe_link oe_edit_only"
name="compute_tax" string="(update)"
attrs="{'invisible': [('state','!=','draft')]}"/>
</div>
</div>
<field name="tax_amount" nolabel="1"/>
<field name="amount" class="oe_subtotal_footer_separator" />
</group>
<group>
<group>
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
<field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
<field name="account_id"
@ -138,7 +138,7 @@
<field name="reference"
attrs="{'invisible':[('pay_now','!=','pay_now')]}"/>
</group>
</group>
</group>
</page>
<page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
<group col="4">

View File

@ -11,8 +11,9 @@
<field name="arch" type="xml">
<field name="payment_term" position="after">
<group col="4" colspan="2">
<!-- "algorithm" not a field in any account related module.so pass it as False argument in generate_bbacomm() function. -->
<field name="reference_type" nolabel="1" size="0" attrs="{'readonly':[('state','!=','draft')]}"
on_change="generate_bbacomm(type,reference_type,algorithm,partner_id,reference)" colspan="1"/>
on_change="generate_bbacomm(type,reference_type,partner_id,reference)" colspan="1"/>
<field name="reference" nolabel="1" colspan="3" attrs="{'readonly':[('state','!=','draft')]}"/>
</group>
</field>

View File

@ -64,7 +64,7 @@ class account_invoice(osv.osv):
return True
def onchange_partner_id(self, cr, uid, ids, type, partner_id,
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id,
date_invoice, payment_term, partner_bank_id, company_id)
# reference_type = self.default_get(cr, uid, ['reference_type'])['reference_type']
@ -78,15 +78,15 @@ class account_invoice(osv.osv):
algorithm = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_algorithm
if not algorithm:
algorithm = 'random'
reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, algorithm, partner_id, '')['value']['reference']
reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, partner_id, '', algorithm)['value']['reference']
res_update = {
'reference_type': reference_type or 'none',
'reference': reference,
}
result['value'].update(res_update)
return result
def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference):
#algorithm is not defined as field in any account related modules.so pass it as false argument.
def generate_bbacomm(self, cr, uid, ids, type, reference_type, partner_id, reference, algorithm=False):
partner_obj = self.pool.get('res.partner')
reference = reference or ''
if (type == 'out_invoice'):

View File

@ -30,15 +30,15 @@
<field name="target">new</field>
</record>
<record model="ir.ui.view" id="view_bank_statement_form">
<record model="ir.ui.view" id="view_bank_statement_form_bvr">
<field name="name">account.bank.statement.form.inherit</field>
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<field name="balance_end_real" position="after">
<button name="%(wizard_bvr_import)d" icon="gtk-execute" string="Import BVR" type="action" colspan="2"/>
</field>
<xpath expr="//div[@name='import_buttons']" position="inside">
<button name="%(wizard_bvr_import)d" icon="gtk-execute" string="Import BVR" type="action"/>
</xpath>
</field>
</record>
</data>

View File

@ -105,7 +105,7 @@
<field name="inherit_id" ref="account.view_cash_statement_tree"/>
<field name="arch" type="xml">
<field name="journal_id" position="after">
<field name="user_id"/>
<field name="user_id" string="Responsible"/>
</field>
</field>
</record>