[MERGE] merge with main branch

[IMP] account: account balance report improved

bzr revid: qdp-launchpad@tinyerp.com-20100706115548-4jyefffxjagapu77
This commit is contained in:
qdp-launchpad@tinyerp.com
2010-07-06 13:55:48 +02:00
814 changed files with 73292 additions and 37129 deletions
+15 -2
View File
@@ -303,6 +303,13 @@ class account_bank_statement(osv.osv):
_('Ledger Posting line "%s" is not valid') % line.name)
if move.reconcile_id and move.reconcile_id.line_ids:
## Search if move has already a partial reconciliation
previous_partial = False
for line_reconcile_move in move.reconcile_id.line_ids:
if line_reconcile_move.reconcile_partial_id:
previous_partial = True
break
##
torec += map(lambda x: x.id, move.reconcile_id.line_ids)
#try:
if abs(move.reconcile_amount-move.amount)<0.0001:
@@ -312,8 +319,14 @@ class account_bank_statement(osv.osv):
for entry in move.reconcile_id.line_new_ids:
writeoff_acc_id = entry.account_id.id
break
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
## If we have already a partial reconciliation
## We need to make a partial reconciliation
## To add this amount to previous paid amount
if previous_partial:
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
## If it's the first reconciliation, we do a full reconciliation as regular
else:
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
else:
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
#except:
+42 -19
View File
@@ -26,16 +26,16 @@ from mx import DateTime
from decimal import Decimal
from tools.translate import _
class singer_statement(osv.osv):
class account_cashbox_line(osv.osv):
""" Singer Statements """
""" Cash Box Details """
_name = 'singer.statement'
_description = 'Statement'
_name = 'account.cashbox.line'
_description = 'CashBox Line'
def _sub_total(self, cr, uid, ids, name, arg, context=None):
""" Calculates Sub total"
""" Calculates Sub total
@param name: Names of fields.
@param arg: User defined arguments
@return: Dictionary of values.
@@ -61,7 +61,7 @@ class singer_statement(osv.osv):
'starting_id': fields.many2one('account.bank.statement',ondelete='cascade'),
'ending_id': fields.many2one('account.bank.statement',ondelete='cascade'),
}
singer_statement()
account_cashbox_line()
class account_cash_statement(osv.osv):
@@ -157,22 +157,31 @@ class account_cash_statement(osv.osv):
res[r] = round(res[r], 2)
return res
def _get_company(self, cr, uid, ids, context={}):
user_pool = self.pool.get('res.users')
company_pool = self.pool.get('res.company')
user = user_pool.browse(cr, uid, uid, uid)
company_id = user.company_id and user.company_id.id
if not company_id:
company_id = company_pool.search(cr, uid, [])[0]
return company_id
_columns = {
'company_id':fields.many2one('res.company', 'Company', required=False),
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
'balance_start': fields.function(_get_starting_balance, method=True, string='Opening Balance', type='float',digits=(16,2), help="Opening balance based on cashBox"),
'balance_start': fields.function(_get_starting_balance, store=True, method=True, string='Opening Balance', type='float',digits=(16,2), help="Opening balance based on cashBox"),
'balance_end_real': fields.float('Closing Balance', digits=(16,2), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
'state': fields.selection(
[('draft', 'Draft'),
('confirm', 'Confirm'),
('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"),
'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, string="Cash Transaction", help="Total cash transactions"),
'date':fields.datetime("Open On"),
'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, store=True, string="Cash Transaction", help="Total cash transactions"),
'closing_date':fields.datetime("Closed On"),
'balance_end': fields.function(_end_balance, method=True, string='Balance', help="Closing balance based on transactions"),
'balance_end_cash': fields.function(_balance_end_cash, method=True, string='Balance', help="Closing balance based on cashBox"),
'starting_details_ids': fields.one2many('singer.statement', 'starting_id', string='Opening Cashbox'),
'ending_details_ids': fields.one2many('singer.statement', 'ending_id', string='Closing Cashbox'),
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on transactions"),
'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', 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'),
'name': fields.char('Name', size=64, required=True, readonly=True),
'user_id':fields.many2one('res.users', 'Responsible', required=False),
}
@@ -181,7 +190,8 @@ class account_cash_statement(osv.osv):
'name': lambda *a: '/',
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
'journal_id': _default_journal_id,
'user_id': lambda self, cr, uid, context=None: uid
'user_id': lambda self, cr, uid, context=None: uid,
'company_id': _get_company
}
def create(self, cr, uid, vals, context=None):
@@ -205,7 +215,7 @@ class account_cash_statement(osv.osv):
@return: Dictionary of changed values
"""
cash_pool = self.pool.get('singer.statement')
cash_pool = self.pool.get('account.cashbox.line')
statement_pool = self.pool.get('account.bank.statement')
res = {}
@@ -220,17 +230,30 @@ class account_cash_statement(osv.osv):
res = super(account_cash_statement, self).onchange_journal_id(cr, uid, statement_id, journal_id, context)
return res
def _equal_balance(self, cr, uid, ids, statement, context={}):
if statement.balance_end != statement.balance_end_cash:
return False
else:
return True
def _user_allow(self, cr, uid, ids, statement, context={}):
return True
def button_open(self, cr, uid, ids, context=None):
""" Changes statement state to Running.
@return: True
"""
cash_pool = self.pool.get('singer.statement')
cash_pool = self.pool.get('account.cashbox.line')
statement_pool = self.pool.get('account.bank.statement')
statement = statement_pool.browse(cr, uid, ids[0])
number = self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement')
if not self._user_allow(cr, uid, ids, statement, context={}):
raise osv.except_osv(_('Error !'), _('User %s does not have rights to access %s journal !' % (statement.user_id.name, statement.journal_id.name)))
number = self.pool.get('ir.sequence').get(cr, uid, statement.journal_id.sequence_id.code)
if len(statement.starting_details_ids) > 0:
sid = []
@@ -280,7 +303,7 @@ class account_cash_statement(osv.osv):
if not st.state == 'open':
continue
if st.balance_end != st.balance_end_cash:
if not self._equal_balance(cr, uid, ids, st, context):
raise osv.except_osv(_('Error !'), _('Cash balance is not matching with closing balance !'))
if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001):
+1 -1
View File
@@ -205,7 +205,7 @@
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="terp-camera_test"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="stock_effects-object-colorize"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="terp-dolar"/>
</group>
+343 -86
View File
@@ -12,12 +12,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Fiscalyear">
<field name="name" select="1"/>
<field name="code" select="1"/>
<group>
<field name="name"/>
<field name="code"/>
<field name="date_start"/>
<field name="date_stop"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="end_journal_period_id" groups="base.group_extended"/>
</group>
<separator colspan="4" string="Periods"/>
<field colspan="4" name="period_ids" nolabel="1" widget="one2many_list">
<form string="Period">
@@ -29,8 +31,8 @@
</form>
</field>
<separator colspan="4" string="States"/>
<field name="state" select="1" readonly="1"/>
<group col="2" colspan="2">
<group>
<field name="state" select="1" readonly="1"/>
<button name="create_period" states="draft" string="Create Monthly Periods" type="object" icon="gtk-dnd"/>
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" icon="gtk-dnd"/>
</group>
@@ -49,18 +51,40 @@
</tree>
</field>
</record>
<record id="view_account_fiscalyear_search" model="ir.ui.view">
<field name="name">account.fiscalyear.search</field>
<field name="model">account.fiscalyear</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Fiscalyear">
<group>
<filter string="Done" domain="[('state','=','done')]" icon="terp-dolar_ok!"/>
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="name"/>
<field name="state"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
</group>
</search>
</field>
</record>
<record id="action_account_fiscalyear_form" model="ir.actions.act_window">
<field name="name">Fiscal Years</field>
<field name="res_model">account.fiscalyear</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem id="next_id_23" name="Periods" parent="account.menu_finance_accounting"/>
<menuitem action="action_account_fiscalyear_form" id="menu_action_account_fiscalyear_form" parent="next_id_23"/>
<!--
Period
-->
Period
-->
<record id="res_role_period" model="res.roles">
<field eval="&quot;&quot;&quot;Period&quot;&quot;&quot;" name="name"/>
</record>
@@ -154,10 +178,22 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Accounts">
<field name="code" select="1"/>
<field name="name" select="1"/>
<field name="user_type" select="1"/>
<field name="type" select="1"/>
<group col="10" colspan="4">
<filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
<filter icon="terp-purchase" string="Purchase Accounts" domain="[('type','=','purchase')]"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="name"/>
<field name="user_type"/>
<field name="type"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
<separator orientation="vertical"/>
<filter string="User Type" icon="terp-folder-blue" domain="" context="{'group_by':'user_type'}"/>
<filter string="Internal Type" icon="terp-folder-yellow" domain="" context="{'group_by':'type'}"/>
</group>
</search>
</field>
</record>
@@ -181,6 +217,8 @@
<tree string="Chart of accounts" toolbar="1" colors="blue:type in ('view');black:type not in ('view')">
<field name="code"/>
<field name="name"/>
<field name="parent_id" invisible="1"/>
<field name="user_type" invisible="1"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
@@ -258,11 +296,34 @@
<tree string="Account Journal">
<field name="code"/>
<field name="name"/>
<field name="type" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="view_account_journal_search" model="ir.ui.view">
<field name="name">account.journal.search</field>
<field name="model">account.journal</field>
<field name="type">search</field>
<field name="arch" type="xml">
<tree string="Search Account Journal">
<group>
<filter domain="[('type', '=', 'sale')]" string="Sale Journals" icon="terp-sale"/>
<filter domain="[('type', '=', 'purchase')]" string="Purchase Journals" icon="terp-purchase"/>
<filter domain="[('centralisation', '=', 'True')]" string="Centralized Journals" icon="terp-stock"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="name"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Type" context="{'group_by':'type'}" icon="terp-stock_effects-object-colorize"/>
<filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
</group>
</tree>
</field>
</record>
<record id="view_account_journal_form" model="ir.ui.view">
<field name="name">account.journal.form</field>
<field name="model">account.journal</field>
@@ -292,13 +353,13 @@
<field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</group>
<group colspan="2" col="2">
<separator string="Invoicing Data" colspan="4"/>
<field name="invoice_sequence_id"/>
<field name="group_invoice_lines"/>
</group>
<group colspan="2" col="2">
<separator string="Company" colspan="4"/>
<field name="company_id" groups="base.group_multi_company"/>
@@ -336,7 +397,7 @@
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="account_account_menu"/>
<record id="view_account_bank_statement_filter" model="ir.ui.view">
<field name="name">account.bank.statement.select</field>
<field name="model">account.bank.statement</field>
@@ -345,16 +406,20 @@
<search string="Search Statement">
<group col="10" colspan="4">
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Statement"/>
<filter icon="terp-check" string="Poster" domain="[('state','=','confirm')]" help="Confirm confirm"/>
<filter icon="terp-check" string="Posted" domain="[('state','=','confirm')]" help="Confirm confirm"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="date"/>
<field name="journal_id"/>
</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'}"/>
</group>
</search>
</field>
</record>
<record id="view_bank_statement_tree" model="ir.ui.view">
<field name="name">account.bank.statement.tree</field>
<field name="model">account.bank.statement</field>
@@ -372,7 +437,29 @@
</tree>
</field>
</record>
<record id="view_bank_statement_search" model="ir.ui.view">
<field name="name">account.bank.statement.search</field>
<field name="model">account.bank.statement</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Bank Statements">
<group>
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirm" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
</group>
</search>
</field>
</record>
<record id="view_bank_statement_form" model="ir.ui.view">
<field name="name">account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
@@ -383,16 +470,10 @@
<field name="name" select="1"/>
<field name="date" select="1"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1"/>
<!-- <field name="currency"/>-->
<field name="period_id"/>
<!-- <group colspan="2" col="3">-->
<!-- <button name="%(action_view_account_statement_from_invoice)d"-->
<!-- string="Import Invoice" type="action" attrs="{'invisible':[('state','=','confirm')]}" icon="gtk-open"/>-->
<!-- <button name="button_import_invoice" string="Import Invoice" attrs="{'invisible':[('state','=','confirm')]}" type="object" icon="gtk-apply"/>-->
<!-- </group>-->
<field name="balance_start"/>
<field name="balance_end_real"/>
</group>
</group>
<notebook colspan="4">
<page string="Transaction">
<field colspan="4" name="line_ids" nolabel="1">
@@ -450,7 +531,7 @@
<field name="name">Draft statements</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
<field name="domain">[('state','=','draft')]</field>
<field name="filter" eval="True"/>
</record>
@@ -621,7 +702,8 @@
<field name="sum"/>
<field name="sum_period"/>
<newline/>
<field colspan="4" name="info"/>
<separator string="Description" colspan="4"/>
<field colspan="4" name="info" nolabel="1"/>
</form>
</field>
</record>
@@ -649,9 +731,30 @@
<field name="name"/>
<field name="price_include" groups="base.group_extended"/>
<field name="description"/>
<field name="tax_group" invisible="1"/>
</tree>
</field>
</record>
<record id="view_account_tax_search" model="ir.ui.view">
<field name="name">account.tax.search</field>
<field name="model">account.tax</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Taxes">
<group col="10" colspan="4">
<filter icon="terp-folder-blue" string="Vat Taxes" domain="[('tax_group','=','vat')]" help="Vat Taxes"/>
<filter icon="terp-folder-yellow" string="Other Taxes" domain="[('tax_group','=','other')]" help="Other Taxes"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="description"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Tax Group" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'tax_group'}"/>
</group>
</search>
</field>
</record>
<record id="view_tax_form" model="ir.ui.view">
<field name="name">account.tax.form</field>
<field name="model">account.tax</field>
@@ -715,7 +818,7 @@
<field name="domain">[('parent_id','=',False)]</field>
</record>
<menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27"/>
<record id="action_tax_code_tree" model="ir.actions.act_window">
<field name="name">Chart of Taxes</field>
<field name="res_model">account.tax.code</field>
@@ -729,7 +832,7 @@
parent="menu_finance_charts"
sequence="12"/>
<!-- <wizard id="action_move_journal_line_form" menu="False" model="account.move.line" name="account.move.journal" string="Entries by Line"/-->
<!--
Entries lines
-->
@@ -1046,6 +1149,23 @@
</field>
</record>
<record id="action_move_journal_line" model="ir.actions.act_window">
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<menuitem
icon="STOCK_JUSTIFY_FILL"
action="action_move_journal_line"
id="menu_action_move_journal_line_form"
parent="account.menu_finance_entries"
sequence="5"/>
<record id="action_move_line_form" model="ir.actions.act_window">
<field name="name">Entries</field>
<field name="type">ir.actions.act_window</field>
@@ -1054,7 +1174,7 @@
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<act_window
domain="[('move_id','=',active_id)]"
id="act_account_move_to_account_move_line_open"
@@ -1062,7 +1182,7 @@
context="{'move_id':active_id}"
res_model="account.move.line"
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="type">ir.actions.act_window</field>
@@ -1077,7 +1197,7 @@
<!-- <menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>-->
<record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
<field name="name">Journal Vouchers</field>
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -1085,8 +1205,8 @@
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<!-- <menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>-->
<menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>
<record id="action_account_moves_sale" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
@@ -1132,18 +1252,18 @@
<field name="view_mode">form</field>
<field name="act_window_id" ref="action_move_line_search"/>
</record>
<record id="action_move_line_search_view4" model="ir.actions.act_window">
<field name="name">Checks Register</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
</record>
<menuitem action="action_move_line_search_view4" id="journal_bank_move_lines" parent="menu_finance_bank_and_cash"/>
<!-- <record id="action_move_line_search_view4" model="ir.actions.act_window">-->
<!-- <field name="name">Cheque Register</field>-->
<!-- <field name="type">ir.actions.act_window</field>-->
<!-- <field name="res_model">account.move.line</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" ref="view_move_line_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_line_filter"/>-->
<!-- <field name="domain">[('journal_id.type', '=', 'bank')]</field>-->
<!-- </record>-->
<!-- -->
<!-- <menuitem action="action_move_line_search_view4" id="journal_bank_move_lines" parent="menu_finance_bank_and_cash"/>-->
<!-- <menuitem action="action_move_line_search" id="menu_action_move_line_search" parent="account.next_id_29"/>-->
@@ -1152,7 +1272,7 @@
<menuitem icon="STOCK_INDENT" action="wizard_account_chart" id="menu_action_account_tree2" parent="account.menu_finance_charts" type="wizard"/>
-->
<record id="view_bank_statement_reconcile_form" model="ir.ui.view">
<field name="name">account.bank.statement.reconcile.form</field>
<field name="model">account.bank.statement</field>
@@ -1346,7 +1466,7 @@
<field colspan="4" nolabel="1" name="lines_id" height="250" widget="one2many_list"/>
<separator string="Legend" colspan="4"/>
<field name="legend" colspan="4" nolabel="1"/>
<group col="1" colspan="4">
<group col="1" colspan="4">
<button name="%(action_account_use_model_create_entry)d" string="Create entries" type="action" icon="gtk-execute"/>
</group>
</form>
@@ -1419,12 +1539,32 @@
<field name="name" select="1"/>
<field name="active" select="1"/>
<separator colspan="4" string="Description on invoices"/>
<field colspan="4" name="note"/>
<field colspan="4" name="note" nolabel="1"/>
<separator colspan="4" string="Computation"/>
<field colspan="4" name="line_ids"/>
<field colspan="4" name="line_ids" nolabel="1"/>
</form>
</field>
</record>
<!-- <record id="view_account_move_line_filter" model="ir.ui.view">-->
<!-- <field name="name">Payment Terms</field>-->
<!-- <field name="model">account.payment.term</field>-->
<!-- <field name="type">search</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <search string="Search Payment Terms">-->
<!-- <group col='10' colspan='4'>-->
<!-- <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entry Lines"/>-->
<!-- <filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>-->
<!-- <separator orientation="vertical"/>-->
<!-- <field name="date" select='1'/>-->
<!-- <field name="account_id" select='1'/>-->
<!-- <field name="partner_id" select='1'>-->
<!-- <filter help="Next Partner Entries to reconcile" name="next_partner" string="Next Partner to reconcile" context="{'next_partner_only': 1}" icon="terp-partner" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>-->
<!-- </field>-->
<!-- <field name="balance" string="Debit/Credit" select='1'/>-->
<!-- </group>-->
<!-- </search>-->
<!-- </field>-->
<!-- </record>-->
<record id="action_payment_term_form" model="ir.actions.act_window">
<field name="name">Payment Terms</field>
<field name="res_model">account.payment.term</field>
@@ -1616,13 +1756,14 @@
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
<record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
<field name="name">Account Add wizard</field>
<field name="name">Create Account</field>
<field name="model">account.addtmpl.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Add">
<separator col="4" colspan="4" string="Select the common parent for the accounts"/>
<form string="Create Account">
<separator col="4" colspan="4" string="Create an Account based on this template"/>
<field name="cparent_id"/>
<newline/>
<group col="2" colspan="2">
<button icon="gtk-cancel" special="cancel" string="Cancel" name="action_cancel" type="object"/>
<button icon="gtk-ok" name="action_create" string="Add" type="object"/>
@@ -1632,7 +1773,8 @@
</record>
<act_window domain="[]" id="action_account_addtmpl_wizard_form"
name="Add account Wizard"
name="Create Account"
target="new"
res_model="account.addtmpl.wizard"
context="{'tmpl_ids': active_id}"
src_model="account.account.template"
@@ -1665,16 +1807,17 @@
<notebook>
<page string="General Information">
<field name="name"/>
<field name="code" select="1"/>
<field name="code"/>
<newline/>
<field name="parent_id" select="1"/>
<field name="parent_id"/>
<field name="shortcut"/>
<field name="type" select="1"/>
<field name="user_type" select="1"/>
<field name="type"/>
<field name="user_type"/>
<field name="currency_id"/>
<field name="reconcile"/>
<field name="tax_ids" colspan="4"/>
<separator string="Default taxes" colspan="4"/>
<field name="tax_ids" colspan="4" nolabel="1"/>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
@@ -1692,15 +1835,41 @@
<tree string="Account Template">
<field name="code"/>
<field name="name"/>
<field name="type" invisible="1"/>
<field name="user_type" invisible="1"/>
</tree>
</field>
</record>
<record id="view_account_template_search" model="ir.ui.view">
<field name="name">account.account.template.search</field>
<field name="model">account.account.template</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Account Templates">
<group>
<filter icon="terp-sale" string="Receivale Accounts" domain="[('type','=','receivable')]"/>
<filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="parent_id"/>
<field name="type"/>
<field name="user_type"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Internal Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
<filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
</group>
</search>
</field>
</record>
<record id="action_account_template_form" model="ir.actions.act_window">
<field name="name">Account Templates</field>
<field name="res_model">account.account.template</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
@@ -1714,21 +1883,50 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Chart of Accounts Template">
<field name="name" select="1"/>
<field name="account_root_id" select="1"/>
<field name="bank_account_view_id" select="1"/>
<group>
<field name="name"/>
<field name="account_root_id"/>
<field name="bank_account_view_id"/>
<field name="tax_code_root_id"/>
<field name="tax_template_ids" colspan="4" readonly="1" />
</group>
<field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
<separator string="Properties" colspan="4"/>
<group>
<field name="property_account_receivable"/>
<field name="property_account_payable"/>
<field name="property_account_expense_categ" />
<field name="property_account_income_categ"/>
<field name="property_account_expense"/>
<field name="property_account_income"/>
</group>
</form>
</field>
</record>
<record id="view_account_chart_template_seacrh" model="ir.ui.view">
<field name="name">account.chart.template.search</field>
<field name="model">account.chart.template</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Chart of Account Templates">
<group>
<field name="name"/>
<field name="account_root_id"/>
<field name="bank_account_view_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
<filter string="Bank Account" icon="terp-folder-blue" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
<separator orientation="vertical"/>
<filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
<filter string="Payable Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_payable'}"/>
<separator orientation="vertical"/>
<filter string="Income Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_income_categ'}"/>
<filter string="Expense Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_expense_categ'}"/>
</group>
</search>
</field>
</record>
<record id="view_account_chart_template_tree" model="ir.ui.view">
<field name="name">account.chart.template.tree</field>
<field name="model">account.chart.template</field>
@@ -1739,6 +1937,10 @@
<field name="account_root_id"/>
<field name="tax_code_root_id"/>
<field name="bank_account_view_id"/>
<field name="property_account_receivable" invisible="1"/>
<field name="property_account_payable" invisible="1"/>
<field name="property_account_expense_categ" invisible="1"/>
<field name="property_account_income_categ" invisible="1"/>
</tree>
</field>
</record>
@@ -1746,7 +1948,7 @@
<field name="name">Chart of Accounts Templates</field>
<field name="res_model">account.chart.template</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts"/>
@@ -1760,11 +1962,11 @@
<field name="arch" type="xml">
<form string="Account Tax Template">
<group colspan="4">
<field name="name" select="1"/>
<field name="description" select="1"/>
<field name="name"/>
<field name="description"/>
<newline/>
<field name="chart_template_id" select="1"/>
<field name="tax_group" select="1"/>
<field name="chart_template_id"/>
<field name="tax_group"/>
<field name="type"/>
<field name="type_tax_use"/>
</group>
@@ -1818,6 +2020,27 @@
</tree>
</field>
</record>
<record id="view_account_tax_template_search" model="ir.ui.view">
<field name="name">account.tax.template.search</field>
<field name="model">account.tax.template</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Tax Templates">
<group col="10" colspan="4">
<filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
<filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
<separator orientation="vertical"/>
<filter icon="terp-folder-blue" string="Vat Taxes" domain="[('tax_group','=','vat')]" help="Vat Taxes"/>
<filter icon="terp-folder-yellow" string="Other Taxes" domain="[('tax_group','=','other')]" help="Other Taxes"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="description"/>
<field name="chart_template_id"/>
</group>
</search>
</field>
</record>
<record id="action_account_tax_template_form" model="ir.actions.act_window">
<field name="name">Tax Templates</field>
<field name="res_model">account.tax.template</field>
@@ -1837,10 +2060,30 @@
<tree string="Account Tax Code Template" toolbar="1">
<field name="name"/>
<field name="code"/>
<field name="parent_id" invisible="1"/>
</tree>
</field>
</record>
<record id="view_tax_code_template_search" model="ir.ui.view">
<field name="name">account.tax.code.template.search</field>
<field name="model">account.tax.code.template</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search tax template">
<group>
<field name="name"/>
<field name="code"/>
<field name="parent_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
</group>
</search>
</field>
</record>
<record id="view_tax_code_template_form" model="ir.ui.view">
<field name="name">account.tax.code.template.form</field>
<field name="model">account.tax.code.template</field>
@@ -1852,7 +2095,8 @@
<field name="parent_id" select="1"/>
<field name="sign"/>
<newline/>
<field colspan="4" name="info"/>
<separator string="Description" colspan="4"/>
<field colspan="4" name="info" nolabel="1"/>
</form>
</field>
</record>
@@ -1861,7 +2105,7 @@
<field name="name">Tax Code Templates</field>
<field name="res_model">account.tax.code.template</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
@@ -1949,7 +2193,7 @@
<field name="name" select="1"/>
<field name="chart_template_id"/>
<newline/>
<field name="tax_ids" colspan="4">
<field name="tax_ids" colspan="4" nolabel="1">
<tree string="Taxes Mapping" editable="bottom">
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
@@ -1959,7 +2203,7 @@
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
</form>
</field>
<field name="account_ids" colspan="4">
<field name="account_ids" colspan="4" nolabel="1">
<tree string="Accounts Mapping" editable="bottom">
<field name="account_src_id"/>
<field name="account_dest_id"/>
@@ -2003,14 +2247,14 @@
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<menuitem
icon="STOCK_JUSTIFY_FILL"
action="action_move_journal_line"
id="menu_action_move_journal_line_form"
parent="account.menu_finance_entries"
icon="STOCK_JUSTIFY_FILL"
action="action_move_journal_line"
id="menu_action_move_journal_line_form"
parent="account.menu_finance_entries"
sequence="5"/>
<record id="action_account_moves_all" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
@@ -2020,10 +2264,10 @@
<field name="search_view_id" ref="view_account_move_line_filter"/>
</record>
<menuitem
action="action_account_moves_all"
icon="STOCK_JUSTIFY_FILL"
id="menu_eaction_account_moves_all"
<menuitem
action="action_account_moves_all"
icon="STOCK_JUSTIFY_FILL"
id="menu_eaction_account_moves_all"
parent="account.menu_finance_entries"
sequence="4"
/>
@@ -2050,7 +2294,7 @@
</tree>
</field>
</record>
<record id="view_bank_statement_form2" model="ir.ui.view">
<field name="name">account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
@@ -2065,7 +2309,7 @@
<field name="period_id" select="1"/>
<field name="balance_end_real"/>
</group>
<notebook colspan="4">
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
<field colspan="4" name="line_ids" nolabel="1">
@@ -2081,6 +2325,19 @@
<field context="{'partner_id': partner_id, 'amount': amount, 'account_id': account_id, 'currency_id': parent.currency, 'journal_id': parent.journal_id, 'date':date}" name="reconcile_id"/>
<field invisible="1" name="reconcile_amount"/>
</tree>
<form string="Statement lines">
<field name="date"/>
<field name="name"/>
<field name="type"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id"/>
<field name="amount"/>
<field context="{'partner_id':partner_id,'amount':amount,'account_id':account_id,'currency_id': parent.currency,'journal_id':parent.journal_id, 'date':date}" name="reconcile_id"/>
<field name="ref"/>
<field name="sequence"/>
<separator colspan="4" string="Notes"/>
<field colspan="4" name="note" nolabel="1"/>
</form>
</field>
</page>
<page string="Cash Box">
@@ -2166,6 +2423,6 @@
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
</record>
<menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"/>
</data>
</openerp>
+3 -5
View File
@@ -48,10 +48,8 @@
<field name="usage">menu</field>
<field name="view_id" ref="board_account_form"/>
</record>
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
<menuitem id="next_id_68" name="Accounting" parent="base.dashboard"
groups="account.group_account_manager"/>
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="next_id_68" sequence="1"/>
<menuitem icon="terp-graph" id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting"/>
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
</data>
</openerp>
+1 -1
View File
@@ -28,7 +28,7 @@ class res_company(osv.osv):
}
_defaults = {
'overdue_msg': lambda *a: 'Would your payment have been carried \
'overdue_msg': 'Would your payment have been carried \
out after this mail was sent, please consider the present one as \
void. Do not hesitate to contact our accounting department'
}
+44 -25
View File
@@ -14,31 +14,48 @@
<record id="account_type_asset" model="account.account.type">
<field name="name">Asset</field>
<field name="code">asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_receivable" model="account.account.type">
<field name="name">Receivable</field>
<field name="code">receivable</field>
<field name="report_type">asset</field>
<field name="close_method">unreconciled</field>
</record>
<record id="account_type_liability" model="account.account.type">
<field name="name">Liability</field>
<field name="name">Liability</field>
<field name="code">liability</field>
<field name="report_type">liability</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_payable" model="account.account.type">
<field name="name">Payable</field>
<field name="code">payable</field>
<field name="report_type">liability</field>
<field name="close_method">unreconciled</field>
</record>
<record id="account_type_income" model="account.account.type">
<field name="name">Income</field>
<field name="code">income</field>
<field name="report_type">income</field>
<field name="close_method">none</field>
</record>
<record id="account_type_expense" model="account.account.type">
<field name="name">Expense</field>
<field name="code">expense</field>
<field name="report_type">expense</field>
<field name="close_method">none</field>
</record>
<record id="account_type_cash_equity" model="account.account.type">
<field name="name">Equity</field>
<field name="name">Equity</field>
<field name="code">equity</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_income" model="account.account.type">
<field name="name">Income</field>
<field name="code">income</field>
<field name="close_method">unreconciled</field>
</record>
<record id="account_type_expense" model="account.account.type">
<field name="name">Expense</field>
<field name="code">expense</field>
<field name="close_method">unreconciled</field>
</record>
<record id="account_type_cash_moves" model="account.account.type">
<field name="name">Cash</field>
<field name="name">Cash</field>
<field name="code">cash</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
@@ -65,7 +82,7 @@ your own accounts.
<field eval="ref('minimal_0')" name="parent_id"/>
<field name="company_id" ref="base.main_company"/>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="account_type_income"/>
<field name="user_type" ref="account_type_receivable"/>
<field name="note">
This chart of account is used for automated testing purpose. It is installed
only if you selected demo data during your database creation. Modules can
@@ -75,12 +92,12 @@ your own chart of account.
</record>
<record id="a_pay" model="account.account">
<field name="name">Main Payable</field>
<field name="code">x 440000</field>
<field name="code">x 44000</field>
<field name="type">payable</field>
<field eval="ref('minimal_0')" name="parent_id"/>
<field name="company_id" ref="base.main_company"/>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="account_type_expense"/>
<field name="user_type" ref="account_type_payable"/>
<field name="note">
This chart of account is used for automated testing purpose. It is installed
only if you selected demo data during your database creation. Modules can
@@ -90,7 +107,7 @@ your own chart of account.
</record>
<record id="cash" model="account.account">
<field name="name">Petty Cash</field>
<field name="code">x 570000</field>
<field name="code">x 57000</field>
<field name="type">other</field>
<field eval="ref('minimal_0')" name="parent_id"/>
<field name="company_id" ref="base.main_company"/>
@@ -104,7 +121,7 @@ your own chart of account.
</record>
<record id="a_expense" model="account.account">
<field name="name">Products Purchase</field>
<field name="code">x 600000</field>
<field name="code">x 60000</field>
<field name="type">other</field>
<field eval="ref('minimal_0')" name="parent_id"/>
<field name="company_id" ref="base.main_company"/>
@@ -118,11 +135,11 @@ your own chart of account.
</record>
<record id="a_sale" model="account.account">
<field name="name">Products Sales</field>
<field name="code">x 701000</field>
<field name="code">x 70000</field>
<field name="type">other</field>
<field eval="ref('minimal_0')" name="parent_id"/>
<field name="user_type" ref="account_type_income"/>
<field name="company_id" ref="base.main_company"/>
<field name="user_type" ref="account_type_income"/>
<field name="note">
This chart of account is used for automated testing purpose. It is installed
only if you selected demo data during your database creation. Modules can
@@ -162,6 +179,7 @@ your own chart of account.
<field name="type">sale</field>
<field name="view_id" ref="account_journal_view"/>
<field name="sequence_id" ref="sequence_sale_journal"/>
<field name="invoice_sequence_id" ref="seq_type_out_invoice"/>
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
<field name="user_id" ref="base.user_root"/>
@@ -169,7 +187,7 @@ your own chart of account.
<record id="refund_sales_journal" model="account.journal">
<field name="name">x Sales Credit Note Journal</field>
<field name="code">SCNJ</field>
<field name="type">sale</field>
<field name="type">sale_refund</field>
<field name="refund_journal">True</field>
<field name="view_id" ref="account_journal_view"/>
<field name="sequence_id" ref="sequence_sale_journal"/>
@@ -184,6 +202,7 @@ your own chart of account.
<field name="type">purchase</field>
<field name="view_id" ref="account_journal_view"/>
<field name="sequence_id" ref="sequence_purchase_journal"/>
<field name="invoice_sequence_id" ref="seq_type_in_invoice"/>
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
<field name="user_id" ref="base.user_root"/>
@@ -191,7 +210,7 @@ your own chart of account.
<record id="refund_expenses_journal" model="account.journal">
<field name="name">x Expenses Credit Notes Journal</field>
<field name="code">ECNJ</field>
<field name="type">purchase</field>
<field name="type">purchase_refund</field>
<field name="refund_journal">True</field>
<field name="view_id" ref="account_journal_view"/>
<field name="sequence_id" ref="sequence_purchase_journal"/>
@@ -224,17 +243,17 @@ your own chart of account.
<!--
Product income and expense accounts, default parameters
-->
<record id="property_account_expense_prd" model="ir.property">
<field name="name">property_account_expense</field>
<field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_expense')]"/>
<field eval="False" name="value"/>
<field eval="'account.account,'+str(ref('account.a_expense'))" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="property_account_income_prd" model="ir.property">
<field name="name">property_account_income</field>
<field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_income')]"/>
<field eval="False" name="value"/>
<field eval="'account.account,'+str(ref('account.a_sale'))" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="property_account_expense_categ" model="ir.property">
+329
View File
@@ -5794,3 +5794,332 @@ msgstr ""
msgid "Compute Entry Dates"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Analytic accounts to close"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Draft invoices"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.open_board_account
#: model:ir.ui.menu,name:account.menu_board_account
msgid "Accounting Dashboard"
msgstr ""
#. module: account
#: view:board.board:0
#: model:ir.actions.act_window,name:account.act_my_account
msgid "Accounts to invoice"
msgstr ""
#. module: account
#: view:board.board:0
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
msgid "Costs to invoice"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Aged receivables"
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:account.module_meta_information
msgid "Board for accountant"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_aged_income
msgid "Income Accounts"
msgstr ""
#. module: account
#: view:board.board:0
msgid "My indicators"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Account Board"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Aged income"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
msgid "Show Debit/Credit Information"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,account_choice:0
msgid "All accounts"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
msgid "Entries Selection Based on"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "Notification"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Financial Period"
msgstr ""
#. module: account
#: model:ir.actions.report.xml,name:account.account_account_balance
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
msgid "Account balance"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period(s)"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Percentage"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
msgid "Compare Selected Years In Terms Of"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Fiscal Year(s)(Maximum Three Years)"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,select_account:0
msgid "Select Reference Account(for % comparision)"
msgstr ""
#. module: account
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
msgid "Account balance-Compare Years"
msgstr ""
#. module: account
#: model:ir.module.module,description:account.module_meta_information
msgid ""
"Account Balance Module is an added functionality to the Financial Management "
"module.\n"
"\n"
" This module gives you the various options for printing balance sheet.\n"
"\n"
" 1. You can compare the balance sheet for different years.\n"
"\n"
" 2. You can set the cash or percentage comparison between two years.\n"
"\n"
" 3. You can set the referential account for the percentage comparison for "
"particular years.\n"
"\n"
" 4. You can select periods as an actual date or periods as creation "
"date.\n"
"\n"
" 5. You have an option to print the desired report in Landscape format.\n"
" "
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You have to select 'Landscape' option. Please Check it."
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,landscape:0
msgid "Show Report in Landscape Form"
msgstr ""
#. module: account
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Total :"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
msgid "Show Comparision in %"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Report Options"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Don't Compare"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
msgid "Show Accounts"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "1. You have selected more than 3 years in any case."
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:account.module_meta_information
msgid "Accounting and financial management-Compare Accounts"
msgstr ""
#. module: account
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Year :"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You can select maximum 3 years. Please check again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"3. You have selected 'Percentage' option with more than 2 years, but you "
"have not selected landscape format."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"You might have done following mistakes. Please correct them and try again."
msgstr ""
#. module: account
#: help:account.balance.account.balance.report,init,select_account:0
msgid "Keep empty for comparision to its parent"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Creation Date"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"2. You have not selected 'Percentage' option, but you have selected more "
"than 2 years."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid ""
"You may have selected the compare options with more than 1 year with credit/"
"debit columns and % option.This can lead contents to be printed out of the "
"paper.Please try again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "You have to select at least 1 Fiscal Year. Try again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Customize Report"
msgstr ""
#. module: account
#: field:report.aged.receivable,name:0
msgid "Month Range"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
msgid "Invoices Created Within Past 15 Days"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_invoice_created
msgid "Report of Invoices Created within Last 15 days"
msgstr ""
#. module: account
#: view:report.invoice.created:0
msgid "Total Amount"
msgstr ""
#. module: account
#: view:report.account.receivable:0
msgid "Accounts by type"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_aged_receivable
msgid "Aged Receivable Till Today"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_account_receivable
msgid "Receivable accounts"
msgstr ""
#. module: account
#: field:temp.range,name:0
msgid "Range"
msgstr ""
#. module: account
#: model:ir.module.module,description:report_account.module_meta_information
msgid "A module that adds new reports based on the account module."
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:report_account.module_meta_information
msgid "Account Reporting - Reporting"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
msgid "Balance by Type of Account"
msgstr ""
#. module: account
#: field:report.account.receivable,name:0
msgid "Week of Year"
msgstr ""
#. module: account
#: field:report.invoice.created,create_date:0
msgid "Create Date"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
#: view:report.aged.receivable:0
msgid "Aged Receivable"
msgstr ""
#. module: account
#: view:report.invoice.created:0
msgid "Untaxed Amount"
msgstr ""
+535 -418
View File
File diff suppressed because it is too large Load Diff
+541 -430
View File
File diff suppressed because it is too large Load Diff
+543 -420
View File
File diff suppressed because it is too large Load Diff
+564 -424
View File
File diff suppressed because it is too large Load Diff
+547 -448
View File
File diff suppressed because it is too large Load Diff
+558 -418
View File
File diff suppressed because it is too large Load Diff
+599 -510
View File
File diff suppressed because it is too large Load Diff
+361 -2
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-06-24 10:03+0000\n"
"PO-Revision-Date: 2010-06-29 22:11+0000\n"
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
"X-Launchpad-Export-Date: 2010-07-01 03:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -6076,5 +6076,364 @@ msgstr ""
msgid "Compute Entry Dates"
msgstr "Calcular fechas asiento"
#. module: account
#: view:board.board:0
msgid "Analytic accounts to close"
msgstr "Cuentas analíticas a cerrar"
#. module: account
#: view:board.board:0
msgid "Draft invoices"
msgstr "Facturas borrador"
#. module: account
#: model:ir.actions.act_window,name:account.open_board_account
#: model:ir.ui.menu,name:account.menu_board_account
msgid "Accounting Dashboard"
msgstr "Tablero de contabilidad"
#. module: account
#: view:board.board:0
#: model:ir.actions.act_window,name:account.act_my_account
msgid "Accounts to invoice"
msgstr "Cuentas a facturar"
#. module: account
#: view:board.board:0
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
msgid "Costs to invoice"
msgstr "Costos a facturar"
#. module: account
#: view:board.board:0
msgid "Aged receivables"
msgstr "Efectos vencidos a cobrar"
#. module: account
#: model:ir.module.module,shortdesc:account.module_meta_information
msgid "Board for accountant"
msgstr "Tablero para contables"
#. module: account
#: model:ir.actions.act_window,name:account.action_aged_income
msgid "Income Accounts"
msgstr "Cuentas de ingresos"
#. module: account
#: view:board.board:0
msgid "My indicators"
msgstr "Mis indicadores"
#. module: account
#: view:board.board:0
msgid "Account Board"
msgstr "Tablero de contabilidad"
#. module: account
#: view:board.board:0
msgid "Aged income"
msgstr "Ingresos vencidos"
#. module: account
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
msgid "Show Debit/Credit Information"
msgstr "Mostrar información débito/crédito"
#. module: account
#: selection:account.balance.account.balance.report,init,account_choice:0
msgid "All accounts"
msgstr "Todas las cuentas"
#. module: account
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
msgid "Entries Selection Based on"
msgstr "Selección de entradas basada en"
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "Notification"
msgstr "Notificación"
#. module: account
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Financial Period"
msgstr "Periodo financiero"
#. module: account
#: model:ir.actions.report.xml,name:account.account_account_balance
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
msgid "Account balance"
msgstr "Balance contable"
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period(s)"
msgstr "Seleccione período(s)"
#. module: account
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Percentage"
msgstr "Porcentaje"
#. module: account
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
msgid "Compare Selected Years In Terms Of"
msgstr "Comparar ejercicios seleccionados en términos de"
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Fiscal Year(s)(Maximum Three Years)"
msgstr "Seleccionar ejercicio(s) fiscal(es) (máximo 3 años)"
#. module: account
#: wizard_field:account.balance.account.balance.report,init,select_account:0
msgid "Select Reference Account(for % comparision)"
msgstr "Seleccione cuenta de referencia (para comparación %)"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
msgid "Account balance-Compare Years"
msgstr "Balance contable-Compara ejercicios"
#. module: account
#: model:ir.module.module,description:account.module_meta_information
msgid ""
"Account Balance Module is an added functionality to the Financial Management "
"module.\n"
"\n"
" This module gives you the various options for printing balance sheet.\n"
"\n"
" 1. You can compare the balance sheet for different years.\n"
"\n"
" 2. You can set the cash or percentage comparison between two years.\n"
"\n"
" 3. You can set the referential account for the percentage comparison for "
"particular years.\n"
"\n"
" 4. You can select periods as an actual date or periods as creation "
"date.\n"
"\n"
" 5. You have an option to print the desired report in Landscape format.\n"
" "
msgstr ""
"El módulo de balance de cuentas es una funcionalidad añadida al módulo de "
"gestión financiera.\n"
"\n"
" Este módulo ofrece diversas opciones de impresión de balances.\n"
"\n"
" 1. Se puede comparar el balance de distintos años.\n"
"\n"
" 2. Puede establecer la comparación en importe o porcentual entre dos "
"años.\n"
"\n"
" 3. Puede establecer la cuenta de referencia para la comparación "
"porcentual para años en particular.\n"
"\n"
" 4. Puede seleccionar períodos como una fecha real o períodos como fecha "
"de creación.\n"
"\n"
" 5. Puede imprimir el informe que desee en formato apaisado.\n"
" "
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You have to select 'Landscape' option. Please Check it."
msgstr "Debe seleccionar la opción 'Horizontal'. Por favor, márquela."
#. module: account
#: wizard_field:account.balance.account.balance.report,init,landscape:0
msgid "Show Report in Landscape Form"
msgstr "Mostrar informe en formato horizontal"
#. module: account
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Total :"
msgstr "Total :"
#. module: account
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
msgid "Show Comparision in %"
msgstr "Mostrar comparación en %"
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period"
msgstr "Seleccionar periodo"
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Report Options"
msgstr "Opciones del informe"
#. module: account
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Don't Compare"
msgstr "No comparar"
#. module: account
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
msgid "Show Accounts"
msgstr "Mostrar cuentas"
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "1. You have selected more than 3 years in any case."
msgstr "1. Ha seleccionado más de 3 ejercicios en cualquier caso."
#. module: account
#: model:ir.module.module,shortdesc:account.module_meta_information
msgid "Accounting and financial management-Compare Accounts"
msgstr "Gestión contable y financiera - Comparación de cuentas"
#. module: account
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Year :"
msgstr "Ejercicio :"
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You can select maximum 3 years. Please check again."
msgstr ""
"Puede seleccionar un máximo de 3 ejercicios. Por favor, seleccione otra vez."
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"3. You have selected 'Percentage' option with more than 2 years, but you "
"have not selected landscape format."
msgstr ""
"3. Ha seleccionado la opción 'Porcentaje' con más de 2 ejercicios, pero no "
"ha seleccionado formato horizontal."
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"You might have done following mistakes. Please correct them and try again."
msgstr ""
"Podría haber cometido los siguientes errores. Por favor, corríjalos e "
"inténtelo de nuevo."
#. module: account
#: help:account.balance.account.balance.report,init,select_account:0
msgid "Keep empty for comparision to its parent"
msgstr "Dejarlo vacío para comparar con sus padres"
#. module: account
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Creation Date"
msgstr "Fecha creación"
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"2. You have not selected 'Percentage' option, but you have selected more "
"than 2 years."
msgstr ""
"2. No ha seleccionado la opción 'Porcentaje', pero ha seleccionado más de 2 "
"ejercicios."
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid ""
"You may have selected the compare options with more than 1 year with "
"credit/debit columns and % option.This can lead contents to be printed out "
"of the paper.Please try again."
msgstr ""
"Puede haber seleccionado las opciones comparar con más de 1 ejercicio con "
"columnas crédito/débito y opción %. Esto pueden ocasionar que hayan "
"contenidos que se impriman fuera del papel. Por favor, inténtelo de nuevo."
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "You have to select at least 1 Fiscal Year. Try again."
msgstr ""
"Debe seleccionar al menos un ejercicio fiscal. Por favor, inténtelo de nuevo."
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Customize Report"
msgstr "Informe personalizado"
#. module: account
#: field:report.aged.receivable,name:0
msgid "Month Range"
msgstr "Rango mensual"
#. module: account
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
msgid "Invoices Created Within Past 15 Days"
msgstr "Facturas creadas en los últimos 15 días"
#. module: account
#: model:ir.model,name:report_account.model_report_invoice_created
msgid "Report of Invoices Created within Last 15 days"
msgstr "Informe de facturas creadas en los últimos 15 días"
#. module: account
#: view:report.invoice.created:0
msgid "Total Amount"
msgstr "Importe total"
#. module: account
#: view:report.account.receivable:0
msgid "Accounts by type"
msgstr "Cuentas por tipo"
#. module: account
#: model:ir.model,name:report_account.model_report_aged_receivable
msgid "Aged Receivable Till Today"
msgstr "Efectos a cobrar vencidos hasta hoy"
#. module: account
#: model:ir.model,name:report_account.model_report_account_receivable
msgid "Receivable accounts"
msgstr "Cuentas a cobrar"
#. module: account
#: field:temp.range,name:0
msgid "Range"
msgstr "Intervalo"
#. module: account
#: model:ir.module.module,description:report_account.module_meta_information
msgid "A module that adds new reports based on the account module."
msgstr ""
"Módulo que añade nuevos informes basado en el módulo contable-financiero."
#. module: account
#: model:ir.module.module,shortdesc:report_account.module_meta_information
msgid "Account Reporting - Reporting"
msgstr "Informe contable - Informe"
#. module: account
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
msgid "Balance by Type of Account"
msgstr "Saldo por tipo de cuenta"
#. module: account
#: field:report.account.receivable,name:0
msgid "Week of Year"
msgstr "Semana del año"
#. module: account
#: field:report.invoice.created,create_date:0
msgid "Create Date"
msgstr "Fecha de creación"
#. module: account
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
#: view:report.aged.receivable:0
msgid "Aged Receivable"
msgstr "A cobrar anteriores"
#. module: account
#: view:report.invoice.created:0
msgid "Untaxed Amount"
msgstr "Base imponible"
#~ msgid "account.config.wizard"
#~ msgstr "account.config.asistente"
File diff suppressed because it is too large Load Diff
+539 -424
View File
File diff suppressed because it is too large Load Diff
+413 -440
View File
File diff suppressed because it is too large Load Diff
+543 -420
View File
File diff suppressed because it is too large Load Diff
+533 -546
View File
File diff suppressed because it is too large Load Diff
+557 -531
View File
File diff suppressed because it is too large Load Diff
+536 -419
View File
File diff suppressed because it is too large Load Diff
+538 -432
View File
File diff suppressed because it is too large Load Diff
+333 -4
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-06-15 07:00+0000\n"
"PO-Revision-Date: 2010-07-05 10:24+0000\n"
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:05+0000\n"
"X-Launchpad-Export-Date: 2010-07-06 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -35,7 +35,7 @@ msgstr "Fatture fornitori non pagate"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_entries
msgid "Entries Encoding"
msgstr "Codifica delle registrazioni"
msgstr "Movimenti contabili"
#. module: account
#: model:ir.actions.todo,note:account.config_wizard_account_base_setup_form
@@ -4581,7 +4581,7 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_move_line_form_encode_by_move
#: model:ir.ui.menu,name:account.menu_encode_entries_by_move
msgid "Entries Encoding by Move"
msgstr "Codifica delle registrazioni per movimento"
msgstr "Registrazioni per movimento"
#. module: account
#: wizard_view:account.analytic.account.chart,init:0
@@ -5959,3 +5959,332 @@ msgstr ""
#: wizard_button:account.subscription.generate,init,generate:0
msgid "Compute Entry Dates"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Analytic accounts to close"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Draft invoices"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.open_board_account
#: model:ir.ui.menu,name:account.menu_board_account
msgid "Accounting Dashboard"
msgstr ""
#. module: account
#: view:board.board:0
#: model:ir.actions.act_window,name:account.act_my_account
msgid "Accounts to invoice"
msgstr ""
#. module: account
#: view:board.board:0
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
msgid "Costs to invoice"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Aged receivables"
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:account.module_meta_information
msgid "Board for accountant"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_aged_income
msgid "Income Accounts"
msgstr ""
#. module: account
#: view:board.board:0
msgid "My indicators"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Account Board"
msgstr ""
#. module: account
#: view:board.board:0
msgid "Aged income"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
msgid "Show Debit/Credit Information"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,account_choice:0
msgid "All accounts"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
msgid "Entries Selection Based on"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "Notification"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Financial Period"
msgstr ""
#. module: account
#: model:ir.actions.report.xml,name:account.account_account_balance
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
msgid "Account balance"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period(s)"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Percentage"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
msgid "Compare Selected Years In Terms Of"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Fiscal Year(s)(Maximum Three Years)"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,select_account:0
msgid "Select Reference Account(for % comparision)"
msgstr ""
#. module: account
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
msgid "Account balance-Compare Years"
msgstr ""
#. module: account
#: model:ir.module.module,description:account.module_meta_information
msgid ""
"Account Balance Module is an added functionality to the Financial Management "
"module.\n"
"\n"
" This module gives you the various options for printing balance sheet.\n"
"\n"
" 1. You can compare the balance sheet for different years.\n"
"\n"
" 2. You can set the cash or percentage comparison between two years.\n"
"\n"
" 3. You can set the referential account for the percentage comparison for "
"particular years.\n"
"\n"
" 4. You can select periods as an actual date or periods as creation "
"date.\n"
"\n"
" 5. You have an option to print the desired report in Landscape format.\n"
" "
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You have to select 'Landscape' option. Please Check it."
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,landscape:0
msgid "Show Report in Landscape Form"
msgstr ""
#. module: account
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Total :"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
msgid "Show Comparision in %"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Period"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Report Options"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,compare_pattern:0
msgid "Don't Compare"
msgstr ""
#. module: account
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
msgid "Show Accounts"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "1. You have selected more than 3 years in any case."
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:account.module_meta_information
msgid "Accounting and financial management-Compare Accounts"
msgstr ""
#. module: account
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Year :"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid "You can select maximum 3 years. Please check again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"3. You have selected 'Percentage' option with more than 2 years, but you "
"have not selected landscape format."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"You might have done following mistakes. Please correct them and try again."
msgstr ""
#. module: account
#: help:account.balance.account.balance.report,init,select_account:0
msgid "Keep empty for comparision to its parent"
msgstr ""
#. module: account
#: selection:account.balance.account.balance.report,init,period_manner:0
msgid "Creation Date"
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,backtoinit:0
msgid ""
"2. You have not selected 'Percentage' option, but you have selected more "
"than 2 years."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid ""
"You may have selected the compare options with more than 1 year with "
"credit/debit columns and % option.This can lead contents to be printed out "
"of the paper.Please try again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
msgid "You have to select at least 1 Fiscal Year. Try again."
msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Customize Report"
msgstr ""
#. module: account
#: field:report.aged.receivable,name:0
msgid "Month Range"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
msgid "Invoices Created Within Past 15 Days"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_invoice_created
msgid "Report of Invoices Created within Last 15 days"
msgstr ""
#. module: account
#: view:report.invoice.created:0
msgid "Total Amount"
msgstr ""
#. module: account
#: view:report.account.receivable:0
msgid "Accounts by type"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_aged_receivable
msgid "Aged Receivable Till Today"
msgstr ""
#. module: account
#: model:ir.model,name:report_account.model_report_account_receivable
msgid "Receivable accounts"
msgstr ""
#. module: account
#: field:temp.range,name:0
msgid "Range"
msgstr ""
#. module: account
#: model:ir.module.module,description:report_account.module_meta_information
msgid "A module that adds new reports based on the account module."
msgstr ""
#. module: account
#: model:ir.module.module,shortdesc:report_account.module_meta_information
msgid "Account Reporting - Reporting"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
msgid "Balance by Type of Account"
msgstr ""
#. module: account
#: field:report.account.receivable,name:0
msgid "Week of Year"
msgstr ""
#. module: account
#: field:report.invoice.created,create_date:0
msgid "Create Date"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
#: view:report.aged.receivable:0
msgid "Aged Receivable"
msgstr ""
#. module: account
#: view:report.invoice.created:0
msgid "Untaxed Amount"
msgstr ""
+561 -557
View File
File diff suppressed because it is too large Load Diff
+538 -426
View File
File diff suppressed because it is too large Load Diff
+559 -424
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+402 -440
View File
File diff suppressed because it is too large Load Diff
+542 -422
View File
File diff suppressed because it is too large Load Diff
+550 -426
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+565 -425
View File
File diff suppressed because it is too large Load Diff
+537 -421
View File
File diff suppressed because it is too large Load Diff
+268 -422
View File
File diff suppressed because it is too large Load Diff
+564 -424
View File
File diff suppressed because it is too large Load Diff
+534 -417
View File
File diff suppressed because it is too large Load Diff
+535 -418
View File
File diff suppressed because it is too large Load Diff
+540 -421
View File
File diff suppressed because it is too large Load Diff
+542 -434
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+36 -22
View File
@@ -45,24 +45,25 @@ class account_invoice(osv.osv):
res[invoice.id]['amount_total'] = res[invoice.id]['amount_tax'] + res[invoice.id]['amount_untaxed']
return res
def _get_journal(self, cr, uid, context):
def _get_journal(self, cr, uid, context=None):
if context is None:
context = {}
type_inv = context.get('type', 'out_invoice')
user = self.pool.get('res.users').browse(cr, uid, uid)
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
company_id = context.get('company_id', user.company_id.id)
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale', 'in_refund': 'purchase'}
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
refund_journal = {'out_invoice': False, 'in_invoice': False, 'out_refund': True, 'in_refund': True}
journal_obj = self.pool.get('account.journal')
res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'sale')),
('company_id', '=', company_id),('refund_journal', '=', refund_journal.get(type_inv, False))],
('company_id', '=', company_id),
('refund_journal', '=', refund_journal.get(type_inv, False))],
limit=1)
if res:
return res[0]
else:
return False
def _get_currency(self, cr, uid, context):
def _get_currency(self, cr, uid, context=None):
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid])[0]
if user.company_id:
return user.company_id.currency_id.id
@@ -80,10 +81,9 @@ class account_invoice(osv.osv):
def _get_type(self, cr, uid, context=None):
if context is None:
context = {}
type = context.get('type', 'out_invoice')
return type
return context.get('type', 'out_invoice')
def _reconciled(self, cr, uid, ids, name, args, context):
def _reconciled(self, cr, uid, ids, name, args, context=None):
res = {}
for id in ids:
res[id] = self.test_paid(cr, uid, [id])
@@ -94,8 +94,11 @@ class account_invoice(osv.osv):
def _amount_residual(self, cr, uid, ids, name, args, context=None):
res = {}
data_inv = self.browse(cr, uid, ids)
cur_obj = self.pool.get('res.currency')
data_inv = self.browse(cr, uid, ids)
if context is None:
context = {}
for inv in data_inv:
debit = credit = 0.0
context.update({'date':inv.date_invoice})
@@ -187,7 +190,7 @@ class account_invoice(osv.osv):
result[invoice.id] = lines
return result
def _get_invoice_from_line(self, cr, uid, ids, context={}):
def _get_invoice_from_line(self, cr, uid, ids, context=None):
move = {}
for line in self.pool.get('account.move.line').browse(cr, uid, ids):
if line.reconcile_partial_id:
@@ -201,7 +204,7 @@ class account_invoice(osv.osv):
invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)
return invoice_ids
def _get_invoice_from_reconcile(self, cr, uid, ids, context={}):
def _get_invoice_from_reconcile(self, cr, uid, ids, context=None):
move = {}
for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids):
for line in r.line_partial_ids:
@@ -316,12 +319,12 @@ class account_invoice(osv.osv):
_defaults = {
'type': _get_type,
#'date_invoice': lambda *a: time.strftime('%Y-%m-%d'),
'state': lambda *a: 'draft',
'state': 'draft',
'journal_id': _get_journal,
'currency_id': _get_currency,
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.invoice', context=c),
'reference_type': lambda *a: 'none',
'check_total': lambda *a: 0.0,
'reference_type': 'none',
'check_total': 0.0,
'user_id': lambda s, cr, u, c: u,
}
@@ -338,16 +341,15 @@ class account_invoice(osv.osv):
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.form')])[0]
return super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
def create(self, cr, uid, vals, context={}):
def create(self, cr, uid, vals, context=None):
try:
res = super(account_invoice, self).create(cr, uid, vals, context)
return res
except Exception,e:
except Exception, e:
if '"journal_id" viol' in e.args[0]:
raise orm.except_orm(_('Configuration Error!'),
_('There is no Accounting Journal of type Sale/Purchase defined!'))
else:
raise
raise orm.except_orm(_('UnknownError'), str(e))
def confirm_paid(self, cr, uid, ids, context=None):
@@ -766,6 +768,10 @@ class account_invoice(osv.osv):
cur_obj = self.pool.get('res.currency')
context = {}
for inv in self.browse(cr, uid, ids):
if not inv.journal_id.invoice_sequence_id:
raise osv.except_osv(_('Error !'), _('Please define invoice sequence on invoice journal'))
if not inv.invoice_line:
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
if inv.move_id:
continue
@@ -788,6 +794,7 @@ class account_invoice(osv.osv):
# one move line per tax line
iml += ait_obj.move_line_get(cr, uid, inv.id)
entry_type=''
if inv.type in ('in_invoice', 'in_refund'):
ref = inv.reference
entry_type = 'journal_pur_voucher'
@@ -918,7 +925,7 @@ class account_invoice(osv.osv):
if not number:
if obj_inv.journal_id.invoice_sequence_id:
sid = obj_inv.journal_id.invoice_sequence_id.id
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id=%s', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
else:
number = self.pool.get('ir.sequence').get(cr, uid,
'account.invoice.' + invtype)
@@ -1043,6 +1050,10 @@ class account_invoice(osv.osv):
tax_lines = self.pool.get('account.invoice.tax').read(cr, uid, invoice['tax_line'])
tax_lines = filter(lambda l: l['manual'], tax_lines)
tax_lines = self._refund_cleanup_lines(cr, uid, tax_lines)
if invoice['type'] == 'in_invoice':
refund_journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase_refund')])
else:
refund_journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','sale_refund')])
if not date :
date = time.strftime('%Y-%m-%d')
invoice.update({
@@ -1051,7 +1062,8 @@ class account_invoice(osv.osv):
'state': 'draft',
'number': False,
'invoice_line': invoice_lines,
'tax_line': tax_lines
'tax_line': tax_lines,
'journal_id': refund_journal_ids
})
if period_id :
invoice.update({
@@ -1105,7 +1117,6 @@ class account_invoice(osv.osv):
ref = invoice.reference
else:
ref = self._convert_ref(cr, uid, invoice.number)
# Pay attention to the sign for both debit/credit AND amount_currency
l1 = {
'debit': direction * pay_amount>0 and direction * pay_amount,
@@ -1216,8 +1227,8 @@ class account_invoice_line(osv.osv):
'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True)
}
_defaults = {
'quantity': lambda *a: 1,
'discount': lambda *a: 0.0,
'quantity': 1,
'discount': 0.0,
'price_unit': _price_unit_default,
}
@@ -1560,4 +1571,7 @@ class res_partner(osv.osv):
_columns = {
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -4
View File
@@ -191,7 +191,4 @@ class res_partner(osv.osv):
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+5 -3
View File
@@ -10,9 +10,9 @@
<form string="Fiscal Position">
<field name="name" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<separator string="Mapping" colspan="4"/>
<newline/>
<field name="note" colspan="4"/>
<field name="tax_ids" colspan="4" widget="one2many_list">
<field name="tax_ids" colspan="2" widget="one2many_list" nolabel="1">
<tree string="Tax Mapping" editable="bottom">
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
@@ -22,7 +22,7 @@
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
</form>
</field>
<field name="account_ids" colspan="4" widget="one2many_list">
<field name="account_ids" colspan="2" widget="one2many_list" nolabel="1">
<tree string="Account Mapping" editable="bottom">
<field name="account_src_id"/>
<field name="account_dest_id"/>
@@ -32,6 +32,8 @@
<field name="account_dest_id"/>
</form>
</field>
<separator string="Notes" colspan="4"/>
<field name="note" colspan="4" nolabel="1"/>
</form>
</field>
</record>
+4 -4
View File
@@ -33,7 +33,7 @@ class product_category(osv.osv):
string="Income Account",
method=True,
view_load=True,
help="This account will be used to value incoming stock(i.e. credit of incoming goods) for the current product category"),
help="This account will be used for invoices to value sales for the current product category"),
'property_account_expense_categ': fields.property(
'account.account',
type='many2one',
@@ -41,7 +41,7 @@ class product_category(osv.osv):
string="Expense Account",
method=True,
view_load=True,
help="This account will be used to value outgoing stock(i.e. debit of outgoing goods) for the current product category"),
help="This account will be used for invoices to value expenses for the current product category"),
}
product_category()
@@ -64,7 +64,7 @@ class product_template(osv.osv):
string="Income Account",
method=True,
view_load=True,
help="This account will be used instead of the default one to value incoming stock for the current product"),
help="This account will be used for invoices instead of the default one to value sales for the current product"),
'property_account_expense': fields.property(
'account.account',
type='many2one',
@@ -72,7 +72,7 @@ class product_template(osv.osv):
string="Expense Account",
method=True,
view_load=True,
help="This account will be used instead of the default one to value outgoing stock for the current product"),
help="This account will be used for invoices instead of the default one to value expenses for the current product"),
}
product_template()
+37 -6
View File
@@ -24,7 +24,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Account">
<group col="8" colspan="4">
<group col="8" colspan="4">
<filter icon="terp-check" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
<separator orientation="vertical"/>
@@ -32,7 +32,15 @@
<field name="code" select="1"/>
<field name="partner_id" select="1"/>
<field name="user_id" widget="selection"/>
</group>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Associated Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
</group>
</search>
</field>
</record>
@@ -53,6 +61,10 @@
<field name="balance"/>
<field name="quantity"/>
<field name="quantity_max"/>
<field name="parent_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="user_id" invisible="1"/>
</tree>
</field>
</record>
@@ -148,7 +160,7 @@
<field name="journal_id" select="2"/>
<field name="general_account_id" select="2"/>
<field name="move_id" select="2"/>
<separator string="Optionnal Information" colspan="4"/>
<separator string="Optional Information" colspan="4"/>
<field name="unit_amount" select="2"/>
<field name="ref" select="2"/>
<field name="currency_id" select="2"/>
@@ -195,6 +207,13 @@
<field name="date" select="1"/>
<field name="user_id" widget="selection"/>
</group>
<newline/>
<group string="Group By..." expand="0">
<filter string="General Account" context="{'group_by':'general_account_id'}"/>
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
<filter string="Analytic Journal" context="{'group_by':'journal_id'}"/>
<filter string="Product" context="{'group_by':'product_id'}"/>
</group>
</search>
</field>
</record>
@@ -278,6 +297,19 @@
</field>
</record>
<record id="view_analytic_journal_search" model="ir.ui.view">
<field name="name">account.analytic.journal.search</field>
<field name="model">account.analytic.journal</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="analytic Journals">
<group expand="0" string="Group By...">
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
</group>
</search>
</field>
</record>
<record id="view_account_analytic_journal_form" model="ir.ui.view">
<field name="name">account.analytic.journal.form</field>
<field name="model">account.analytic.journal</field>
@@ -296,7 +328,7 @@
<field name="name">Analytic Journals</field>
<field name="res_model">account.analytic.journal</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic"/>
@@ -309,7 +341,6 @@
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('journal_id','=',active_id)]</field>
</record>
<menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_entries"/>
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
@@ -321,7 +352,7 @@
</record> -->
<!-- <menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_bank_and_cash"/>-->
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
<field name="name">Checks Register</field>
<field name="name">Check Registers</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -7,18 +7,20 @@
<field name="model">account.analytic.cost.ledger.journal.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select period">
<separator string="Cost Legder for period" colspan="4"/>
<field name="date1"/>
<field name="date2"/>
<separator string="and Journals" colspan="4"/>
<field name="journal" colspan="4"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
<form string="Select period">
<group width="450">
<separator string="Cost Legder for period" colspan="4"/>
<field name="date1"/>
<field name="date2"/>
<separator string="and Journals" colspan="4"/>
<field name="journal" colspan="4" nolabel="1"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</group>
</form>
</field>
</record>
-4
View File
@@ -123,11 +123,7 @@ class account_balance(report_sxw.rml_parse):
child_ids = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, ids, ctx)
if child_ids:
ids = child_ids
print 'on va faire un read'
accounts = self.pool.get('account.account').read(self.cr, self.uid, ids, ['type','code','name','debit','credit','balance','parent_id'], ctx)
print 'on a fait un read'
import pdb
pdb.set_trace()
for account in accounts:
if account['id'] in done:
continue
+8 -8
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<document filename="account_balance.pdf">
<template pageSize="(595.0,842.0)" title="Account Balance" author="OpenERP SA" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<pageGraphics>
@@ -244,12 +244,12 @@
<td><para style="P10">Credit</para></td>
<td><para style="P10">Balance</para></td>
</tr>
<tr>
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<!--<font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i>--></para></td>
<td><para style="P14"><!--<font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font>--></para></td>
<td><para style="P3"><!--<font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font>--></para></td>
<td><para style="P3"><!--<font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font>--></para></td>
<td><para style="P3"><!--<font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font>--></para></td>
<tr> [[ repeatIn(lines(data['form']), 'a') ]]
<td><para style="P14"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><i>[[ a['code'] and a['code'] or removeParentNode('tr') ]]</i></para></td>
<td><para style="P14"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font></para></td>
<td><para style="P3"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
<td><para style="P3"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font></para></td>
<td><para style="P3"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font></para></td>
</tr>
</blockTable>
</story>
@@ -27,8 +27,6 @@
"access_account_tax_code_template","account.tax.code.template","model_account_tax_code_template","account.group_account_manager",1,1,1,1
"access_account_chart_template","account.chart.template","model_account_chart_template","account.group_account_manager",1,1,1,1
"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1
"access_wizard_multi_charts_accounts","wizard.multi.charts.accounts","model_wizard_multi_charts_accounts","account.group_account_manager",1,1,1,1
"access_account_bank_accounts_wizard","account.bank.accounts.wizard","model_account_bank_accounts_wizard","account.group_account_manager",1,1,1,1
"access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_account_user",1,1,1,1
"access_account_bank_statement_reconcile","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_account_user",1,1,1,1
"access_account_bank_statement_reconcile_line","account.bank.statement.reconcile.line","model_account_bank_statement_reconcile_line","account.group_account_user",1,1,1,1
@@ -66,8 +64,6 @@
"access_account_fiscalyear_invoice","account.fiscalyear.invoice","model_account_fiscalyear","account.group_account_invoice",1,0,0,0
"access_res_currency_account_manager","res.currency account manager","base.model_res_currency","group_account_manager",1,1,1,1
"access_res_currency_rate_account_manager","res.currency.rate account manager","base.model_res_currency_rate","group_account_manager",1,1,1,1
"access_account_add_tmpl_wizard_account_manager","account.addtmpl.wizard account manager","model_account_addtmpl_wizard","group_account_manager",1,1,1,1
"access_account_add_tmpl_wizard_system_manager","account.addtmpl.wizard system manager","model_account_addtmpl_wizard","base.group_system",1,1,1,1
"access_account_invoice_user","account.invoice user","model_account_invoice","base.group_user",1,0,0,0
"access_account_invoice_user","account.invoice.line user","model_account_invoice_line","base.group_user",1,0,0,0
"access_account_payment_term_partner_manager","account.payment.term partner manager","model_account_payment_term","base.group_user",1,0,0,0
@@ -85,7 +81,6 @@
"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,1,1,1
"access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1
"access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0
"access_account_installer","account.installer","model_account_installer","base.group_system",1,1,1,1
"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,0,0,0
"access_temp_range","temp.range","model_temp_range","account.group_account_manager",1,0,0,0
"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,0,0,0
@@ -93,13 +88,3 @@
"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,0,0,0
"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,0,0,0
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_manager",1,0,0,0
"access_project_account_analytic_line","project.account.analytic.line","model_project_account_analytic_line","account.group_account_manager",1,1,1,1
"access_account_move_line_reconcile_select","account.move.line.reconcile.select","model_account_move_line_reconcile_select","account.group_account_manager",1,1,1,1
"access_account_move_line_unreconcile_select","account.move.line.unreconcile.select","model_account_move_line_unreconcile_select","account.group_account_manager",1,1,1,1
"access_account_invoice_refund","account.invoice.refund","model_account_invoice_refund","account.group_account_manager",1,1,1,1
"access_account_move_journal","account.move.journal","model_account_move_journal","account.group_account_manager",1,1,1,1
"access_account_move_bank_reconcile","account.move.bank.reconcile","model_account_move_bank_reconcile","account.group_account_manager",1,1,1,1
"access_account_subscription_generate","account.subscription.generate","model_account_subscription_generate","account.group_account_manager",1,1,1,1
"access_account_period_close","account.period.close","model_account_period_close","account.group_account_manager",1,1,1,1
"access_account_fiscalyear_close_state","account.fiscalyear.close.state","model_account_fiscalyear_close_state","account.group_account_manager",1,1,1,1
"access_account_chart","account.chart","model_account_chart","account.group_account_manager",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
27 access_account_tax_code_template account.tax.code.template model_account_tax_code_template account.group_account_manager 1 1 1 1
28 access_account_chart_template account.chart.template model_account_chart_template account.group_account_manager 1 1 1 1
29 access_account_tax_template account.tax.template model_account_tax_template account.group_account_manager 1 1 1 1
access_wizard_multi_charts_accounts wizard.multi.charts.accounts model_wizard_multi_charts_accounts account.group_account_manager 1 1 1 1
access_account_bank_accounts_wizard account.bank.accounts.wizard model_account_bank_accounts_wizard account.group_account_manager 1 1 1 1
30 access_account_bank_statement account.bank.statement model_account_bank_statement account.group_account_user 1 1 1 1
31 access_account_bank_statement_reconcile account.bank.statement.reconcile model_account_bank_statement_reconcile account.group_account_user 1 1 1 1
32 access_account_bank_statement_reconcile_line account.bank.statement.reconcile.line model_account_bank_statement_reconcile_line account.group_account_user 1 1 1 1
64 access_account_fiscalyear_invoice account.fiscalyear.invoice model_account_fiscalyear account.group_account_invoice 1 0 0 0
65 access_res_currency_account_manager res.currency account manager base.model_res_currency group_account_manager 1 1 1 1
66 access_res_currency_rate_account_manager res.currency.rate account manager base.model_res_currency_rate group_account_manager 1 1 1 1
access_account_add_tmpl_wizard_account_manager account.addtmpl.wizard account manager model_account_addtmpl_wizard group_account_manager 1 1 1 1
access_account_add_tmpl_wizard_system_manager account.addtmpl.wizard system manager model_account_addtmpl_wizard base.group_system 1 1 1 1
67 access_account_invoice_user account.invoice user model_account_invoice base.group_user 1 0 0 0
68 access_account_invoice_user account.invoice.line user model_account_invoice_line base.group_user 1 0 0 0
69 access_account_payment_term_partner_manager account.payment.term partner manager model_account_payment_term base.group_user 1 0 0 0
81 access_account_fiscal_position_account_template account.fiscal.position.account.template model_account_fiscal_position_account_template account.group_account_manager 1 1 1 1
82 access_account_sequence_fiscal_year account.sequence.fiscalyear model_account_sequence_fiscalyear account.group_account_user 1 1 1 1
83 access_account_sequence_fiscal_year_user account.sequence.fiscalyear user model_account_sequence_fiscalyear base.group_user 1 0 0 0
access_account_installer account.installer model_account_installer base.group_system 1 1 1 1
84 access_report_account_receivable report.account.receivable model_report_account_receivable account.group_account_manager 1 0 0 0
85 access_temp_range temp.range model_temp_range account.group_account_manager 1 0 0 0
86 access_report_aged_receivable report.aged.receivable model_report_aged_receivable account.group_account_manager 1 0 0 0
88 access_report_account_type_sales report.account_type.sales model_report_account_type_sales account.group_account_manager 1 0 0 0
89 access_report_account_sales report.account.sales model_report_account_sales account.group_account_manager 1 0 0 0
90 access_account_invoice_report account.invoice.report model_account_invoice_report account.group_account_manager 1 0 0 0
access_project_account_analytic_line project.account.analytic.line model_project_account_analytic_line account.group_account_manager 1 1 1 1
access_account_move_line_reconcile_select account.move.line.reconcile.select model_account_move_line_reconcile_select account.group_account_manager 1 1 1 1
access_account_move_line_unreconcile_select account.move.line.unreconcile.select model_account_move_line_unreconcile_select account.group_account_manager 1 1 1 1
access_account_invoice_refund account.invoice.refund model_account_invoice_refund account.group_account_manager 1 1 1 1
access_account_move_journal account.move.journal model_account_move_journal account.group_account_manager 1 1 1 1
access_account_move_bank_reconcile account.move.bank.reconcile model_account_move_bank_reconcile account.group_account_manager 1 1 1 1
access_account_subscription_generate account.subscription.generate model_account_subscription_generate account.group_account_manager 1 1 1 1
access_account_period_close account.period.close model_account_period_close account.group_account_manager 1 1 1 1
access_account_fiscalyear_close_state account.fiscalyear.close.state model_account_fiscalyear_close_state account.group_account_manager 1 1 1 1
access_account_chart account.chart model_account_chart account.group_account_manager 1 1 1 1
@@ -58,8 +58,8 @@ class account_balance_report(osv.osv_memory):
# return result
def _print_report(self, cr, uid, ids, data, query_line, context=None):
data['form'].update(self.read(cr, uid, ids, ['display_account', 'company_id',])[0])
data['form']['query_line'] = query_line
data['form'].update(self.read(cr, uid, ids, ['display_account',])[0])
data['form']['query_line'] = query_line + ' AND l.journal_id in (%s)' % ','.join(map(str, data['form']['journal_ids']))
return { 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data, 'nodestroy':True, }
account_balance_report()
+20 -22
View File
@@ -21,32 +21,30 @@
{
'name': 'report_account_analytic',
'version': '1.0',
'category': 'Generic Modules/Accounting',
'name' : 'report_account_analytic',
'version' : '1.1',
'category' : 'Generic Modules/Accounting',
'description': """
This module is for modifying account analytic view to show
important data to project manager of services companies.
Adds menu to show relevant information to each manager..
This module is for modifying account analytic view to show
important data to project manager of services companies.
Adds menu to show relevant information to each manager..
You can also view the report of account analytic summary
user-wise as well as month wise.
You can also view the report of account analytic summary
user-wise as well as month wise.
""",
"version" : "1.1",
"author" : "Camptocamp",
"category" : "Generic Modules/Accounting",
"module": "",
"website": "http://www.camptocamp.com/",
"depends" : ["account","hr_timesheet","hr_timesheet_invoice","project"],
"init_xml" : [],
"update_xml" : [
"security/ir.model.access.csv",
"account_analytic_analysis_view.xml",
"account_analytic_analysis_menu.xml",
],
'demo_xml': [],
"author" : "Camptocamp",
"website" : "http://www.camptocamp.com/",
"depends" : ["hr_timesheet_invoice"],
"init_xml" : [],
"update_xml": [
"security/ir.model.access.csv",
"account_analytic_analysis_view.xml",
"account_analytic_analysis_menu.xml",
],
'demo_xml' : [],
'installable': True,
'active': False,
'active' : False,
'certificate': '0042927202589',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -19,18 +19,16 @@
#
##############################################################################
import operator
from osv import osv, fields
from osv.orm import intersect
import tools.sql
from tools.translate import _
class account_analytic_account(osv.osv):
_name = "account.analytic.account"
_inherit = "account.analytic.account"
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}):
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
if parent_ids:
@@ -46,7 +44,7 @@ class account_analytic_account(osv.osv):
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context)
def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}):
def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
res2 = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
@@ -92,7 +90,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2) + round(res2.get(id, 0.0),2)
return res
def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context={}):
def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context=None):
res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
if parent_ids:
@@ -117,7 +115,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2)
return res
def _hours_quantity_calc(self, cr, uid, ids, name, arg, context={}):
def _hours_quantity_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
if parent_ids:
@@ -141,7 +139,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2)
return res
def _total_cost_calc(self, cr, uid, ids, name, arg, context={}):
def _total_cost_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
if parent_ids:
@@ -158,7 +156,7 @@ class account_analytic_account(osv.osv):
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context)
# TODO Take care of pricelist and purchase !
def _ca_theorical_calc(self, cr, uid, ids, name, arg, context={}):
def _ca_theorical_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
res2 = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
@@ -202,7 +200,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2) + round(res2.get(id, 0.0),2)
return res
def _last_worked_date_calc (self, cr, uid, ids, name, arg, context={}):
def _last_worked_date_calc (self, cr, uid, ids, name, arg, context = None):
res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
if parent_ids:
@@ -223,7 +221,7 @@ class account_analytic_account(osv.osv):
res[id] = res.get(id, '')
return res
def _last_invoice_date_calc (self, cr, uid, ids, name, arg, context={}):
def _last_invoice_date_calc (self, cr, uid, ids, name, arg, context=None):
res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
if parent_ids:
@@ -247,7 +245,7 @@ class account_analytic_account(osv.osv):
res[id] = res.get(id, '')
return res
def _last_worked_invoiced_date_calc (self, cr, uid, ids, name, arg, context={}):
def _last_worked_invoiced_date_calc (self, cr, uid, ids, name, arg, context=None):
res = {}
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
if parent_ids:
@@ -268,7 +266,7 @@ class account_analytic_account(osv.osv):
res[id] = res.get(id, '')
return res
def _remaining_hours_calc(self, cr, uid, ids, name, arg, context={}):
def _remaining_hours_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
for account in self.browse(cr, uid, ids):
if account.quantity_max != 0:
@@ -279,7 +277,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2)
return res
def _hours_qtt_invoiced_calc(self, cr, uid, ids, name, arg, context={}):
def _hours_qtt_invoiced_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
for account in self.browse(cr, uid, ids):
res[account.id] = account.hours_quantity - account.hours_qtt_non_invoiced
@@ -289,7 +287,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2)
return res
def _revenue_per_hour_calc(self, cr, uid, ids, name, arg, context={}):
def _revenue_per_hour_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
for account in self.browse(cr, uid, ids):
if account.hours_qtt_invoiced == 0:
@@ -300,7 +298,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2)
return res
def _real_margin_rate_calc(self, cr, uid, ids, name, arg, context={}):
def _real_margin_rate_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
for account in self.browse(cr, uid, ids):
if account.ca_invoiced == 0:
@@ -313,7 +311,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2)
return res
def _remaining_ca_calc(self, cr, uid, ids, name, arg, context={}):
def _remaining_ca_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
for account in self.browse(cr, uid, ids):
if account.amount_max != 0:
@@ -324,7 +322,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2)
return res
def _real_margin_calc(self, cr, uid, ids, name, arg, context={}):
def _real_margin_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
for account in self.browse(cr, uid, ids):
res[account.id] = account.ca_invoiced + account.total_cost
@@ -332,7 +330,7 @@ class account_analytic_account(osv.osv):
res[id] = round(res.get(id, 0.0),2)
return res
def _theorical_margin_calc(self, cr, uid, ids, name, arg, context={}):
def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None):
res = {}
for account in self.browse(cr, uid, ids):
res[account.id] = account.ca_theorical + account.total_cost
@@ -426,6 +424,7 @@ class account_analytic_account_summary_user(osv.osv):
string='Total Time'),
'user' : fields.many2one('res.users', 'User'),
}
def init(self, cr):
tools.sql.drop_view_if_exists(cr, 'account_analytic_analysis_summary_user')
cr.execute('CREATE OR REPLACE VIEW account_analytic_analysis_summary_user AS (' \
@@ -731,6 +730,5 @@ class account_analytic_account_summary_month(osv.osv):
account_analytic_account_summary_month()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,7 +1,6 @@
<openerp>
<data>
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
<!-- <menuitem id="next_id_71" name="Financial Project Management" parent="base.menu_main_pm" groups="account.group_account_invoice" sequence="20"/>-->
<menuitem id="menu_invoicing" name="Billing" parent="base.menu_main_pm" sequence="4"/>
<record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
@@ -14,17 +13,6 @@
</record>
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="menu_invoicing"/>
<record id="action_account_analytic_all" model="ir.actions.act_window">
<field name="name">All Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="account.view_account_analytic_account_list"/>
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
<field name="domain">[]</field>
</record>
<!-- <menuitem name="Analytic Accounts" action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="next_id_71"/>-->
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
<field name="name">Overpassed Accounts</field>
<field name="res_model">account.analytic.account</field>
@@ -24,7 +24,6 @@
<field name="ca_invoiced"/>
<field name="ca_theorical"/>
<newline/>
<!-- <field name="old"/> -->
<field name="hours_quantity"/>
<field name="hours_qtt_invoiced"/>
<field name="remaining_hours"/>
@@ -38,13 +37,12 @@
<separator colspan="4" string="Key dates"/>
<field name="last_invoice_date"/>
<field name="last_worked_invoiced_date"/>
<field name="last_worked_date"/>
<separator colspan="4" string="To be invoiced"/>
<field name="hours_qtt_non_invoiced"/>
<field name="ca_to_invoice"/>
</page>
<page string="Stats by month">
<field colspan="4" name="month_ids" nolabel="1">
@@ -81,20 +79,18 @@
</field>
</field>
</record>
<record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
<field name="name">account.analytic.account.tree</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="account.view_account_analytic_account_list"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="date" position="before">
<field name="last_invoice_date"/>
<field name="ca_to_invoice"/>
</field>
</field>
</record>
<record id="view_account_analytic_simplified" model="ir.ui.view">
@@ -110,7 +106,6 @@
<field name="remaining_hours"/>
<field name="ca_to_invoice"/>
<field name="last_invoice_date"/>
</tree>
</field>
</record>
+11 -11
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 06:50+0000\n"
"Last-Translator: Tor Syversen <sol-moe@online.no>\n"
"PO-Revision-Date: 2010-07-03 18:41+0000\n"
"Last-Translator: Mathias Bøhn Grytemark <Unknown>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:10+0000\n"
"X-Launchpad-Export-Date: 2010-07-04 03:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_analysis
@@ -32,7 +32,7 @@ msgstr "Timer, summert pr. bruker"
#. module: account_analytic_analysis
#: field:account.analytic.account,last_invoice_date:0
msgid "Last Invoice Date"
msgstr ""
msgstr "Forrige fakturadato"
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_ca:0
@@ -58,7 +58,7 @@ msgstr "Mine nåværende konti"
#. module: account_analytic_analysis
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Ugyldig XML for visningsarkitektur!"
#. module: account_analytic_analysis
#: help:account.analytic.account,last_invoice_date:0
@@ -84,7 +84,7 @@ msgstr ""
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
msgstr "Objektets navn må starte med x_ og ikke inneholde spesialkarakterer!"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_new
@@ -123,7 +123,7 @@ msgstr ""
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing
msgid "Invoicing"
msgstr ""
msgstr "Fakturering"
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_date:0
@@ -145,7 +145,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_hours:0
msgid "Remaining Hours"
msgstr ""
msgstr "Gjenværende timer"
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_theorical:0
@@ -159,7 +159,7 @@ msgstr ""
#: field:account.analytic.account,user_ids:0
#: field:account_analytic_analysis.summary.user,user:0
msgid "User"
msgstr ""
msgstr "Bruker"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_pending
@@ -182,7 +182,7 @@ msgstr ""
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_managed
msgid "My Accounts"
msgstr ""
msgstr "Mine kontoer"
#. module: account_analytic_analysis
#: model:ir.module.module,description:account_analytic_analysis.module_meta_information
@@ -195,7 +195,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_non_invoiced:0
msgid "Uninvoiced Hours"
msgstr ""
msgstr "Ufakturerte timer"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_quantity:0
@@ -20,4 +20,5 @@
##############################################################################
import account_analytic_default
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -19,11 +19,10 @@
#
##############################################################################
{
'name': 'Account Analytic Default',
'version': '1.0',
'category': 'Generic Modules/Accounting',
'name' : 'Account Analytic Default',
'version' : '1.0',
'category' : 'Generic Modules/Accounting',
'description': """
Allows to automatically select analytic accounts based on criterions:
* Product
@@ -32,14 +31,15 @@ Allows to automatically select analytic accounts based on criterions:
* Company
* Date
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['account', 'sale'],
'init_xml': [],
'author' : 'Tiny',
'website' : 'http://www.openerp.com',
'depends' : ['account', 'sale'],
'init_xml' : [],
'update_xml': ['security/ir.model.access.csv', 'account_analytic_default_view.xml'],
'demo_xml': [],
'demo_xml' : [],
'installable': True,
'active': False,
'certificate': '0074229833581',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -19,10 +19,10 @@
#
##############################################################################
from osv import fields,osv
from osv import orm
import time
from osv import fields,osv
class account_analytic_default(osv.osv):
_name = 'account.analytic.default'
_description = 'Analytic Distribution'
@@ -38,7 +38,7 @@ class account_analytic_default(osv.osv):
'date_start': fields.date('Start Date'),
'date_stop': fields.date('End Date'),
}
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context={}):
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context=None):
domain = []
if product_id:
domain += ['|',('product_id','=',product_id)]
@@ -71,7 +71,7 @@ class account_invoice_line(osv.osv):
_inherit = 'account.invoice.line'
_description = 'Invoice Line'
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, currency_id=False, context={}):
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition, price_unit, address_invoice_id, currency_id=currency_id, context=context)
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context)
if rec:
@@ -101,7 +101,7 @@ class sale_order_line(osv.osv):
_inherit = 'sale.order.line'
# Method overridden to set the analytic account by default on criterion match
def invoice_line_create(self, cr, uid, ids, context={}):
def invoice_line_create(self, cr, uid, ids, context=None):
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context)
if not ids:
return create_ids
@@ -117,6 +117,4 @@ class sale_order_line(osv.osv):
sale_order_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -6,7 +6,7 @@
<field name="model">account.analytic.default</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Analytic Defaults" editable="bottom">
<tree string="Analytic Defaults">
<field name="sequence"/>
<field name="analytic_id" required="1"/>
<field name="product_id"/>
@@ -18,17 +18,18 @@
</tree>
</field>
</record>
<record id="view_account_analytic_default_form" model="ir.ui.view">
<field name="name">account.analytic.default.form</field>
<field name="model">account.analytic.default</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Analytic Defaults">
<field name="analytic_id" select="1" required="1"/>
<field name="analytic_id" required="1"/>
<field name="sequence"/>
<separator string="Conditions" colspan="4"/>
<field name="product_id" select="1"/>
<field name="partner_id" select="1"/>
<field name="product_id"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="date_start"/>
@@ -36,19 +37,37 @@
</form>
</field>
</record>
<record id="view_account_analytic_default_form_search" model="ir.ui.view">
<field name="name">account.analytic.default.search</field>
<field name="model">account.analytic.default</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Accounts">
<field name="analytic_id"/>
<field name="product_id"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="company_id"/>
</search>
</field>
</record>
<record id="action_analytic_default_form" model="ir.actions.act_window">
<field name="name">Analytic Defaults</field>
<field name="res_model">account.analytic.default</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_account_analytic_default_form_search"/>
</record>
<!-- <menuitem-->
<!-- action="action_analytic_default_form"-->
<!-- id="menu_analytic_defaul_form"-->
<!-- parent="account.menu_analytic_accounting"/>-->
<act_window
domain="[('account_id', '=', active_id)]" id="act_account_acount_move_line_open" name="Entries" res_model="account.move.line" src_model="account.account"/>
name="Entries"
id="act_account_acount_move_line_open"
res_model="account.move.line"
src_model="account.account"
domain="[('account_id', '=', active_id)]"/>
<act_window
name="Analytic Rules"
id="analytic_rule_action_partner"
@@ -56,12 +75,14 @@
src_model="res.partner"
domain="[('partner_id','=',active_id)]"
groups="base.group_extended"/>
<act_window
name="Analytic Rules"
id="analytic_rule_action_user"
res_model="account.analytic.default"
src_model="res.users"
domain="[('user_id','=',active_id)]"/>
<act_window
name="Analytic Rules"
res_model="account.analytic.default"
@@ -22,5 +22,6 @@
import account_analytic_plans
import wizard
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+10 -9
View File
@@ -21,9 +21,9 @@
{
'name': 'Multiple-plans management in Analytic Accounting',
'version': '1.0',
'category': 'Generic Modules/Accounting',
'name' : 'Multiple-plans management in Analytic Accounting',
'version' : '1.0',
'category' : 'Generic Modules/Accounting',
'description': """This module allows to use several analytic plans, according to the general journal,
so that multiple analytic lines are created when the invoice or the entries
are confirmed.
@@ -54,10 +54,10 @@ for one account entry.
The analytic plan validates the minimum and maximum percentage at the time of creation
of distribution models.
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['account', 'account_analytic_default'],
'init_xml': [],
'author' : 'Tiny',
'website' : 'http://www.openerp.com',
'depends' : ['account', 'account_analytic_default'],
'init_xml' : [],
'update_xml': [
'security/ir.model.access.csv',
'account_analytic_plans_view.xml',
@@ -65,9 +65,10 @@ of distribution models.
'wizard/analytic_plan_create_model_view.xml',
'wizard/account_crossovered_analytic_view.xml'
],
'demo_xml': [],
'demo_xml' : [],
'installable': True,
'active': False,
'active' : False,
'certificate': '0036417675373',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -19,15 +19,9 @@
#
##############################################################################
from lxml import etree
from mx import DateTime
from mx.DateTime import now
import time
import netsvc
from osv import fields, osv,orm
import ir
from osv import fields, osv
import tools
from tools.translate import _
@@ -64,6 +58,7 @@ account_analytic_plan()
class account_analytic_plan_line(osv.osv):
_name = "account.analytic.plan.line"
_description = "Analytic Plan Line"
_order = "sequence, id"
_columns = {
'plan_id':fields.many2one('account.analytic.plan','Analytic Plan'),
'name': fields.char('Plan Name', size=64, required=True, select=True),
@@ -73,16 +68,15 @@ class account_analytic_plan_line(osv.osv):
'max_required': fields.float('Maximum Allowed (%)'),
}
_defaults = {
'min_required': lambda *args: 100.0,
'max_required': lambda *args: 100.0,
'min_required': 100.0,
'max_required': 100.0,
}
_order = "sequence,id"
account_analytic_plan_line()
class account_analytic_plan_instance(osv.osv):
_name='account.analytic.plan.instance'
_name = 'account.analytic.plan.instance'
_description = 'Analytic Plan Instance'
_columns={
_columns = {
'name':fields.char('Analytic Distribution', size=64),
'code':fields.char('Distribution Code', size=16),
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal' ),
@@ -116,7 +110,9 @@ class account_analytic_plan_instance(osv.osv):
'account4_ids':False, 'account5_ids':False, 'account6_ids':False})
return super(account_analytic_plan_instance, self).copy(cr, uid, id, default, context)
def _default_journal(self, cr, uid, context={}):
def _default_journal(self, cr, uid, context=None):
if not context:
context = {}
if context.has_key('journal_id') and context['journal_id']:
journal = self.pool.get('account.journal').browse(cr, uid, context['journal_id'])
if journal.analytic_journal_id:
@@ -124,10 +120,10 @@ class account_analytic_plan_instance(osv.osv):
return False
_defaults = {
'plan_id': lambda *args: False,
'plan_id': False,
'journal_id': _default_journal,
}
def name_get(self, cr, uid, ids, context={}):
def name_get(self, cr, uid, ids, context=None):
res = []
for inst in self.browse(cr, uid, ids, context):
name = inst.name or '/'
@@ -207,7 +203,7 @@ class account_analytic_plan_instance(osv.osv):
return super(account_analytic_plan_instance, self).create(cr, uid, vals, context)
def write(self, cr, uid, ids, vals, context={}, check=True, update_check=True):
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
this = self.browse(cr, uid, ids[0])
if this.plan_id and not vals.has_key('plan_id'):
#this instance is a model, so we have to create a new plan instance instead of modifying it
@@ -237,9 +233,9 @@ class account_analytic_plan_instance_line(osv.osv):
'rate':fields.float('Rate (%)', required=True),
}
_defaults = {
'rate': lambda *args: 100.0
'rate': 100.0
}
def name_get(self, cr, uid, ids, context={}):
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
return []
reads = self.read(cr, uid, ids, ['analytic_account_id'], context)
@@ -297,7 +293,7 @@ class account_move_line(osv.osv):
del(data['analytics_id'])
return data
def create_analytic_lines(self, cr, uid, ids, context={}):
def create_analytic_lines(self, cr, uid, ids, context=None):
super(account_move_line, self).create_analytic_lines(cr, uid, ids, context)
analytic_line_obj = self.pool.get('account.analytic.line')
for line in self.browse(cr, uid, ids, context):
@@ -333,7 +329,7 @@ class account_invoice(osv.osv):
_name = "account.invoice"
_inherit="account.invoice"
def line_get_convert(self, cr, uid, x, part, date, context={}):
def line_get_convert(self, cr, uid, x, part, date, context=None):
res=super(account_invoice,self).line_get_convert(cr, uid, x, part, date, context)
res['analytics_id']=x.get('analytics_id',False)
return res
@@ -399,7 +395,7 @@ class sale_order_line(osv.osv):
_inherit = 'sale.order.line'
# Method overridden to set the analytic account by default on criterion match
def invoice_line_create(self, cr, uid, ids, context={}):
def invoice_line_create(self, cr, uid, ids, context=None):
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context)
if ids:
sale_line_obj = self.browse(cr, uid, ids[0], context)
@@ -11,13 +11,6 @@
auto="False"
menu="False"/>
<!--<wizard
id="account_analytic_account_inverted_balance_report"
string="Crossovered Analytic"
model="account.analytic.account"
name="wizard.crossovered.analytic"
keyword="client_print_multi"/>-->
</data>
</openerp>
@@ -89,7 +89,11 @@
<field name="code" select="1"/>
<field name="plan_id" required="True"/>
<field name="journal_id"/>
<field name="account_ids" string="Analytic Distribution" colspan="4">
<field name="account_ids" nolabel="1" colspan="4">
<form string="Analytic Distribution">
<field name="rate"/>
<field name="analytic_account_id"/>
</form>
<tree string="Analytic Distribution" editable="bottom">
<field name="rate"/>
<field name="analytic_account_id"/>
@@ -124,16 +128,11 @@
<act_window name="Distribution Models"
domain="[('plan_id', '=', active_id),('plan_id','&lt;&gt;',False)]"
context="{'plan_id': active_id}"
context="{'plan_id':active_id}"
res_model="account.analytic.plan.instance"
src_model="account.analytic.plan"
id="account_analytic_instance_model_open"/>
<!-- <menuitem-->
<!-- name="Analytic Distribution's models" parent="account.account_def_analytic_journal"-->
<!-- id="menu_account_analytic_plan_instance_action"-->
<!-- action="account_analytic_plan_instance_action"/>-->
<record model="ir.ui.view" id="account_analytic_plan_instance_line_form">
<field name="name">account.analytic.plan.instance.line.form</field>
<field name="model">account.analytic.plan.instance.line</field>
@@ -168,7 +167,7 @@
<form string="Analytic Plan">
<field name="name" select="1"/>
<field name="default_instance_id"/>
<field name="plan_ids" colspan="4"/>
<field name="plan_ids" colspan="4" nolabel="1"/>
</form>
</field>
</record>
@@ -192,7 +191,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem
parent="account.menu_analytic"
name="Multi Plans"
@@ -201,7 +200,7 @@
<menuitem
parent="menu_account_analytic_multi_plan_action"
id="menu_account_analytic_plan_action"
action="account_analytic_plan_form_action"/>
action="account_analytic_plan_form_action"/>
<record model="ir.ui.view" id="account_analytic_plan_line_form">
<field name="name">account.analytic.plan.line.form</field>
@@ -234,7 +233,7 @@
</field>
</record>
<!-- add property field on product -->
<!-- add property field on default analytic account-->
<record model="ir.ui.view" id="view_default_inherit_form">
<field name="name">account.analytic.default.form.plans</field>
@@ -20,5 +20,6 @@
##############################################################################
import crossovered_analytic
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -19,20 +19,20 @@
#
##############################################################################
import pooler
import time
from report import report_sxw
class crossovered_analytic(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(crossovered_analytic, self).__init__(cr, uid, name, context=context)
super(crossovered_analytic, self).__init__(cr, uid, name, context = context)
self.localcontext.update( {
'time': time,
'lines': self._lines,
'ref_lines' : self._ref_lines,
'find_children':self.find_children,
})
self.base_amount=0.00
self.base_amount = 0.00
def find_children(self,ref_ids):
to_return_ids = []
@@ -153,23 +153,23 @@ class crossovered_analytic(report_sxw.rml_parse):
if not form['empty_line']:
res.append(result)
else:
result={}
res=[]
result['id']=acc_id
result = {}
res = []
result['id'] = acc_id
data_account = acc_pool.browse(self.cr,self.uid,acc_id)
result['acc_name']=data_account.name
result['acc_name'] = data_account.name
result['code'] = data_account.code
result['amt']=result['qty']=result['perc']=0.00
result['amt'] = result['qty'] = result['perc'] = 0.00
if not form['empty_line']:
res.append(result)
for item in res:
obj_acc=acc_pool.name_get(self.cr,self.uid,[item['id']])
item['acc_name']=obj_acc[0][1]
obj_acc = acc_pool.name_get(self.cr,self.uid,[item['id']])
item['acc_name'] = obj_acc[0][1]
final.append(item)
return final
report_sxw.report_sxw('report.account.analytic.account.crossovered.analytic', 'account.analytic.account', 'addons/account_analytic_plans/report/crossovered_analytic.rml',parser=crossovered_analytic, header=False)
report_sxw.report_sxw('report.account.analytic.account.crossovered.analytic', 'account.analytic.account', 'addons/account_analytic_plans/report/crossovered_analytic.rml',parser = crossovered_analytic, header = False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -21,5 +21,6 @@
import analytic_plan_create_model
import account_crossovered_analytic
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -8,17 +8,19 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Crossovered Analytic">
<group col="4" colspan="6">
<field name="date1"/>
<field name="date2"/>
<field name="ref" colspan="4"/>
<field name="journal_ids" colspan="4"/>
<field name="empty_line"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="print_report" string="Print" colspan="1" type="object" icon="gtk-print"/>
<group height="280" width="300">
<group col="4" colspan="6">
<field name="date1"/>
<field name="date2"/>
<field name="ref" colspan="4"/>
<field name="journal_ids" colspan="4"/>
<field name="empty_line"/>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="print_report" string="Print" colspan="1" type="object" icon="gtk-print"/>
</group>
</group>
</form>
</field>
@@ -75,11 +75,6 @@
<page string="Accounts">
<field name="account_ids" colspan="4" nolabel="1"/>
</page>
<page string="Dotations">
<button string="Spread" name="%(action_account_budget_spread)d" type="action" icon="gtk-fullscreen"/>
<field name="dotation_ids" colspan="4" nolabel="1"/>
</page>
<page string="Budget Lines">
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="graph,tree">
<graph type="bar" string="Lines">
@@ -8,12 +8,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Dates Period">
<field name="date_from"/>
<field name="date_to"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
<group width="450">
<separator string="This wizard is used to print budget" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group>
</form>
</field>
@@ -8,12 +8,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Dates Period">
<field name="date_from"/>
<field name="date_to"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
<group width="450">
<separator string="This wizard is used to print budget" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group>
</form>
</field>
@@ -8,13 +8,16 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Dates Period">
<field name="date_from"/>
<field name="date_to"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
<group width="450">
<separator string="This wizard is used to print summary of budgets" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group>
</form>
</field>
</record>
@@ -8,13 +8,16 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Dates Period">
<field name="date1"/>
<field name="date2"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
<group width="450">
<separator string="Print Budgets" colspan="4"/>
<field name="date1"/>
<field name="date2"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group>
</form>
</field>
</record>
@@ -7,14 +7,16 @@
<field name="model">account.budget.spread</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Dates Period">
<field name="fiscalyear"/>
<field name="amount"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_spread" string="Ok" type="object" icon="gtk-ok" default_focus="1"/>
<form string="Select Fiscalyear">
<group width="480">
<separator string="" colspan="4"/>
<field name="fiscalyear"/>
<field name="amount"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_spread" string="Ok" type="object" icon="gtk-ok"/>
</group>
</group>
</form>
</field>
+1 -1
View File
@@ -19,7 +19,7 @@
#
##############################################################################
import coda
import account_coda
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+8 -5
View File
@@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -24,13 +24,16 @@
"version":"1.0",
"author":"Tiny",
"category":"Account CODA",
"description":"""Module provides functionality to import
"description":"""
Module provides functionality to import
bank statements from coda files.
""",
"depends":["base", "account"],
"demo_xml":["coda_demo.xml"],
"demo_xml":["account_coda_demo.xml"],
"init_xml":[],
"update_xml" : ["security/ir.model.access.csv","coda_wizard.xml","coda_view.xml"],
"update_xml" : ["security/ir.model.access.csv",
"wizard/account_coda_import.xml",
"account_coda_view.xml"],
"active":False,
"installable":True,
@@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -26,15 +26,15 @@ class account_coda(osv.osv):
_name = "account.coda"
_description = "coda for an Account"
_columns = {
'name': fields.binary('Coda file', readonly=True),
'statement_ids': fields.one2many('account.bank.statement','coda_id','Generated Bank Statement', readonly=True),
'name': fields.binary('Coda file', readonly=True ,help="Store the detail of bank statements"),
'statement_ids': fields.one2many('account.bank.statement','coda_id','Generated Bank Statements', readonly=True),
'note': fields.text('Import log', readonly=True),
'journal_id': fields.many2one('account.journal','Bank Journal', readonly=True, select=True),
'date': fields.date('Import Date', readonly=True, select=True),
'journal_id': fields.many2one('account.journal','Journal', readonly=True, select=True,help="Bank Journal"),
'date': fields.date('Date', readonly=True, select=True, help="Import Date"),
'user_id': fields.many2one('res.users','User', readonly=True, select=True),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'date': time.strftime('%Y-%m-%d'),
'user_id': lambda self,cr,uid,context: uid,
}
account_coda()
+89
View File
@@ -0,0 +1,89 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record model="ir.ui.view" id="view_account_coda_form">
<field name="name">account.coda.form</field>
<field name="model">account.coda</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Coda import">
<field name="name" />
<field name="journal_id" />
<field name="date" />
<field name="user_id" />
<notebook colspan="4">
<page string="Log">
<field name="note" colspan="4" nolabel="1"/>
</page>
<page string="Statements">
<field name="statement_ids" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_account_coda_tree">
<field name="name">account.coda.tree</field>
<field name="model">account.coda</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Coda import">
<field name="journal_id" />
<field name="date" />
<field name="user_id" />
<field name="statement_ids"/>
</tree>
</field>
</record>
<record id="view_aaccount_coda_filter" model="ir.ui.view">
<field name="name">account.coda.select</field>
<field name="model">account.coda</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Coda">
<group col="10" colspan="4">
<field name="journal_id"/>
<field name="user_id" default="uid"/>
<field name="date"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
<separator orientation="vertical"/>
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_account_coda">
<field name="name">Coda Statements</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="view_aaccount_coda_filter"/>
</record>
<menuitem name="Coda Statements" parent="account.menu_finance_periodical_processing" id="menu_account_coda" sequence="12"/>
<menuitem name="Coda Statements" parent="menu_account_coda" id="menu_account_coda_statement" action="action_account_coda" sequence="15"/>
<menuitem name="Import Coda Statements" action="action_account_coda_import" parent="menu_account_coda"
id="menu_account_coda_import" sequence="13"/>
<act_window name="Coda File"
domain="[('statement_ids', 'in', [active_id])]"
res_model="account.coda"
src_model="account.bank.statement"
view_type="form"
view_mode="tree,form"
id="act_account_payment_account_bank_statement"/>
</data>
</openerp>
-63
View File
@@ -1,63 +0,0 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record model="ir.ui.view" id="view_account_coda_form">
<field name="name">account.coda.form</field>
<field name="model">account.coda</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Coda import">
<field name="name" />
<field name="journal_id" />
<field name="date" />
<field name="user_id" />
<notebook colspan="4">
<page string="Log">
<field name="note" colspan="4"/>
</page>
<page string="Statements">
<field name="statement_ids" colspan="4"/>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_account_coda_tree">
<field name="name">account.coda.tree</field>
<field name="model">account.coda</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Coda import">
<field name="journal_id" />
<field name="date" />
<field name="user_id" />
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_account_coda">
<field name="name">Coda import</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Coda Statements" parent="account.menu_finance_reporting" id="menu_account_coda" action="action_account_coda" sequence="12"/>
<menuitem name="Import Coda Statements" action="wizard_account_coda_import" parent="account.menu_finance_periodical_processing"
type="wizard" id="menu_account_coda_wizard" sequence="15"/>
<act_window name="Coda File"
domain="[('statement_ids', 'in', [active_id])]"
res_model="account.coda"
src_model="account.bank.statement"
view_type="form"
view_mode="tree,form"
id="act_account_payment_account_bank_statement"/>
</data>
</openerp>
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" ?>
<openerp>
<data>
<wizard
string="Import Coda File"
model="account.bank.statement"
name="account.coda_import"
id="wizard_account_coda_import"
menu="False"
/>
</data>
</openerp>
@@ -1,3 +1,5 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_account_coda","account.coda","model_account_coda","account.group_account_user",1,0,0,0
"access_account_coda_manager","account.coda","model_account_coda","account.group_account_manager",1,1,1,1
"access_account_coda_manager","account.coda","model_account_coda","account.group_account_manager",1,1,1,1
"access_account_coda_import_manager","account.coda.import","model_account_coda_import","account.group_account_manager",1,1,1,1
"access_account_coda_import_user","account.coda","model_account_coda","account.group_account_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_coda account.coda model_account_coda account.group_account_user 1 0 0 0
3 access_account_coda_manager account.coda model_account_coda account.group_account_manager 1 1 1 1
4 access_account_coda_import_manager account.coda.import model_account_coda_import account.group_account_manager 1 1 1 1
5 access_account_coda_import_user account.coda model_account_coda account.group_account_user 1 0 0 0
+1 -1
View File
@@ -19,7 +19,7 @@
#
##############################################################################
import coda_import
import account_coda_import
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,292 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from mx import DateTime
import base64
from osv import fields
from osv import osv
from tools.translate import _
def str2date(date_str):
return time.strftime("%y/%m/%d", time.strptime(date_str, "%d%m%y"))
def str2float(str):
try:
return float(str)
except:
return 0.0
def list2float(lst):
try:
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
except:
return 0.0
class account_coda_import(osv.osv_memory):
_name = 'account.coda.import'
_description = 'Account Coda Import'
_columns = {
'journal_id': fields.many2one('account.journal', 'Bank Journal', required=True),
'def_payable': fields.many2one('account.account', 'Default Payable Account', domain=[('type', '=', 'payable')], required=True, help= 'Set here the payable account that will be used, by default, if the partner is not found'),
'def_receivable': fields.many2one('account.account', 'Default Receivable Account', domain=[('type', '=', 'receivable')], required=True, help= 'Set here the receivable account that will be used, by default, if the partner is not found',),
'awaiting_account': fields.many2one('account.account', 'Default Account for Unrecognized Movement', required=True, help= 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',),
'coda': fields.binary('Coda File', required=True),
'note':fields.text('Log'),
}
def coda_parsing(self, cr, uid, ids, context):
journal_obj=self.pool.get('account.journal')
account_period_obj = self.pool.get('account.period')
partner_bank_obj = self.pool.get('res.partner.bank')
bank_statement_obj = self.pool.get('account.bank.statement')
move_line_obj = self.pool.get('account.move.line')
bank_statement_line_obj = self.pool.get('account.bank.statement.line')
statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile')
account_coda_obj = self.pool.get('account.coda')
mod_obj = self.pool.get('ir.model.data')
data = self.read(cr, uid, ids)[0]
codafile = data['coda']
journal_code = journal_obj.browse(cr, uid, data['journal_id'], context).code
period = account_period_obj.find(cr, uid, context=context)[0]
def_pay_acc = data['def_payable']
def_rec_acc = data['def_receivable']
str_log = ""
err_log = "Errors:\n------\n"
nb_err=0
std_log=''
str_log1 = "Coda File is Imported : "
str_not=''
str_not1=''
bank_statements=[]
bank_statement = {}
recordlist = base64.decodestring(codafile).split('\n')
recordlist.pop()
for line in recordlist:
if line[0] == '0':
# header data
bank_statement["bank_statement_line"]={}
bank_statement_lines = {}
bank_statement['date'] = str2date(line[5:11])
bank_statement['journal_id']=data['journal_id']
period_id = account_period_obj.search(cr, uid, [('date_start', '<=', time.strftime('%Y-%m-%d', time.strptime(bank_statement['date'], "%y/%m/%d"))), ('date_stop', '>=', time.strftime('%Y-%m-%d', time.strptime(bank_statement['date'], "%y/%m/%d")))])
bank_statement['period_id'] = period_id and period_id[0] or False
bank_statement['state']='draft'
elif line[0] == '1':
# old balance data
bal_start = list2float(line[43:58])
if line[42] == '1':
bal_start = - bal_start
bank_statement["balance_start"]= bal_start
bank_statement["acc_number"]=line[5:17]
bank_statement["acc_holder"]=line[64:90]
bank_statement['name'] = journal_code + ' ' + str(line[2:5])
elif line[0]=='2':
# movement data record 2
if line[1]=='1':
# movement data record 2.1
if bank_statement_lines.has_key(line[2:6]):
continue
st_line = {}
st_line['extra_note'] = ''
st_line['statement_id']=0
st_line['ref'] = line[2:10]
st_line['date'] = time.strftime('%Y-%m-%d', time.strptime(str2date(line[115:121]), "%y/%m/%d")),
st_line_amt = list2float(line[32:47])
if line[61]=='1':
st_line['toreconcile'] = True
st_line['name']=line[65:77]
else:
st_line['toreconcile'] = False
st_line['name']=line[62:115]
st_line['free_comm'] = st_line['name']
st_line['val_date']=time.strftime('%Y-%m-%d', time.strptime(str2date(line[47:53]), "%y/%m/%d")),
st_line['entry_date']=time.strftime('%Y-%m-%d', time.strptime(str2date(line[115:121]), "%y/%m/%d")),
st_line['partner_id']=0
if line[31] == '1':
st_line_amt = - st_line_amt
st_line['account_id'] = def_pay_acc
else:
st_line['account_id'] = def_rec_acc
st_line['amount'] = st_line_amt
bank_statement_lines[line[2:6]]=st_line
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name].update({'account_id': data['awaiting_account']})
elif line[1] == '3':
# movement data record 3.1
st_line_name = line[2:6]
st_line_partner_acc = str(line[10:47]).strip()
cntry_number=line[10:47].strip()
contry_name=line[47:125].strip()
bank_ids = partner_bank_obj.search(cr, uid, [('acc_number', '=', st_line_partner_acc)])
bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
if bank_ids:
bank = partner_bank_obj.browse(cr, uid, bank_ids[0], context)
if line and bank.partner_id:
bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
if bank_statement_lines[st_line_name]['amount'] < 0 :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
else :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
else:
nb_err += 1
err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number, contry_name)
bank_statement_lines[st_line_name].update({'account_id': data['awaiting_account']})
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[0]=='3':
if line[1] == '1':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113]
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115]
elif line[1] == '3':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100]
elif line[0]=='8':
# new balance record
bal_end = list2float(line[42:57])
if line[41] == '1':
bal_end = - bal_end
bank_statement["balance_end_real"]= bal_end
elif line[0]=='9':
# footer record
bank_statements.append(bank_statement)
#end for
bkst_list=[]
for statement in bank_statements:
try:
bk_st_id =bank_statement_obj.create(cr, uid, {
'journal_id': statement['journal_id'],
'date':time.strftime('%Y-%m-%d', time.strptime(statement['date'], "%y/%m/%d")),
'period_id':statement['period_id'] or period,
'balance_start': statement["balance_start"],
'balance_end_real': statement["balance_end_real"],
'state': 'draft',
'name': statement['name'],
})
lines=statement["bank_statement_line"]
for value in lines:
line=lines[value]
reconcile_id = False
if line['toreconcile']:
rec_id = move_line_obj.search(cr, uid, [('name', '=', line['name']), ('reconcile_id', '=', False), ('account_id.reconcile', '=', True)])
if rec_id:
reconcile_id = statement_reconcile_obj.create(cr, uid, {
'line_ids': [(6, 0, rec_id)]
}, context=context)
str_not1 = ''
if line.has_key('contry_name') and line.has_key('cntry_number'):
str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"], line["cntry_number"], line["free_comm"]+line['extra_note'], line["val_date"][0], line["entry_date"][0])
id=bank_statement_line_obj.create(cr, uid, {
'name':line['name'],
'date': line['date'],
'amount': line['amount'],
'partner_id':line['partner_id'] or 0,
'account_id':line['account_id'],
'statement_id': bk_st_id,
'reconcile_id': reconcile_id,
'note':str_not1,
'ref':line['ref'],
})
str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"], statement["acc_holder"])
std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
%(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
bkst_list.append(bk_st_id)
except osv.except_osv, e:
cr.rollback()
nb_err+=1
err_log += '\n Application Error : ' + str(e)
raise # REMOVEME
except Exception, e:
cr.rollback()
nb_err+=1
err_log += '\n System Error : '+str(e)
raise # REMOVEME
except :
cr.rollback()
nb_err+=1
err_log += '\n Unknown Error'
raise
err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
err_log += '\nNumber of error :'+ str(nb_err) +'\n'
account_coda_obj.create(cr, uid, {
'name':codafile,
'statement_ids': [(6, 0, bkst_list,)],
'note':str_log1+str_not+std_log+err_log,
'journal_id':data['journal_id'],
'date':time.strftime("%Y-%m-%d"),
'user_id':uid,
})
test=''
test=str_log1 + std_log + err_log
self.write(cr, uid, ids, {'note':test}, context=context)
extraction= { 'statment_ids':bkst_list}
context.update({ 'statment_ids':bkst_list})
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'account_coda_note_view')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
return {
'name': _('Result'),
'res_id': ids[0],
'view_type': 'form',
'view_mode': 'form',
'res_model': 'account.coda.import',
'view_id': False,
'target':'new',
'views': [(resource_id, 'form')],
'context': context,
'type': 'ir.actions.act_window',
}
def action_open_window(self, cr, uid, data, context):
return {
'domain':"[('id','in',%s)]"%(context.get('statment_ids', False)),
'name': 'Statement',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.bank.statement',
'view_id': False,
'type': 'ir.actions.act_window',
}
account_coda_import()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,59 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record id="account_coda_import_view" model="ir.ui.view">
<field name="name">Import Coda Statement</field>
<field name="model">account.coda.import</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Import Coda Statement">
<separator colspan="4" string="Configure Your Journal and Account :" />
<field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
<newline />
<field name="def_payable" />
<newline />
<field name="def_receivable" />
<newline />
<field name="awaiting_account" />
<separator string="Click on 'New' to select your file :" colspan="4"/>
<field name="coda"/>
<newline/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="coda_parsing" string="Import" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<record id="account_coda_note_view" model="ir.ui.view">
<field name="name">Import Coda Statement</field>
<field name="model">account.coda.import</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Result of Imported Coda Statements">
<group width="500" height="420">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="500"/>
<newline/>
<separator colspan="6"/>
<button special="cancel" string="Close" icon="gtk-cancel"/>
<button name="action_open_window" string="Open Statements" type="object" icon="gtk-apply"/>
</group>
</form>
</field>
</record>
<record id="action_account_coda_import" model="ir.actions.act_window">
<field name="name">Import Coda Statement</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda.import</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="view_id" ref="account_coda_import_view"/>
</record>
</data>
</openerp>
-341
View File
@@ -1,341 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import pooler
import time
import datetime
import wizard
import netsvc
import base64
from osv import osv
from tools.translate import _
codawiz_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Select your bank journal :" />
<field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
<newline />
<field name="def_payable" />
<newline />
<field name="def_receivable" />
<newline />
<field name="awaiting_account" />
<separator string="Click on 'New' to select your file :" colspan="4"/>
<field name="coda"/>
</form>
"""
codawiz_fields = {
'journal_id' : {
'string':'Bank Journal',
'type':'many2one',
'relation':'account.journal',
'required':True,
},
'coda' : {
'string':'Coda File',
'type':'binary',
'required':True,
},
'def_payable' : {
'string' : 'Default Payable Account',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'domain':[('type','=','payable')],
'help': 'Set here the payable account that will be used, by default, if the partner is not found',
},
'def_receivable' : {
'string' : 'Default receivable Account',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'domain':[('type','=','receivable')],
'help': 'Set here the receivable account that will be used, by default, if the partner is not found',
},
'awaiting_account' : {
'string' : 'Default Account for Unrecognized Movement',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'help': 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',
}
}
result_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="500"/>
</form>
"""
result_fields = {
'note' : {'string':'Log','type':'text'}
}
def _coda_parsing(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
codafile = data['form']['coda']
journal_code = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context).code
def_pay_acc = data['form']['def_payable']
def_rec_acc = data['form']['def_receivable']
str_log = ""
err_log = "Errors:\n------\n"
nb_err=0
std_log=''
str_log1 = "Coda File is Imported : "
str_not=''
str_not1=''
bank_statements=[]
recordlist = base64.decodestring(codafile).split('\n')
recordlist.pop()
for line in recordlist:
if line[0] == '0':
# header data
bank_statement = {}
bank_statement["bank_statement_line"]={}
bank_statement_lines = {}
bank_statement['date'] = str2date(line[5:11])
bank_statement['journal_id']=data['form']['journal_id']
period_id = pool.get('account.period').search(cr, uid, [('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
bank_statement['period_id'] = period_id[0]
bank_statement['state']='draft'
elif line[0] == '1':
# old balance data
bal_start = list2float(line[43:58])
if line[42] == '1':
bal_start = - bal_start
bank_statement["balance_start"]= bal_start
bank_statement["acc_number"]=line[5:17]
bank_statement["acc_holder"]=line[64:90]
bank_statement['name'] = journal_code + ' ' + str(line[2:5])
elif line[0]=='2':
# movement data record 2
if line[1]=='1':
# movement data record 2.1
if bank_statement_lines.has_key(line[2:6]):
continue
st_line = {}
st_line['extra_note'] = ''
st_line['statement_id']=0
st_line['ref'] = line[2:10]
st_line['date'] = time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
st_line_amt = list2float(line[32:47])
if line[61]=='1':
st_line['toreconcile'] = True
st_line['name']=line[65:77]
else:
st_line['toreconcile'] = False
st_line['name']=line[62:115]
st_line['free_comm'] = st_line['name']
st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[47:53]),"%y/%m/%d")),
st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
st_line['partner_id']=0
if line[31] == '1':
st_line_amt = - st_line_amt
st_line['account_id'] = def_pay_acc
else:
st_line['account_id'] = def_rec_acc
st_line['amount'] = st_line_amt
bank_statement_lines[line[2:6]]=st_line
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
elif line[1] == '3':
# movement data record 3.1
st_line_name = line[2:6]
st_line_partner_acc = str(line[10:47]).strip()
cntry_number=line[10:47].strip()
contry_name=line[47:125].strip()
bank_ids = pool.get('res.partner.bank').search(cr, uid, [('acc_number','=',st_line_partner_acc)])
bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
if bank_ids:
bank = pool.get('res.partner.bank').browse(cr, uid, bank_ids[0], context)
if line and bank.partner_id:
bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
if bank_statement_lines[st_line_name]['amount'] < 0 :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
else :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
else:
nb_err += 1
err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number,contry_name)
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[0]=='3':
if line[1] == '1':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113]
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115]
elif line[1] == '3':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100]
elif line[0]=='8':
# new balance record
bal_end = list2float(line[42:57])
if line[41] == '1':
bal_end = - bal_end
bank_statement["balance_end_real"]= bal_end
elif line[0]=='9':
# footer record
bank_statements.append(bank_statement)
#end for
bkst_list=[]
for statement in bank_statements:
try:
bk_st_id = pool.get('account.bank.statement').create(cr,uid,{
'journal_id': statement['journal_id'],
'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")),
'period_id':statement['period_id'],
'balance_start': statement["balance_start"],
'balance_end_real': statement["balance_end_real"],
'state': 'draft',
'name': statement['name'],
})
lines=statement["bank_statement_line"]
for value in lines:
line=lines[value]
reconcile_id = False
if line['toreconcile']:
rec_id = pool.get('account.move.line').search(cr, uid, [('name','=',line['name']),('reconcile_id','=',False),('account_id.reconcile','=',True)])
if rec_id:
reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, {
'line_ids': [(6, 0, rec_id)]
}, context=context)
str_not1 = ''
if line.has_key('contry_name') and line.has_key('cntry_number'):
str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0])
id=pool.get('account.bank.statement.line').create(cr,uid,{
'name':line['name'],
'date': line['date'],
'amount': line['amount'],
'partner_id':line['partner_id'] or 0,
'account_id':line['account_id'],
'statement_id': bk_st_id,
'reconcile_id': reconcile_id,
'note':str_not1,
'ref':line['ref'],
})
str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"])
std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
%(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
bkst_list.append(bk_st_id)
except osv.except_osv, e:
cr.rollback()
nb_err+=1
err_log += '\n Application Error : ' + str(e)
raise # REMOVEME
except Exception, e:
cr.rollback()
nb_err+=1
err_log += '\n System Error : '+str(e)
raise # REMOVEME
except :
cr.rollback()
nb_err+=1
err_log += '\n Unknown Error'
raise
err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
err_log += '\nNumber of error :'+ str(nb_err) +'\n'
pool.get('account.coda').create(cr, uid, {
'name':codafile,
'statement_ids': [(6, 0, bkst_list,)],
'note':str_log1+str_not+std_log+err_log,
'journal_id':data['form']['journal_id'],
'date':time.strftime("%Y-%m-%d"),
'user_id':uid,
})
return {'note':str_log1 + std_log + err_log ,'journal_id': data['form']['journal_id'], 'coda': data['form']['coda'],'statment_ids':bkst_list}
def str2date(date_str):
return time.strftime("%y/%m/%d",time.strptime(date_str,"%d%m%y"))
def str2float(str):
try:
return float(str)
except:
return 0.0
def list2float(lst):
try:
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
except:
return 0.0
class coda_import(wizard.interface):
def _action_open_window(self, cr, uid, data, context):
form=data['form']
return {
'domain':"[('id','in',%s)]"%(form['statment_ids']),
'name': 'Statement',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.bank.statement',
'view_id': False,
'type': 'ir.actions.act_window',
}
states = {
'init' : {
'actions' : [],
'result' : {'type' : 'form',
'arch' : codawiz_form,
'fields' : codawiz_fields,
'state' : [('end', '_Close'),('extraction', '_Ok') ]}
},
'extraction' : {
'actions' : [_coda_parsing],
'result' : {'type' : 'form',
'arch' : result_form,
'fields' : result_fields,
'state' : [('end', '_Close'),('open', '_Open Statement')]}
},
'open': {
'actions': [],
'result': {'type': 'action', 'action': _action_open_window, 'state': 'end'}
},
}
coda_import("account.coda_import")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+5 -6
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,14 +15,13 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import followup
import followup_report
import account_followup
import account_followup_report
import wizard
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+9 -10
View File
@@ -19,7 +19,6 @@
#
##############################################################################
{
'name': 'Accounting follow-ups management',
'version': '1.0',
@@ -28,19 +27,18 @@
Modules to automate letters for unpaid invoices, with multi-level recalls.
You can define your multiple levels of recall through the menu:
Financial Management/Configuration/Payment Terms/Follow-Ups
Financial Management/Configuration/Follow-Ups
Once it's defined, you can automatically print recalls every day
through simply clicking on the menu:
Financial_Management/Periodical_Processing/Print_Follow-Ups
Financial Management/Periodical Processing/Send followups
It will generate a PDF with all the letters according the the
different levels of recall defined. You can define different policies
for different companies.
for different companies. You can send also mail to the customer.
Note that if you want to change the followup level for a given partner/account entry, you can do it in the menu:
Financial_Management/Reporting/Follow-Ups/All Receivable Entries
Accounting/Reporting/Follow-Ups/All receivable entries
""",
'author': 'Tiny',
@@ -50,13 +48,14 @@
'update_xml': [
'security/ir.model.access.csv',
'wizard/account_followup_print_view.xml',
'followup_report_view.xml',
'followup_view.xml',
'followup_data.xml'
'account_followup_report.xml',
'account_followup_view.xml',
'account_followup_data.xml'
],
'demo_xml': ['followup_demo.xml'],
'demo_xml': ['account_followup_demo.xml'],
'installable': True,
'active': False,
'certificate': '0072481076453',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -23,13 +23,17 @@ from osv import fields, osv
class followup(osv.osv):
_name = 'account_followup.followup'
_description = 'Follow-Up'
_description = 'Account Follow Up'
_columns = {
'name': fields.char('Name', size=64, required=True),
'description': fields.text('Description'),
'followup_line': fields.one2many('account_followup.followup.line', 'followup_id', 'Follow-Up'),
'company_id': fields.many2one('res.company', 'Company'),
}
_defaults = {
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c),
}
followup()
class followup_line(osv.osv):
@@ -42,26 +46,27 @@ class followup_line(osv.osv):
'start': fields.selection([('days','Net Days'),('end_of_month','End of Month')], 'Type of Term', size=64, required=True),
'followup_id': fields.many2one('account_followup.followup', 'Follow Ups', required=True, ondelete="cascade"),
'description': fields.text('Printed Message', translate=True),
}
}
followup_line()
class account_move_line(osv.osv):
_name = 'account.move.line'
_inherit = 'account.move.line'
_columns = {
'followup_line_id': fields.many2one('account_followup.followup.line', 'Follow-up Level'),
'followup_date': fields.date('Latest Follow-up'),
}
}
account_move_line()
class res_company(osv.osv):
_inherit = "res.company"
_columns = {
'follow_up_msg' : fields.text('Follow-up Message', translate=True),
}
}
_defaults = {
'overdue_msg': lambda *a: '''
'overdue_msg': '''
Date : %(date)s
Dear %(partner_name)s,
@@ -75,8 +80,8 @@ Thanks,
%(user_signature)s
%(company_name)s
'''
}
}
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_account_followup_followup_line_tree" model="ir.ui.view">
<field name="name">account_followup.followup.line.tree</field>
<field name="model">account_followup.followup.line</field>
@@ -15,40 +15,39 @@
</tree>
</field>
</record>
<record id="view_account_followup_followup_line_form" model="ir.ui.view">
<field name="name">account_followup.followup.line.form</field>
<field name="model">account_followup.followup.line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Follow-Up Lines">
<field name="sequence" select="1"/>
<field name="name" select="1"/>
<field name="delay" select="1"/>
<field name="start" select="1"/>
<field name="sequence"/>
<field name="name" />
<field name="delay" />
<field name="start" />
<newline/>
<field colspan="4" name="description" select="1"/>
<field colspan="4" name="description" />
<separator string="Legend" colspan="4"/>
<label string="%%(partner_name)s: Partner name" colspan="2"/>
<label string="%%(partner_name)s: Partner Name" colspan="2"/>
<label string="%%(date)s: Current Date" colspan="2"/>
<label string="%%(user_signature)s: User name" colspan="2"/>
<label string="%%(company_name)s: User's Company name" colspan="2"/>
<label string="%%(user_signature)s: User Name" colspan="2"/>
<label string="%%(company_name)s: User's Company Name" colspan="2"/>
</form>
</field>
</record>
<record id="view_account_followup_followup_form" model="ir.ui.view">
<field name="name">account_followup.followup.form</field>
<field name="model">account_followup.followup</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Follow-Up">
<field name="name" select="1"/>
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
<field name="name" />
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<separator colspan="4" string="Description"/>
<field colspan="4" name="description" nolabel="1" select="1"/>
<separator colspan="4" string="Lines"/>
<field colspan="4" name="description" nolabel="1" />
<separator colspan="4" string="Followup Lines"/>
<field colspan="4" name="followup_line" nolabel="1"/>
</form>
</field>
@@ -66,17 +65,30 @@
</field>
</record>
<record id="view_account_followup_filter" model="ir.ui.view">
<field name="name">account.followup.select</field>
<field name="model">account_followup.followup</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Followup">
<group col="10" colspan="4">
<field name="name"/>
</group>
</search>
</field>
</record>
<record id="action_account_followup_definition_form" model="ir.actions.act_window">
<field name="name">Follow-Ups</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account_followup.followup</field>
<field name="search_view_id" ref="view_account_followup_filter"/>
<field name="view_type">form</field>
</record>
<menuitem action="action_account_followup_definition_form" id="account_followup_menu" parent="account.menu_finance_configuration"/>
<report auto="False" id="account_followup_followup_report" menu="False" model="account_followup.followup" name="account_followup.followup.print" rml="account_followup/report/rappel.rml" string="Followup Report"/>
<record id="account_move_line_partner_tree" model="ir.ui.view">
<field name="name">account.move.line.partner.tree</field>
<field name="model">account.move.line</field>
@@ -99,7 +111,7 @@
</tree>
</field>
</record>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account.move.line.form.followup</field>
<field name="model">account.move.line</field>
@@ -111,7 +123,7 @@
</field>
</field>
</record>
<record id="view_move_line_tree" model="ir.ui.view">
<field name="name">account.move.line.tree.followup</field>
<field name="model">account.move.line</field>
@@ -123,17 +135,17 @@
</field>
</field>
</record>
<act_window domain="[('partner_id', '=', active_id),('reconcile_id','=',False),('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]" id="account.act_account_partner_account_move_unreconciled" name="Receivables &amp; Payables" res_model="account.move.line" view="account_move_line_partner_tree"/>
<act_window domain="[('reconcile_id', '=', False),('account_id.type','=','receivable')]" id="act_account_partner_account_move_all" name="All receivable entries" res_model="account.move.line" src_model="" view="account_move_line_partner_tree"/>
<menuitem action="act_account_partner_account_move_all" id="menu_account_move_open_unreconcile" parent="account_followup.menu_action_followup_stat"/>
<act_window domain="[('reconcile_id', '=', False), ('account_id.type','=','payable')]" id="act_account_partner_account_move_payable_all" name="All payable entries" res_model="account.move.line" src_model="" view="account_move_line_partner_tree"/>
<menuitem action="act_account_partner_account_move_payable_all" id="menu_account_move_open_unreconcile_payable" parent="account_followup.menu_action_followup_stat"/>
<record model="ir.ui.view" id="view_company_inherit_followup_form">
<field name="name">res.company.followup.form.inherit</field>
<field name="inherit_id" ref="account.view_company_inherit_form"/>
@@ -146,5 +158,6 @@
</field>
</field>
</record>
</data>
</openerp>
@@ -30,12 +30,12 @@ class report_rappel(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(report_rappel, self).__init__(cr, uid, name, context=context)
self.localcontext.update( {
'time' : time,
'time': time,
'ids_to_objects': self._ids_to_objects,
'adr_get' : self._adr_get,
'getLines' : self._lines_get,
'get_text' : self._get_text
})
'adr_get': self._adr_get,
'getLines': self._lines_get,
'get_text': self._get_text
})
def _ids_to_objects(self, partners_ids):
pool = pooler.get_pool(self.cr.dbname)
@@ -91,10 +91,8 @@ class report_rappel(report_sxw.rml_parse):
return text
report_sxw.report_sxw('report.account_followup.followup.print',
'res.partner', 'addons/account_followup/report/rappel.rml',
parser=report_rappel)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -34,25 +34,32 @@ class account_followup_print(osv.osv_memory):
}
def _get_followup(self, cr, uid, context=None):
if context is None:
context = {}
if context.get('active_model', 'ir.ui.menu') == 'account_followup.followup':
return context.get('active_id', False)
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
tmp = self.pool.get('account_followup.followup').search(cr, uid, [('company_id', '=', company_id)])
return tmp and tmp[0] or False
followp_id = self.pool.get('account_followup.followup').search(cr, uid, [('company_id', '=', company_id)], context=context)
return followp_id and followp_id[0] or False
def do_continue(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
if context is None:
context = {}
data = self.read(cr, uid, ids, [])[0]
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
context.update({'followup_id': data['followup_id'], 'date':data['date']})
return {
'name': _('Select partners'),
'view_type': 'form',
'context': context,
'view_mode': 'tree,form',
'res_model': 'account.followup.print.all',
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
'name': _('Select Partners'),
'view_type': 'form',
'context': context,
'view_mode': 'tree,form',
'res_model': 'account.followup.print.all',
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
}
_defaults = {
@@ -74,10 +81,12 @@ class account_followup_print_all(osv.osv_memory):
'summary': fields.text('Summary', required=True, readonly=True)
}
def _get_summary(self, cr, uid, context=None):
if context is None:
context = {}
return context.get('summary', '')
def _get_partners(self, cr, uid, context=None):
return self._get_partners_followp(cr, uid, [], context)['partner_ids']
return self._get_partners_followp(cr, uid, [], context=context)['partner_ids']
def _get_msg(self, cr, uid, context=None):
return self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.follow_up_msg
@@ -168,17 +177,19 @@ class account_followup_print_all(osv.osv_memory):
move_obj = self.pool.get('account.move.line')
user_obj = self.pool.get('res.users')
line_obj = self.pool.get('account_followup.stat')
if context is None:
context = {}
data = self.read(cr, uid, ids, [])[0]
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all_msg')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
if data['email_conf']:
mail_notsent = ''
msg_sent = ''
msg_unsent = ''
count = 0
data_user = user_obj.browse(cr, uid, uid)
move_lines = line_obj.browse(cr, uid, data['partner_ids'][0][2])
move_lines = line_obj.browse(cr, uid, data['partner_ids'])
partners = []
dict_lines = {}
for line in move_lines:
@@ -253,8 +264,9 @@ class account_followup_print_all(osv.osv_memory):
context.update({'summary': summary})
else:
context.update({'summary': '\n\n\nE-Mail has not been sent to any partner. If you want to send it, please tick send email confirmation on wizard.'})
return {
'name': _('Summary'),
'name': _('Follwoup Summary'),
'view_type': 'form',
'context': context,
'view_mode': 'tree,form',
@@ -266,6 +278,8 @@ class account_followup_print_all(osv.osv_memory):
}
def do_print(self, cr, uid, ids, context=None):
if context is None:
context = {}
data = self.read(cr, uid, ids, [])[0]
res = self._get_partners_followp(cr, uid, ids, context)['to_update']
to_update = res
@@ -285,6 +299,7 @@ class account_followup_print_all(osv.osv_memory):
'model': 'account_followup.followup',
'form': data
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'account_followup.followup.print',
@@ -2,17 +2,6 @@
<openerp>
<data noupdate="0">
<!--<wizard string="Send followups"
name="account_followup.followup.print.all"
id="action_account_followup_all_wizard"
model="account_followup.followup" />
<menuitem action="action_account_followup_all_wizard"
id="account_followup_wizard_menu"
parent="account.menu_finance_periodical_processing"
type="wizard" />-->
<record id="view_account_followup_print" model="ir.ui.view">
<field name="name">account.followup.print.form</field>
<field name="model">account.followup.print</field>

Some files were not shown because too many files have changed in this diff Show More