[MERGE]: Merge with lp:openobject-addons-trunk
bzr revid: ksa@tinyerp.co.in-20101004044618-85iovhaz2xrivxj5
This commit is contained in:
@@ -1654,11 +1654,11 @@ class account_tax(osv.osv):
|
||||
_columns = {
|
||||
'name': fields.char('Tax Name', size=64, required=True, translate=True, help="This name will be displayed on reports"),
|
||||
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the tax lines from the lowest sequences to the higher ones. The order is important if you have a tax with several tax children. In this case, the evaluation order is important."),
|
||||
'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
|
||||
'amount': fields.float('Amount', required=True, digits_compute=dp.get_precision('Account'), help="For taxes of type percentage, enter % ratio between 0-1."),
|
||||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the tax without removing it."),
|
||||
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'),('balance','Balance')], 'Tax Type', required=True,
|
||||
'type': fields.selection( [('percent','Percentage'), ('fixed','Fixed Amount'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True,
|
||||
help="The computation method for the tax amount."),
|
||||
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True,
|
||||
'applicable_type': fields.selection( [('true','Always'), ('code','Given by Python Code')], 'Applicability', required=True,
|
||||
help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
|
||||
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
|
||||
'account_collected_id':fields.many2one('account.account', 'Invoice Tax Account'),
|
||||
@@ -1669,7 +1669,6 @@ class account_tax(osv.osv):
|
||||
'python_compute':fields.text('Python Code'),
|
||||
'python_compute_inv':fields.text('Python Code (reverse)'),
|
||||
'python_applicable':fields.text('Python Code'),
|
||||
'tax_group': fields.selection([('vat','VAT'),('other','Other')], 'Tax Group', help="If a default tax is given in the partner it only overrides taxes from accounts (or products) in the same group."),
|
||||
|
||||
#
|
||||
# Fields used for the VAT declaration
|
||||
@@ -1762,7 +1761,6 @@ class account_tax(osv.osv):
|
||||
'active': 1,
|
||||
'type_tax_use': 'all',
|
||||
'sequence': 1,
|
||||
'tax_group': 'vat',
|
||||
'ref_tax_sign': 1,
|
||||
'ref_base_sign': 1,
|
||||
'tax_sign': 1,
|
||||
@@ -2421,7 +2419,6 @@ class account_tax_template(osv.osv):
|
||||
'python_compute':fields.text('Python Code'),
|
||||
'python_compute_inv':fields.text('Python Code (reverse)'),
|
||||
'python_applicable':fields.text('Python Code'),
|
||||
'tax_group': fields.selection([('vat','VAT'),('other','Other')], 'Tax Group', help="If a default tax if given in the partner it only override taxes from account (or product) of the same group."),
|
||||
|
||||
#
|
||||
# Fields used for the VAT declaration
|
||||
@@ -2464,7 +2461,6 @@ class account_tax_template(osv.osv):
|
||||
'type': 'percent',
|
||||
'amount': 0,
|
||||
'sequence': 1,
|
||||
'tax_group': 'vat',
|
||||
'ref_tax_sign': 1,
|
||||
'ref_base_sign': 1,
|
||||
'tax_sign': 1,
|
||||
@@ -2609,7 +2605,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
'python_compute': tax.python_compute,
|
||||
'python_compute_inv': tax.python_compute_inv,
|
||||
'python_applicable': tax.python_applicable,
|
||||
'tax_group':tax.tax_group,
|
||||
'base_code_id': tax.base_code_id and ((tax.base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.base_code_id.id]) or False,
|
||||
'tax_code_id': tax.tax_code_id and ((tax.tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.tax_code_id.id]) or False,
|
||||
'base_sign': tax.base_sign,
|
||||
|
||||
@@ -222,11 +222,11 @@ class account_bank_statement(osv.osv):
|
||||
account_move_line_obj = self.pool.get('account.move.line')
|
||||
account_analytic_line_obj = self.pool.get('account.analytic.line')
|
||||
account_bank_statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
|
||||
st_line = account_bank_statement_line_obj.browse(cr, uid, st_line_id, context)
|
||||
st = st_line.statement_id
|
||||
|
||||
context.update({'date': st_line.date})
|
||||
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
@@ -501,4 +501,4 @@ class account_bank_statement_line(osv.osv):
|
||||
|
||||
account_bank_statement_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -247,7 +247,7 @@ class account_cash_statement(osv.osv):
|
||||
open_jrnl = self.search(cr, uid, sql)
|
||||
if open_jrnl:
|
||||
raise osv.except_osv('Error', _('You can not have two open register for the same journal'))
|
||||
|
||||
|
||||
if self.pool.get('account.journal').browse(cr, uid, vals['journal_id']).type == 'cash':
|
||||
open_close = self._get_cash_open_close_box_lines(cr, uid, context)
|
||||
vals.update({
|
||||
@@ -370,16 +370,6 @@ class account_cash_statement(osv.osv):
|
||||
super(account_cash_statement, self).button_confirm_bank(cr, uid, ids, context=context)
|
||||
return self.write(cr, uid, ids, {'closing_date':time.strftime("%Y-%m-%d %H:%M:%S")}, context=context)
|
||||
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
done = []
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
ids = []
|
||||
for line in st.line_ids:
|
||||
ids += [x.id for x in line.move_ids]
|
||||
self.pool.get('account.move').unlink(cr, uid, ids, context)
|
||||
done.append(st.id)
|
||||
self.write(cr, uid, done, {'state':'draft'}, context=context)
|
||||
return True
|
||||
|
||||
account_cash_statement()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -3,33 +3,33 @@
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
|
||||
<menuitem id="menu_finance_receivables" name="Customers" parent="menu_finance" sequence="1" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="menu_finance_payables" name="Vendors" parent="menu_finance" sequence="2" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="menu_finance_receivables" name="Customers" parent="menu_finance" sequence="1" groups="group_account_user,group_account_manager"/>
|
||||
<menuitem id="menu_finance_payables" name="Vendors" parent="menu_finance" sequence="2" groups="group_account_user,group_account_manager"/>
|
||||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user,group_account_manager,base.group_system,group_account_invoice"/>
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user,group_account_manager,group_account_invoice"/>
|
||||
<!-- This menu is used in account_code module -->
|
||||
<menuitem id="menu_account_pp_statements" name="Statements" parent="menu_finance_periodical_processing" sequence="12"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Draft Entries" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Draft Entries" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5" groups="base.group_system"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12" groups="base.group_system,group_account_manager,group_account_user"/>
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12" groups="group_account_manager,group_account_user"/>
|
||||
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13" groups="base.group_system"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration" groups="base.group_system"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration" groups="base.group_system"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13" groups="group_account_manager"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration" groups="group_account_manager"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration" groups="group_account_manager"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts" groups="analytic.group_analytic_accounting"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting" groups="base.group_extended"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscellaneous" parent="menu_finance_configuration" sequence="30" groups="base.group_system"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscellaneous" parent="menu_finance_configuration" sequence="30" groups="group_account_manager"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100" groups="base.group_system,group_account_manager"/>
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100" groups="group_account_manager"/>
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
|
||||
groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
groups="group_account_user,group_account_manager"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15" groups="base.group_extended"/>
|
||||
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager,base.group_system" sequence="25"/>
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager" sequence="25"/>
|
||||
<menuitem id="menu_finance_periodical_processing_billing" name="Billing" parent="menu_finance_periodical_processing" sequence="35"/>
|
||||
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300" groups="account.group_account_manager"/>
|
||||
|
||||
@@ -36,12 +36,18 @@ class account_move_line(osv.osv):
|
||||
fiscalperiod_obj = self.pool.get('account.period')
|
||||
fiscalyear_ids = []
|
||||
fiscalperiod_ids = []
|
||||
if not context.get('fiscalyear', False) and not context.get('empty_fy_allow', False):
|
||||
initial_bal = context.get('initial_bal', False)
|
||||
company_clause = ""
|
||||
if context.get('company_id', False):
|
||||
company_clause = " AND " +obj+".company_id = %s" % context.get('company_id', False)
|
||||
if not context.get('fiscalyear', False):
|
||||
fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')])
|
||||
elif context.get('empty_fy_allow', False):
|
||||
fiscalyear_ids = context['fiscalyear']
|
||||
else:
|
||||
fiscalyear_ids = [context['fiscalyear']]
|
||||
if initial_bal:
|
||||
fiscalyear_date_start = fiscalyear_obj.read(cr, uid, context['fiscalyear'], ['date_start'])['date_start']
|
||||
fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('date_stop', '<', fiscalyear_date_start), ('state', '=', 'draft')], context=context)
|
||||
else:
|
||||
fiscalyear_ids = [context['fiscalyear']]
|
||||
|
||||
fiscalyear_clause = (','.join([str(x) for x in fiscalyear_ids])) or '0'
|
||||
state = context.get('state',False)
|
||||
@@ -50,12 +56,23 @@ class account_move_line(osv.osv):
|
||||
where_move_lines_by_date = ''
|
||||
|
||||
if context.get('date_from', False) and context.get('date_to', False):
|
||||
where_move_lines_by_date = " AND " +obj+".move_id in ( select id from account_move where date >= '" +context['date_from']+"' AND date <= '"+context['date_to']+"')"
|
||||
if initital_bal:
|
||||
where_move_lines_by_date = " AND " +obj+".move_id in ( select id from account_move where date < '"+context['date_from']+"')"
|
||||
else:
|
||||
where_move_lines_by_date = " AND " +obj+".move_id in ( select id from account_move where date >= '" +context['date_from']+"' AND date <= '"+context['date_to']+"')"
|
||||
|
||||
if state:
|
||||
if state.lower() not in ['all']:
|
||||
where_move_state= " AND "+obj+".move_id in (select id from account_move where account_move.state = '"+state+"')"
|
||||
|
||||
if context.get('period_from', False) and context.get('periof_from', False) and not context.get('periods', False):
|
||||
if initial_bal:
|
||||
period_company_id = period_obj.browse(cr, uid, data['form']['period_from'], context=context).company_id.id
|
||||
first_period = self.pool.get('account.period').search(cr, uid, [('company_id', '=', period_company_id)], order='date_start', limit=1)[0]
|
||||
context['periods'] = period_obj.build_ctx_periods(cr, uid, first_period, data['form']['period_from'])
|
||||
else:
|
||||
context['periods'] = period_obj.build_ctx_periods(cr, uid, data['form']['period_from'], data['form']['period_to'])
|
||||
|
||||
if context.get('periods', False):
|
||||
ids = ','.join([str(x) for x in context['periods']])
|
||||
query = obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id in (%s) AND id in (%s)) %s %s" % (fiscalyear_clause, ids, where_move_state, where_move_lines_by_date)
|
||||
@@ -69,6 +86,8 @@ class account_move_line(osv.osv):
|
||||
child_ids = self.pool.get('account.account')._get_children_and_consol(cr, uid, [context['chart_account_id']], context=context)
|
||||
query += ' AND '+obj+'.account_id in (%s)' % ','.join(map(str, child_ids))
|
||||
|
||||
query += company_clause
|
||||
|
||||
if context.get('period_manner','') == 'created':
|
||||
#the query have to be build with no reference to periods but thanks to the creation date
|
||||
if context.get('periods',False):
|
||||
@@ -77,8 +96,6 @@ class account_move_line(osv.osv):
|
||||
else:
|
||||
fiscalperiod_ids = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id','in',fiscalyear_ids)])
|
||||
|
||||
|
||||
|
||||
#remove from the old query the clause related to the period selection
|
||||
res = ''
|
||||
count = 1
|
||||
@@ -309,15 +326,27 @@ class account_move_line(osv.osv):
|
||||
ml = self.browse(cr, uid, id, context)
|
||||
return map(lambda x: x.id, ml.move_id.line_id)
|
||||
|
||||
# TODO: this is false, it does not uses draft and closed periods
|
||||
def _balance(self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
res={}
|
||||
# TODO group the foreach in sql
|
||||
for id in ids:
|
||||
cr.execute('SELECT date,account_id FROM account_move_line WHERE id=%s', (id,))
|
||||
dt, acc = cr.fetchone()
|
||||
cr.execute('SELECT SUM(debit-credit) FROM account_move_line WHERE account_id=%s AND (date<%s OR (date=%s AND id<=%s))', (acc,dt,dt,id))
|
||||
res[id] = cr.fetchone()[0]
|
||||
def _balance(self, cr, uid, ids, name, arg, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
c = context.copy()
|
||||
c['initital_bal'] = True
|
||||
|
||||
sql = [
|
||||
"""select l2.id, sum(l1.debit-l1.credit) from account_move_line l1, account_move_line l2""",
|
||||
"""where l2.account_id=l1.account_id""",
|
||||
"""and""",
|
||||
"""l1.id<=l2.id""",
|
||||
"""and""",
|
||||
"""l2.id in %s""",
|
||||
"""and""",
|
||||
self._query_get(cr, uid, obj='l1', context=c),
|
||||
""" group by l2.id""",
|
||||
]
|
||||
|
||||
cr.execute('\n'.join(sql), [tuple(ids)])
|
||||
res = dict(cr.fetchall())
|
||||
return res
|
||||
|
||||
def _invoice(self, cursor, user, ids, name, arg, context=None):
|
||||
|
||||
@@ -433,7 +433,7 @@
|
||||
<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="name">account.cash.statement.select</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -444,7 +444,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id" widget='selection'/>
|
||||
<field name="journal_id" widget='selection' domain="[('type', '=', 'cash')]" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
@@ -489,7 +489,7 @@
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="period_id"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="journal_id" widget="selection" domain="[('type', '=', 'bank')]" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
@@ -600,6 +600,7 @@
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
<field name="context">{'journal_type':'bank'}</field>
|
||||
<field name="search_view_id" ref="view_bank_statement_search"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank">
|
||||
<field name="sequence" eval="1"/>
|
||||
@@ -614,12 +615,13 @@
|
||||
<field name="act_window_id" ref="action_bank_statement_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="action_bank_statement_periodic_tree" model="ir.actions.act_window">
|
||||
<record id="action_bank_statement_periodic_tree" model="ir.actions.act_window">
|
||||
<field name="name">Bank Statements</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
<field name="search_view_id" ref="view_bank_statement_search"/>
|
||||
<field name="context">{'journal_type':'bank'}</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_bank_statement_periodic_tree_bank">
|
||||
@@ -808,7 +810,6 @@
|
||||
<field name="name"/>
|
||||
<field name="price_include" groups="base.group_extended"/>
|
||||
<field name="description"/>
|
||||
<field name="tax_group" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -819,15 +820,12 @@
|
||||
<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>
|
||||
@@ -841,52 +839,46 @@
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="description" select="1"/>
|
||||
<field name="tax_group" select="1"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="type_tax_use"/>
|
||||
<field name="price_include"/>
|
||||
<field name="active"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Tax Definition" >
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string=""/>
|
||||
<field name="applicable_type"/>
|
||||
<field name="type_tax_use"/>
|
||||
<field groups="base.group_extended" name="domain"/>
|
||||
<field groups="base.group_extended" name="sequence"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string=""/>
|
||||
<field name="amount" attrs="{'readonly':[('type','in',('none', 'code'))]}"/>
|
||||
<field groups="base.group_extended" name="child_depend"/>
|
||||
<field groups="base.group_extended" name="price_include"/>
|
||||
<field groups="base.group_extended" name="include_base_amount"/>
|
||||
</group>
|
||||
<field name="account_collected_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<label colspan="2" nolabel="1" string="Keep empty to use the income account"/>
|
||||
<field name="account_paid_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<label colspan="2" nolabel="1" string="Keep empty to use the expense account"/>
|
||||
<separator colspan="4" string="Child Taxes"/>
|
||||
<field colspan="4" groups="base.group_extended" name="child_ids" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Tax Declaration">
|
||||
<separator colspan="4" string="Invoices"/>
|
||||
<field name="base_code_id"/>
|
||||
<field name="base_sign"/>
|
||||
<field name="tax_code_id"/>
|
||||
<field name="tax_sign"/>
|
||||
|
||||
<separator colspan="4" string="Credit Notes"/>
|
||||
<field name="ref_base_code_id"/>
|
||||
<field name="ref_base_sign"/>
|
||||
<field name="ref_tax_code_id"/>
|
||||
<field name="ref_tax_sign"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="type"/>
|
||||
<field name="amount" attrs="{'readonly':[('type','in',('none', 'code', 'balance'))]}"/>
|
||||
<separator colspan="4" string="Accounting Information"/>
|
||||
<field name="account_collected_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<label colspan="2" nolabel="1" string="Keep empty to use the income account"/>
|
||||
<field name="account_paid_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<label colspan="2" nolabel="1" string="Keep empty to use the expense account"/>
|
||||
<separator colspan="4" string="Tax Declaration: Invoices"/>
|
||||
<field name="base_code_id"/>
|
||||
<field name="base_sign"/>
|
||||
<field name="tax_code_id"/>
|
||||
<field name="tax_sign"/>
|
||||
<separator colspan="4" string="Tax Declaration: Credit Notes"/>
|
||||
<field name="ref_base_code_id"/>
|
||||
<field name="ref_base_sign"/>
|
||||
<field name="ref_tax_code_id"/>
|
||||
<field name="ref_tax_sign"/>
|
||||
<separator groups="base.group_extended" colspan="4" string="Children Definition"/>
|
||||
<field groups="base.group_extended" name="child_depend"/>
|
||||
<field groups="base.group_extended" name="sequence"/>
|
||||
<field groups="base.group_extended" name="include_base_amount"/>
|
||||
<field groups="base.group_extended" colspan="4" name="child_ids"/>
|
||||
</group>
|
||||
</page>
|
||||
<page groups="base.group_extended" string="Special Computation">
|
||||
<separator colspan="4" string="Compute Code (if type=code)"/>
|
||||
<field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||
<separator colspan="4" string="Applicability Options"/>
|
||||
<field name="applicable_type"/>
|
||||
<field name="domain"/>
|
||||
<separator colspan="4" string="Applicable Code (if type=code)"/>
|
||||
<field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
|
||||
<separator colspan="4" string="Compute Code (if type=code)"/>
|
||||
<field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
@@ -1154,7 +1146,7 @@
|
||||
id="menu_action_account_moves_all"
|
||||
parent="account.menu_finance_entries"
|
||||
sequence="1"
|
||||
groups="group_account_user,group_account_manager,base.group_system"
|
||||
groups="group_account_user,group_account_manager"
|
||||
/>
|
||||
|
||||
<record id="action_move_line_select" model="ir.actions.act_window">
|
||||
@@ -1418,10 +1410,6 @@
|
||||
res_model="account.move.line"
|
||||
src_model="account.move"/>
|
||||
|
||||
<record id="account.act_account_move_to_account_move_line_open" model="ir.actions.act_window">
|
||||
<field eval="[(6,0,[ref('account.group_accounting_accountant')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="action_move_line_search" model="ir.actions.act_window">
|
||||
<field name="name">Journal Items</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -1505,6 +1493,7 @@
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="search_view_id" ref="view_bank_statement_search"/>
|
||||
<field name="view_id" ref="view_bank_statement_reconcile_form"/>
|
||||
</record>
|
||||
|
||||
@@ -1646,17 +1635,17 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Journal Entry Model">
|
||||
<group>
|
||||
<filter string="Sale" icon="terp-sale" domain="[('journal_id.type', '=', 'sale')]"/>
|
||||
<filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<group>
|
||||
<filter string="Sale" icon="terp-sale" domain="[('journal_id.type', '=', 'sale')]"/>
|
||||
<filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -1800,7 +1789,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_subscription_search" model="ir.ui.view">
|
||||
<record id="view_subscription_search" model="ir.ui.view">
|
||||
<field name="name">account.subscription.search</field>
|
||||
<field name="model">account.subscription</field>
|
||||
<field name="type">search</field>
|
||||
@@ -2184,7 +2173,6 @@
|
||||
<field name="description"/>
|
||||
<newline/>
|
||||
<field name="chart_template_id"/>
|
||||
<field name="tax_group"/>
|
||||
<field name="type"/>
|
||||
<field name="type_tax_use"/>
|
||||
</group>
|
||||
@@ -2248,8 +2236,6 @@
|
||||
<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"/>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<field name="view_id" ref="board_account_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting" groups="group_account_user,group_account_manager"/>
|
||||
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
|
||||
<menuitem icon="terp-account" id="account.menu_finance" name="Accounting" sequence="13" action="open_board_account"/>
|
||||
</data>
|
||||
|
||||
@@ -24,7 +24,7 @@ from osv import fields, osv
|
||||
class res_company(osv.osv):
|
||||
_inherit = "res.company"
|
||||
_columns = {
|
||||
'overdue_msg' : fields.text('Overdue Payments Message', translate=True),
|
||||
'overdue_msg': fields.text('Overdue Payments Message', translate=True),
|
||||
'property_reserve_and_surplus_account': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
@@ -41,6 +41,7 @@ class res_company(osv.osv):
|
||||
out after this mail was sent, please consider the present one as \
|
||||
void. Do not hesitate to contact our accounting department'
|
||||
}
|
||||
|
||||
res_company()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 10:28+0000\n"
|
||||
"PO-Revision-Date: 2010-09-30 06:57+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\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-09-30 04:40+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -170,7 +170,6 @@ class account_installer(osv.osv_memory):
|
||||
'python_compute': tax.python_compute,
|
||||
'python_compute_inv': tax.python_compute_inv,
|
||||
'python_applicable': tax.python_applicable,
|
||||
'tax_group':tax.tax_group,
|
||||
'base_code_id': tax.base_code_id and ((tax.base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.base_code_id.id]) or False,
|
||||
'tax_code_id': tax.tax_code_id and ((tax.tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.tax_code_id.id]) or False,
|
||||
'base_sign': tax.base_sign,
|
||||
|
||||
@@ -30,7 +30,6 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(aged_trial_report, self).__init__(cr, uid, name, context=context)
|
||||
self.query_line = ''
|
||||
self.total_account = []
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
@@ -47,7 +46,8 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
self.query = data['form'].get('query_line', '')
|
||||
obj_move = self.pool.get('account.move.line')
|
||||
self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
|
||||
self.direction_selection = data['form'].get('direction_selection', 'past')
|
||||
self.target_move = data['form'].get('target_move', 'all')
|
||||
self.date_from = data['form'].get('date_from', time.strftime('%Y-%m-%d'))
|
||||
|
||||
@@ -51,12 +51,13 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
obj_move = self.pool.get('account.move.line')
|
||||
new_ids = ids
|
||||
self.query_get_clause = ''
|
||||
if (data['model'] == 'ir.ui.menu'):
|
||||
new_ids = 'active_ids' in data['form'] and data['form']['active_ids'] or []
|
||||
self.query_get_clause = 'AND '
|
||||
self.query_get_clause += data['form']['query_line'] or ''
|
||||
self.query_get_clause += obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
|
||||
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
|
||||
if new_ids:
|
||||
self.cr.execute('SELECT period_id, journal_id FROM account_journal_period WHERE id IN %s', (tuple(new_ids),))
|
||||
|
||||
@@ -53,12 +53,13 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
obj_move = self.pool.get('account.move.line')
|
||||
new_ids = ids
|
||||
self.query_get_clause = ''
|
||||
if (data['model'] == 'ir.ui.menu'):
|
||||
new_ids = 'active_ids' in data['form'] and data['form']['active_ids'] or []
|
||||
self.query_get_clause = 'AND '
|
||||
self.query_get_clause += data['form']['query_line'] or ''
|
||||
self.query_get_clause += obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
|
||||
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
|
||||
if new_ids:
|
||||
self.cr.execute('SELECT period_id, journal_id FROM account_journal_period WHERE id IN %s', (tuple(new_ids),))
|
||||
|
||||
@@ -38,9 +38,12 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
new_ids = ids
|
||||
obj_move = self.pool.get('account.move.line')
|
||||
self.sortby = data['form'].get('sortby', 'sort_date')
|
||||
self.query = data['form'].get('query_line', '')
|
||||
self.init_query = data['form']['initial_bal_query']
|
||||
self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context',{}))
|
||||
ctx2 = data['form'].get('used_context',{}).copy()
|
||||
ctx2.update({'initial_bal': True})
|
||||
self.init_query = obj_move._query_get(self.cr, self.uid, obj='l', context=ctx2)
|
||||
self.init_balance = data['form']['initial_balance']
|
||||
self.display_account = data['form']['display_account']
|
||||
self.target_move = data['form'].get('target_move', 'all')
|
||||
@@ -97,7 +100,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
|
||||
FROM account_move_line l \
|
||||
WHERE l.account_id = %s AND %s '%(account.id, self.init_query))
|
||||
sum_currency += self.cr.fetchone()[0] or 0.0
|
||||
return str(sum_currency)
|
||||
return sum_currency
|
||||
|
||||
def get_children_accounts(self, account):
|
||||
res = []
|
||||
|
||||
@@ -266,10 +266,10 @@
|
||||
<tr>
|
||||
<td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_debit_account(o)) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o)) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ o.currency_id and sum_currency_amount_account(o) +o.currency_id.code or '' ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
@@ -292,9 +292,9 @@
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['lname'] ]]</para></td>
|
||||
<td><para style="P3_content_center">[[ strip_name(line['line_corresp'].replace(', ',','),40) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -327,9 +327,9 @@
|
||||
<tr>
|
||||
<td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para></td>
|
||||
<td><para style="Standard"></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_debit_account(o)) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[formatLang(sum_credit_account(o)) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</u></para></td>
|
||||
<td alignment="right"><para style="P9b"><u>[[ formatLang(sum_credit_account(o), digits=get_digits(dp=Account)) ]]</u></para></td>
|
||||
<td><para style="P9b"><u>[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</u></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
@@ -352,9 +352,9 @@
|
||||
<td><para style="P2_content">[[ line['move'] ]]</para></td>
|
||||
<td><para style="P3_content">[[ line['lname'] ]]</para></td>
|
||||
<td><para style="P3_content_center">[[ strip_name(line['line_corresp'],15) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit']) ]] </para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit']) ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['debit'], dp='Account') ]] </para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['credit'], dp='Account') ]]</para></td>
|
||||
<td><para style="P4_content">[[ formatLang(line['progress'], dp='Account') ]] [[ company.currency_id.symbol ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
|
||||
@@ -52,13 +52,14 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
obj_move = self.pool.get('account.move.line')
|
||||
new_ids = ids
|
||||
self.query_get_clause = ''
|
||||
self.target_move = data['form'].get('target_move', 'all')
|
||||
if (data['model'] == 'ir.ui.menu'):
|
||||
new_ids = data['form'].get('active_ids', [])
|
||||
self.query_get_clause = 'AND '
|
||||
self.query_get_clause += data['form'].get('query_line', '')
|
||||
self.query_get_clause += obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
|
||||
self.sort_selection = data['form'].get('sort_selection', 'date')
|
||||
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
|
||||
if new_ids:
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import time
|
||||
import re
|
||||
import copy
|
||||
|
||||
from tools.translate import _
|
||||
from report import report_sxw
|
||||
from common_report_header import common_report_header
|
||||
@@ -52,8 +53,8 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
self.display_partner = data['form'].get('display_partner', 'non-zero_balance')
|
||||
self.query = data['form'].get('query_line', '')
|
||||
self.init_query = data['form'].get('initial_bal_query', '')
|
||||
obj_move = self.pool.get('account.move.line')
|
||||
self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
|
||||
self.result_selection = data['form'].get('result_selection')
|
||||
self.target_move = data['form'].get('target_move', 'all')
|
||||
|
||||
@@ -116,7 +117,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
for rec in full_account:
|
||||
if not rec.get('name', False):
|
||||
rec.update({'name': _('Unknown Partner')})
|
||||
|
||||
|
||||
## We will now compute Total
|
||||
subtotal_row = self._add_subtotal(full_account)
|
||||
return subtotal_row
|
||||
@@ -141,8 +142,8 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
|
||||
new_header['ref'] = ''
|
||||
new_header['name'] = r['account_name']
|
||||
new_header['code'] = r['code']
|
||||
new_header['debit'] = r['debit']
|
||||
new_header['credit'] = r['credit']
|
||||
new_header['debit'] = r['debit']
|
||||
new_header['credit'] = r['credit']
|
||||
new_header['scredit'] = tot_scredit
|
||||
new_header['sdebit'] = tot_sdebit
|
||||
new_header['enlitige'] = tot_enlitige
|
||||
|
||||
@@ -56,8 +56,11 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
self.query = data['form'].get('query_line', '')
|
||||
self.init_query = data['form'].get('initial_bal_query', '')
|
||||
obj_move = self.pool.get('account.move.line')
|
||||
self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
|
||||
ctx2 = data['form'].get('used_context',{}).copy()
|
||||
ctx2.update({'initial_bal': True})
|
||||
self.init_query = obj_move._query_get(self.cr, self.uid, obj='l', context=ctx2)
|
||||
self.reconcil = data['form'].get('reconcil', True)
|
||||
self.initial_balance = data['form'].get('initial_balance', True)
|
||||
self.result_selection = data['form'].get('result_selection', 'customer')
|
||||
|
||||
@@ -13,17 +13,12 @@
|
||||
<field name="name">Accounting / Manager</field>
|
||||
</record>
|
||||
|
||||
<record model="res.groups" id="group_accounting_accountant">
|
||||
<field name="name">Accounting / Accountant and Manager</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="menu_finance_reporting" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'), ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_legal_statement" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_receivables" model="ir.ui.menu">
|
||||
@@ -47,27 +42,27 @@
|
||||
</record>
|
||||
|
||||
<record id="menu_action_invoice_tree1" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_action_invoice_tree2" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_action_invoice_tree3" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_action_invoice_tree4" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_bank_and_cash" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_action_account_tree2" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_entries" model="ir.ui.menu">
|
||||
@@ -75,7 +70,7 @@
|
||||
</record>
|
||||
|
||||
<record id="menu_action_move_journal_line_form" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_eaction_account_moves_all" model="ir.ui.menu">
|
||||
@@ -87,15 +82,15 @@
|
||||
</record>
|
||||
|
||||
<record id="final_accounting_reports" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system'), ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager'), ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_journals_report" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_action_tax_code_tree" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_periodical_processing" model="ir.ui.menu">
|
||||
@@ -103,27 +98,27 @@
|
||||
</record>
|
||||
|
||||
<record id="menu_general_ledger" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_general_Balance_report" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_account_bs_report" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_account_pl_report" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_tax_report" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="next_id_22" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
|
||||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_action_account_invoice_report_all" model="ir.ui.menu">
|
||||
@@ -142,17 +137,17 @@
|
||||
<field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_configuration" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
|
||||
</record>
|
||||
<!--record id="menu_finance_configuration" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
|
||||
</record-->
|
||||
|
||||
<record id="menu_finance_entries" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_analytic_accounting" model="ir.ui.menu">
|
||||
<!--record id="menu_analytic_accounting" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('analytic.group_analytic_accounting')])]" name="groups_id"/>
|
||||
</record>
|
||||
</record-->
|
||||
|
||||
<record id="account_move_comp_rule" model="ir.rule">
|
||||
<field name="name">Account Entry</field>
|
||||
|
||||
@@ -149,51 +149,6 @@
|
||||
"access_report_account_receivable_invoice","report.account.receivable.invoice","model_report_account_receivable","account.group_account_invoice",1,1,1,1
|
||||
"access_report_account_receivable_user","report.account.receivable.user","model_report_account_receivable","account.group_account_user",1,1,1,1
|
||||
"access_account_sequence_fiscal_year_invoice","account.sequence.fiscalyear invoice","model_account_sequence_fiscalyear","account.group_account_invoice",1,1,1,1
|
||||
"access_account_invoice_accounting_accountant","account.invoice","model_account_invoice","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_invoice_line_accounting_accountant","account.invoice.line","model_account_invoice_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_res_partner_accounting_accountant","res.partner","base.model_res_partner","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_account_accounting_accountant","account.account","model_account_account","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_account_type_accounting_accountant","account.type","model_account_account_type","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_tax_accounting_accountant","account.tax","model_account_tax","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_tax_code_accounting_accountant","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_invoice_tax_accounting_accountant","account.invoice.tax","model_account_invoice_tax","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_partner_address_accounting_accountant","res.partner.address","base.model_res_partner_address","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_move_accounting_accountant","account.move","model_account_move","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_move_line_accounting_accountant","account.move.line","model_account_move_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_res_partner_bank_accounting_accountant","res.partner.bank","base.model_res_partner_bank","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_partner_event_accounting_accountant","res.partner.event","base.model_res_partner_event","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_currency_rate_accounting_accountant","res.currency.rate","base.model_res_currency_rate","account.group_accounting_accountant",1,1,0,0
|
||||
"access_res_currency_accounting_accountant","res.currency","base.model_res_currency","account.group_accounting_accountant",1,1,0,0
|
||||
"access_product_template_accounting_accountant","product.template","product.model_product_template","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_product_accounting_accountant","product.product","product.model_product_product","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_category_accounting_accountant","product.category","product.model_product_category","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist_accounting_accountant","product.pricelist","product.model_product_pricelist","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist_version_accounting_accountant","product.pricelist.version","product.model_product_pricelist_version","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist_item_accounting_accountant","product.pricelist.item","product.model_product_pricelist_item","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_payment_term_accounting_accountant","account.payment.term","model_account_payment_term","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_payterm_accounting_accountant","res.payterm","base.model_res_payterm","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_payment_term_line_accounting_accountant","account.payment.term.line","model_account_payment_term_line","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal_accounting_accountant","account.journal","model_account_journal","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_fiscalyear_accounting_accountant","account.fiscalyear","model_account_fiscalyear","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_period_accounting_accountant","account.period","model_account_period","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_move_reconcile_accounting_accountant","account.move.reconcile","model_account_move_reconcile","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_tax_code_accounting_accountant","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_bank_statement_accounting_accountant","account.bank.statement","model_account_bank_statement","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_cashbox_line_accounting_accountant","account.cashbox.line","model_account_cashbox_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_bank_statement_line_accounting_accountant","account.bank.statement.line","model_account_bank_statement_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_invoice_report_accounting_accountant","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_account_receivable_accounting_accountant","report.account.receivable","model_report_account_receivable","account.group_accounting_accountant",1,0,0,0
|
||||
"access_temp_range_accounting_accountant","temp.range","model_temp_range","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_aged_receivable_accounting_accountant","report.aged.receivable","model_report_aged_receivable","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_invoice_created_accounting_accountant","report.invoice.created","model_report_invoice_created","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_entries_report_accounting_accountant","account.entries.report","model_account_entries_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_invoice_report_accounting_accountant","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal_view_accounting_accountant","account.journal.view","model_account_journal_view","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal_period_accounting_accountant","account.journal.period","model_account_journal_period","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_journal_column_accounting_accountant","account.journal.column","model_account_journal_column","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_analytic_account_accounting_accountant","account.analytic.account","analytic.model_account_analytic_account","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_analytic_line_accounting_accountant","account.analytic.line","analytic.model_account_analytic_line","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_analytic_journal_accounting_accountant","account.analytic.journal","model_account_analytic_journal","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_analytic_journal_analytic_accounting","account.analytic.journal","model_account_analytic_journal","analytic.group_analytic_accounting",1,1,1,1
|
||||
"access_account_account_analytic_accounting","account.account","model_account_account","analytic.group_analytic_accounting",1,0,0,0
|
||||
"access_product_product_analytic_accounting","product.product","product.model_product_product","analytic.group_analytic_accounting",1,0,0,0
|
||||
|
||||
|
@@ -8,29 +8,27 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reconciliation">
|
||||
<group width="660" height="430">
|
||||
<separator string="Options" colspan="4"/>
|
||||
<group>
|
||||
<field name="account_ids" colspan="4" domain="[('reconcile','=',1)]"/>
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
<field name="power"/>
|
||||
<field name="allow_write_off"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group attrs="{'readonly':[('allow_write_off', '!=', True)]}">
|
||||
<separator string="Write-Off Move" colspan="4"/>
|
||||
<field name="max_amount"/>
|
||||
<field name="writeoff_acc_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
<field name="journal_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
<field name="period_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
</group>
|
||||
<separator string ="" colspan="4"/>
|
||||
<group colspan="2" col="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="reconcile" string="Reconcile" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
<separator string="Options" colspan="4"/>
|
||||
<group>
|
||||
<field name="account_ids" colspan="4" domain="[('reconcile','=',1)]"/>
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
<field name="power"/>
|
||||
<field name="allow_write_off"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group attrs="{'readonly':[('allow_write_off', '!=', True)]}">
|
||||
<separator string="Write-Off Move" colspan="4"/>
|
||||
<field name="max_amount"/>
|
||||
<field name="writeoff_acc_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
<field name="journal_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
<field name="period_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
</group>
|
||||
<separator string ="" colspan="4"/>
|
||||
<group colspan="2" col="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="reconcile" string="Reconcile" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -73,7 +73,7 @@ class account_move_journal(osv.osv_memory):
|
||||
|
||||
period_pool = self.pool.get('account.period')
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
|
||||
journal_id = self._get_journal(cr, uid, context)
|
||||
period_id = self._get_period(cr, uid, context)
|
||||
|
||||
@@ -97,15 +97,16 @@ class account_move_journal(osv.osv_memory):
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Ok" name="action_open_window" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open" name="action_open_window" default_focus="1" type="object"/>
|
||||
</group>
|
||||
</form>""" % (str(journal), str(period))
|
||||
|
||||
|
||||
res.update({
|
||||
'arch':view
|
||||
})
|
||||
return res
|
||||
|
||||
|
||||
def action_open_window(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
This function Open action move line window on given period and Journal/Payment Mode
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<field name="context">{'journal_type':'sale','view_mode':False}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem action="action_account_moves_sale" sequence="16" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem action="action_account_moves_sale" sequence="16" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL" groups="group_account_user,group_account_manager"/>
|
||||
|
||||
<!-- <record id="action_account_moves_purchase_refund" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">Journal Refund Items</field>-->
|
||||
@@ -46,7 +46,7 @@
|
||||
parent="menu_finance_payables"
|
||||
icon="STOCK_JUSTIFY_FILL"
|
||||
sequence="16"
|
||||
groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
groups="group_account_user,group_account_manager"/>
|
||||
|
||||
<!-- <record id="action_account_moves_sale_refund" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">Journal Refund Items</field>-->
|
||||
@@ -73,7 +73,7 @@
|
||||
id="menu_action_account_moves_bank"
|
||||
parent="account.menu_finance_bank_and_cash"
|
||||
sequence="16"
|
||||
groups="group_account_user,group_account_manager,base.group_system"
|
||||
groups="group_account_user,group_account_manager"
|
||||
/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -49,8 +49,8 @@ class account_balance_report(osv.osv_memory):
|
||||
res['arch'] = etree.tostring(doc)
|
||||
return res
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['target_move'])[0])
|
||||
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data}
|
||||
|
||||
|
||||
@@ -55,12 +55,12 @@ class account_aged_trial_balance(osv.osv_memory):
|
||||
res['arch'] = etree.tostring(doc)
|
||||
return res
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
res = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['period_length', 'direction_selection'])[0])
|
||||
|
||||
period_length = data['form']['period_length']
|
||||
@@ -70,7 +70,7 @@ class account_aged_trial_balance(osv.osv_memory):
|
||||
raise osv.except_osv(_('UserError'), _('Enter a Start date !'))
|
||||
|
||||
start = datetime.strptime(data['form']['date_from'], "%Y-%m-%d")
|
||||
|
||||
|
||||
if data['form']['direction_selection'] == 'past':
|
||||
for i in range(5)[::-1]:
|
||||
stop = start - relativedelta(days=period_length)
|
||||
|
||||
@@ -57,10 +57,10 @@ class account_bs_report(osv.osv_memory):
|
||||
res['arch'] = etree.tostring(doc)
|
||||
return res
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
account = self.pool.get('account.account').browse(cr, uid, data['form']['chart_account_id'])
|
||||
if not account.company_id.property_reserve_and_surplus_account:
|
||||
raise osv.except_osv(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !'))
|
||||
|
||||
@@ -25,8 +25,8 @@ class account_central_journal(osv.osv_memory):
|
||||
_description = 'Account Central Journal'
|
||||
_inherit = "account.common.journal.report"
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.central.journal',
|
||||
|
||||
@@ -63,10 +63,10 @@ class account_common_report(osv.osv_memory):
|
||||
if filter == 'filter_period' and fiscalyear_id:
|
||||
start_period = end_period = False
|
||||
cr.execute('''
|
||||
SELECT * FROM (SELECT p.id
|
||||
FROM account_period p
|
||||
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
|
||||
WHERE f.id = %s
|
||||
SELECT * FROM (SELECT p.id
|
||||
FROM account_period p
|
||||
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
|
||||
WHERE f.id = %s
|
||||
ORDER BY p.date_start ASC
|
||||
LIMIT 1) AS period_start
|
||||
UNION
|
||||
@@ -112,29 +112,16 @@ class account_common_report(osv.osv_memory):
|
||||
result['fiscalyear'] = 'fiscalyear_id' in data['form'] and data['form']['fiscalyear_id'] or False
|
||||
result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
|
||||
result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
|
||||
result_initial_bal = result.copy()
|
||||
if data['form']['filter'] == 'filter_date':
|
||||
result['date_from'] = data['form']['date_from']
|
||||
result['date_to'] = data['form']['date_to']
|
||||
result_initial_bal['date_from'] = '0001-01-01'
|
||||
result_initial_bal['date_to'] = (datetime.datetime.strptime(data['form']['date_from'], "%Y-%m-%d") + timedelta(days=-1)).strftime('%Y-%m-%d')
|
||||
elif data['form']['filter'] == 'filter_period':
|
||||
if not data['form']['period_from'] or not data['form']['period_to']:
|
||||
raise osv.except_osv(_('Error'),_('Select a starting and an ending period'))
|
||||
company_id = period_obj.browse(cr, uid, data['form']['period_from'], context=context).company_id.id
|
||||
result['periods'] = period_obj.build_ctx_periods(cr, uid, data['form']['period_from'], data['form']['period_to'])
|
||||
first_period = self.pool.get('account.period').search(cr, uid, [('company_id', '=', company_id)], order='date_start', limit=1)[0]
|
||||
result_initial_bal['periods'] = period_obj.build_ctx_periods(cr, uid, first_period, data['form']['period_from'])
|
||||
else:
|
||||
if data['form']['fiscalyear_id']:
|
||||
fiscal_date_start = fiscal_obj.browse(cr, uid, [data['form']['fiscalyear_id']], context=context)[0].date_start
|
||||
result_initial_bal['empty_fy_allow'] = True #Improve me => there should be something generic in account.move.line -> query get
|
||||
result_initial_bal['fiscalyear'] = fiscal_obj.search(cr, uid, [('date_stop', '<', fiscal_date_start), ('state', '=', 'draft')], context=context)
|
||||
result_initial_bal['date_from'] = '0001-01-01'
|
||||
result_initial_bal['date_to'] = (datetime.datetime.strptime(fiscal_date_start, "%Y-%m-%d") + timedelta(days=-1)).strftime('%Y-%m-%d')
|
||||
return result, result_initial_bal
|
||||
return result
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
raise (_('Error'), _('not implemented'))
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
@@ -145,12 +132,10 @@ class account_common_report(osv.osv_memory):
|
||||
data['ids'] = context.get('active_ids', [])
|
||||
data['model'] = context.get('active_model', 'ir.ui.menu')
|
||||
data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id'])[0]
|
||||
used_context, used_context_initial_bal = self._build_contexts(cr, uid, ids, data, context=context)
|
||||
query_line = obj_move._query_get(cr, uid, obj='l', context=used_context)
|
||||
used_context = self._build_contexts(cr, uid, ids, data, context=context)
|
||||
data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or []
|
||||
data['form']['query_line'] = query_line
|
||||
data['form']['initial_bal_query'] = obj_move._query_get(cr, uid, obj='l', context=used_context_initial_bal)
|
||||
return self._print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data['form']['used_context'] = used_context
|
||||
return self._print_report(cr, uid, ids, data, context=context)
|
||||
|
||||
account_common_report()
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class account_common_account_report(osv.osv_memory):
|
||||
'display_account': 'bal_all',
|
||||
}
|
||||
|
||||
def pre_print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def pre_print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data['form'].update(self.read(cr, uid, ids, ['display_account'])[0])
|
||||
@@ -43,4 +43,4 @@ class account_common_account_report(osv.osv_memory):
|
||||
|
||||
account_common_account_report()
|
||||
|
||||
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -38,7 +38,7 @@ class account_common_journal_report(osv.osv_memory):
|
||||
result['periods'] = map(lambda x: x[0], cr.fetchall())
|
||||
return result
|
||||
|
||||
def pre_print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def pre_print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data['form'].update(self.read(cr, uid, ids, ['amount_currency'])[0])
|
||||
|
||||
@@ -39,7 +39,7 @@ class account_common_partner_report(osv.osv_memory):
|
||||
'target_move': 'all'
|
||||
}
|
||||
|
||||
def pre_print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def pre_print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data['form'].update(self.read(cr, uid, ids, ['result_selection', 'target_move'])[0])
|
||||
|
||||
@@ -26,8 +26,8 @@ class account_general_journal(osv.osv_memory):
|
||||
_name = 'account.general.journal'
|
||||
_description = 'Account General Journal'
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
return {'type': 'ir.actions.report.xml', 'report_name': 'account.general.journal', 'datas': data}
|
||||
|
||||
account_general_journal()
|
||||
|
||||
@@ -49,10 +49,10 @@ class account_report_general_ledger(osv.osv_memory):
|
||||
res['value'] = {'initial_balance': False}
|
||||
return res
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby', 'target_move'])[0])
|
||||
if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record
|
||||
data['form'].update({'initial_balance': False})
|
||||
@@ -62,4 +62,4 @@ class account_report_general_ledger(osv.osv_memory):
|
||||
|
||||
account_report_general_ledger()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -40,10 +40,10 @@ class account_partner_balance(osv.osv_memory):
|
||||
'display_partner': 'non-zero_balance',
|
||||
}
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['display_partner'])[0])
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
|
||||
@@ -43,10 +43,10 @@ class account_partner_ledger(osv.osv_memory):
|
||||
'page_split': False,
|
||||
}
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'reconcil', 'page_split', 'amount_currency'])[0])
|
||||
if data['form']['page_split']:
|
||||
return {
|
||||
|
||||
@@ -38,10 +38,10 @@ class account_print_journal(osv.osv_memory):
|
||||
'target_move': 'all'
|
||||
}
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['sort_selection','target_move'])[0])
|
||||
return {'type': 'ir.actions.report.xml', 'report_name': 'account.journal.period.print', 'datas': data}
|
||||
|
||||
|
||||
@@ -50,10 +50,10 @@ class account_pl_report(osv.osv_memory):
|
||||
res['arch'] = etree.tostring(doc)
|
||||
return res
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
|
||||
data = self.pre_print_report(cr, uid, ids, data, context=context)
|
||||
data['form'].update(self.read(cr, uid, ids, ['display_type'])[0])
|
||||
if data['form']['display_type']:
|
||||
return {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Entries From Models">
|
||||
<group height="240" width="510">
|
||||
<separator string="This wizard will create recurring accounting entries" colspan="4"/>
|
||||
<label string="Select recurring to create a manualy recurring accounting entries" width="400"/>
|
||||
<field name="model" colspan="4" nolabel="1"/>
|
||||
@@ -17,7 +16,6 @@
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -2,129 +2,5 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account.menu_eaction_account_moves_sale" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_eaction_account_moves_purchase" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_receivables" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_payables" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_invoice_tree1" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_invoice_tree2" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_invoice_tree3" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_invoice_tree4" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_bank_and_cash" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_charts" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_account_tree2" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_tax_code_tree" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_entries" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_move_journal_line_form" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_eaction_account_moves_all" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_reporting" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_dashboard_acc" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_board_account" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_legal_statement" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.final_accounting_reports" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_general_ledger" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_general_Balance_report" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_tax_report" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_journals_report" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_generic_reporting" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.next_id_22" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_account_journal_period_tree" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_finance_statistic_report_statement" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_account_invoice_report_all" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_account_entries_report_all" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="account.menu_action_account_account_report" model="ir.ui.menu">
|
||||
<field eval="[(4,ref('account.group_accounting_accountant'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-08-02 20:54+0000\n"
|
||||
"Last-Translator: mga (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-10-01 11:48+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\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-09-29 05:07+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
@@ -61,7 +61,7 @@ msgstr "Kostenplaatsschema"
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
|
||||
msgid "Analytic Instance Line"
|
||||
msgstr ""
|
||||
msgstr "Kostenverdelingsregel"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: view:account.analytic.plan.instance.line:0
|
||||
@@ -210,7 +210,7 @@ msgstr "Kostenverdelingsmodel opgeslagen"
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
|
||||
msgid "Analytic Plan Instance"
|
||||
msgstr ""
|
||||
msgstr "Kostenverdeling"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: constraint:ir.ui.view:0
|
||||
@@ -294,7 +294,7 @@ msgstr "Meedere schema's beheren in kostenplaatsen"
|
||||
#: view:account.analytic.plan.line:0
|
||||
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
|
||||
msgid "Analytic Plan Lines"
|
||||
msgstr "Kostenpalatsboekingen"
|
||||
msgstr "Kostenplaatsboekingen"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
@@ -361,7 +361,7 @@ msgstr ""
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.line,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr "Reeks"
|
||||
msgstr "Volgnummer"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance.line,analytic_account_id:0
|
||||
|
||||
@@ -8,19 +8,19 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-24 12:50+0000\n"
|
||||
"PO-Revision-Date: 2010-07-16 15:49+0000\n"
|
||||
"Last-Translator: Jan Verlaan (Veritos) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-10-01 11:59+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@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-09-29 05:17+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: view:product.category:0
|
||||
msgid " Accounting Property"
|
||||
msgstr ""
|
||||
msgstr " Administratieve instelling"
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
|
||||
@@ -38,6 +38,19 @@ msgid ""
|
||||
" when the invoice is created to transfer this amount to the debtor or "
|
||||
"creditor account."
|
||||
msgstr ""
|
||||
"Deze module geeft ondersteuning voor de Angelsaksische boekhoud methoden "
|
||||
"door \n"
|
||||
" de boekingslogica bij voorraad transacties te veranderen. Het verschil "
|
||||
"tussen de Angelsaksische boekhoud landen en de\n"
|
||||
" Rijn- of ook wel continentale boekhoud landen is het moment van het "
|
||||
"nemen van de kosten van verkochte goederen versus kostprijs verkopen. \n"
|
||||
" Angelsaksische boekhoudingen nemen de kosten op het wanneer de "
|
||||
"verkoopfactuur wordt gemaakt, Continentale boekhoudingen wanneer wordt "
|
||||
"geleverd.\n"
|
||||
" Deze module voegt deze functionaliteit toe door een tussenrekening te "
|
||||
"gebruiken voor het boeken van de geleverde goederen en \n"
|
||||
" voor het tegenboeken wanneer de factuur wordt gemaakt om het over te "
|
||||
"boeken naar de klant of leverancier."
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
'category': 'Generic Modules/Accounting',
|
||||
'description': """This module allows accountants to manage analytic and crossovered budgets.
|
||||
|
||||
Once the Master Budgets and the Budgets are defined (in Financial
|
||||
Management/Budgets/), the Project Managers can set the planned amount on each
|
||||
Analytic Account.
|
||||
Once the Master Budgets and the Budgets are defined (in Accounting/Budgets/),
|
||||
the Project Managers can set the planned amount on each Analytic Account.
|
||||
|
||||
The accountant has the possibility to see the total of amount planned for each
|
||||
Budget and Master Budget in order to ensure the total planned is not
|
||||
|
||||
@@ -24,6 +24,8 @@ import datetime
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
|
||||
import decimal_precision as dp
|
||||
|
||||
def strToDate(dt):
|
||||
dt_date=datetime.date(int(dt[0:4]),int(dt[5:7]),int(dt[8:10]))
|
||||
return dt_date
|
||||
@@ -49,12 +51,13 @@ class account_budget_post(osv.osv):
|
||||
|
||||
def spread(self, cr, uid, ids, fiscalyear_id=False, amount=0.0):
|
||||
dobj = self.pool.get('account.budget.post.dotation')
|
||||
obj_fiscalyear = self.pool.get('account.fiscalyear')
|
||||
for o in self.browse(cr, uid, ids):
|
||||
# delete dotations for this post
|
||||
dobj.unlink(cr, uid, dobj.search(cr, uid, [('post_id','=',o.id)]))
|
||||
|
||||
# create one dotation per period in the fiscal year, and spread the total amount/quantity over those dotations
|
||||
fy = self.pool.get('account.fiscalyear').browse(cr, uid, [fiscalyear_id])[0]
|
||||
fy = obj_fiscalyear.browse(cr, uid, [fiscalyear_id])[0]
|
||||
num = len(fy.period_ids)
|
||||
for p in fy.period_ids:
|
||||
dobj.create(cr, uid, {'post_id': o.id, 'period_id': p.id, 'amount': amount/num})
|
||||
@@ -64,26 +67,27 @@ account_budget_post()
|
||||
|
||||
class account_budget_post_dotation(osv.osv):
|
||||
def _tot_planned(self, cr, uid, ids, name, args, context):
|
||||
obj_budget_lines = self.pool.get('crossovered.budget.lines')
|
||||
res = {}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
if line.period_id:
|
||||
obj_period=self.pool.get('account.period').browse(cr, uid, line.period_id.id)
|
||||
obj_period = self.pool.get('account.period').browse(cr, uid, line.period_id.id)
|
||||
|
||||
total_days=strToDate(obj_period.date_stop) - strToDate(obj_period.date_start)
|
||||
budget_id=line.post_id and line.post_id.id or False
|
||||
query="select id from crossovered_budget_lines where \
|
||||
general_budget_id= %s AND (date_from >=%s and date_from <= %s ) \
|
||||
OR (date_to >=%s and date_to <= %s) OR (date_from < %s and date_to > %s)"
|
||||
cr.execute(query,(budget_id,obj_period.date_start,obj_period.date_stop,obj_period.date_start,obj_period.date_stop,obj_period.date_start,obj_period.date_stop,))
|
||||
res1=cr.fetchall()
|
||||
tot_planned=0.00
|
||||
total_days = strToDate(obj_period.date_stop) - strToDate(obj_period.date_start)
|
||||
budget_id = line.post_id and line.post_id.id or False
|
||||
query="SELECT id FROM crossovered_budget_lines WHERE \
|
||||
general_budget_id= %s AND (date_from >=%s AND date_from <= %s ) \
|
||||
OR (date_to >=%s AND date_to <= %s) OR (date_from < %s AND date_to > %s)"
|
||||
cr.execute(query, (budget_id, obj_period.date_start, obj_period.date_stop, obj_period.date_start, obj_period.date_stop, obj_period.date_start, obj_period.date_stop,))
|
||||
res1 = cr.fetchall()
|
||||
tot_planned = 0.00
|
||||
for record in res1:
|
||||
obj_lines = self.pool.get('crossovered.budget.lines').browse(cr, uid, record[0])
|
||||
count_days = min(strToDate(obj_period.date_stop),strToDate(obj_lines.date_to)) - max(strToDate(obj_period.date_start), strToDate(obj_lines.date_from))
|
||||
days_in_period = count_days.days +1
|
||||
obj_lines = obj_budget_lines.browse(cr, uid, record[0])
|
||||
count_days = min(strToDate(obj_period.date_stop), strToDate(obj_lines.date_to)) - max(strToDate(obj_period.date_start), strToDate(obj_lines.date_from))
|
||||
days_in_period = count_days.days + 1
|
||||
count_days = strToDate(obj_lines.date_to) - strToDate(obj_lines.date_from)
|
||||
total_days_of_rec = count_days.days +1
|
||||
tot_planned += obj_lines.planned_amount/total_days_of_rec* days_in_period
|
||||
total_days_of_rec = count_days.days + 1
|
||||
tot_planned += obj_lines.planned_amount / total_days_of_rec * days_in_period
|
||||
res[line.id] = tot_planned
|
||||
else:
|
||||
res[line.id] = 0.00
|
||||
@@ -96,7 +100,7 @@ class account_budget_post_dotation(osv.osv):
|
||||
'post_id': fields.many2one('account.budget.post', 'Item', select=True),
|
||||
'period_id': fields.many2one('account.period', 'Period'),
|
||||
'amount': fields.float('Amount', digits=(16,2)),
|
||||
'tot_planned':fields.function(_tot_planned, method=True, string='Total Planned Amount', type='float', store=True),
|
||||
'tot_planned': fields.function(_tot_planned, method=True, string='Total Planned Amount', type='float', store=True),
|
||||
}
|
||||
|
||||
account_budget_post_dotation()
|
||||
@@ -119,38 +123,38 @@ class crossovered_budget(osv.osv):
|
||||
|
||||
_defaults = {
|
||||
'state': 'draft',
|
||||
'creating_user_id': lambda self,cr,uid,context: uid,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.budget.post', context=c)
|
||||
'creating_user_id': lambda self, cr, uid, context: uid,
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.budget.post', context=c)
|
||||
}
|
||||
|
||||
def budget_confirm(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {
|
||||
'state':'confirm'
|
||||
'state': 'confirm'
|
||||
})
|
||||
return True
|
||||
|
||||
def budget_draft(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {
|
||||
'state':'draft'
|
||||
'state': 'draft'
|
||||
})
|
||||
return True
|
||||
|
||||
def budget_validate(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {
|
||||
'state':'validate',
|
||||
'state': 'validate',
|
||||
'validating_user_id': uid,
|
||||
})
|
||||
return True
|
||||
|
||||
def budget_cancel(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {
|
||||
'state':'cancel'
|
||||
'state': 'cancel'
|
||||
})
|
||||
return True
|
||||
|
||||
def budget_done(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {
|
||||
'state':'done'
|
||||
'state': 'done'
|
||||
})
|
||||
return True
|
||||
|
||||
@@ -158,7 +162,7 @@ crossovered_budget()
|
||||
|
||||
class crossovered_budget_lines(osv.osv):
|
||||
|
||||
def _prac_amt(self, cr, uid, ids,context={}):
|
||||
def _prac_amt(self, cr, uid, ids, context={}):
|
||||
res = {}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
acc_ids = [x.id for x in line.general_budget_id.account_ids]
|
||||
@@ -170,8 +174,8 @@ class crossovered_budget_lines(osv.osv):
|
||||
date_from = context['wizard_date_from']
|
||||
if context.has_key('wizard_date_to'):
|
||||
date_to = context['wizard_date_to']
|
||||
cr.execute("select sum(amount) from account_analytic_line where account_id=%s and (date "
|
||||
"between to_date(%s,'yyyy-mm-dd') and to_date(%s,'yyyy-mm-dd')) and "
|
||||
cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE account_id=%s AND (date "
|
||||
"between to_date(%s,'yyyy-mm-dd') AND to_date(%s,'yyyy-mm-dd')) AND "
|
||||
"general_account_id=ANY(%s)", (line.analytic_account_id.id, date_from, date_to,acc_ids,))
|
||||
result = cr.fetchone()[0]
|
||||
if result is None:
|
||||
@@ -182,13 +186,13 @@ class crossovered_budget_lines(osv.osv):
|
||||
def _prac(self, cr, uid, ids, name, args, context):
|
||||
res={}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
res[line.id]=self._prac_amt(cr, uid, [line.id], context=context)[line.id]
|
||||
res[line.id] = self._prac_amt(cr, uid, [line.id], context=context)[line.id]
|
||||
return res
|
||||
|
||||
def _theo_amt(self, cr, uid, ids,context={}):
|
||||
def _theo_amt(self, cr, uid, ids, context={}):
|
||||
res = {}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
today=datetime.datetime.today()
|
||||
today = datetime.datetime.today()
|
||||
date_to = today.strftime("%Y-%m-%d")
|
||||
date_from = line.date_from
|
||||
if context.has_key('wizard_date_from'):
|
||||
@@ -197,38 +201,37 @@ class crossovered_budget_lines(osv.osv):
|
||||
date_to = context['wizard_date_to']
|
||||
|
||||
if line.paid_date:
|
||||
if strToDate(line.date_to)<=strToDate(line.paid_date):
|
||||
theo_amt=0.00
|
||||
if strToDate(line.date_to) <= strToDate(line.paid_date):
|
||||
theo_amt = 0.00
|
||||
else:
|
||||
theo_amt=line.planned_amount
|
||||
theo_amt = line.planned_amount
|
||||
else:
|
||||
total=strToDate(line.date_to) - strToDate(line.date_from)
|
||||
total = strToDate(line.date_to) - strToDate(line.date_from)
|
||||
elapsed = min(strToDate(line.date_to),strToDate(date_to)) - max(strToDate(line.date_from),strToDate(date_from))
|
||||
if strToDate(date_to) < strToDate(line.date_from):
|
||||
elapsed = strToDate(date_to) - strToDate(date_to)
|
||||
|
||||
if total.days:
|
||||
theo_amt = float(elapsed.days/float(total.days))*line.planned_amount
|
||||
theo_amt = float(elapsed.days / float(total.days)) * line.planned_amount
|
||||
else:
|
||||
theo_amt = line.planned_amount
|
||||
|
||||
res[line.id]=theo_amt
|
||||
res[line.id] = theo_amt
|
||||
return res
|
||||
|
||||
def _theo(self, cr, uid, ids, name, args, context):
|
||||
res={}
|
||||
res = {}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
res[line.id]=self._theo_amt(cr, uid, [line.id], context=context)[line.id]
|
||||
|
||||
res[line.id] = self._theo_amt(cr, uid, [line.id], context=context)[line.id]
|
||||
return res
|
||||
|
||||
def _perc(self, cr, uid, ids, name, args, context):
|
||||
res = {}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
if line.theoritical_amount<>0.00:
|
||||
res[line.id]=float(line.practical_amount or 0.0 / line.theoritical_amount)*100
|
||||
if line.theoritical_amount <> 0.00:
|
||||
res[line.id] = float(line.practical_amount or 0.0 / line.theoritical_amount) * 100
|
||||
else:
|
||||
res[line.id]=0.00
|
||||
res[line.id] = 0.00
|
||||
return res
|
||||
|
||||
_name = "crossovered.budget.lines"
|
||||
@@ -240,9 +243,9 @@ class crossovered_budget_lines(osv.osv):
|
||||
'date_from': fields.date('Start Date', required=True),
|
||||
'date_to': fields.date('End Date', required=True),
|
||||
'paid_date': fields.date('Paid Date'),
|
||||
'planned_amount':fields.float('Planned Amount', required=True, digits=(16,2)),
|
||||
'practical_amount':fields.function(_prac, method=True, string='Practical Amount', type='float', digits=(16,2)),
|
||||
'theoritical_amount':fields.function(_theo, method=True, string='Theoritical Amount', type='float', digits=(16,2)),
|
||||
'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Account')),
|
||||
'practical_amount':fields.function(_prac, method=True, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),
|
||||
'theoritical_amount':fields.function(_theo, method=True, string='Theoritical Amount', type='float', digits_compute=dp.get_precision('Account')),
|
||||
'percentage':fields.function(_perc, method=True, string='Percentage', type='float'),
|
||||
'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
|
||||
}
|
||||
@@ -258,4 +261,4 @@ class account_analytic_account(osv.osv):
|
||||
|
||||
account_analytic_account()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -33,47 +33,43 @@ class analytic_account_budget_report(report_sxw.rml_parse):
|
||||
'funct_total': self.funct_total,
|
||||
'time': time,
|
||||
})
|
||||
self.context=context
|
||||
|
||||
def funct(self,object,form,ids={}, done=None, level=1):
|
||||
self.context = context
|
||||
|
||||
def funct(self, object, form, ids={}, done=None, level=1):
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not done:
|
||||
done={}
|
||||
done = {}
|
||||
|
||||
global tot
|
||||
tot={
|
||||
tot = {
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
}
|
||||
result=[]
|
||||
result = []
|
||||
accounts = self.pool.get('account.analytic.account').browse(self.cr, self.uid, [object.id], self.context.copy())
|
||||
c_b_lines_obj = self.pool.get('crossovered.budget.lines')
|
||||
obj_c_budget = self.pool.get('crossovered.budget')
|
||||
|
||||
c_b_lines_obj=self.pool.get('crossovered.budget.lines')
|
||||
for account_id in accounts:
|
||||
res={}
|
||||
b_line_ids=[]
|
||||
|
||||
res = {}
|
||||
b_line_ids = []
|
||||
for line in account_id.crossovered_budget_line:
|
||||
b_line_ids.append(line.id)
|
||||
|
||||
if not b_line_ids:
|
||||
return []
|
||||
d_from = form['date_from']
|
||||
d_to = form['date_to']
|
||||
|
||||
d_from=form['date_from']
|
||||
d_to=form['date_to']
|
||||
self.cr.execute('SELECT DISTINCT(crossovered_budget_id) FROM crossovered_budget_lines WHERE id =ANY(%s)',(b_line_ids,))
|
||||
budget_ids = self.cr.fetchall()
|
||||
|
||||
self.cr.execute('select distinct(crossovered_budget_id) from crossovered_budget_lines where id =ANY(%s)',(b_line_ids,))
|
||||
budget_ids=self.cr.fetchall()
|
||||
|
||||
context={'wizard_date_from':d_from,'wizard_date_to':d_to}
|
||||
for i in range(0,len(budget_ids)):
|
||||
|
||||
budget_name=self.pool.get('crossovered.budget').browse(self.cr, self.uid,[budget_ids[i][0]])
|
||||
res={
|
||||
context = {'wizard_date_from':d_from,'wizard_date_to':d_to}
|
||||
for i in range(0, len(budget_ids)):
|
||||
budget_name = obj_c_budget.browse(self.cr, self.uid, [budget_ids[i][0]])
|
||||
res= {
|
||||
'b_id':'-1',
|
||||
'a_id':'-1',
|
||||
'name':budget_name[0].name,
|
||||
@@ -85,48 +81,42 @@ class analytic_account_budget_report(report_sxw.rml_parse):
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', b_line_ids),('crossovered_budget_id','=',budget_ids[i][0])])
|
||||
line_id =c_b_lines_obj.browse(self.cr,self.uid,line_ids)
|
||||
tot_theo=tot_pln=tot_prac=tot_perc=0
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', b_line_ids), ('crossovered_budget_id','=',budget_ids[i][0])])
|
||||
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
|
||||
tot_theo = tot_pln = tot_prac = tot_perc = 0
|
||||
|
||||
done_budget=[]
|
||||
done_budget = []
|
||||
for line in line_id:
|
||||
|
||||
if line.id in b_line_ids:
|
||||
theo=pract=0.00
|
||||
theo=c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id],context)[line.id]
|
||||
pract=c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id],context)[line.id]
|
||||
|
||||
theo = pract = 0.00
|
||||
theo = c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
pract = c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
if line.general_budget_id.id in done_budget:
|
||||
|
||||
for record in result:
|
||||
if record['b_id']==line.general_budget_id.id and record['a_id']==line.analytic_account_id.id:
|
||||
|
||||
record['theo'] +=theo
|
||||
record['pln'] +=line.planned_amount
|
||||
record['prac'] +=pract
|
||||
record['perc'] +=line.percentage
|
||||
tot_theo +=theo
|
||||
tot_pln +=line.planned_amount
|
||||
tot_prac +=pract
|
||||
tot_perc +=line.percentage
|
||||
if record['b_id'] == line.general_budget_id.id and record['a_id'] == line.analytic_account_id.id:
|
||||
record['theo'] += theo
|
||||
record['pln'] += line.planned_amount
|
||||
record['prac'] += pract
|
||||
record['perc'] += line.percentage
|
||||
tot_theo += theo
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += line.percentage
|
||||
else:
|
||||
|
||||
res1={
|
||||
'b_id':line.general_budget_id.id,
|
||||
'a_id':line.analytic_account_id.id,
|
||||
'name':line.general_budget_id.name,
|
||||
'status':2,
|
||||
'theo':theo,
|
||||
'pln':line.planned_amount,
|
||||
'prac':pract,
|
||||
'perc':line.percentage
|
||||
res1 = {
|
||||
'b_id': line.general_budget_id.id,
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': theo,
|
||||
'pln': line.planned_amount,
|
||||
'prac': pract,
|
||||
'perc': line.percentage
|
||||
}
|
||||
|
||||
tot_theo += theo
|
||||
tot_pln +=line.planned_amount
|
||||
tot_prac +=pract
|
||||
tot_perc +=line.percentage
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += line.percentage
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
else:
|
||||
@@ -134,50 +124,45 @@ class analytic_account_budget_report(report_sxw.rml_parse):
|
||||
continue
|
||||
else:
|
||||
res1={
|
||||
'b_id':line.general_budget_id.id,
|
||||
'a_id':line.analytic_account_id.id,
|
||||
'name':line.general_budget_id.name,
|
||||
'status':2,
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
'b_id': line.general_budget_id.id,
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': 0.00,
|
||||
'pln': 0.00,
|
||||
'prac': 0.00,
|
||||
'perc': 0.00
|
||||
}
|
||||
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
|
||||
if tot_theo==0.00:
|
||||
tot_perc=0.00
|
||||
if tot_theo == 0.00:
|
||||
tot_perc = 0.00
|
||||
else:
|
||||
tot_perc=float(tot_prac /tot_theo)*100
|
||||
tot_perc = float(tot_prac / tot_theo) * 100
|
||||
|
||||
result[-(len(done_budget) +1)]['theo']=tot_theo
|
||||
result[-(len(done_budget) +1)]['theo'] = tot_theo
|
||||
tot['theo'] +=tot_theo
|
||||
result[-(len(done_budget) +1)]['pln']=tot_pln
|
||||
result[-(len(done_budget) +1)]['pln'] = tot_pln
|
||||
tot['pln'] +=tot_pln
|
||||
result[-(len(done_budget) +1)]['prac']=tot_prac
|
||||
result[-(len(done_budget) +1)]['prac'] = tot_prac
|
||||
tot['prac'] +=tot_prac
|
||||
result[-(len(done_budget) +1)]['perc']=tot_perc
|
||||
|
||||
if tot['theo']==0.00:
|
||||
tot['perc'] =0.00
|
||||
result[-(len(done_budget) +1)]['perc'] = tot_perc
|
||||
if tot['theo'] == 0.00:
|
||||
tot['perc'] = 0.00
|
||||
else:
|
||||
tot['perc']=float(tot['prac'] /tot['theo'])*100
|
||||
|
||||
tot['perc'] = float(tot['prac'] / tot['theo']) * 100
|
||||
return result
|
||||
|
||||
def funct_total(self,form):
|
||||
result=[]
|
||||
res={}
|
||||
res={
|
||||
'tot_theo':tot['theo'],
|
||||
'tot_pln':tot['pln'],
|
||||
'tot_prac':tot['prac'],
|
||||
'tot_perc':tot['perc']
|
||||
result = []
|
||||
res = {}
|
||||
res = {
|
||||
'tot_theo': tot['theo'],
|
||||
'tot_pln': tot['pln'],
|
||||
'tot_prac': tot['prac'],
|
||||
'tot_perc': tot['perc']
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
return result
|
||||
|
||||
report_sxw.report_sxw('report.account.analytic.account.budget', 'account.analytic.account', 'addons/account_budget/report/analytic_account_budget_report.rml',parser=analytic_account_budget_report,header='internal')
|
||||
|
||||
@@ -38,17 +38,19 @@ class budget_report(report_sxw.rml_parse):
|
||||
def post_total(self, post_obj, date1, date2):
|
||||
def str2date(date_str):
|
||||
return datetime.date.fromtimestamp(time.mktime(time.strptime(date_str, '%Y-%m-%d')))
|
||||
|
||||
def interval(d1str, d2str):
|
||||
return (str2date(d2str) - str2date(d1str) + datetime.timedelta(days=1)).days
|
||||
|
||||
prev = reduce(lambda x,d: x + d.amount, post_obj.dotation_ids, 0.0)
|
||||
period_days = interval(date1, date2)
|
||||
for d in post_obj.dotation_ids:
|
||||
i = interval(d.period_id.date_start, d.period_id.date_stop)
|
||||
total_days = reduce(lambda x,d: x+interval(d.period_id.date_start, d.period_id.date_stop), post_obj.dotation_ids, 0)
|
||||
achievements = reduce(lambda x,l: x+l['achievements'], self.lines(post_obj, date1, date2), 0.0)
|
||||
prev_1=1.00
|
||||
if total_days<>0.00:
|
||||
prev_1=prev * period_days / total_days
|
||||
prev_1 = 1.00
|
||||
if total_days <> 0.00:
|
||||
prev_1 = prev * period_days / total_days
|
||||
return [{'prev': prev, 'prev_period': prev_1, 'achievements': achievements}]
|
||||
|
||||
def budget_total(self, post_obj, date1, date2):
|
||||
@@ -66,7 +68,7 @@ class budget_report(report_sxw.rml_parse):
|
||||
res.append({'name': a.name, 'code': a.code, 'achievements': achievements})
|
||||
return res
|
||||
|
||||
report_sxw.report_sxw('report.account.budget', 'account.budget.post', 'addons/account_budget/report/budget_report.rml',parser=budget_report, header="internal")
|
||||
report_sxw.report_sxw('report.account.budget', 'account.budget.post', 'addons/account_budget/report/budget_report.rml', parser=budget_report, header="internal")
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -20,48 +20,46 @@
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import datetime
|
||||
|
||||
import pooler
|
||||
from report import report_sxw
|
||||
import datetime
|
||||
import operator
|
||||
import osv
|
||||
|
||||
class budget_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(budget_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
self.localcontext.update({
|
||||
'funct': self.funct,
|
||||
'funct_total': self.funct_total,
|
||||
'time': time,
|
||||
})
|
||||
self.context=context
|
||||
self.context = context
|
||||
|
||||
def funct(self, object, form, ids={}, done=None, level=1):
|
||||
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not done:
|
||||
done={}
|
||||
|
||||
done = {}
|
||||
global tot
|
||||
tot={
|
||||
tot = {
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
}
|
||||
result=[]
|
||||
result = []
|
||||
|
||||
budgets = self.pool.get('crossovered.budget').browse(self.cr, self.uid, [object.id], self.context.copy())
|
||||
|
||||
c_b_lines_obj=self.pool.get('crossovered.budget.lines')
|
||||
c_b_lines_obj = self.pool.get('crossovered.budget.lines')
|
||||
acc_analytic_obj = self.pool.get('account.analytic.account')
|
||||
for budget_id in budgets:
|
||||
|
||||
res={}
|
||||
budget_lines=[]
|
||||
budget_ids=[]
|
||||
d_from=form['date_from']
|
||||
d_to=form['date_to']
|
||||
res = {}
|
||||
budget_lines = []
|
||||
budget_ids = []
|
||||
d_from = form['date_from']
|
||||
d_to = form['date_to']
|
||||
|
||||
for line in budget_id.crossovered_budget_line:
|
||||
budget_ids.append(line.id)
|
||||
@@ -69,78 +67,69 @@ class budget_report(report_sxw.rml_parse):
|
||||
if not budget_ids:
|
||||
return []
|
||||
|
||||
self.cr.execute('select distinct(analytic_account_id) from crossovered_budget_lines where id =ANY(%s)',(budget_ids,))
|
||||
an_ids=self.cr.fetchall()
|
||||
|
||||
context={'wizard_date_from':d_from,'wizard_date_to':d_to}
|
||||
for i in range(0,len(an_ids)):
|
||||
|
||||
analytic_name=self.pool.get('account.analytic.account').browse(self.cr, self.uid, [an_ids[i][0]])
|
||||
self.cr.execute('SELECT DISTINCT(analytic_account_id) FROM crossovered_budget_lines WHERE id = ANY(%s)',(budget_ids,))
|
||||
an_ids = self.cr.fetchall()
|
||||
|
||||
context = {'wizard_date_from': d_from, 'wizard_date_to': d_to}
|
||||
for i in range(0, len(an_ids)):
|
||||
analytic_name = acc_analytic_obj.browse(self.cr, self.uid, [an_ids[i][0]])
|
||||
res={
|
||||
'b_id':'-1',
|
||||
'a_id':'-1',
|
||||
'name':analytic_name[0].name,
|
||||
'status':1,
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
'b_id': '-1',
|
||||
'a_id': '-1',
|
||||
'name': analytic_name[0].name,
|
||||
'status': 1,
|
||||
'theo': 0.00,
|
||||
'pln': 0.00,
|
||||
'prac': 0.00,
|
||||
'perc': 0.00
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids),('analytic_account_id','=',an_ids[i][0])])
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids), ('analytic_account_id','=',an_ids[i][0])])
|
||||
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
|
||||
tot_theo=tot_pln=tot_prac=tot_perc=0.00
|
||||
tot_theo = tot_pln = tot_prac = tot_perc = 0.00
|
||||
|
||||
done_budget=[]
|
||||
done_budget = []
|
||||
for line in line_id:
|
||||
|
||||
if line.id in budget_ids:
|
||||
theo=pract=0.00
|
||||
theo=c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id],context)[line.id]
|
||||
pract=c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id],context)[line.id]
|
||||
|
||||
theo = pract = 0.00
|
||||
theo = c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
pract = c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
if line.general_budget_id.id in done_budget:
|
||||
|
||||
for record in result:
|
||||
if record['b_id']==line.general_budget_id.id and record['a_id']==line.analytic_account_id.id:
|
||||
|
||||
record['theo'] +=theo
|
||||
record['pln'] +=line.planned_amount
|
||||
record['prac'] +=pract
|
||||
if record['theo']<>0.00:
|
||||
perc=(record['prac']/record['theo'])*100
|
||||
if record['b_id'] == line.general_budget_id.id and record['a_id'] == line.analytic_account_id.id:
|
||||
record['theo'] += theo
|
||||
record['pln'] += line.planned_amount
|
||||
record['prac'] += pract
|
||||
if record['theo'] <> 0.00:
|
||||
perc = (record['prac'] / record['theo']) * 100
|
||||
else:
|
||||
perc=0.00
|
||||
record['perc'] =perc
|
||||
perc = 0.00
|
||||
record['perc'] = perc
|
||||
tot_theo += theo
|
||||
tot_pln +=line.planned_amount
|
||||
tot_prac +=pract
|
||||
tot_perc +=perc
|
||||
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += perc
|
||||
else:
|
||||
|
||||
if theo<>0.00:
|
||||
perc=(pract/theo)*100
|
||||
if theo <> 0.00:
|
||||
perc = (pract / theo) * 100
|
||||
else:
|
||||
perc=0.00
|
||||
res1={
|
||||
'a_id':line.analytic_account_id.id,
|
||||
'b_id':line.general_budget_id.id,
|
||||
'name':line.general_budget_id.name,
|
||||
'status':2,
|
||||
'theo':theo,
|
||||
'pln':line.planned_amount,
|
||||
'prac':pract,
|
||||
'perc':perc,
|
||||
perc = 0.00
|
||||
res1 = {
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'b_id': line.general_budget_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': theo,
|
||||
'pln': line.planned_amount,
|
||||
'prac': pract,
|
||||
'perc': perc,
|
||||
}
|
||||
tot_theo += theo
|
||||
tot_pln +=line.planned_amount
|
||||
tot_prac +=pract
|
||||
tot_perc +=perc
|
||||
if form['report']=='analytic-full':
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += perc
|
||||
if form['report'] == 'analytic-full':
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
else:
|
||||
@@ -149,61 +138,57 @@ class budget_report(report_sxw.rml_parse):
|
||||
continue
|
||||
else:
|
||||
res1={
|
||||
'a_id':line.analytic_account_id.id,
|
||||
'b_id':line.general_budget_id.id,
|
||||
'name':line.general_budget_id.name,
|
||||
'status':2,
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
}
|
||||
|
||||
if form['report']=='analytic-full':
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'b_id': line.general_budget_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': 0.00,
|
||||
'pln': 0.00,
|
||||
'prac': 0.00,
|
||||
'perc': 0.00
|
||||
}
|
||||
if form['report'] == 'analytic-full':
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
|
||||
if tot_theo==0.00:
|
||||
tot_perc=0.00
|
||||
if tot_theo == 0.00:
|
||||
tot_perc = 0.00
|
||||
else:
|
||||
tot_perc=float(tot_prac /tot_theo)*100
|
||||
|
||||
if form['report']=='analytic-full':
|
||||
|
||||
result[-(len(done_budget) +1)]['theo']=tot_theo
|
||||
tot['theo'] +=tot_theo
|
||||
result[-(len(done_budget) +1)]['pln']=tot_pln
|
||||
tot['pln'] +=tot_pln
|
||||
result[-(len(done_budget) +1)]['prac']=tot_prac
|
||||
tot['prac'] +=tot_prac
|
||||
result[-(len(done_budget) +1)]['perc']=tot_perc
|
||||
tot_perc = float(tot_prac / tot_theo) * 100
|
||||
if form['report'] == 'analytic-full':
|
||||
result[-(len(done_budget) +1)]['theo'] = tot_theo
|
||||
tot['theo'] += tot_theo
|
||||
result[-(len(done_budget) +1)]['pln'] = tot_pln
|
||||
tot['pln'] += tot_pln
|
||||
result[-(len(done_budget) +1)]['prac'] = tot_prac
|
||||
tot['prac'] += tot_prac
|
||||
result[-(len(done_budget) +1)]['perc'] = tot_perc
|
||||
else:
|
||||
result[-1]['theo']=tot_theo
|
||||
tot['theo'] +=tot_theo
|
||||
result[-1]['pln']=tot_pln
|
||||
tot['pln'] +=tot_pln
|
||||
result[-1]['prac']=tot_prac
|
||||
tot['prac'] +=tot_prac
|
||||
result[-1]['perc']=tot_perc
|
||||
if tot['theo']==0.00:
|
||||
tot['perc'] =0.00
|
||||
result[-1]['theo'] = tot_theo
|
||||
tot['theo'] += tot_theo
|
||||
result[-1]['pln'] = tot_pln
|
||||
tot['pln'] += tot_pln
|
||||
result[-1]['prac'] = tot_prac
|
||||
tot['prac'] += tot_prac
|
||||
result[-1]['perc'] = tot_perc
|
||||
if tot['theo'] == 0.00:
|
||||
tot['perc'] = 0.00
|
||||
else:
|
||||
tot['perc']=float(tot['prac'] /tot['theo'])*100
|
||||
tot['perc'] = float(tot['prac'] / tot['theo']) * 100
|
||||
return result
|
||||
|
||||
def funct_total(self, form):
|
||||
result=[]
|
||||
res={}
|
||||
|
||||
res={
|
||||
'tot_theo':tot['theo'],
|
||||
'tot_pln':tot['pln'],
|
||||
'tot_prac':tot['prac'],
|
||||
'tot_perc':tot['perc']
|
||||
result = []
|
||||
res = {}
|
||||
res = {
|
||||
'tot_theo': tot['theo'],
|
||||
'tot_pln': tot['pln'],
|
||||
'tot_prac': tot['prac'],
|
||||
'tot_perc': tot['perc']
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
return result
|
||||
|
||||
report_sxw.report_sxw('report.crossovered.budget.report', 'crossovered.budget', 'addons/account_budget/report/crossovered_budget_report.rml',parser=budget_report,header='internal')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -148,16 +148,16 @@
|
||||
<para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ a['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ '%.2f' % a['theo'] ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ '%.2f' % a['pln'] ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ '%.2f' % a['prac'] ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ '%.2f' % a['perc'] ]]%</para>
|
||||
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['perc'], digits=2) ]]%</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -168,16 +168,16 @@
|
||||
<para style="terp_default_Bold_9"><font face="Helvetica">[[ repeatIn(funct_total(data['form']),'b') ]]</font>Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac']) ]] [[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_right_9">[[ '%.2f' % b['tot_perc'] ]]%</para>
|
||||
<para style="terp_default_Bold_right_9">[[ formatLang(b['tot_perc'], digits=2) ]]%</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -185,4 +185,4 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -29,11 +29,11 @@ class account_budget_analytic(osv.osv_memory):
|
||||
_columns = {
|
||||
'date_from': fields.date('Start of period', required=True),
|
||||
'date_to': fields.date('End of period', required=True),
|
||||
}
|
||||
}
|
||||
_defaults= {
|
||||
'date_from': time.strftime('%Y-01-01'),
|
||||
'date_to': time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
}
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
datas = {}
|
||||
@@ -44,12 +44,12 @@ class account_budget_analytic(osv.osv_memory):
|
||||
'ids': context.get('active_ids',[]),
|
||||
'model': 'account.analytic.account',
|
||||
'form': data
|
||||
}
|
||||
}
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.analytic.account.budget',
|
||||
'datas': datas,
|
||||
}
|
||||
}
|
||||
|
||||
account_budget_analytic()
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
|
||||
from osv import fields, osv
|
||||
@@ -30,11 +29,11 @@ class account_budget_crossvered_report(osv.osv_memory):
|
||||
_columns = {
|
||||
'date_from': fields.date('Start of period', required=True),
|
||||
'date_to': fields.date('End of period', required=True),
|
||||
}
|
||||
}
|
||||
_defaults= {
|
||||
'date_from': time.strftime('%Y-01-01'),
|
||||
'date_to': time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
}
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
datas = {}
|
||||
@@ -45,13 +44,13 @@ class account_budget_crossvered_report(osv.osv_memory):
|
||||
'ids': context.get('active_ids',[]),
|
||||
'model': 'crossovered.budget',
|
||||
'form': data
|
||||
}
|
||||
}
|
||||
datas['form']['report']='analytic-full'
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'crossovered.budget.report',
|
||||
'datas': datas,
|
||||
}
|
||||
}
|
||||
|
||||
account_budget_crossvered_report()
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ class account_budget_crossvered_summary_report(osv.osv_memory):
|
||||
_columns = {
|
||||
'date_from': fields.date('Start of period', required=True),
|
||||
'date_to': fields.date('End of period', required=True),
|
||||
}
|
||||
}
|
||||
_defaults= {
|
||||
'date_from': time.strftime('%Y-01-01'),
|
||||
'date_to': time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
}
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
datas = {}
|
||||
@@ -46,14 +46,13 @@ class account_budget_crossvered_summary_report(osv.osv_memory):
|
||||
'ids': context.get('active_ids',[]),
|
||||
'model': 'crossovered.budge',
|
||||
'form': data
|
||||
}
|
||||
datas['form']['report']='analytic-one'
|
||||
}
|
||||
datas['form']['report'] = 'analytic-one'
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'crossovered.budget.report',
|
||||
'datas': datas,
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
account_budget_crossvered_summary_report()
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
|
||||
from osv import fields, osv
|
||||
@@ -31,11 +30,11 @@ class account_budget_report(osv.osv_memory):
|
||||
_columns = {
|
||||
'date1': fields.date('Start of period', required=True),
|
||||
'date2': fields.date('End of period', required=True),
|
||||
}
|
||||
}
|
||||
_defaults= {
|
||||
'date1': time.strftime('%Y-01-01'),
|
||||
'date2': time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
}
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
datas = {}
|
||||
@@ -46,7 +45,7 @@ class account_budget_report(osv.osv_memory):
|
||||
'ids': context.get('active_ids',[]),
|
||||
'model': 'account.budget.post',
|
||||
'form': data
|
||||
}
|
||||
}
|
||||
|
||||
data_model = self.pool.get(datas['model']).browse(cr, uid, context['active_id'])
|
||||
if not data_model.dotation_ids:
|
||||
@@ -55,7 +54,7 @@ class account_budget_report(osv.osv_memory):
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.budget',
|
||||
'datas': datas,
|
||||
}
|
||||
}
|
||||
|
||||
account_budget_report()
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class account_budget_spread(osv.osv_memory):
|
||||
_columns = {
|
||||
'fiscalyear': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True),
|
||||
'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
|
||||
}
|
||||
}
|
||||
|
||||
def check_spread(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2010-08-19 12:03+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 10:33+0000\n"
|
||||
"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-09-30 06:58+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@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-09-30 04:44+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_cancel
|
||||
|
||||
@@ -8,71 +8,72 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-24 13:11+0000\n"
|
||||
"PO-Revision-Date: 2010-09-26 20:12+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2010-10-01 11:59+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@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-09-29 05:17+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,journal_id:0
|
||||
#: wizard_field:account.coda_import,init,journal_id:0
|
||||
msgid "Bank Journal"
|
||||
msgstr ""
|
||||
msgstr "Bank Dagafschrift"
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten!"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,extraction,note:0
|
||||
msgid "Log"
|
||||
msgstr ""
|
||||
msgstr "Logboek"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,extraction,open:0
|
||||
msgid "_Open Statement"
|
||||
msgstr ""
|
||||
msgstr "_Open Afschrift"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
|
||||
msgid "Account CODA"
|
||||
msgstr ""
|
||||
msgstr "Rekening CODA"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,name:0
|
||||
msgid "Coda file"
|
||||
msgstr ""
|
||||
msgstr "Coda bestand"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Clic on 'New' to select your file :"
|
||||
msgstr ""
|
||||
msgstr "Klik op 'Nieuw' om uw bestand te selecteren :"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
|
||||
msgid "Import Coda File"
|
||||
msgstr ""
|
||||
msgstr "Importeer Coda bestand"
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
msgstr "Ongeldige modelnaam in de definitie van de actie."
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,note:0
|
||||
msgid "Import log"
|
||||
msgstr ""
|
||||
msgstr "Import logboek"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,def_receivable:0
|
||||
msgid "Default receivable Account"
|
||||
msgstr ""
|
||||
msgstr "Standaard ontvangstenrekening"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.module.module,description:account_coda.module_meta_information
|
||||
@@ -81,86 +82,89 @@ msgid ""
|
||||
" bank statements from .csv file.\n"
|
||||
" Import coda file wizard is used to import bank statements."
|
||||
msgstr ""
|
||||
"Module voorziet in functies voor het importeren van bankafschriften in "
|
||||
".csv.bestanden.\n"
|
||||
"Import coda bestand wizard importeert bankafschriften."
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,extraction,end:0
|
||||
msgid "_Close"
|
||||
msgstr ""
|
||||
msgstr "_Afsluiten"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,statement_id:0
|
||||
msgid "Generated Bank Statement"
|
||||
msgstr ""
|
||||
msgstr "Gegenereerd bankafschrift"
|
||||
|
||||
#. module: account_coda
|
||||
#: view:account.coda:0
|
||||
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
|
||||
#: model:ir.actions.act_window,name:account_coda.action_account_coda
|
||||
msgid "Coda import"
|
||||
msgstr ""
|
||||
msgstr "Coda import"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,user_id:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
msgstr "Gebruiker"
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
msgstr "Ongeldige XML voor weergave opbouw!"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.model,name:account_coda.model_account_coda
|
||||
msgid "coda for an Account"
|
||||
msgstr ""
|
||||
msgstr "coda voor een rekening"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,def_payable:0
|
||||
msgid "Default Payable Account"
|
||||
msgstr ""
|
||||
msgstr "Standaard uitgavenrekening"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.ui.menu,name:account_coda.menu_account_coda
|
||||
msgid "Coda Statements"
|
||||
msgstr ""
|
||||
msgstr "Coda afschriften"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
|
||||
msgid "Import Coda Statements"
|
||||
msgstr ""
|
||||
msgstr "Importeer Coda afschriften"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,init,extraction:0
|
||||
msgid "_Ok"
|
||||
msgstr ""
|
||||
msgstr "_Ok"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,extraction:0
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Import Coda Statement"
|
||||
msgstr ""
|
||||
msgstr "Importeer Coda afschrift"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.bank.statement,coda_id:0
|
||||
msgid "Coda"
|
||||
msgstr ""
|
||||
msgstr "Coda"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,extraction:0
|
||||
msgid "Results :"
|
||||
msgstr ""
|
||||
msgstr "Resultaten :"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,coda:0
|
||||
msgid "Coda File"
|
||||
msgstr ""
|
||||
msgstr "Coda Bestand"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,date:0
|
||||
msgid "Import Date"
|
||||
msgstr ""
|
||||
msgstr "Importdatum"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Select your bank journal :"
|
||||
msgstr ""
|
||||
msgstr "Selecteer bank dagboek :"
|
||||
|
||||
@@ -224,24 +224,24 @@ class account_coda_import(osv.osv_memory):
|
||||
'period_id':statement.get('period_id',False) or period,# statement.period_id.id
|
||||
}
|
||||
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
|
||||
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'))
|
||||
context.update({'move_line_ids': rec_id})
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), context=context)
|
||||
voucher_line_dict = False
|
||||
if result['value']['line_ids']:
|
||||
for line_dict in result['value']['line_ids']:
|
||||
move_line = line_obj.browse(cr, uid, line_dict['move_line_id'], context)
|
||||
if line.move_id.id == move_line.move_id.id:
|
||||
voucher_line_dict = line_dict
|
||||
|
||||
|
||||
if voucher_line_dict:
|
||||
voucher_line_dict.update({'voucher_id':voucher_id})
|
||||
voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
|
||||
|
||||
|
||||
# reconcile_id = statement_reconcile_obj.create(cr, uid, {
|
||||
# 'line_ids': [(6, 0, rec_id)]
|
||||
# }, context=context)
|
||||
#
|
||||
|
||||
|
||||
mv = self.pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
|
||||
if mv.partner_id:
|
||||
line['partner_id'] = mv.partner_id.id
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
</record>
|
||||
<menuitem action="action_account_followup_definition_form" id="account_followup_menu" parent="account.menu_configuration_misc" groups="base.group_system"/>
|
||||
|
||||
<report auto="False" id="account_followup_followup_report" menu="False" model="account_followup.followup" name="account_followup.followup.print" rml="account_followup/report/report_followp_print.rml" string="Followup Report"/>
|
||||
<report auto="False" id="account_followup_followup_report" menu="False" model="account_followup.followup" name="account_followup.followup.print" rml="account_followup/report/account_followup_print.rml" string="Followup Report"/>
|
||||
|
||||
<record id="account_move_line_partner_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.partner.tree</field>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import report_followup_print
|
||||
import account_followup_print
|
||||
import account_followup_report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ class report_rappel(report_sxw.rml_parse):
|
||||
return text
|
||||
|
||||
report_sxw.report_sxw('report.account_followup.followup.print',
|
||||
'res.partner', 'addons/account_followup/report/report_followp_print.rml',
|
||||
'res.partner', 'addons/account_followup/report/account_followup_print.rml',
|
||||
parser=report_rappel)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -91,7 +91,8 @@ class account_payment_populate_statement(osv.osv_memory):
|
||||
'period_id': statement.period_id.id
|
||||
}
|
||||
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment')
|
||||
context.update({'move_line_ids': [line.move_line_id.id]})
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment', context=context)
|
||||
voucher_line_dict = False
|
||||
if result['value']['line_ids']:
|
||||
for line_dict in result['value']['line_ids']:
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import voucher
|
||||
import account_voucher
|
||||
import report
|
||||
import wizard
|
||||
|
||||
|
||||
@@ -38,22 +38,22 @@
|
||||
|
||||
"update_xml" : [
|
||||
"security/ir.model.access.csv",
|
||||
"voucher_sequence.xml",
|
||||
"voucher_workflow.xml",
|
||||
"voucher_report.xml",
|
||||
"account_voucher_sequence.xml",
|
||||
"account_voucher_workflow.xml",
|
||||
"account_voucher_report.xml",
|
||||
"wizard/account_voucher_unreconcile_view.xml",
|
||||
"wizard/account_statement_from_invoice_view.xml",
|
||||
"voucher_view.xml",
|
||||
"account_voucher_view.xml",
|
||||
"voucher_payment_receipt_view.xml",
|
||||
"voucher_sales_purchase_view.xml",
|
||||
"voucher_wizard.xml",
|
||||
"account_voucher_wizard.xml",
|
||||
"security/account_voucher_security.xml"
|
||||
],
|
||||
"test" : [
|
||||
# "test/account_voucher.yml",
|
||||
"test/sales_receipt.yml",
|
||||
"test/sales_payment.yml",
|
||||
"test/account_voucher_report.yml"
|
||||
"test/account_voucher_report.yml"
|
||||
],
|
||||
'certificate': '0037580727101',
|
||||
"active": False,
|
||||
|
||||
@@ -48,7 +48,7 @@ account_move_line()
|
||||
class account_voucher(osv.osv):
|
||||
def _get_type(self, cr, uid, ids, context={}):
|
||||
return context.get('type', False)
|
||||
|
||||
|
||||
def _get_period(self, cr, uid, context={}):
|
||||
if context.get('period_id', False):
|
||||
return context.get('period_id')
|
||||
@@ -61,7 +61,7 @@ class account_voucher(osv.osv):
|
||||
return context.get('journal_id')
|
||||
if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
|
||||
return context.get('search_default_journal_id')
|
||||
|
||||
|
||||
ttype = context.get('type', 'bank')
|
||||
if ttype in ('payment', 'receipt'):
|
||||
ttype = 'bank'
|
||||
@@ -77,7 +77,7 @@ class account_voucher(osv.osv):
|
||||
if not res:
|
||||
return False
|
||||
journal_id = res[0]
|
||||
|
||||
|
||||
if not journal_id:
|
||||
return False
|
||||
journal = journal_pool.browse(cr, uid, journal_id)
|
||||
@@ -109,7 +109,7 @@ class account_voucher(osv.osv):
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
return []
|
||||
return [(r['id'], (str(r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')]
|
||||
return [(r['id'], (str("%.2f" % r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')]
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
|
||||
res = super(account_voucher,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
@@ -187,33 +187,33 @@ class account_voucher(osv.osv):
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
|
||||
'tax_id': _get_tax,
|
||||
}
|
||||
|
||||
|
||||
def compute_tax(self, cr, uid, ids, context={}):
|
||||
tax_pool = self.pool.get('account.tax')
|
||||
partner_pool = self.pool.get('res.partner')
|
||||
position_pool = self.pool.get('account.fiscal.position')
|
||||
voucher_line_pool = self.pool.get('account.voucher.line')
|
||||
voucher_pool = self.pool.get('account.voucher')
|
||||
|
||||
|
||||
for voucher in voucher_pool.browse(cr, uid, ids, context):
|
||||
voucher_amount = 0.0
|
||||
for line in voucher.line_ids:
|
||||
voucher_amount += line.untax_amount or line.amount
|
||||
line.amount = line.untax_amount or line.amount
|
||||
voucher_line_pool.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount})
|
||||
|
||||
|
||||
if not voucher.tax_id:
|
||||
self.write(cr, uid, [voucher.id], {'amount':voucher_amount, 'tax_amount':0.0})
|
||||
continue
|
||||
|
||||
|
||||
tax = [tax_pool.browse(cr, uid, voucher.tax_id.id)]
|
||||
partner = partner_pool.browse(cr, uid, voucher.partner_id.id) or False
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
|
||||
tax = tax_pool.browse(cr, uid, taxes)
|
||||
|
||||
|
||||
total = voucher_amount
|
||||
total_tax = 0.0
|
||||
|
||||
|
||||
if not tax[0].price_include:
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes',[]):
|
||||
total_tax += tax_line.get('amount')
|
||||
@@ -223,17 +223,17 @@ class account_voucher(osv.osv):
|
||||
for line in voucher.line_ids:
|
||||
line_total = 0.0
|
||||
line_tax = 0.0
|
||||
|
||||
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes',[]):
|
||||
line_tax += tax_line.get('amount')
|
||||
line_total += tax_line.get('price_unit')
|
||||
total_tax += line_tax
|
||||
untax_amount = line.untax_amount or line.amount
|
||||
voucher_line_pool.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount})
|
||||
|
||||
|
||||
self.write(cr, uid, [voucher.id], {'amount':total, 'tax_amount':total_tax})
|
||||
return True
|
||||
|
||||
|
||||
def onchange_price(self, cr, uid, ids, line_ids, tax_id, partner_id=False, context={}):
|
||||
tax_pool = self.pool.get('account.tax')
|
||||
partner_pool = self.pool.get('res.partner')
|
||||
@@ -246,16 +246,16 @@ class account_voucher(osv.osv):
|
||||
voucher_total_tax = 0.0
|
||||
voucher_total = 0.0
|
||||
voucher_line_ids = []
|
||||
|
||||
|
||||
total = 0.0
|
||||
total_tax = 0.0
|
||||
|
||||
|
||||
for line in line_ids:
|
||||
line_amount = 0.0
|
||||
line_amount = line[2].get('amount')
|
||||
voucher_line_ids += [line[1]]
|
||||
voucher_total += line_amount
|
||||
|
||||
|
||||
total = voucher_total
|
||||
total_tax = 0.0
|
||||
if tax_id:
|
||||
@@ -264,12 +264,12 @@ class account_voucher(osv.osv):
|
||||
partner = partner_pool.browse(cr, uid, partner_id) or False
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
|
||||
tax = tax_pool.browse(cr, uid, taxes)
|
||||
|
||||
|
||||
if not tax[0].price_include:
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes',[]):
|
||||
total_tax += tax_line.get('amount')
|
||||
total += total_tax
|
||||
|
||||
|
||||
res.update({
|
||||
'amount':total or voucher_total,
|
||||
'tax_amount':total_tax
|
||||
@@ -277,7 +277,7 @@ class account_voucher(osv.osv):
|
||||
return {
|
||||
'value':res
|
||||
}
|
||||
|
||||
|
||||
def onchange_term_id(self, cr, uid, ids, term_id, amount):
|
||||
term_pool = self.pool.get('account.payment.term')
|
||||
terms = False
|
||||
@@ -291,24 +291,24 @@ class account_voucher(osv.osv):
|
||||
'date_due':due_date
|
||||
})
|
||||
return {'value':default}
|
||||
|
||||
|
||||
def onchange_journal_voucher(self, cr, uid, ids, line_ids=False, tax_id=False, price=0.0, partner_id=False, journal_id=False, ttype=False, context={}):
|
||||
"""price
|
||||
Returns a dict that contains new values and context
|
||||
|
||||
|
||||
@param partner_id: latest value from user input for field partner_id
|
||||
@param args: other arguments
|
||||
@param context: context arguments, like lang, time zone
|
||||
|
||||
|
||||
@return: Returns a dict which contains new values, and context
|
||||
"""
|
||||
default = {
|
||||
'value':{},
|
||||
}
|
||||
|
||||
|
||||
if not partner_id or not journal_id:
|
||||
return default
|
||||
|
||||
|
||||
partner_pool = self.pool.get('res.partner')
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
@@ -328,32 +328,35 @@ class account_voucher(osv.osv):
|
||||
|
||||
default['value']['account_id'] = account_id
|
||||
default['value']['type'] = ttype or tr_type
|
||||
|
||||
|
||||
vals = self.onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context)
|
||||
default['value'].update(vals.get('value'))
|
||||
|
||||
|
||||
return default
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context={}):
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None):
|
||||
"""price
|
||||
Returns a dict that contains new values and context
|
||||
|
||||
|
||||
@param partner_id: latest value from user input for field partner_id
|
||||
@param args: other arguments
|
||||
@param context: context arguments, like lang, time zone
|
||||
|
||||
|
||||
@return: Returns a dict which contains new values, and context
|
||||
"""
|
||||
if not journal_id:
|
||||
return {}
|
||||
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
currency_pool = self.pool.get('res.currency')
|
||||
move_pool = self.pool.get('account.move')
|
||||
line_pool = self.pool.get('account.voucher.line')
|
||||
move_line_pool = self.pool.get('account.move.line')
|
||||
partner_pool = self.pool.get('res.partner')
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
|
||||
vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context)
|
||||
vals = vals.get('value')
|
||||
currency_id = vals.get('currency_id', currency_id)
|
||||
@@ -383,7 +386,7 @@ class account_voucher(osv.osv):
|
||||
default['value']['account_id'] = account_id
|
||||
if journal.type not in ('cash', 'bank'):
|
||||
return default
|
||||
|
||||
|
||||
total_credit = 0.0
|
||||
total_debit = 0.0
|
||||
account_type = 'receivable'
|
||||
@@ -393,21 +396,25 @@ class account_voucher(osv.osv):
|
||||
else:
|
||||
total_credit = price or 0.0
|
||||
account_type = 'receivable'
|
||||
ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
|
||||
|
||||
if not context.get('move_line_ids', False):
|
||||
ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
|
||||
else:
|
||||
ids = context['move_line_ids']
|
||||
ids.reverse()
|
||||
moves = move_line_pool.browse(cr, uid, ids)
|
||||
|
||||
|
||||
company_currency = journal.company_id.currency_id.id
|
||||
if company_currency != currency_id and ttype == 'payment':
|
||||
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit)
|
||||
elif company_currency != currency_id and ttype == 'receipt':
|
||||
total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit)
|
||||
|
||||
|
||||
for line in moves:
|
||||
if line.credit and line.reconcile_partial_id and ttype == 'receipt':
|
||||
continue
|
||||
if line.debit and line.reconcile_partial_id and ttype == 'payment':
|
||||
continue
|
||||
continue
|
||||
total_credit += line.credit or 0.0
|
||||
total_debit += line.debit or 0.0
|
||||
|
||||
@@ -416,7 +423,7 @@ class account_voucher(osv.osv):
|
||||
continue
|
||||
if line.debit and line.reconcile_partial_id and ttype == 'payment':
|
||||
continue
|
||||
|
||||
|
||||
orignal_amount = line.credit or line.debit or 0.0
|
||||
rs = {
|
||||
'name':line.move_id.name,
|
||||
@@ -442,11 +449,11 @@ class account_voucher(osv.osv):
|
||||
default['value']['line_cr_ids'].append(rs)
|
||||
else:
|
||||
default['value']['line_dr_ids'].append(rs)
|
||||
|
||||
|
||||
if ttype == 'payment' and len(default['value']['line_cr_ids']) > 0:
|
||||
default['value']['pre_line'] = 1
|
||||
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
|
||||
default['value']['pre_line'] = 1
|
||||
default['value']['pre_line'] = 1
|
||||
return default
|
||||
|
||||
def onchange_date(self, cr, user, ids, date, context={}):
|
||||
@@ -475,7 +482,7 @@ class account_voucher(osv.osv):
|
||||
tax_id = False
|
||||
if account_id and account_id.tax_ids:
|
||||
tax_id = account_id.tax_ids[0].id
|
||||
|
||||
|
||||
vals = self.onchange_price(cr, uid, ids, line_ids, tax_id, partner_id, context)
|
||||
vals['value'].update({'tax_id':tax_id})
|
||||
currency_id = journal.company_id.currency_id.id
|
||||
@@ -499,7 +506,7 @@ class account_voucher(osv.osv):
|
||||
reconcile_pool = self.pool.get('account.move.reconcile')
|
||||
move_pool = self.pool.get('account.move')
|
||||
voucher_line_pool = self.pool.get('account.voucher.line')
|
||||
|
||||
|
||||
for voucher in self.browse(cr, uid, ids):
|
||||
recs = []
|
||||
for line in voucher.move_ids:
|
||||
@@ -509,7 +516,7 @@ class account_voucher(osv.osv):
|
||||
recs += [line.reconcile_partial_id.id]
|
||||
|
||||
reconcile_pool.unlink(cr, uid, recs)
|
||||
|
||||
|
||||
if voucher.move_id:
|
||||
move_pool.button_cancel(cr, uid, [voucher.move_id.id])
|
||||
move_pool.unlink(cr, uid, [voucher.move_id.id])
|
||||
@@ -547,7 +554,7 @@ class account_voucher(osv.osv):
|
||||
return {'value':res}
|
||||
|
||||
def action_move_line_create(self, cr, uid, ids, context=None):
|
||||
|
||||
|
||||
def _get_payment_term_lines(term_id, amount):
|
||||
term_pool = self.pool.get('account.payment.term')
|
||||
if term_id and amount:
|
||||
@@ -561,10 +568,11 @@ class account_voucher(osv.osv):
|
||||
analytic_pool = self.pool.get('account.analytic.line')
|
||||
currency_pool = self.pool.get('res.currency')
|
||||
invoice_pool = self.pool.get('account.invoice')
|
||||
bank_st_line_obj = self.pool.get('account.bank.statement.line')
|
||||
for inv in self.browse(cr, uid, ids):
|
||||
if inv.move_id:
|
||||
continue
|
||||
if inv.number:
|
||||
if inv.number:
|
||||
name = inv.number
|
||||
elif inv.journal_id.sequence_id:
|
||||
name = self.pool.get('ir.sequence').get_id(cr, uid, inv.journal_id.sequence_id.id)
|
||||
@@ -580,12 +588,17 @@ class account_voucher(osv.osv):
|
||||
'period_id': inv.period_id and inv.period_id.id or False
|
||||
}
|
||||
move_id = move_pool.create(cr, uid, move)
|
||||
|
||||
line_bank_ids = bank_st_line_obj.search(cr, uid, [('voucher_id', '=', inv.id)], context=context)
|
||||
if line_bank_ids:
|
||||
bank_st_line_obj.write(cr, uid, line_bank_ids, {
|
||||
'move_ids': [(4, move_id, False)]
|
||||
})
|
||||
|
||||
#create the first line manually
|
||||
company_currency = inv.journal_id.company_id.currency_id.id
|
||||
debit = 0.0
|
||||
credit = 0.0
|
||||
# TODO: is there any other alternative then the voucher type ??
|
||||
# TODO: is there any other alternative then the voucher type ??
|
||||
# -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt
|
||||
if inv.type in ('purchase', 'payment'):
|
||||
credit = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
|
||||
@@ -597,7 +610,7 @@ class account_voucher(osv.osv):
|
||||
if credit < 0:
|
||||
debit = -credit
|
||||
credit = 0.0
|
||||
|
||||
|
||||
move_line = {
|
||||
'name':inv.name or '/',
|
||||
'debit':debit,
|
||||
@@ -627,7 +640,7 @@ class account_voucher(osv.osv):
|
||||
if not line.amount:
|
||||
continue
|
||||
amount = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, line.amount)
|
||||
|
||||
|
||||
move_line = {
|
||||
'journal_id':inv.journal_id.id,
|
||||
'period_id':inv.period_id.id,
|
||||
@@ -649,7 +662,7 @@ class account_voucher(osv.osv):
|
||||
line.type = 'cr'
|
||||
else:
|
||||
line.type = 'dr'
|
||||
|
||||
|
||||
if (line.type=='dr'):
|
||||
line_total += amount
|
||||
move_line['debit'] = amount
|
||||
@@ -716,7 +729,7 @@ class account_voucher_line(osv.osv):
|
||||
_name = 'account.voucher.line'
|
||||
_description = 'Voucher Lines'
|
||||
_order = "move_line_id"
|
||||
|
||||
|
||||
def _compute_balance(self, cr, uid, ids, name, args, context=None):
|
||||
currency_pool = self.pool.get('res.currency')
|
||||
rs_data = {}
|
||||
@@ -725,16 +738,16 @@ class account_voucher_line(osv.osv):
|
||||
company_currency = line.voucher_id.journal_id.company_id.currency_id.id
|
||||
voucher_currency = line.voucher_id.currency_id.id
|
||||
move_line = line.move_line_id or False
|
||||
|
||||
|
||||
if not move_line:
|
||||
res['amount_original'] = 0.0
|
||||
res['amount_unreconciled'] = 0.0
|
||||
|
||||
|
||||
elif move_line and move_line.credit > 0:
|
||||
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit)
|
||||
else:
|
||||
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit)
|
||||
|
||||
|
||||
if move_line:
|
||||
res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.amount_unreconciled)
|
||||
rs_data[line.id] = res
|
||||
@@ -767,7 +780,7 @@ class account_voucher_line(osv.osv):
|
||||
@param move_line_id: latest value from user input for field move_line_id
|
||||
@param args: other arguments
|
||||
@param context: context arguments, like lang, time zone
|
||||
|
||||
|
||||
@return: Returns a dict which contains new values, and context
|
||||
"""
|
||||
res = {}
|
||||
@@ -793,9 +806,9 @@ class account_voucher_line(osv.osv):
|
||||
def default_get(self, cr, user, fields_list, context=None):
|
||||
"""
|
||||
Returns default values for fields
|
||||
@param fields_list: list of fields, for which default values are required to be read
|
||||
@param fields_list: list of fields, for which default values are required to be read
|
||||
@param context: context arguments, like lang, time zone
|
||||
|
||||
|
||||
@return: Returns a dict that contains default values for fields
|
||||
"""
|
||||
journal_id = context.get('journal_id', False)
|
||||
@@ -834,14 +847,26 @@ account_voucher_line()
|
||||
class account_bank_statement(osv.osv):
|
||||
_inherit = 'account.bank.statement'
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
done = []
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
voucher_ids = []
|
||||
for line in st.line_ids:
|
||||
if line.voucher_id:
|
||||
voucher_ids.append(line.voucher_id.id)
|
||||
self.pool.get('account.voucher').cancel_voucher(cr, uid, voucher_ids, context)
|
||||
self.pool.get('account.voucher').unlink(cr, uid, voucher_ids, context)
|
||||
return super(account_bank_statement, self).button_cancel(cr, uid, ids, context=context)
|
||||
|
||||
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, next_number, context=None):
|
||||
voucher_obj = self.pool.get('account.voucher')
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
st_line = self.pool.get('account.bank.statement.line').browse(cr, uid, st_line_id, context=context)
|
||||
if st_line.voucher_id:
|
||||
self.pool.get('account.voucher').write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
|
||||
wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
|
||||
return self.pool.get('account.move.line').write(cr, uid, [x.id for x in st_line.voucher_id.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
|
||||
return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line, company_currency_id, next_number, context=context)
|
||||
return self.pool.get('account.move.line').write(cr, uid, [x.id for x in st_line.voucher_id.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
|
||||
return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
|
||||
|
||||
account_bank_statement()
|
||||
|
||||
@@ -851,17 +876,18 @@ class account_bank_statement_line(osv.osv):
|
||||
def _amount_reconciled(self, cursor, user, ids, name, args, context=None):
|
||||
if not ids:
|
||||
return {}
|
||||
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res = {}
|
||||
company_currency_id = False
|
||||
|
||||
for line in self.browse(cursor, user, ids, context=context):
|
||||
if not company_currency_id:
|
||||
company_currency_id = line.company_id.id
|
||||
# if not company_currency_id:
|
||||
# company_currency_id = line.company_id.id
|
||||
if line.voucher_id:
|
||||
res[line.id] = res_currency_obj.compute(cursor, user,
|
||||
company_currency_id, line.statement_id.currency.id,
|
||||
line.voucher_id.amount, context=context)
|
||||
res[line.id] = line.voucher_id.amount#
|
||||
# res_currency_obj.compute(cursor, user,
|
||||
# company_currency_id, line.statement_id.currency.id,
|
||||
# line.voucher_id.amount, context=context)
|
||||
else:
|
||||
res[line.id] = 0.0
|
||||
return res
|
||||
@@ -877,7 +903,8 @@ class account_bank_statement_line(osv.osv):
|
||||
statement_line = self.browse(cr, uid, ids, context)
|
||||
unlink_ids = []
|
||||
for st_line in statement_line:
|
||||
unlink_ids.append(st_line.voucher_id.id)
|
||||
if st_line.voucher_id:
|
||||
unlink_ids.append(st_line.voucher_id.id)
|
||||
self.pool.get('account.voucher').unlink(cr, uid, unlink_ids, context=context)
|
||||
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
+3
-3
@@ -5,17 +5,17 @@
|
||||
string="Voucher"
|
||||
model="account.voucher"
|
||||
name="voucher.cash_receipt.drcr"
|
||||
rml="account_voucher/report/report_voucher.rml"
|
||||
rml="account_voucher/report/account_voucher.rml"
|
||||
groups="base.group_extended"
|
||||
auto="False"
|
||||
header = "False"
|
||||
menu="True"/>
|
||||
|
||||
|
||||
<report id="report_account_voucher_print"
|
||||
string="Voucher Print"
|
||||
model="account.voucher"
|
||||
name="voucher.print"
|
||||
rml="account_voucher/report/report_voucher_print.rml"
|
||||
rml="account_voucher/report/account_voucher_print.rml"
|
||||
auto="False"
|
||||
header = "False"
|
||||
menu="True"/>
|
||||
+16
-3
@@ -193,9 +193,8 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_bank_statement_form_voucher" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.voucher.form.inherit</field>
|
||||
<record id="view_bank_statement_tree_voucher" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.voucher.tree.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
@@ -207,5 +206,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_form_voucher" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.voucher.form.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page[@name='statement_line_ids']/field[@name='line_ids']/form/field[@name='sequence']" position="before">
|
||||
<field name="voucher_id" context="{'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
|
||||
<field name="amount_reconciled"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,9 +15,9 @@
|
||||
# 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 report_voucher
|
||||
import report_voucher_print
|
||||
import account_voucher
|
||||
import account_voucher_print
|
||||
|
||||
+1
-1
@@ -67,6 +67,6 @@ class report_voucher(report_sxw.rml_parse):
|
||||
report_sxw.report_sxw(
|
||||
'report.voucher.cash_receipt.drcr',
|
||||
'account.voucher',
|
||||
'addons/account_voucher/report/report_voucher.rml',
|
||||
'addons/account_voucher/report/account_voucher.rml',
|
||||
parser=report_voucher,header="external"
|
||||
)
|
||||
+7
-7
@@ -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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -37,7 +37,7 @@ class report_voucher_print(report_sxw.rml_parse):
|
||||
def convert(self, amount, cur):
|
||||
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
|
||||
return amt_en
|
||||
|
||||
|
||||
def get_lines(self,voucher):
|
||||
result = []
|
||||
if voucher.type in ('payment','receipt'):
|
||||
@@ -67,13 +67,13 @@ class report_voucher_print(report_sxw.rml_parse):
|
||||
res['amount'] = amount
|
||||
result.append(res)
|
||||
return result
|
||||
|
||||
|
||||
def get_title(self, type):
|
||||
title = ''
|
||||
if type:
|
||||
title = type[0].swapcase() + type[1:] + " Voucher"
|
||||
return title
|
||||
|
||||
|
||||
def get_on_account(self, voucher):
|
||||
name = ""
|
||||
if voucher.type == 'receipt':
|
||||
@@ -85,10 +85,10 @@ class report_voucher_print(report_sxw.rml_parse):
|
||||
elif voucher.type == 'purchase':
|
||||
name = "Purchase from "+str(voucher.partner_id.name)
|
||||
return name
|
||||
|
||||
|
||||
report_sxw.report_sxw(
|
||||
'report.voucher.print',
|
||||
'account.voucher',
|
||||
'addons/account_voucher/report/report_voucher_print.rml',
|
||||
'addons/account_voucher/report/account_voucher_print.rml',
|
||||
parser=report_voucher_print,header="external"
|
||||
)
|
||||
@@ -71,9 +71,9 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
||||
elif (line.invoice and line.invoice.currency_id.id <> statement.currency.id):
|
||||
amount = currency_obj.compute(cr, uid, line.invoice.currency_id.id,
|
||||
statement.currency.id, amount, context=ctx)
|
||||
|
||||
|
||||
voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt') ,
|
||||
'name': line.name,
|
||||
'name': line.name,
|
||||
'partner_id': line.partner_id.id,
|
||||
'journal_id': statement.journal_id.id,
|
||||
'account_id': line.account_id.id,
|
||||
@@ -83,7 +83,8 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
||||
'amount':abs(amount),
|
||||
'period_id':statement.period_id.id}
|
||||
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'))
|
||||
context.update({'move_line_ids': [line.id]})
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), context=context)
|
||||
voucher_line_dict = False
|
||||
if result['value']['line_ids']:
|
||||
for line_dict in result['value']['line_ids']:
|
||||
|
||||
+62
-41
@@ -8,19 +8,19 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
|
||||
"PO-Revision-Date: 2010-09-24 14:42+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2010-10-01 11:59+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@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-09-29 05:17+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,child_ids:0
|
||||
msgid "Child Accounts"
|
||||
msgstr ""
|
||||
msgstr "Subrekeningen"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,amount_currency:0
|
||||
@@ -28,27 +28,31 @@ msgid ""
|
||||
"The amount expressed in the related account currency if not equal to the "
|
||||
"company one."
|
||||
msgstr ""
|
||||
"Het bedrag in de valuta van de gekoppelde rekening als deze afwijkt van die "
|
||||
"van het bedrijf"
|
||||
|
||||
#. module: analytic
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten !"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,name:0
|
||||
msgid "Account Name"
|
||||
msgstr ""
|
||||
msgstr "Naam rekening"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,unit_amount:0
|
||||
msgid "Specifies the amount of quantity to count."
|
||||
msgstr ""
|
||||
msgstr "Het aantal te rekenen eenheden"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,currency_id:0
|
||||
msgid "The related account currency if not equal to the company one."
|
||||
msgstr ""
|
||||
"De valuta van de gekoppelde rekening wijkt af van die van het bedrijf."
|
||||
|
||||
#. module: analytic
|
||||
#: model:ir.module.module,description:analytic.module_meta_information
|
||||
@@ -56,31 +60,33 @@ msgid ""
|
||||
"Module for defining analytic accounting object.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"Module voor het definiëren van kostenplaatsen.\n"
|
||||
" "
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,state:0
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
msgstr "Status"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,user_id:0
|
||||
msgid "Account Manager"
|
||||
msgstr ""
|
||||
msgstr "Rekeningbeheerder"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
msgstr "Concept"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Closed"
|
||||
msgstr ""
|
||||
msgstr "Gesloten"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,debit:0
|
||||
msgid "Debit"
|
||||
msgstr ""
|
||||
msgstr "Debit"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.account,state:0
|
||||
@@ -100,32 +106,46 @@ msgid ""
|
||||
" If it is to be reviewed then the state is 'Pending'.\n"
|
||||
" When the project is completed the state is set to 'Done'."
|
||||
msgstr ""
|
||||
"* Nadat de rekening is gemaakt, wordt de status 'Concept'. "
|
||||
" \n"
|
||||
"* Als er een gekoppelde relatie is, kan de status naar 'Open'. "
|
||||
" \n"
|
||||
"* Als er openstaand saldo is, kan de status naar 'Wacht'. "
|
||||
" \n"
|
||||
"* En tenslotte als alle transacties klaar zijn, dan gaat de status naar "
|
||||
"'Gesloten'. \n"
|
||||
"* Het project kan zowel in 'Sjabloon' als in 'Lopend' zijn.\n"
|
||||
" Als het in 'Sjabloon' status is, dan kunnen we projecten maken op basis van "
|
||||
"het sjabloon project. Als het status 'Lopend' heeft, dan is het een gewoon "
|
||||
"project. \n"
|
||||
" Als het moet worden nagekeken is de status 'Wacht'.\n"
|
||||
" Als het project klaar is dan is de status 'Klaar'."
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,type:0
|
||||
msgid "Account Type"
|
||||
msgstr ""
|
||||
msgstr "Rekeningsoort"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Template"
|
||||
msgstr ""
|
||||
msgstr "Sjabloon"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Pending"
|
||||
msgstr ""
|
||||
msgstr "Wacht"
|
||||
|
||||
#. module: analytic
|
||||
#: model:ir.model,name:analytic.model_account_analytic_line
|
||||
msgid "Analytic Line"
|
||||
msgstr ""
|
||||
msgstr "Kostenplaatsboeking"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,description:0
|
||||
#: field:account.analytic.line,name:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
msgstr "Omschrijving"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,amount:0
|
||||
@@ -133,133 +153,134 @@ msgid ""
|
||||
"Calculated by multiplying the quantity and the price given in the Product's "
|
||||
"cost price."
|
||||
msgstr ""
|
||||
"Berekend door het aantal en de product kostprijs te vermenigvuldigen."
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,company_id:0
|
||||
#: field:account.analytic.line,company_id:0
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
msgstr "Bedrijf"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,quantity_max:0
|
||||
msgid "Maximum Quantity"
|
||||
msgstr ""
|
||||
msgstr "Maximum aantal"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,user_id:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
msgstr "Gebruiker"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,parent_id:0
|
||||
msgid "Parent Analytic Account"
|
||||
msgstr ""
|
||||
msgstr "Bovenliggende kostenplaats"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,date:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
msgstr "Datum"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,currency_id:0
|
||||
#: field:account.analytic.line,currency_id:0
|
||||
msgid "Account currency"
|
||||
msgstr ""
|
||||
msgstr "Kostenplaats valuta"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,type:0
|
||||
msgid "View"
|
||||
msgstr ""
|
||||
msgstr "Weergave"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.account,quantity_max:0
|
||||
msgid "Sets the higher limit of quantity of hours."
|
||||
msgstr ""
|
||||
msgstr "Stelt de bovengrens in van het aantal uren."
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,credit:0
|
||||
msgid "Credit"
|
||||
msgstr ""
|
||||
msgstr "Credit"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,amount:0
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
msgstr "Bedrag"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,contact_id:0
|
||||
msgid "Contact"
|
||||
msgstr ""
|
||||
msgstr "Contactpersoon"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
msgstr "Geannuleerd"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,balance:0
|
||||
msgid "Balance"
|
||||
msgstr ""
|
||||
msgstr "Saldo"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,date_start:0
|
||||
msgid "Date Start"
|
||||
msgstr ""
|
||||
msgstr "Begindatum"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,quantity:0
|
||||
#: field:account.analytic.line,unit_amount:0
|
||||
msgid "Quantity"
|
||||
msgstr ""
|
||||
msgstr "Aantal"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,date:0
|
||||
msgid "Date End"
|
||||
msgstr ""
|
||||
msgstr "Einddatum"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,code:0
|
||||
msgid "Account Code"
|
||||
msgstr ""
|
||||
msgstr "Rekeningcode"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,type:0
|
||||
msgid "Normal"
|
||||
msgstr ""
|
||||
msgstr "Normaal"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,complete_name:0
|
||||
msgid "Full Account Name"
|
||||
msgstr ""
|
||||
msgstr "Volledige naam kostenplaats"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,account_id:0
|
||||
#: model:ir.model,name:analytic.model_account_analytic_account
|
||||
#: model:ir.module.module,shortdesc:analytic.module_meta_information
|
||||
msgid "Analytic Account"
|
||||
msgstr ""
|
||||
msgstr "Kostenplaats"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,company_currency_id:0
|
||||
msgid "Currency"
|
||||
msgstr ""
|
||||
msgstr "Valuta"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,amount_currency:0
|
||||
msgid "Amount currency"
|
||||
msgstr ""
|
||||
msgstr "Bedrag in valuta"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,partner_id:0
|
||||
msgid "Associated Partner"
|
||||
msgstr ""
|
||||
msgstr "Gekoppelde relatie"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
msgstr "Open"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,line_ids:0
|
||||
msgid "Analytic Entries"
|
||||
msgstr ""
|
||||
msgstr "Kostenplaatsboekingen"
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2010-08-19 12:20+0000\n"
|
||||
"PO-Revision-Date: 2010-09-12 15:32+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2010-10-02 08:12+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@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-09-29 05:18+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-10-03 04:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base_action_rule
|
||||
@@ -22,68 +22,72 @@ msgstr ""
|
||||
msgid ""
|
||||
"Check this if you want the rule to send an email to the responsible person."
|
||||
msgstr ""
|
||||
"Vink dit aan wanneer de regel een email moet versturen naar de "
|
||||
"verantwoordelijke persoon."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_remind_partner:0
|
||||
msgid "Remind Partner"
|
||||
msgstr ""
|
||||
msgstr "Relatie herinneren"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,trg_partner_categ_id:0
|
||||
msgid "Partner Category"
|
||||
msgstr ""
|
||||
msgstr "Relatiecategorie"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
msgstr "Ongeldige naam van het model in de actie definitie."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,act_remind_user:0
|
||||
msgid ""
|
||||
"Check this if you want the rule to send a reminder by email to the user."
|
||||
msgstr ""
|
||||
"Vink dit aan wanneer u wilt dat de regel de gebruiker via de mail een "
|
||||
"herinnering stuurt."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,trg_state_to:0
|
||||
msgid "Button Pressed"
|
||||
msgstr ""
|
||||
msgstr "Knop ingedrukt"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,model_id:0
|
||||
msgid "Object"
|
||||
msgstr ""
|
||||
msgstr "Object"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_mail_to_email:0
|
||||
msgid "Mail to these Emails"
|
||||
msgstr ""
|
||||
msgstr "Mail naar deze emails"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_state:0
|
||||
msgid "Set State to"
|
||||
msgstr ""
|
||||
msgstr "Zet status op"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Email Body"
|
||||
msgstr ""
|
||||
msgstr "Email bericht"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_range_type:0
|
||||
msgid "Days"
|
||||
msgstr ""
|
||||
msgstr "Dagen"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: code:addons/base_action_rule/base_action_rule.py:0
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
msgstr "Fout!"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_reply_to:0
|
||||
msgid "Reply-To"
|
||||
msgstr ""
|
||||
msgstr "Antwoord naar"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,act_email_cc:0
|
||||
@@ -91,128 +95,132 @@ msgid ""
|
||||
"These people will receive a copy of the future communication between partner "
|
||||
"and users by email"
|
||||
msgstr ""
|
||||
"Deze personen krijgen via email een kopie van toekomstige communicatie "
|
||||
"tussen relatie en gebruikers"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_range_type:0
|
||||
msgid "Minutes"
|
||||
msgstr ""
|
||||
msgstr "Minuten"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,name:0
|
||||
msgid "Rule Name"
|
||||
msgstr ""
|
||||
msgstr "Regelnaam"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,act_remind_partner:0
|
||||
msgid ""
|
||||
"Check this if you want the rule to send a reminder by email to the partner."
|
||||
msgstr ""
|
||||
"Aanvinken als u wilt dat de regel de relatie een herinnering via email "
|
||||
"stuurt."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Email Reminders"
|
||||
msgstr ""
|
||||
msgstr "Email herinneringen"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Conditions on Model Partner"
|
||||
msgstr ""
|
||||
msgstr "Voorwaarden op relatiemodel"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_type:0
|
||||
msgid "Deadline"
|
||||
msgstr ""
|
||||
msgstr "Uiterste datum"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,trg_partner_id:0
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
msgstr "Relatie"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(object_subject)s = Object subject"
|
||||
msgstr ""
|
||||
msgstr "%(object_subject)s = Object onderwerp"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
msgstr "Ongeldige XML voor weergave opbouw!"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Special Keywords to Be Used in The Body"
|
||||
msgstr ""
|
||||
msgstr "Speciale sleutelwoorden die in het bericht kunnen worden gebruikt"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,trg_state_from:0
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
msgstr "Status"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,act_mail_to_email:0
|
||||
msgid "Email-id of the persons whom mail is to be sent"
|
||||
msgstr ""
|
||||
msgstr "Email-id van de personen waarvan de mail wordt verstuurd"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
#: model:ir.module.module,shortdesc:base_action_rule.module_meta_information
|
||||
msgid "Action Rule"
|
||||
msgstr ""
|
||||
msgstr "Actieregel"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Fields to Change"
|
||||
msgstr ""
|
||||
msgstr "Te veranderen velden"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_type:0
|
||||
msgid "Creation Date"
|
||||
msgstr ""
|
||||
msgstr "Aanmaakdatum"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_type:0
|
||||
msgid "Last Action Date"
|
||||
msgstr ""
|
||||
msgstr "Laatste actiedatum"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_range_type:0
|
||||
msgid "Hours"
|
||||
msgstr ""
|
||||
msgstr "Uren"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(object_id)s = Object ID"
|
||||
msgstr ""
|
||||
msgstr "%(object_id)s = Object ID"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Delay After Trigger Date"
|
||||
msgstr ""
|
||||
msgstr "Vertraging na Activeerdatum"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_remind_attach:0
|
||||
msgid "Remind with Attachment"
|
||||
msgstr ""
|
||||
msgstr "Herinneren met bijlage"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: constraint:ir.cron:0
|
||||
msgid "Invalid arguments"
|
||||
msgstr ""
|
||||
msgstr "Ongeldige argumenten"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_user_id:0
|
||||
msgid "Set Responsible to"
|
||||
msgstr ""
|
||||
msgstr "Zet verantwoordelijke op"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_type:0
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
msgstr "Geen"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(object_user_phone)s = Responsible phone"
|
||||
msgstr ""
|
||||
msgstr "%(object_user_phone)s = Telefoon verantwoordelijke"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
@@ -220,11 +228,14 @@ msgid ""
|
||||
"The rule uses the AND operator. The model must match all non-empty fields so "
|
||||
"that the rule executes the action described in the 'Actions' tab."
|
||||
msgstr ""
|
||||
"De regel gebruikt een EN bewerking. Het model moet met alle niet-lege velden "
|
||||
"overeenkomen om de regel de in de 'Acties' tab beschreven actie te laten "
|
||||
"uitvoeren."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,trg_date_range_type:0
|
||||
msgid "Delay type"
|
||||
msgstr ""
|
||||
msgstr "Soort vertraging"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,regex_name:0
|
||||
@@ -234,11 +245,15 @@ msgid ""
|
||||
"string 'urgent'\n"
|
||||
"Note: This is case sensitive search."
|
||||
msgstr ""
|
||||
"Reguliere expressie voor overeenkomende naam van de bron; \n"
|
||||
"i.e.: 'urgent.*' zal zoeken naar records met de naam beginnend met de tekst "
|
||||
"'urgent'\n"
|
||||
"Opmerking: dit zoeken is hoofdletter gevoelig."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_method:0
|
||||
msgid "Call Object Method"
|
||||
msgstr ""
|
||||
msgstr "Object-methode aanroepen"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,act_mail_to_watchers:0
|
||||
@@ -246,31 +261,33 @@ msgid ""
|
||||
"Check this if you want the rule to mark CC(mail to any other person defined "
|
||||
"in actions)."
|
||||
msgstr ""
|
||||
"Vink aan als u wilt dat de regel CC markeert (mail naar een andere in de "
|
||||
"acties gedefinieerde persoon)."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(partner)s = Partner name"
|
||||
msgstr ""
|
||||
msgstr "%(partner)s = Naam relatie"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Note"
|
||||
msgstr ""
|
||||
msgstr "Notitie"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: constraint:ir.ui.menu:0
|
||||
msgid "Error ! You can not create recursive Menu."
|
||||
msgstr ""
|
||||
msgstr "Fout ! U kunt geen recursief menu maken."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,trg_date_range:0
|
||||
msgid "Delay after trigger date"
|
||||
msgstr ""
|
||||
msgstr "Vertraging na activeerdatum"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Conditions"
|
||||
msgstr ""
|
||||
msgstr "Voorwaarden"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,trg_date_range:0
|
||||
@@ -279,47 +296,50 @@ msgid ""
|
||||
"need a delay before the trigger date, like sending a reminder 15 minutes "
|
||||
"before a meeting."
|
||||
msgstr ""
|
||||
"Vertraging na activeerdatum, specificeert dat u een negatief getal kunt "
|
||||
"invoeren als u vertraging vóór de activeerdatum wilt, zoals een herinnering "
|
||||
"15 minuten voor een vergadering versturen."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,active:0
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
msgstr "Actief"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: code:addons/base_action_rule/base_action_rule.py:0
|
||||
#, python-format
|
||||
msgid "No E-Mail ID Found for your Company address!"
|
||||
msgstr ""
|
||||
msgstr "Geen email-ID gevonden bij uw bedrijfsadres!"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_remind_user:0
|
||||
msgid "Remind Responsible"
|
||||
msgstr ""
|
||||
msgstr "Herinneren verantwoordelijke"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: model:ir.module.module,description:base_action_rule.module_meta_information
|
||||
msgid "This module allows to implement action rules for any object."
|
||||
msgstr ""
|
||||
msgstr "Deze module laat u actieregels voor elk object implementeren."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,sequence:0
|
||||
msgid "Gives the sequence order when displaying a list of rules."
|
||||
msgstr ""
|
||||
msgstr "Geeft de volgorde aan waarin de lijst van regels wordt weergegeven."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_range_type:0
|
||||
msgid "Months"
|
||||
msgstr ""
|
||||
msgstr "Maanden"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,filter_id:0
|
||||
msgid "Filter"
|
||||
msgstr ""
|
||||
msgstr "Filter"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: selection:base.action.rule,trg_date_type:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
msgstr "Datum"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,server_action_id:0
|
||||
@@ -327,108 +347,111 @@ msgid ""
|
||||
"Describes the action name.\n"
|
||||
"eg:on which object which action to be taken on basis of which condition"
|
||||
msgstr ""
|
||||
"Beschrijft de actie naam.\n"
|
||||
"ie: op welk object welke actie wordt uitgevoerd onder welke conditie"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: model:ir.model,name:base_action_rule.model_ir_cron
|
||||
msgid "ir.cron"
|
||||
msgstr ""
|
||||
msgstr "ir.cron"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(object_description)s = Object description"
|
||||
msgstr ""
|
||||
msgstr "%(object_description)s = Object omschrijving"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Email Actions"
|
||||
msgstr ""
|
||||
msgstr "Email acties"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Email Information"
|
||||
msgstr ""
|
||||
msgstr "Email Informatie"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten !"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: model:ir.model,name:base_action_rule.model_base_action_rule
|
||||
msgid "Action Rules"
|
||||
msgstr ""
|
||||
msgstr "Actieregels"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,act_mail_body:0
|
||||
msgid "Content of mail"
|
||||
msgstr ""
|
||||
msgstr "Inhoud van mail"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,trg_user_id:0
|
||||
msgid "Responsible"
|
||||
msgstr ""
|
||||
msgstr "Verantwoordelijke"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(partner_email)s = Partner Email"
|
||||
msgstr ""
|
||||
msgstr "%(partner_email)s = Relatie email"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(object_date)s = Creation date"
|
||||
msgstr ""
|
||||
msgstr "%(object_date)s = Aanmaakdatum"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(object_user_email)s = Responsible Email"
|
||||
msgstr ""
|
||||
msgstr "%(object_user_email)s = Verantwoordelijke email"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_mail_body:0
|
||||
msgid "Mail body"
|
||||
msgstr ""
|
||||
msgstr "E-mail berichttekst"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_mail_to_watchers:0
|
||||
msgid "Mail to Watchers (CC)"
|
||||
msgstr ""
|
||||
msgstr "E-mail naar toeschouwers (CC)"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Server Action to be Triggered"
|
||||
msgstr ""
|
||||
msgstr "Server actie om te activeren"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_mail_to_user:0
|
||||
msgid "Mail to Responsible"
|
||||
msgstr ""
|
||||
msgstr "E-mail naar verantwoordelijke"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_email_cc:0
|
||||
msgid "Add Watchers (Cc)"
|
||||
msgstr ""
|
||||
msgstr "Toevoegen toeschouwers (Cc)"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Conditions on Model Fields"
|
||||
msgstr ""
|
||||
msgstr "Voorwaarden op Model velden"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: model:ir.actions.act_window,name:base_action_rule.base_action_rule_act
|
||||
#: model:ir.ui.menu,name:base_action_rule.menu_base_action_rule_form
|
||||
msgid "Automated Actions"
|
||||
msgstr ""
|
||||
msgstr "Geautomatiseerde acties"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,server_action_id:0
|
||||
msgid "Server Action"
|
||||
msgstr ""
|
||||
msgstr "Server-actie"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,regex_name:0
|
||||
msgid "Regex on Resource Name"
|
||||
msgstr ""
|
||||
msgstr "Regex op bronnaam"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,act_remind_attach:0
|
||||
@@ -436,21 +459,23 @@ msgid ""
|
||||
"Check this if you want that all documents attached to the object be attached "
|
||||
"to the reminder email sent."
|
||||
msgstr ""
|
||||
"Vink dit aan als u wilt dat alle bij het object gevoegde documenten worden "
|
||||
"bijgevoegd bij de verstuurde herinnering."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Conditions on Timing"
|
||||
msgstr ""
|
||||
msgstr "Voorwaarden op timing"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
msgstr "Volgnummer"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Actions"
|
||||
msgstr ""
|
||||
msgstr "Acties"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,active:0
|
||||
@@ -458,23 +483,25 @@ msgid ""
|
||||
"If the active field is set to False, it will allow you to hide the rule "
|
||||
"without removing it."
|
||||
msgstr ""
|
||||
"Als het actief veld uitzet, kunt u de regel verbergen zonder haar te "
|
||||
"verwijderen."
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "%(object_user)s = Responsible name"
|
||||
msgstr ""
|
||||
msgstr "%(object_user)s = Naam verantwoordelijke"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,create_date:0
|
||||
msgid "Create Date"
|
||||
msgstr ""
|
||||
msgstr "Aanmaakdatum"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: view:base.action.rule:0
|
||||
msgid "Conditions on States"
|
||||
msgstr ""
|
||||
msgstr "Voorwaarden op status"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,trg_date_type:0
|
||||
msgid "Trigger Date"
|
||||
msgstr ""
|
||||
msgstr "Activeerdatum"
|
||||
|
||||
@@ -673,9 +673,10 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
new_res_alarm = res_alarm_obj.create(cr, uid, val, context=context)
|
||||
else:
|
||||
new_res_alarm = alarm_ids[0]
|
||||
cr.execute('Update %s set base_calendar_alarm_id=%s, alarm_id=%s \
|
||||
where id=%s' % (model_obj._table, \
|
||||
cal_alarm.id, new_res_alarm, data.id))
|
||||
cr.execute('UPDATE %s ' % model_obj._table + \
|
||||
' SET base_calendar_alarm_id=%s, alarm_id=%s ' \
|
||||
' WHERE id=%s',
|
||||
(cal_alarm.id, new_res_alarm, data.id))
|
||||
|
||||
self.do_alarm_unlink(cr, uid, [data.id], model)
|
||||
if basic_alarm:
|
||||
@@ -697,9 +698,10 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
'user_id': uid
|
||||
}
|
||||
alarm_id = alarm_obj.create(cr, uid, vals)
|
||||
cr.execute('Update %s set base_calendar_alarm_id=%s, alarm_id=%s \
|
||||
where id=%s' % (model_obj._table, \
|
||||
alarm_id, basic_alarm.id, data.id))
|
||||
cr.execute('UPDATE %s ' % model_obj._table + \
|
||||
' SET base_calendar_alarm_id=%s, alarm_id=%s '
|
||||
' WHERE id=%s', \
|
||||
( alarm_id, basic_alarm.id, data.id) )
|
||||
return True
|
||||
|
||||
def do_alarm_unlink(self, cr, uid, ids, model, context=None):
|
||||
@@ -722,7 +724,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
if alarm_ids:
|
||||
alarm_obj.unlink(cr, uid, alarm_ids)
|
||||
cr.execute('Update %s set base_calendar_alarm_id=NULL, alarm_id=NULL\
|
||||
where id=%s' % (model_obj._table, datas.id))
|
||||
where id=%%d' % model_obj._table,(datas.id,))
|
||||
return True
|
||||
|
||||
res_alarm()
|
||||
@@ -994,10 +996,10 @@ class calendar_event(osv.osv):
|
||||
context = {}
|
||||
cr.execute("UPDATE %s set freq='None',interval=0,count=0,end_date=Null,\
|
||||
mo=False,tu=False,we=False,th=False,fr=False,sa=False,su=False,\
|
||||
day=0,select1='date',month_list=Null ,byday=Null where id=%s" % (self._table, id))
|
||||
day=0,select1='date',month_list=Null ,byday=Null where id=%%s" % (self._table), (id,))
|
||||
|
||||
if not value:
|
||||
cr.execute("UPDATE %s set rrule_type='none' where id=%s" % (self._table, id))
|
||||
cr.execute("UPDATE %s set rrule_type='none' where id=%%s" % self._table,(id,))
|
||||
return True
|
||||
val = {}
|
||||
for part in value.split(';'):
|
||||
@@ -1063,7 +1065,7 @@ class calendar_event(osv.osv):
|
||||
'rule_type': rrule_type,
|
||||
'id': id,
|
||||
})
|
||||
cr.execute(qry % val)
|
||||
cr.execute(qry, val) # Hopefully psycopg2 works with dicts. But, FIXME
|
||||
return True
|
||||
|
||||
def _get_rulestring(self, cr, uid, ids, name, arg, context=None):
|
||||
@@ -1081,7 +1083,7 @@ class calendar_event(osv.osv):
|
||||
if datas.get('rrule_type'):
|
||||
if datas.get('rrule_type') == 'none':
|
||||
result[event] = False
|
||||
cr.execute("UPDATE %s set exrule=Null where id=%s" % (self._table, event))
|
||||
cr.execute("UPDATE %s set exrule=Null where id=%%s" % self._table,( event,))
|
||||
elif datas.get('rrule_type') == 'custom':
|
||||
if datas.get('interval', 0) < 0:
|
||||
raise osv.except_osv('Warning!', 'Interval can not be Negative')
|
||||
@@ -1258,7 +1260,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
if defaults.get('location'):
|
||||
qry += ", location = '%(location)s'"
|
||||
qry += "WHERE id = %s" % (event_id)
|
||||
cr.execute(qry %(defaults))
|
||||
cr.execute(qry, defaults)
|
||||
|
||||
return True
|
||||
|
||||
@@ -1283,8 +1285,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
if ids and (base_start_date or base_until_date):
|
||||
cr.execute("select m.id, m.rrule, m.date, m.date_deadline, m.duration, \
|
||||
m.exdate, m.exrule, m.recurrent_id, m.recurrent_uid from " + self._table + \
|
||||
" m where m.id in ("\
|
||||
+ ','.join(map(lambda x: str(x), ids))+")")
|
||||
" m where m.id = ANY(%s)", (ids,) )
|
||||
|
||||
count = 0
|
||||
for data in cr.dictfetchall():
|
||||
@@ -1683,10 +1684,8 @@ class calendar_todo(osv.osv):
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
|
||||
event = self.browse(cr, uid, id, context=context)
|
||||
cr.execute("UPDATE %s set date_start='%s' where id=%s" \
|
||||
% (self._table, value, id))
|
||||
return True
|
||||
assert name == 'date'
|
||||
return self.write(cr, uid, id, { 'date_start': value }, context=context)
|
||||
|
||||
_columns = {
|
||||
'date': fields.function(_get_date, method=True, fnct_inv=_set_date, \
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
separator="1" help="Delegated Invitations" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="email" select='1'/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="user_id" select="1" string="Responsible"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="cutype" string="Invitation type" select="1"/>
|
||||
<field name="event_date" select="1"/>
|
||||
|
||||
@@ -159,8 +159,8 @@ send an Email to Invited Person')
|
||||
|
||||
if not partner_id:
|
||||
return {'value': {'contact_ids': []}}
|
||||
cr.execute('select id from res_partner_address \
|
||||
where partner_id=%s' % (partner_id))
|
||||
cr.execute('SELECT id FROM res_partner_address \
|
||||
WHERE partner_id=%s', (partner_id,))
|
||||
contacts = map(lambda x: x[0], cr.fetchall())
|
||||
return {'value': {'contact_ids': contacts}}
|
||||
|
||||
|
||||
@@ -143,34 +143,9 @@
|
||||
|
||||
<menuitem
|
||||
name="Custom Reports" id="base.menu_custom_reports"
|
||||
groups="base.group_extended"
|
||||
action="base_report_creator_action" parent="base.reporting_menu" sequence="1"/>
|
||||
|
||||
<menuitem
|
||||
parent="base.next_id_50"
|
||||
id="menu_base_report_creator_action_config"
|
||||
action="base_report_creator_action"/>
|
||||
|
||||
<record model="ir.ui.view" id="base_report_creator_tree_simple">
|
||||
<field name="name">base_report_creator.report.simple.tree</field>
|
||||
<field name="model">base_report_creator.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Reports">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="base_report_creator_action_tree">
|
||||
<field name="res_model">base_report_creator.report</field>
|
||||
<field name="view_type">tree</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Custom Reports" parent="base.menu_custom_reports"
|
||||
id="menu_base_report_creator_action"
|
||||
action="base_report_creator_action_tree"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -72,21 +72,10 @@
|
||||
<field name="context">{'menu':True}</field>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem icon="terp-graph" id="base.reporting_menu"
|
||||
name="Reporting" sequence="30" />
|
||||
|
||||
<menuitem id="base.next_id_50" name="Configuration"
|
||||
parent="base.reporting_menu" sequence="3" />
|
||||
|
||||
<menuitem parent="base.next_id_50" name="Report Designer"
|
||||
<menuitem parent="base.reporting_menu" name="Report Designer"
|
||||
action="action_report_designer_wizard"
|
||||
id="menu_action_report_designer_wizard" sequence="70" />
|
||||
|
||||
<menuitem parent="base.next_id_50" name="Modify an existing report"
|
||||
action="action_view_base_report_sxw"
|
||||
id="menu_wizard_report_designer_modify" sequence="70" groups="base.group_extended"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -60,25 +60,15 @@ class base_setup_config_choice(osv.osv_memory):
|
||||
'config_logo' : _get_image
|
||||
}
|
||||
|
||||
def set_default_menu(self, cr, uid, menu, context=None):
|
||||
user = self.pool.get('res.users')\
|
||||
.browse(cr, uid, uid, context=context)
|
||||
|
||||
user.write({'action_id': menu.id,
|
||||
'menu_id': menu.id})
|
||||
|
||||
def get_default_menu(self, cr, uid, context=None):
|
||||
actions = self.pool.get('ir.actions.act_window')
|
||||
|
||||
current_menu_id = actions.search(cr, uid, [('name','=','Menu')],
|
||||
context=context)
|
||||
assert len(current_menu_id) == 1,\
|
||||
'A given user should only have one menu item'
|
||||
return actions.browse(cr, uid, current_menu_id[0], context=context)
|
||||
def reset_menu(self, cr, uid, context=None):
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
menu_id = user._get_menu()
|
||||
user.write({'action_id': False,
|
||||
'menu_id': menu_id})
|
||||
return self.pool.get('ir.actions.act_window').browse(cr, uid, menu_id, context=context)
|
||||
|
||||
def menu(self, cr, uid, ids, context=None):
|
||||
menu = self.get_default_menu(cr, uid, context=context)
|
||||
self.set_default_menu(cr, uid, menu, context=context)
|
||||
menu = self.reset_menu(cr, uid, context=context)
|
||||
|
||||
if menu.view_id.id:
|
||||
view_id = (menu.view_id.id, menu.view_id.name)
|
||||
@@ -98,9 +88,7 @@ class base_setup_config_choice(osv.osv_memory):
|
||||
}
|
||||
|
||||
def config(self, cr, uid, ids, context=None):
|
||||
menu = self.get_default_menu(cr, uid, context=context)
|
||||
self.set_default_menu(cr, uid, menu, context=context)
|
||||
|
||||
self.reset_menu(cr, uid, context=context)
|
||||
return self.pool.get('res.config').next(cr, uid, [], context=context)
|
||||
|
||||
base_setup_config_choice()
|
||||
|
||||
@@ -177,15 +177,15 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Synchronized server">
|
||||
<field name="name" select="1"/>
|
||||
<newline/>
|
||||
<field name="server_url" select="2"/>
|
||||
<newline/>
|
||||
<field name="server_port"/>
|
||||
<field name="server_db"/>
|
||||
<newline/>
|
||||
<field name="login" select="1"/>
|
||||
<field name="password" password="True"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="name"/>
|
||||
<field name="login"/>
|
||||
<field name="password" password="True"/>
|
||||
<field name="server_url"/>
|
||||
<field name="server_port"/>
|
||||
<field name="server_db"/>
|
||||
</group>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
## -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
|
||||
@@ -9,14 +9,12 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Transfer Data To Server">
|
||||
<field name="server_url" colspan="4"/>
|
||||
<newline/>
|
||||
<separator string="Control" colspan="4"/>
|
||||
<field name="user_id" default="uid"/>
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<button special="cancel" string="_Close" icon="gtk-cancel"/>
|
||||
<button name="upload_download_multi_thread" string="_Synchronize" type="object" icon="gtk-ok"/>
|
||||
<field name="server_url" colspan="4"/>
|
||||
<field name="user_id" default="uid"/>
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<button special="cancel" string="_Close" icon="gtk-cancel"/>
|
||||
<button name="upload_download_multi_thread" string="_Synchronize" type="object" icon="gtk-ok"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem id="base.reporting_menu"
|
||||
parent="base.menu_custom"
|
||||
name="Reporting" sequence="30" />
|
||||
<!--Board Note Search View -->
|
||||
<record id="view_board_note_search" model="ir.ui.view">
|
||||
<field name="name">board.note.search</field>
|
||||
@@ -23,7 +20,7 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!--Board Note Tree View -->
|
||||
|
||||
<record id="view_board_note_tree" model="ir.ui.view">
|
||||
@@ -33,11 +30,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Notes">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!--Board Note Form View -->
|
||||
|
||||
<record id="view_board_note_form" model="ir.ui.view">
|
||||
@@ -113,7 +110,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_board_search" model="ir.ui.view">
|
||||
<field name="name">board.board.search</field>
|
||||
<field name="model">board.board</field>
|
||||
@@ -136,19 +133,13 @@
|
||||
<field name="search_view_id" ref="view_board_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="base.next_id_50"
|
||||
name="Configuration"
|
||||
parent="base.reporting_menu"
|
||||
groups="base.group_system"
|
||||
sequence="3"/>
|
||||
<menuitem
|
||||
action="action_view_board_list_form"
|
||||
id="menu_view_board_form"
|
||||
parent="base.next_id_50" sequence="1"/>
|
||||
id="menu_view_board_form" parent="base.reporting_menu" sequence="1"/>
|
||||
|
||||
<menuitem action="action_view_board_note_form"
|
||||
id="menu_view_board_note_form" parent="base.next_id_50"
|
||||
id="menu_view_board_note_form"
|
||||
parent="base.reporting_menu"
|
||||
sequence="3" groups="base.group_system" />
|
||||
|
||||
<act_window context="{'view': active_id}" id="dashboard_open"
|
||||
|
||||
@@ -61,10 +61,10 @@ def uid2openobjectid(cr, uidval, oomodel, rdate):
|
||||
model_obj = pooler.get_pool(cr.dbname).get(model)
|
||||
if (not model == oomodel) or (not dbname == cr.dbname):
|
||||
return (False, None)
|
||||
qry = 'select distinct(id) from %s' % model_obj._table
|
||||
qry = 'SELECT DISTINCT(id) FROM %s' % model_obj._table
|
||||
if rdate:
|
||||
qry += " where recurrent_id='%s'" % (rdate)
|
||||
cr.execute(qry)
|
||||
qry += " WHERE recurrent_id=%s"
|
||||
cr.execute(qry, (rdate,))
|
||||
r_id = cr.fetchone()
|
||||
if r_id:
|
||||
return (id, r_id[0])
|
||||
@@ -364,8 +364,8 @@ class CalDAV(object):
|
||||
model_obj = self.pool.get(model)
|
||||
r_ids = []
|
||||
if model_obj._columns.get('recurrent_uid', None):
|
||||
cr.execute('select id from %s where recurrent_uid=%s'
|
||||
% (model_obj._table, data[map_field]))
|
||||
cr.execute('SELECT id FROM %s WHERE recurrent_uid=%%s' % model_obj._table,
|
||||
(data[map_field],))
|
||||
r_ids = map(lambda x: x[0], cr.fetchall())
|
||||
if r_ids:
|
||||
r_datas = model_obj.read(cr, uid, r_ids, context=context)
|
||||
@@ -715,8 +715,9 @@ class basic_calendar_line(osv.osv):
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
|
||||
cr.execute("Select count(id) from basic_calendar_lines \
|
||||
where name='%s' and calendar_id=%s" % (vals.get('name'), vals.get('calendar_id')))
|
||||
cr.execute("SELECT COUNT(id) FROM basic_calendar_lines \
|
||||
WHERE name='%s' AND calendar_id=%s",
|
||||
(vals.get('name'), vals.get('calendar_id')))
|
||||
res = cr.fetchone()
|
||||
if res:
|
||||
if res[0] > 0:
|
||||
@@ -797,8 +798,8 @@ class basic_calendar_fields(osv.osv):
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
|
||||
cr.execute('select name from basic_calendar_attributes \
|
||||
where id=%s' % (vals.get('name')))
|
||||
cr.execute('SELECT name FROM basic_calendar_attributes \
|
||||
WHERE id=%s', (vals.get('name'),))
|
||||
name = cr.fetchone()
|
||||
name = name[0]
|
||||
if name in ('valarm', 'attendee'):
|
||||
|
||||
@@ -34,11 +34,11 @@ class calendar_collection(osv.osv):
|
||||
def _get_root_calendar_directory(self, cr, uid, context=None):
|
||||
objid = self.pool.get('ir.model.data')
|
||||
try:
|
||||
mid = objid._get_id(cr, uid, 'document', 'dir_calendars')
|
||||
mid = objid._get_id(cr, uid, 'document', 'dir_calendars')
|
||||
if not mid:
|
||||
return False
|
||||
root_id = objid.read(cr, uid, mid, ['res_id'])['res_id']
|
||||
root_cal_dir = self.browse(cr, uid, root_id, context=context)
|
||||
root_id = objid.read(cr, uid, mid, ['res_id'])['res_id']
|
||||
root_cal_dir = self.browse(cr,uid, root_id, context=context)
|
||||
return root_cal_dir.name
|
||||
except Exception, e:
|
||||
import netsvc
|
||||
@@ -67,7 +67,7 @@ class calendar_collection(osv.osv):
|
||||
], limit=1, context=context)
|
||||
|
||||
root_cal_dir = self._get_root_calendar_directory(cr, uid, context=context)
|
||||
if not calendar_ids:
|
||||
if not calendar_ids:
|
||||
return root_cal_dir
|
||||
calendar_id = calendar_ids[0]
|
||||
calendar = calendar_obj.browse(cr, uid, calendar_id,
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2010-08-20 12:02+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 13:45+0000\n"
|
||||
"PO-Revision-Date: 2010-09-30 06:47+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@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-09-30 04:43+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: claim_from_delivery
|
||||
|
||||
+81
-97
@@ -145,53 +145,29 @@ class crm_case(object):
|
||||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
s = self.get_stage_dict(cr, uid, ids, context=context)
|
||||
section = self._name
|
||||
stage = False
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
model = self._name
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = not context.get('force_domain', False) and case.stage_id.id or False
|
||||
if st in s[section]:
|
||||
data = {'stage_id': s[section][st]}
|
||||
stage = s[section][st]
|
||||
self.write(cr, uid, [case.id], data)
|
||||
return stage
|
||||
|
||||
def get_stage_dict(self, cr, uid, ids, context=None):
|
||||
"""This function gives dictionary for stage according to stage levels
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of case IDs
|
||||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
stage_obj = self.pool.get('crm.case.stage')
|
||||
res = self.read(cr, uid, ids, ['section_id', 'stage_id'], context)[0]
|
||||
section_id = res['section_id'] and res['section_id'][0] or False
|
||||
stage_id = res['stage_id'] and res['stage_id'][0] or False
|
||||
|
||||
# We select either the stages in the same section as the current stage
|
||||
# if it a stage that does not have a section, or the stages of the
|
||||
# current section of the case
|
||||
if stage_id:
|
||||
stage_record = stage_obj.browse(cr, uid, stage_id)
|
||||
if not stage_record.section_id:
|
||||
section_id = False # only select stages without section
|
||||
|
||||
domain = [('object_id.model', '=', self._name), '|', ('section_id', '=', section_id),('section_id','=',False)]
|
||||
if 'force_domain' in context and context['force_domain']:
|
||||
domain += context['force_domain']
|
||||
sid = stage_obj.search(cr, uid, domain, context=context)
|
||||
s = {}
|
||||
previous = {}
|
||||
section = self._name
|
||||
|
||||
for stage in stage_obj.browse(cr, uid, sid, context=context):
|
||||
s.setdefault(section, {})
|
||||
s[section][previous.get(section, False)] = stage.id
|
||||
previous[section] = stage.id
|
||||
return s
|
||||
next_stage = False
|
||||
data = {}
|
||||
domain = [('object_id.model', '=', model)]
|
||||
if case.section_id and case.section_id.stage_ids:
|
||||
domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids)))
|
||||
stages = stage_pool.search(cr, uid, domain, order='sequence')
|
||||
index = -1
|
||||
if case.stage_id and case.stage_id.id in stages:
|
||||
index = stages.index(case.stage_id.id)
|
||||
if index + 1 == len(stages):
|
||||
return False
|
||||
else:
|
||||
next_stage = stages[index + 1]
|
||||
if next_stage:
|
||||
data = {'stage_id': next_stage}
|
||||
stage = stage_pool.browse(cr, uid, next_stage, context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
self.write(cr, uid, [case.id], data, context=context)
|
||||
return next_stage
|
||||
|
||||
def stage_previous(self, cr, uid, ids, context=None):
|
||||
"""This function computes previous stage for case from its current stage
|
||||
@@ -203,21 +179,28 @@ class crm_case(object):
|
||||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
s = self.get_stage_dict(cr, uid, ids, context=context)
|
||||
section = self._name
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
model = self._name
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = not context.get('force_domain', False) and case.stage_id.id or False
|
||||
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
|
||||
if st in s[section]:
|
||||
data = {'stage_id': s[section][st]}
|
||||
if s[section][st]:
|
||||
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
self.write(cr, uid, [case.id], data)
|
||||
prev_stage = False
|
||||
data = {}
|
||||
domain = [('object_id.model', '=', model)]
|
||||
if case.section_id and case.section_id.stage_ids:
|
||||
domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids)))
|
||||
stages = stage_pool.search(cr, uid, domain, order='sequence')
|
||||
index = 0
|
||||
if case.stage_id and case.stage_id.id in stages:
|
||||
index = stages.index(case.stage_id.id)
|
||||
if index == 0:
|
||||
return False
|
||||
else:
|
||||
prev_stage = stages[index - 1]
|
||||
if prev_stage:
|
||||
data = {'stage_id': prev_stage}
|
||||
stage = stage_pool.browse(cr, uid, prev_stage, context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
self.write(cr, uid, [case.id], data, context=context)
|
||||
return True
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part, email=False):
|
||||
@@ -492,6 +475,43 @@ class crm_case(object):
|
||||
return res
|
||||
|
||||
|
||||
class crm_case_stage(osv.osv):
|
||||
""" Stage of case """
|
||||
|
||||
_name = "crm.case.stage"
|
||||
_description = "Stage of case"
|
||||
_rec_name = 'name'
|
||||
_order = "sequence"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Stage Name', size=64, required=True, translate=True),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
|
||||
'object_id': fields.many2one('ir.model', 'Object Name'),
|
||||
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
|
||||
'on_change': fields.boolean('Change Probability Automatically', \
|
||||
help="Change Probability on next and previous stages."),
|
||||
'requirements': fields.text('Requirements')
|
||||
}
|
||||
def _find_object_id(self, cr, uid, context=None):
|
||||
"""Finds id for case object
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
object_id = context and context.get('object_id', False) or False
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
|
||||
return ids and ids[0]
|
||||
|
||||
_defaults = {
|
||||
'sequence': lambda *args: 1,
|
||||
'probability': lambda *args: 0.0,
|
||||
'object_id' : _find_object_id
|
||||
}
|
||||
|
||||
crm_case_stage()
|
||||
|
||||
|
||||
class crm_case_section(osv.osv):
|
||||
"""Sales Team"""
|
||||
|
||||
@@ -517,7 +537,8 @@ class crm_case_section(osv.osv):
|
||||
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'),
|
||||
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"),
|
||||
'note': fields.text('Description'),
|
||||
'working_hours': fields.float('Working Hours', digits=(16,2 )),
|
||||
'working_hours': fields.float('Working Hours', digits=(16,2 )),
|
||||
'stage_ids':fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -619,43 +640,6 @@ class crm_case_resource_type(osv.osv):
|
||||
crm_case_resource_type()
|
||||
|
||||
|
||||
class crm_case_stage(osv.osv):
|
||||
""" Stage of case """
|
||||
|
||||
_name = "crm.case.stage"
|
||||
_description = "Stage of case"
|
||||
_rec_name = 'name'
|
||||
_order = "sequence"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Stage Name', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
|
||||
'object_id': fields.many2one('ir.model', 'Object Name'),
|
||||
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
|
||||
'on_change': fields.boolean('Change Probability Automatically', \
|
||||
help="Change Probability on next and previous stages."),
|
||||
'requirements': fields.text('Requirements')
|
||||
}
|
||||
def _find_object_id(self, cr, uid, context=None):
|
||||
"""Finds id for case object
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
object_id = context and context.get('object_id', False) or False
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
|
||||
return ids and ids[0]
|
||||
|
||||
_defaults = {
|
||||
'sequence': lambda *args: 1,
|
||||
'probability': lambda *args: 0.0,
|
||||
'object_id' : _find_object_id
|
||||
}
|
||||
|
||||
crm_case_stage()
|
||||
|
||||
def _links_get(self, cr, uid, context=None):
|
||||
"""Gets links value for reference field
|
||||
@param self: The object pointer
|
||||
|
||||
@@ -126,8 +126,8 @@ class crm_lead(crm_case, osv.osv):
|
||||
|
||||
'contact_name': fields.char('Contact Name', size=64),
|
||||
'partner_name': fields.char("Partner Name", size=64),
|
||||
'optin': fields.boolean('Opt-In'),
|
||||
'optout': fields.boolean('Opt-Out'),
|
||||
'optin': fields.boolean('Opt-In', help="If opt-in is checked, this contact has accepted to receive emails."),
|
||||
'optout': fields.boolean('Opt-Out', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."),
|
||||
'type':fields.selection([
|
||||
('lead','Lead'),
|
||||
('opportunity','Opportunity'),
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<field name="name">New</field>
|
||||
<field eval="'10'" name="probability"/>
|
||||
<field eval="'1'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
@@ -16,7 +15,6 @@
|
||||
<field name="name">Qualification</field>
|
||||
<field eval="'20'" name="probability"/>
|
||||
<field eval="'2'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
@@ -24,7 +22,6 @@
|
||||
<field name="name">Proposition</field>
|
||||
<field eval="'40'" name="probability"/>
|
||||
<field eval="'3'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
@@ -32,7 +29,6 @@
|
||||
<field name="name">Negotiation</field>
|
||||
<field eval="'60'" name="probability"/>
|
||||
<field eval="'4'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
@@ -40,7 +36,6 @@
|
||||
<field name="name">Win</field>
|
||||
<field eval="'100'" name="probability"/>
|
||||
<field eval="'5'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
@@ -48,10 +43,15 @@
|
||||
<field name="name">Lost</field>
|
||||
<field eval="'0'" name="probability"/>
|
||||
<field eval="'6'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.section" id="section_sales_department">
|
||||
<field name="name">Sales Department</field>
|
||||
<field name="code">Sales</field>
|
||||
<field name="stage_ids" eval="[(4, ref('stage_lead1')), (4, ref('stage_lead2')), (4, ref('stage_lead3')), (4, ref('stage_lead4')), (4, ref('stage_lead5')), (4, ref('stage_lead6'))]"/>
|
||||
</record>
|
||||
|
||||
<!-- CASE CATEGORY2(category2_id) -->
|
||||
<record model="crm.case.resource.type" id="type_lead1">
|
||||
<field name="name">Telesales</field>
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">['|', ('type','=','lead'), ('type','=',False)]</field>
|
||||
<field name="view_id" ref="crm_case_tree_view_leads"/>
|
||||
<field name="context">{"search_default_user_id":uid,'search_default_current':1}</field>
|
||||
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
|
||||
<field name="context">{'search_default_current':1, 'default_type': 'lead', 'search_default_section_id':section_id}</field>
|
||||
<field name="context">{'search_default_current':1, 'default_type': 'lead', 'search_default_section_id': section_id}</field>
|
||||
<field name="help">A lead is a first, unqualified, contact with a new prospect. Use leads when you import a database of prospects or integrate your website's contact form with OpenERP. After having been qualified, the lead can be converted to a partner and a business opportunity for a further detailed tracking of the related activities.</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -55,8 +55,7 @@
|
||||
<newline />
|
||||
<field name="section_id" widget="selection" />
|
||||
<field name="user_id" />
|
||||
<field name="stage_id"
|
||||
domain="[('section_id','=',section_id), ('section_id','=',False), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="stage_id" readonly="1"/>
|
||||
<group col="2" colspan="1">
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending,draft" type="object"
|
||||
@@ -235,7 +234,7 @@
|
||||
<field name="referred" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
|
||||
<field name="stage_id" />
|
||||
<field name="stage_id" readonly="1"/>
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next Stage"
|
||||
@@ -318,7 +317,7 @@
|
||||
context="{'invisible_section': False}">
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
help="My Sales Team(s)"/>
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
@@ -342,8 +341,9 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Category" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="Campaign" icon="terp-stock_symbol-selection"
|
||||
@@ -351,11 +351,10 @@
|
||||
<filter string="Channel" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Creation Month" icon="terp-go-month"
|
||||
<filter string="Creation" help="Create date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'create_date'}" />
|
||||
</group>
|
||||
</search>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<field name="res_model">crm.meeting</field>
|
||||
<field name="view_mode">calendar,tree,form,gantt</field>
|
||||
<field name="view_id" ref="crm_case_calendar_view_meet"/>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
|
||||
<field name="search_view_id" ref="view_crm_case_meetings_filter"/>
|
||||
<field name="help">The calendar of meetings is shared between sales teams and fully integrated with the others applications like the employee holidays. You can also synchronize meetings with your mobile phone using the caldav interface.</field>
|
||||
</record>
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
<field name="partner_id" select="1" />
|
||||
<field name="section_id" select="1" widget="selection">
|
||||
<filter icon="terp-personal+"
|
||||
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
help="My Sales Team(s)" />
|
||||
</field>
|
||||
<field name="user_id" select="1"/>
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
<label string="Stage:" align="1.0"/>
|
||||
<group colspan="1" col="4">
|
||||
<field name="stage_id" nolabel="1"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False),('object_id.model', '=', 'crm.lead')]" />
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]"
|
||||
readonly="1" />
|
||||
<button name="stage_previous"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-back" string="" />
|
||||
@@ -211,7 +212,7 @@
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done');red:date_deadline and (date_deadline < current_date)">
|
||||
<tree string="Opportunities" colors="blue:state=='pending' and not(date_deadline and (date_deadline < current_date));gray:state in ('cancel', 'done');red:date_deadline and (date_deadline < current_date)">
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="create_date"/>
|
||||
<field name="name" string="Opportunity"/>
|
||||
@@ -302,7 +303,7 @@
|
||||
context="{'invisible_section': False}"
|
||||
widget="selection">
|
||||
<filter icon="terp-personal+"
|
||||
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
context="{'invisible_section': False}"
|
||||
help="My Sales Team(s)" />
|
||||
<filter icon="terp-personal+"
|
||||
|
||||
@@ -61,9 +61,6 @@ class crm_phonecall(crm_case, osv.osv):
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False),\
|
||||
('object_id.model', '=', 'crm.phonecall')]"),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
# phonecall fields
|
||||
'duration': fields.float('Duration', help="Duration in Minutes"),
|
||||
|
||||
@@ -16,23 +16,5 @@
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<record model="crm.case.stage" id="stage_phone1">
|
||||
<field name="name">Planned</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone2">
|
||||
<field name="name">Held</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone3">
|
||||
<field name="name">Not Held</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<field eval=""(726) 782-0636"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm.stage_phone1"/>
|
||||
<field eval=""(769) 703-274"" name="partner_phone"/>
|
||||
<field eval="2.3" name="duration"/>
|
||||
</record>
|
||||
@@ -32,7 +31,6 @@
|
||||
<field eval=""(392) 895-7917"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm.stage_phone2"/>
|
||||
<field eval=""(956) 293-2595"" name="partner_phone"/>
|
||||
<field eval="1.5" name="duration"/>
|
||||
</record>
|
||||
@@ -48,7 +46,6 @@
|
||||
<field eval=""(820) 167-3208"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm.stage_phone3"/>
|
||||
<field eval=""(079) 681-2139"" name="partner_phone"/>
|
||||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
<field eval="5.0" name="duration"/>
|
||||
@@ -64,7 +61,6 @@
|
||||
<field eval=""(077) 582-4035"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm.stage_phone1"/>
|
||||
<field eval=""(514) 698-4118"" name="partner_phone"/>
|
||||
<field eval="3.45" name="duration"/>
|
||||
</record>
|
||||
@@ -80,7 +76,6 @@
|
||||
<field eval=""(333) 715-1450"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm.stage_phone2"/>
|
||||
<field eval=""(855) 924-4364"" name="partner_phone"/>
|
||||
<field eval="2.08" name="duration"/>
|
||||
</record>
|
||||
@@ -96,7 +91,6 @@
|
||||
<field eval=""(468) 017-2684"" name="partner_mobile"/>
|
||||
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm.stage_phone3"/>
|
||||
<field eval=""(373) 907-1009"" name="partner_phone"/>
|
||||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
<field eval="8.56" name="duration"/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user