[MERGE] with trunk

bzr revid: fka@tinyerp.com-20130613071422-9iw22gkm33epbkpb
This commit is contained in:
Foram Katharotiya (OpenERP) 2013-06-13 12:44:22 +05:30
commit 09c62b0d02
1262 changed files with 109698 additions and 16500 deletions

View File

@ -99,7 +99,6 @@ for a particular financial year and for preparation of vouchers there is a modul
'project/wizard/project_account_analytic_line_view.xml',
'account_end_fy.xml',
'account_invoice_view.xml',
'partner_view.xml',
'data/account_data.xml',
'data/data_account_type.xml',
'data/configurable_account_chart.xml',
@ -112,6 +111,7 @@ for a particular financial year and for preparation of vouchers there is a modul
'project/wizard/account_analytic_journal_report_view.xml',
'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
'project/wizard/account_analytic_chart_view.xml',
'partner_view.xml',
'product_view.xml',
'account_assert_test.xml',
'process/statement_process.xml',

View File

@ -25,8 +25,9 @@ from dateutil.relativedelta import relativedelta
from operator import itemgetter
import time
import openerp
from openerp import SUPERUSER_ID
from openerp import pooler, tools
from openerp import tools
from openerp.osv import fields, osv
from openerp.tools.translate import _
from openerp.tools.float_utils import float_round
@ -131,7 +132,6 @@ class account_payment_term_line(osv.osv):
(_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2%.', ['value_amount']),
]
account_payment_term_line()
class account_account_type(osv.osv):
_name = "account.account.type"
@ -197,7 +197,6 @@ class account_account_type(osv.osv):
}
_order = "code"
account_account_type()
def _code_get(self, cr, uid, context=None):
acc_type_obj = self.pool.get('account.account.type')
@ -211,7 +210,6 @@ def _code_get(self, cr, uid, context=None):
class account_tax(osv.osv):
_name = 'account.tax'
account_tax()
class account_account(osv.osv):
_order = "parent_left"
@ -650,10 +648,10 @@ class account_account(osv.osv):
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
#Check for 'Closed' type
if old_type == 'closed' and new_type !='closed':
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!"))
raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type as it contains journal items!"))
# Forbid to change an account type for restricted_groups as it contains journal items (or if one of its children does)
if (new_type in restricted_groups):
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,))
raise osv.except_osv(_('Warning!'), _("You cannot change the type of account to '%s' type as it contains journal items!") % (new_type,))
return True
@ -696,7 +694,6 @@ class account_account(osv.osv):
self._check_moves(cr, uid, ids, "unlink", context=context)
return super(account_account, self).unlink(cr, uid, ids, context=context)
account_account()
class account_journal(osv.osv):
_name = "account.journal"
@ -848,7 +845,6 @@ class account_journal(osv.osv):
return self.name_get(cr, user, ids, context=context)
account_journal()
class account_fiscalyear(osv.osv):
_name = "account.fiscalyear"
@ -944,7 +940,6 @@ class account_fiscalyear(osv.osv):
ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit)
return self.name_get(cr, user, ids, context=context)
account_fiscalyear()
class account_period(osv.osv):
_name = "account.period"
@ -1006,8 +1001,7 @@ class account_period(osv.osv):
def find(self, cr, uid, dt=None, context=None):
if context is None: context = {}
if not dt:
dt = fields.date.context_today(self,cr,uid,context=context)
#CHECKME: shouldn't we check the state of the period?
dt = fields.date.context_today(self, cr, uid, context=context)
args = [('date_start', '<=' ,dt), ('date_stop', '>=', dt)]
if context.get('company_id', False):
args.append(('company_id', '=', context['company_id']))
@ -1015,17 +1009,20 @@ class account_period(osv.osv):
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
args.append(('company_id', '=', company_id))
result = []
if context.get('account_period_prefer_normal'):
if context.get('account_period_prefer_normal', True):
# look for non-special periods first, and fallback to all if no result is found
result = self.search(cr, uid, args + [('special', '=', False)], context=context)
if not result:
result = self.search(cr, uid, args, context=context)
if not result:
raise osv.except_osv(_('Error !'), _('There is no period defined for this date: %s.\nPlease create one.')%dt)
raise osv.except_osv(_('Error!'), _('There is no period defined for this date: %s.\nPlease create one.')%dt)
return result
def action_draft(self, cr, uid, ids, *args):
mode = 'draft'
for period in self.browse(cr, uid, ids):
if period.fiscalyear_id.state == 'done':
raise osv.except_osv(_('Warning!'), _('You can not re-open a period which belongs to closed fiscal year'))
cr.execute('update account_journal_period set state=%s where period_id in %s', (mode, tuple(ids),))
cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),))
return True
@ -1037,9 +1034,15 @@ class account_period(osv.osv):
context = {}
ids = []
if name:
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
ids = self.search(cr, user,
[('code', 'ilike', name)] + args,
limit=limit,
context=context)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
ids = self.search(cr, user,
[('name', operator, name)] + args,
limit=limit,
context=context)
return self.name_get(cr, user, ids, context=context)
def write(self, cr, uid, ids, vals, context=None):
@ -1062,12 +1065,15 @@ class account_period(osv.osv):
raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.'))
if period_date_start > period_date_stop:
raise osv.except_osv(_('Error!'), _('Start period should precede then end period.'))
# /!\ We do not include a criterion on the company_id field below, to allow producing consolidated reports
# on multiple companies. It will only work when start/end periods are selected and no fiscal year is chosen.
#for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search).
if period_from.special:
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)])
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)])
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)])
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('special', '=', False)])
account_period()
class account_journal_period(osv.osv):
_name = "account.journal.period"
@ -1124,7 +1130,6 @@ class account_journal_period(osv.osv):
}
_order = "period_id"
account_journal_period()
class account_fiscalyear(osv.osv):
_inherit = "account.fiscalyear"
@ -1141,7 +1146,6 @@ class account_fiscalyear(osv.osv):
})
return super(account_fiscalyear, self).copy(cr, uid, id, default=default, context=context)
account_fiscalyear()
#----------------------------------------------------------
# Entries
#----------------------------------------------------------
@ -1219,7 +1223,7 @@ class account_move(osv.osv):
return res
def _get_period(self, cr, uid, context=None):
ctx = dict(context or {}, account_period_prefer_normal=True)
ctx = dict(context or {})
period_ids = self.pool.get('account.period').find(cr, uid, context=ctx)
return period_ids[0]
@ -1380,6 +1384,7 @@ class account_move(osv.osv):
'ref':False,
'balance':False,
'account_tax_id':False,
'statement_id': False,
})
if 'journal_id' in vals and vals.get('journal_id', False):
@ -1416,6 +1421,7 @@ class account_move(osv.osv):
context = {} if context is None else context.copy()
default.update({
'state':'draft',
'ref': False,
'name':'/',
})
context.update({
@ -1637,7 +1643,6 @@ class account_move(osv.osv):
valid_moves = [move.id for move in valid_moves]
return len(valid_moves) > 0 and valid_moves or False
account_move()
class account_move_reconcile(osv.osv):
_name = "account.move.reconcile"
@ -1675,7 +1680,7 @@ class account_move_reconcile(osv.osv):
elif reconcile.line_partial_ids:
first_partner = reconcile.line_partial_ids[0].partner_id.id
move_lines = reconcile.line_partial_ids
if any([line.partner_id.id != first_partner for line in move_lines]):
if any([(line.account_id.type in ('receivable', 'payable') and line.partner_id.id != first_partner) for line in move_lines]):
return False
return True
@ -1711,7 +1716,6 @@ class account_move_reconcile(osv.osv):
result.append((r.id,r.name))
return result
account_move_reconcile()
#----------------------------------------------------------
# Tax
@ -1791,7 +1795,7 @@ class account_tax_code(osv.osv):
if context.get('period_id', False):
period_id = context['period_id']
else:
period_id = self.pool.get('account.period').find(cr, uid)
period_id = self.pool.get('account.period').find(cr, uid, context=context)
if not period_id:
return dict.fromkeys(ids, 0.0)
period_id = period_id[0]
@ -1859,7 +1863,12 @@ class account_tax_code(osv.osv):
]
_order = 'code'
account_tax_code()
def get_precision_tax():
def change_digit_tax(cr):
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
return (16, res+3)
return change_digit_tax
class account_tax(osv.osv):
"""
@ -1881,12 +1890,6 @@ class account_tax(osv.osv):
default.update({'name': name + _(' (Copy)')})
return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
def get_precision_tax():
def change_digit_tax(cr):
res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, SUPERUSER_ID, 'Account')
return (16, res+2)
return change_digit_tax
_name = 'account.tax'
_description = 'Tax'
_columns = {
@ -2267,7 +2270,6 @@ class account_tax(osv.osv):
total += r['amount']
return res
account_tax()
# ---------------------------------------------------------
# Account Entries Models
@ -2315,7 +2317,7 @@ class account_model(osv.osv):
try:
entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')}
except:
raise osv.except_osv(_('Wrong model !'), _('You have a wrong expression "%(...)s" in your model !'))
raise osv.except_osv(_('Wrong Model!'), _('You have a wrong expression "%(...)s" in your model!'))
move_id = account_move_obj.create(cr, uid, {
'ref': entry['name'],
'period_id': period_id,
@ -2327,7 +2329,7 @@ class account_model(osv.osv):
analytic_account_id = False
if line.analytic_account_id:
if not model.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,))
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (model.journal_id.name,))
analytic_account_id = line.analytic_account_id.id
val = {
'move_id': move_id,
@ -2379,7 +2381,6 @@ class account_model(osv.osv):
return {'value': {'company_id': company_id}}
account_model()
class account_model_line(osv.osv):
_name = "account.model.line"
@ -2403,7 +2404,6 @@ class account_model_line(osv.osv):
('credit_debit1', 'CHECK (credit*debit=0)', 'Wrong credit or debit value in model, they must be positive!'),
('credit_debit2', 'CHECK (credit+debit>=0)', 'Wrong credit or debit value in model, they must be positive!'),
]
account_model_line()
# ---------------------------------------------------------
# Account Subscription
@ -2477,7 +2477,6 @@ class account_subscription(osv.osv):
self.write(cr, uid, ids, {'state':'running'})
return True
account_subscription()
class account_subscription_line(osv.osv):
_name = "account.subscription.line"
@ -2506,7 +2505,6 @@ class account_subscription_line(osv.osv):
_rec_name = 'date'
account_subscription_line()
# ---------------------------------------------------------------
# Account Templates: Account, Tax, Tax Code and chart. + Wizard
@ -2514,7 +2512,6 @@ account_subscription_line()
class account_tax_template(osv.osv):
_name = 'account.tax.template'
account_tax_template()
class account_account_template(osv.osv):
_order = "code"
@ -2642,7 +2639,6 @@ class account_account_template(osv.osv):
obj_acc._parent_store_compute(cr)
return acc_template_ref
account_account_template()
class account_add_tmpl_wizard(osv.osv_memory):
"""Add one more account from the template.
@ -2696,7 +2692,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
def action_cancel(self, cr, uid, ids, context=None):
return { 'type': 'state', 'state': 'end' }
account_add_tmpl_wizard()
class account_tax_code_template(osv.osv):
@ -2768,7 +2763,6 @@ class account_tax_code_template(osv.osv):
(_check_recursion, 'Error!\nYou cannot create recursive Tax Codes.', ['parent_id'])
]
_order = 'code,name'
account_tax_code_template()
class account_chart_template(osv.osv):
@ -2801,7 +2795,6 @@ class account_chart_template(osv.osv):
'complete_tax_set': True,
}
account_chart_template()
class account_tax_template(osv.osv):
@ -2812,7 +2805,7 @@ class account_tax_template(osv.osv):
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'name': fields.char('Tax Name', size=64, required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has 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=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."),
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', 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."),
@ -2931,7 +2924,6 @@ class account_tax_template(osv.osv):
res.update({'tax_template_to_tax': tax_template_to_tax, 'account_dict': todo_dict})
return res
account_tax_template()
# Fiscal Position Templates
@ -2979,7 +2971,6 @@ class account_fiscal_position_template(osv.osv):
})
return True
account_fiscal_position_template()
class account_fiscal_position_tax_template(osv.osv):
_name = 'account.fiscal.position.tax.template'
@ -2992,7 +2983,6 @@ class account_fiscal_position_tax_template(osv.osv):
'tax_dest_id': fields.many2one('account.tax.template', 'Replacement Tax')
}
account_fiscal_position_tax_template()
class account_fiscal_position_account_template(osv.osv):
_name = 'account.fiscal.position.account.template'
@ -3004,7 +2994,6 @@ class account_fiscal_position_account_template(osv.osv):
'account_dest_id': fields.many2one('account.account.template', 'Account Destination', domain=[('type','<>','view')], required=True)
}
account_fiscal_position_account_template()
# ---------------------------------------------------------
# Account generation from template wizards
@ -3397,7 +3386,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
try:
tmp2 = obj_data.get_object_reference(cr, uid, *ref)
if tmp2:
self.pool.get(tmp2[0]).write(cr, uid, tmp2[1], {
self.pool[tmp2[0]].write(cr, uid, tmp2[1], {
'currency_id': obj_wizard.currency_id.id
})
except ValueError, e:
@ -3544,7 +3533,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
current_num += 1
return True
wizard_multi_charts_accounts()
class account_bank_accounts_wizard(osv.osv_memory):
_name='account.bank.accounts.wizard'
@ -3556,6 +3544,5 @@ class account_bank_accounts_wizard(osv.osv_memory):
'account_type': fields.selection([('cash','Cash'), ('check','Check'), ('bank','Bank')], 'Account Type', size=32),
}
account_bank_accounts_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -143,7 +143,6 @@ class account_analytic_line(osv.osv):
return res
return False
account_analytic_line()
class res_partner(osv.osv):
""" Inherits partner and adds contract information in the partner form """
@ -154,6 +153,5 @@ class res_partner(osv.osv):
'partner_id', 'Contracts', readonly=True),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -61,7 +61,7 @@ class account_bank_statement(osv.osv):
return res
def _get_period(self, cr, uid, context=None):
periods = self.pool.get('account.period').find(cr, uid,context=context)
periods = self.pool.get('account.period').find(cr, uid, context=context)
if periods:
return periods[0]
return False
@ -420,7 +420,7 @@ class account_bank_statement(osv.osv):
for st_line in st.line_ids:
if st_line.analytic_account_id:
if not st.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
raise osv.except_osv(_('No Analytic Journal!'),_("You have to assign an analytic journal on the '%s' journal!") % (st.journal_id.name,))
if not st_line.amount:
continue
st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context)
@ -500,7 +500,6 @@ class account_bank_statement(osv.osv):
'context':ctx,
}
account_bank_statement()
class account_bank_statement_line(osv.osv):
@ -576,6 +575,5 @@ class account_bank_statement_line(osv.osv):
'type': 'general',
}
account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -66,7 +66,6 @@ class account_cashbox_line(osv.osv):
'bank_statement_id' : fields.many2one('account.bank.statement', ondelete='cascade'),
}
account_cashbox_line()
class account_cash_statement(osv.osv):
@ -253,7 +252,7 @@ class account_cash_statement(osv.osv):
for statement in statement_pool.browse(cr, uid, ids, context=context):
vals = {}
if not self._user_allow(cr, uid, statement.id, context=context):
raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal !') % (statement.journal_id.name, )))
raise osv.except_osv(_('Error!'), (_('You do not have rights to open this %s journal!') % (statement.journal_id.name, )))
if statement.name and statement.name == '/':
c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
@ -316,7 +315,6 @@ class account_cash_statement(osv.osv):
return self.write(cr, uid, ids, {'closing_date': time.strftime("%Y-%m-%d %H:%M:%S")}, context=context)
account_cash_statement()
class account_journal(osv.osv):
_inherit = 'account.journal'
@ -336,7 +334,6 @@ class account_journal(osv.osv):
'cashbox_line_ids' : _default_cashbox_line_ids,
}
account_journal()
class account_journal_cashbox_line(osv.osv):
_name = 'account.journal.cashbox.line'
@ -348,6 +345,5 @@ class account_journal_cashbox_line(osv.osv):
_order = 'pieces asc'
account_journal_cashbox_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -24,8 +24,6 @@ from datetime import datetime
from dateutil.relativedelta import relativedelta
from operator import itemgetter
from openerp import netsvc
from openerp import pooler
from openerp.osv import fields, osv
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
@ -140,6 +138,5 @@ class account_financial_report(osv.osv):
'style_overwrite': 0,
}
account_financial_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -6,16 +6,19 @@
-->
<record id="account_financial_report_profitandloss0" model="account.financial.report">
<field name="name">Profit and Loss</field>
<field name="sign" eval="-1" />
<field name="type">sum</field>
</record>
<record id="account_financial_report_income0" model="account.financial.report">
<field name="name">Income</field>
<field name="sign" eval="-1" />
<field name="parent_id" ref="account_financial_report_profitandloss0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">account_type</field>
</record>
<record id="account_financial_report_expense0" model="account.financial.report">
<field name="name">Expense</field>
<field name="sign" eval="-1" />
<field name="parent_id" ref="account_financial_report_profitandloss0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">account_type</field>

View File

@ -20,10 +20,11 @@
</p>
<group>
<field name="charts" class="oe_inline"/>
<field name="company_id" widget="selection"/><!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
</group>
<group string="Configure your Fiscal Year" groups="account.group_account_user">
<field name="has_default_company" invisible="1" />
<field name="company_id" colspan="4" widget="selection" attrs="{'invisible' : [('has_default_company', '=', True)]}"/><!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<label for="date_start" string="Date Range"/>
<div>
<field name="date_start" on_change="on_change_start_date(date_start)" class="oe_inline"/> -

View File

@ -24,7 +24,6 @@ from lxml import etree
import openerp.addons.decimal_precision as dp
import openerp.exceptions
from openerp import pooler
from openerp.osv import fields, osv, orm
from openerp.tools.translate import _
@ -70,7 +69,7 @@ class account_invoice(osv.osv):
tt = type2journal.get(type_inv, 'sale')
result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context)
if not result:
raise osv.except_osv(_('No Analytic Journal !'),_("You must define an analytic journal of type '%s'!") % (tt,))
raise osv.except_osv(_('No Analytic Journal!'),_("You must define an analytic journal of type '%s'!") % (tt,))
return result[0]
def _get_type(self, cr, uid, context=None):
@ -90,13 +89,45 @@ class account_invoice(osv.osv):
return [('none', _('Free Reference'))]
def _amount_residual(self, cr, uid, ids, name, args, context=None):
"""Function of the field residua. It computes the residual amount (balance) for each invoice"""
if context is None:
context = {}
ctx = context.copy()
result = {}
currency_obj = self.pool.get('res.currency')
for invoice in self.browse(cr, uid, ids, context=context):
nb_inv_in_partial_rec = max_invoice_id = 0
result[invoice.id] = 0.0
if invoice.move_id:
for m in invoice.move_id.line_id:
if m.account_id.type in ('receivable','payable'):
result[invoice.id] += m.amount_residual_currency
for aml in invoice.move_id.line_id:
if aml.account_id.type in ('receivable','payable'):
if aml.currency_id and aml.currency_id.id == invoice.currency_id.id:
result[invoice.id] += aml.amount_residual_currency
else:
ctx['date'] = aml.date
result[invoice.id] += currency_obj.compute(cr, uid, aml.company_id.currency_id.id, invoice.currency_id.id, aml.amount_residual, context=ctx)
if aml.reconcile_partial_id.line_partial_ids:
#we check if the invoice is partially reconciled and if there are other invoices
#involved in this partial reconciliation (and we sum these invoices)
for line in aml.reconcile_partial_id.line_partial_ids:
if line.invoice:
nb_inv_in_partial_rec += 1
#store the max invoice id as for this invoice we will make a balance instead of a simple division
max_invoice_id = max(max_invoice_id, line.invoice.id)
if nb_inv_in_partial_rec:
#if there are several invoices in a partial reconciliation, we split the residual by the number
#of invoice to have a sum of residual amounts that matches the partner balance
new_value = currency_obj.round(cr, uid, invoice.currency_id, result[invoice.id] / nb_inv_in_partial_rec)
if invoice.id == max_invoice_id:
#if it's the last the invoice of the bunch of invoices partially reconciled together, we make a
#balance to avoid rounding errors
result[invoice.id] = result[invoice.id] - ((nb_inv_in_partial_rec - 1) * new_value)
else:
result[invoice.id] = new_value
#prevent the residual amount on the invoice to be less than 0
result[invoice.id] = max(result[invoice.id], 0.0)
return result
# Give Journal Items related to the payment reconciled to this invoice
@ -285,7 +316,10 @@ class account_invoice(osv.osv):
'payment_ids': fields.function(_compute_lines, relation='account.move.line', type="many2many", string='Payments'),
'move_name': fields.char('Journal Entry', size=64, readonly=True, states={'draft':[('readonly',False)]}),
'user_id': fields.many2one('res.users', 'Salesperson', readonly=True, track_visibility='onchange', states={'draft':[('readonly',False)]}),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True, states={'draft':[('readonly',False)]})
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True, states={'draft':[('readonly',False)]}),
'commercial_partner_id': fields.related('partner_id', 'commercial_partner_id', string='Commercial Entity', type='many2one',
relation='res.partner', store=True, readonly=True,
help="The commercial entity that will be used on Journal Entries for this invoice")
}
_defaults = {
'type': _get_type,
@ -312,7 +346,7 @@ class account_invoice(osv.osv):
context = {}
if context.get('active_model', '') in ['res.partner'] and context.get('active_ids', False) and context['active_ids']:
partner = self.pool.get(context['active_model']).read(cr, uid, context['active_ids'], ['supplier','customer'])[0]
partner = self.pool[context['active_model']].read(cr, uid, context['active_ids'], ['supplier','customer'])[0]
if not view_type:
view_id = self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'account.invoice.tree')])
view_type = 'tree'
@ -366,18 +400,6 @@ class account_invoice(osv.osv):
context['view_id'] = view_id
return context
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
try:
return super(account_invoice, self).create(cr, uid, vals, context)
except Exception, e:
if '"journal_id" viol' in e.args[0]:
raise orm.except_orm(_('Configuration Error!'),
_('There is no Sale/Purchase Journal(s) defined.'))
else:
raise orm.except_orm(_('Unknown Error!'), str(e))
def invoice_print(self, cr, uid, ids, context=None):
'''
This function prints the invoice and mark it as sent, so that we can see more easily the next step of the workflow
@ -420,6 +442,7 @@ class account_invoice(osv.osv):
'mark_invoice_as_sent': True,
})
return {
'name': _('Compose Email'),
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
@ -607,7 +630,7 @@ class account_invoice(osv.osv):
obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id'])
if obj_l.company_id.id != company_id:
raise osv.except_osv(_('Configuration Error!'),
_('Invoice line account\'s company and invoice\'s compnay does not match.'))
_('Invoice line account\'s company and invoice\'s company does not match.'))
else:
continue
if company_id and type:
@ -642,6 +665,26 @@ class account_invoice(osv.osv):
self.create_workflow(cr, uid, ids)
return True
# ----------------------------------------
# Mail related methods
# ----------------------------------------
def _get_formview_action(self, cr, uid, id, context=None):
""" Update form view id of action to open the invoice """
action = super(account_invoice, self)._get_formview_action(cr, uid, id, context=context)
obj = self.browse(cr, uid, id, context=context)
if obj.type == 'in_invoice':
model, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
action.update({
'views': [(view_id, 'form')],
})
else:
model, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'invoice_form')
action.update({
'views': [(view_id, 'form')],
})
return action
# Workflow stuff
#################
@ -729,7 +772,7 @@ class account_invoice(osv.osv):
inv = self.browse(cr, uid, id)
cur_obj = self.pool.get('res.currency')
company_currency = inv.company_id.currency_id.id
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
if inv.type in ('out_invoice', 'in_refund'):
sign = 1
else:
@ -743,7 +786,7 @@ class account_invoice(osv.osv):
else:
ref = self._convert_ref(cr, uid, inv.number)
if not inv.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
il['analytic_lines'] = [(0,0, {
'name': il['name'],
'date': inv['date_invoice'],
@ -776,6 +819,7 @@ class account_invoice(osv.osv):
return move_lines
def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj):
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id
if not inv.tax_line:
for tax in compute_taxes.values():
ait_obj.create(cr, uid, tax)
@ -789,7 +833,7 @@ class account_invoice(osv.osv):
if not key in compute_taxes:
raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
base = compute_taxes[key]['base']
if abs(base - tax.base) > inv.company_id.currency_id.rounding:
if abs(base - tax.base) > company_currency.rounding:
raise osv.except_osv(_('Warning!'), _('Tax base different!\nClick on compute to update the tax base.'))
for key in compute_taxes:
if not key in tax_key:
@ -868,7 +912,7 @@ class account_invoice(osv.osv):
if not inv.journal_id.sequence_id:
raise osv.except_osv(_('Error!'), _('Please define sequence on the journal related to this invoice.'))
if not inv.invoice_line:
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
raise osv.except_osv(_('No Invoice Lines!'), _('Please create some invoice lines.'))
if inv.move_id:
continue
@ -876,7 +920,7 @@ class account_invoice(osv.osv):
ctx.update({'lang': inv.partner_id.lang})
if not inv.date_invoice:
self.write(cr, uid, [inv.id], {'date_invoice': fields.date.context_today(self,cr,uid,context=context)}, context=ctx)
company_currency = inv.company_id.currency_id.id
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
# create the analytical lines
# one move line per invoice line
iml = self._get_analytic_lines(cr, uid, inv.id, context=ctx)
@ -889,7 +933,7 @@ class account_invoice(osv.osv):
group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context)
if group_check_total and uid in [x.id for x in group_check_total.users]:
if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)):
raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe encoded total does not match the computed total.'))
raise osv.except_osv(_('Bad Total!'), _('Please verify the price of the invoice!\nThe encoded total does not match the computed total.'))
if inv.payment_term:
total_fixed = total_percent = 0
@ -992,11 +1036,11 @@ class account_invoice(osv.osv):
'line_id': line,
'journal_id': journal_id,
'date': date,
'narration':inv.comment
'narration': inv.comment,
'company_id': inv.company_id.id,
}
period_id = inv.period_id and inv.period_id.id or False
ctx.update(company_id=inv.company_id.id,
account_period_prefer_normal=True)
ctx.update(company_id=inv.company_id.id)
if not period_id:
period_ids = period_obj.find(cr, uid, inv.date_invoice, context=ctx)
period_id = period_ids and period_ids[0] or False
@ -1272,9 +1316,7 @@ class account_invoice(osv.osv):
ref = invoice.reference
else:
ref = self._convert_ref(cr, uid, invoice.number)
partner = invoice.partner_id
if partner.parent_id and not partner.is_company:
partner = partner.parent_id
partner = self.pool['res.partner']._find_accounting_partner(invoice.partner_id)
# Pay attention to the sign for both debit/credit AND amount_currency
l1 = {
'debit': direction * pay_amount>0 and direction * pay_amount,
@ -1433,7 +1475,7 @@ class account_invoice_line(osv.osv):
context = dict(context)
context.update({'company_id': company_id, 'force_company': company_id})
if not partner_id:
raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") )
if not product:
if type in ('in_invoice', 'in_refund'):
return {'value': {}, 'domain':{'product_uom':[]}}
@ -1448,6 +1490,7 @@ class account_invoice_line(osv.osv):
result = {}
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
result['name'] = res.partner_ref
if type in ('out_invoice','out_refund'):
a = res.property_account_income.id
if not a:
@ -1462,19 +1505,21 @@ class account_invoice_line(osv.osv):
if type in ('out_invoice', 'out_refund'):
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
if res.description_sale:
result['name'] += '\n'+res.description_sale
else:
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
if res.description_purchase:
result['name'] += '\n'+res.description_purchase
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
if type in ('in_invoice', 'in_refund'):
result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
else:
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
result['name'] = res.partner_ref
result['uos_id'] = uom_id or res.uom_id.id
if res.description:
result['name'] += '\n'+res.description
domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}
@ -1527,8 +1572,7 @@ class account_invoice_line(osv.osv):
if context is None:
context = {}
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
company_currency = inv.company_id.currency_id.id
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
for line in inv.invoice_line:
mres = self.move_line_get_item(cr, uid, line, context)
if not mres:
@ -1594,7 +1638,6 @@ class account_invoice_line(osv.osv):
unique_tax_ids = product_change_result['value']['invoice_line_tax_id']
return {'value':{'invoice_line_tax_id': unique_tax_ids}}
account_invoice_line()
class account_invoice_tax(osv.osv):
_name = "account.invoice.tax"
@ -1673,8 +1716,7 @@ class account_invoice_tax(osv.osv):
cur_obj = self.pool.get('res.currency')
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
cur = inv.currency_id
company_currency = inv.company_id.currency_id.id
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
for line in inv.invoice_line:
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, line.product_id, inv.partner_id)['taxes']:
val={}
@ -1745,15 +1787,11 @@ class res_partner(osv.osv):
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
}
def _find_accounting_partner(self, part):
def _find_accounting_partner(self, partner):
'''
Find the partner for which the accounting entries will be created
'''
#if the chosen partner is not a company and has a parent company, use the parent for the journal entries
#because you want to invoice 'Agrolait, accounting department' but the journal items are for 'Agrolait'
if part.parent_id and not part.is_company:
part = part.parent_id
return part
return partner.commercial_partner_id
def copy(self, cr, uid, id, default=None, context=None):
default = default or {}

View File

@ -117,6 +117,7 @@
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice">
<field name="partner_id" groups="base.group_user"/>
<field name="commercial_partner_id" invisible="1"/>
<field name="date_invoice"/>
<field name="number"/>
<field name="reference" invisible="1"/>
@ -196,7 +197,7 @@
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
@ -319,8 +320,9 @@
<group>
<field string="Customer" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
groups="base.group_user" context="{'search_default_customer':1, 'show_address': 1}"
options='{"always_reload": True}'/>
context="{'search_default_customer':1, 'show_address': 1}"
options='{"always_reload": True}'
domain="[('customer', '=', True)]"/>
<field name="fiscal_position" widget="selection" />
</group>
<group>
@ -351,7 +353,7 @@
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
@ -447,18 +449,20 @@
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<search string="Search Invoice">
<field name="number" string="Invoice" filter_domain="['|','|','|', ('number','ilike',self), ('origin','ilike',self), ('supplier_invoice_number', 'ilike', self), ('partner_id', 'ilike', self)]"/>
<field name="number" string="Invoice" filter_domain="['|','|','|', ('number','ilike',self), ('origin','ilike',self), ('supplier_invoice_number', 'ilike', self), ('partner_id', 'child_of', self)]"/>
<filter name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
<filter name="proforma" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/>
<filter name="invoices" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>
<filter name="unpaid" string="Unpaid" domain="[('state','=','open')]" help="Unpaid Invoices"/>
<separator/>
<filter domain="[('user_id','=',uid)]" help="My Invoices" icon="terp-personal"/>
<field name="partner_id"/>
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
<field name="user_id" string="Salesperson"/>
<field name="period_id" string="Period"/>
<separator/>
<filter domain="[('user_id','=',uid)]" help="My Invoices"/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter name="partner_id" string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter name="commercial_partner_id" string="Commercial Partner" domain="[]" context="{'group_by':'commercial_partner_id'}"/>
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
@ -621,8 +625,6 @@
</record>
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
<act_window context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
<act_window
id="act_account_journal_2_account_invoice_opened"
name="Unpaid Invoices"

View File

@ -192,7 +192,7 @@ class account_move_line(osv.osv):
for obj_line in self.browse(cr, uid, ids, context=context):
if obj_line.analytic_account_id:
if not obj_line.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
vals_line = self._prepare_analytic_line(cr, uid, obj_line, context=context)
acc_ana_line_obj.create(cr, uid, vals_line)
return True
@ -559,10 +559,11 @@ class account_move_line(osv.osv):
]
def _auto_init(self, cr, context=None):
super(account_move_line, self)._auto_init(cr, context=context)
res = super(account_move_line, self)._auto_init(cr, context=context)
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'account_move_line_journal_id_period_id_index\'')
if not cr.fetchone():
cr.execute('CREATE INDEX account_move_line_journal_id_period_id_index ON account_move_line (journal_id, period_id)')
return res
def _check_no_view(self, cr, uid, ids, context=None):
lines = self.browse(cr, uid, ids, context=context)
@ -625,7 +626,7 @@ class account_move_line(osv.osv):
(_check_date, 'The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal.', ['date']),
(_check_currency, 'The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal.', ['currency_id']),
(_check_currency_and_amount, "You cannot create journal items with a secondary currency without recording both 'currency' and 'amount currency' field.", ['currency_id','amount_currency']),
(_check_currency_amount, 'The amount expressed in the secondary currency must be positif when journal item are debit and negatif when journal item are credit.', ['amount_currency']),
(_check_currency_amount, 'The amount expressed in the secondary currency must be positive when the journal item is a debit and negative when if it is a credit.', ['amount_currency']),
(_check_currency_company, "You cannot provide a secondary currency if it is the same than the company one." , ['currency_id']),
]
@ -654,13 +655,7 @@ class account_move_line(osv.osv):
}
return result
def onchange_account_id(self, cr, uid, ids, account_id, context=None):
res = {'value': {}}
if account_id:
res['value']['account_tax_id'] = [x.id for x in self.pool.get('account.account').browse(cr, uid, account_id, context=context).tax_ids]
return res
def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False):
def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False, context=None):
partner_obj = self.pool.get('res.partner')
payment_term_obj = self.pool.get('account.payment.term')
journal_obj = self.pool.get('account.journal')
@ -674,8 +669,8 @@ class account_move_line(osv.osv):
date = datetime.now().strftime('%Y-%m-%d')
jt = False
if journal:
jt = journal_obj.browse(cr, uid, journal).type
part = partner_obj.browse(cr, uid, partner_id)
jt = journal_obj.browse(cr, uid, journal, context=context).type
part = partner_obj.browse(cr, uid, partner_id, context=context)
payment_term_id = False
if jt and jt in ('purchase', 'purchase_refund') and part.property_supplier_payment_term:
@ -700,20 +695,20 @@ class account_move_line(osv.osv):
elif part.supplier:
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id1)
if val.get('account_id', False):
d = self.onchange_account_id(cr, uid, ids, val['account_id'])
d = self.onchange_account_id(cr, uid, ids, account_id=val['account_id'], partner_id=part.id, context=context)
val.update(d['value'])
return {'value':val}
def onchange_account_id(self, cr, uid, ids, account_id=False, partner_id=False):
def onchange_account_id(self, cr, uid, ids, account_id=False, partner_id=False, context=None):
account_obj = self.pool.get('account.account')
partner_obj = self.pool.get('res.partner')
fiscal_pos_obj = self.pool.get('account.fiscal.position')
val = {}
if account_id:
res = account_obj.browse(cr, uid, account_id)
res = account_obj.browse(cr, uid, account_id, context=context)
tax_ids = res.tax_ids
if tax_ids and partner_id:
part = partner_obj.browse(cr, uid, partner_id)
part = partner_obj.browse(cr, uid, partner_id, context=context)
tax_id = fiscal_pos_obj.map_tax(cr, uid, part and part.property_account_position or False, tax_ids)[0]
else:
tax_id = tax_ids and tax_ids[0].id or False
@ -741,24 +736,26 @@ class account_move_line(osv.osv):
def list_partners_to_reconcile(self, cr, uid, context=None):
cr.execute(
"""
SELECT partner_id
FROM (
SELECT l.partner_id, p.last_reconciliation_date, SUM(l.debit) AS debit, SUM(l.credit) AS credit
"""SELECT partner_id FROM (
SELECT l.partner_id, p.last_reconciliation_date, SUM(l.debit) AS debit, SUM(l.credit) AS credit, MAX(l.create_date) AS max_date
FROM account_move_line l
RIGHT JOIN account_account a ON (a.id = l.account_id)
RIGHT JOIN res_partner p ON (l.partner_id = p.id)
WHERE a.reconcile IS TRUE
AND l.reconcile_id IS NULL
AND (p.last_reconciliation_date IS NULL OR l.date > p.last_reconciliation_date)
AND l.state <> 'draft'
GROUP BY l.partner_id, p.last_reconciliation_date
) AS s
WHERE debit > 0 AND credit > 0
WHERE debit > 0 AND credit > 0 AND (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date)
ORDER BY last_reconciliation_date""")
ids = cr.fetchall()
ids = len(ids) and [x[0] for x in ids] or []
return self.pool.get('res.partner').name_get(cr, uid, ids, context=context)
ids = [x[0] for x in cr.fetchall()]
if not ids:
return []
# To apply the ir_rules
partner_obj = self.pool.get('res.partner')
ids = partner_obj.search(cr, uid, [('id', 'in', ids)], context=context)
return partner_obj.name_get(cr, uid, ids, context=context)
def reconcile_partial(self, cr, uid, ids, type='auto', context=None, writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False):
move_rec_obj = self.pool.get('account.move.reconcile')
@ -983,8 +980,7 @@ class account_move_line(osv.osv):
if context is None:
context = {}
period_pool = self.pool.get('account.period')
ctx = dict(context, account_period_prefer_normal=True)
pids = period_pool.find(cr, user, date, context=ctx)
pids = period_pool.find(cr, user, date, context=context)
if pids:
res.update({
'period_id':pids[0]
@ -1105,7 +1101,7 @@ class account_move_line(osv.osv):
period = period_obj.browse(cr, uid, period_id, context=context)
for (state,) in result:
if state == 'done':
raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
raise osv.except_osv(_('Error!'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
if not result:
jour_period_obj.create(cr, uid, {
'name': (journal.code or journal.name)+':'+(period.name or ''),
@ -1185,7 +1181,7 @@ class account_move_line(osv.osv):
move_id = move_obj.create(cr, uid, v, context)
vals['move_id'] = move_id
else:
raise osv.except_osv(_('No piece number !'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
raise osv.except_osv(_('No Piece Number!'), _('Cannot create an automatic sequence for this piece.\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
ok = not (journal.type_control_ids or journal.account_control_ids)
if ('account_id' in vals):
account = account_obj.browse(cr, uid, vals['account_id'], context=context)
@ -1306,6 +1302,5 @@ class account_move_line(osv.osv):
bool(journal.currency),bool(journal.analytic_journal_id)))
return result
account_move_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -11,7 +11,7 @@
<report auto="False" id="account_general_journal" model="account.journal.period" name="account.general.journal" rml="account/report/account_general_journal.rml" string="General Journal" header="False"/>
<report auto="False" id="account_journal" model="account.journal.period" name="account.journal.period.print" rml="account/report/account_journal.rml" string="Journal" header="False"/>
<report auto="False" id="account_journal_sale_purchase" model="account.journal.period" name="account.journal.period.print.sale.purchase" rml="account/report/account_journal_sale_purchase.rml" string="Sale/Purchase Journal" header="False"/>
<report auto="False" id="account_overdue" model="res.partner" name="account.overdue" rml="account/report/account_print_overdue.rml" string="Overdue Payments"/>
<report id="account_overdue" model="res.partner" name="account.overdue" rml="account/report/account_print_overdue.rml" string="Overdue Payments" parser="account.report.account_print_overdue.Overdue"/>
<report
auto="False"
id="account_invoices"

View File

@ -907,9 +907,7 @@
<label for="type"/>
<div>
<field name="type"/>
<field name="amount" class="oe_inline"
attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
<label string="%%" attrs="{'invisible':[('type','&lt;&gt;','percent')]}"/>
<field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
</div>
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
@ -1112,7 +1110,7 @@
<field name="ref"/>
<field name="statement_id" invisible="1"/>
<field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
<field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]" on_change="onchange_account_id(account_id)"/>
<field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]" on_change="onchange_account_id(account_id, partner_id, context)"/>
<field name="account_tax_id" options='{"no_open":True}' invisible="context.get('journal_type', False) not in ['sale','sale_refund','purchase','purchase_refund','general']"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','not in',['view','template'])]" invisible="not context.get('analytic_journal_id',False)"/>
<field name="move_id" required="0"/>
@ -1194,7 +1192,12 @@
sequence="1"
groups="group_account_user"
/>
<record id="action_account_moves_all_tree" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
<field name="view_id" ref="view_move_line_tree"/>
</record>
<record id="view_move_line_tree_reconcile" model="ir.ui.view">
<field name="model">account.move.line</field>
<field eval="24" name="priority"/>
@ -1288,7 +1291,7 @@
<group col="6" colspan="4">
<field name="name"/>
<field name="ref"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, date, journal_id, context)"/>
<field name="journal_id"/>
<field name="period_id"/>
@ -1352,7 +1355,7 @@
<tree colors="blue:state == 'draft';black:state == 'posted'" editable="top" string="Journal Items">
<field name="invoice"/>
<field name="name"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, parent.date, parent.journal_id, context)"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id),('company_id', '=', parent.company_id)]"/>
<field name="date_maturity"/>
<field name="debit" sum="Total Debit"/>
@ -1771,23 +1774,6 @@
</field>
</record>
<!-- res.partner links -->
<act_window
context="{'search_default_unreconciled':True, 'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
domain="[('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]"
id="act_account_partner_account_move_all"
name="Receivables &amp; Payables"
res_model="account.move.line"
src_model="res.partner"/>
<act_window
context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
id="act_account_partner_account_move"
name="Journal Items"
res_model="account.move.line"
src_model="res.partner"
groups="account.group_account_user"/>
<!-- Account Templates -->
<menuitem
id="account_template_folder"
@ -2123,10 +2109,8 @@
<group attrs="{'invisible': [('only_one_chart_template','=',True)]}">
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
</group>
<group groups="base.group_multi_company">
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
</group>
<group>
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name="currency_id" class="oe_inline"/>
<field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>

View File

@ -47,6 +47,5 @@ Thank you in advance for your cooperation.
Best Regards,'''
}
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -313,8 +313,8 @@
<field name="code">TSAJ</field>
<field name="type">sale</field>
<field name="sequence_id" ref="sequence_sale_journal"/>
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
<field name="default_credit_account_id" ref="a_sale"/>
<field name="default_debit_account_id" ref="a_sale"/>
<field name="analytic_journal_id" ref="cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -323,8 +323,8 @@
<field name="code">TSCNJ</field>
<field name="type">sale_refund</field>
<field name="sequence_id" ref="sequence_refund_sales_journal"/>
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
<field name="default_credit_account_id" ref="a_sale"/>
<field name="default_debit_account_id" ref="a_sale"/>
<field name="analytic_journal_id" ref="cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -334,8 +334,8 @@
<field name="code">TEXJ</field>
<field name="type">purchase</field>
<field name="sequence_id" ref="sequence_purchase_journal"/>
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
<field name="default_debit_account_id" ref="a_expense"/>
<field name="default_credit_account_id" ref="a_expense"/>
<field name="analytic_journal_id" ref="exp"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -344,8 +344,8 @@
<field name="code">TECNJ</field>
<field name="type">purchase_refund</field>
<field name="sequence_id" ref="sequence_refund_purchase_journal"/>
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
<field name="default_debit_account_id" ref="a_expense"/>
<field name="default_credit_account_id" ref="a_expense"/>
<field name="analytic_journal_id" ref="exp"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -355,8 +355,8 @@
<field name="code">TBNK</field>
<field name="type">bank</field>
<field name="sequence_id" ref="sequence_bank_journal"/>
<field model="account.account" name="default_debit_account_id" ref="bnk"/>
<field model="account.account" name="default_credit_account_id" ref="bnk"/>
<field name="default_debit_account_id" ref="bnk"/>
<field name="default_credit_account_id" ref="bnk"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -365,8 +365,8 @@
<field name="code">TCHK</field>
<field name="type">bank</field>
<field name="sequence_id" ref="sequence_check_journal"/>
<field model="account.account" name="default_debit_account_id" ref="cash"/>
<field model="account.account" name="default_credit_account_id" ref="cash"/>
<field name="default_debit_account_id" ref="cash"/>
<field name="default_credit_account_id" ref="cash"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -374,9 +374,9 @@
<field name="name">Cash Journal - (test)</field>
<field name="code">TCSH</field>
<field name="type">cash</field>
<field name="profit_account_id" model="account.account" ref="rsa" />
<field name="loss_account_id" model="account.account" ref="rsa" />
<field name="internal_account_id" model="account.account" ref="rsa" />
<field name="profit_account_id" ref="rsa" />
<field name="loss_account_id" ref="rsa" />
<field name="internal_account_id" ref="rsa" />
<field name="with_last_closing_balance" eval="True" />
<!--
Usually, cash payment methods requires a control at opening and closing.
@ -385,8 +385,8 @@
-->
<field name="cash_control" eval="False"/>
<field name="sequence_id" ref="sequence_cash_journal"/>
<field model="account.account" name="default_debit_account_id" ref="cash"/>
<field model="account.account" name="default_credit_account_id" ref="cash"/>
<field name="default_debit_account_id" ref="cash"/>
<field name="default_credit_account_id" ref="cash"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -403,8 +403,8 @@
<field name="code">TOEJ</field>
<field name="type">situation</field>
<field name="sequence_id" ref="sequence_opening_journal"/>
<field model="account.account" name="default_debit_account_id" ref="o_income"/>
<field model="account.account" name="default_credit_account_id" ref="o_expense"/>
<field name="default_debit_account_id" ref="o_income"/>
<field name="default_credit_account_id" ref="o_expense"/>
<field eval="True" name="centralisation"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -413,8 +413,8 @@
<field name="name">USD Bank Journal - (test)</field>
<field name="code">TUBK</field>
<field name="type">bank</field>
<field model="account.account" name="default_debit_account_id" ref="usd_bnk"/>
<field model="account.account" name="default_credit_account_id" ref="usd_bnk"/>
<field name="default_debit_account_id" ref="usd_bnk"/>
<field name="default_credit_account_id" ref="usd_bnk"/>
<field name="currency" ref="base.USD"/>
</record>
<!--

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

View File

@ -0,0 +1,205 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Accounting Made Easy</h2>
<h3 class="oe_slogan">Beautiful, easy, full featured</h3>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=account">
<img src="account_sc_00.png" alt="Online Demo">
</a>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
<div class="oe_span6">
<p class='oe_mt32'>
By far the most beautiful and full featured accounting software. OpenERP Accounting allows a better way to collaborate with your accountants, your customers and control your suppliers.</p>
<p>
Activate features on demand, from integrated analytic accounting to budget, assets and multiple companies consolidation.
</p>
<div class="oe_centeralign oe_websiteonly">
<a href="http://www.openerp.com/start" class="oe_button oe_big oe_tacky">Start your <span class="oe_emph">free</span> trial</a>
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row">
<h2 class="oe_slogan">A Smart User Interface</h2>
<div class="oe_span6">
<p class='oe_mt32'>
Record transactions in a few clicks and easily manage all financial activities
in one place. OpenERP's user interface is designed with productivity in mind.
</p>
</div>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="account_sc_01.png">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row">
<h2 class="oe_slogan">A Better Way To Work Together</h2>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="account_sc_02.png">
</div>
<div class="oe_span6">
<p class='oe_mt32'>
Share access to your latest business numbers with your team and your accountant so everyone is up to speed. From work, home or on the go.
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row">
<h2 class="oe_slogan">Connect Your Bank Accounts</h2>
<div class="oe_span6">
<p class='oe_mt32'>
Import your bank statements and reconcile them in just a few clicks. Prepare payment orders based on your supplier invoices and payment terms.
</p>
</div>
<div class="oe_span6">
<img class="oe_picture" src="account_illu_01.png">
</div>
</div>
</section>
<section class="oe_container">
<h2 class="oe_slogan">Get Paid Faster</h2>
<h3 class="oe_slogan">Electronic invoicing and automated follow-ups</h3>
<div class="oe_row">
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="account_sc_03.png">
</div>
<div class="oe_span6">
<p class='oe_mt32'>
Create and send professional invoices &amp; get paid online. Get rid of the stress of having to constantly remind your debtors. Simply set-up and automate follow-ups to get paid quickly.
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row">
<h2 class="oe_slogan">Sales Integration</h2>
<div class="oe_span6">
<p class='oe_mt32'>
Automatically create invoices from sales orders, delivery orders or base them on time and material. Re-invoice expenses on projects to your customer in just a few clicks.
</p>
</div>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="account_sc_04.png">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row">
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="account_sc_05.png">
</div>
<div class="oe_span6">
<h2 class="oe_slogan">Purchase Integration</h2>
<p class='oe_mt32'>
Control supplier invocies based on purchase orders. Get real-time inventory valuation reports automatically posted in your accounts.
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row">
<h2 class="oe_slogan">Multi-Level Analytic Accounting</h2>
<div class="oe_span6">
<p class='oe_mt32'>
Integrate your analytic accounting operations with timesheets, projects, invoices, expenses, etc. No need to record transactions, all analytic entries are posted automatically following your business rules.
</p>
</div>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="account_sc_06.png">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row">
<h2 class="oe_slogan">Everything you need to grow</h2>
<div class="oe_span6">
<img src="account_illu_02.png">
</div>
<div class="oe_span6">
<p class='oe_mt32'>
Manage your assets, track expenses, control budgets, multi-level analytic accounting; OpenERP has all the features you need to sustain all your business activities.
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row">
<h2 class="oe_slogan">Scale With Your Organization</h2>
<h3 class="oe_slogan">Used by very small to very large organizations</h3>
<div class="oe_span6">
<p class='oe_mt32'>
OpenERP supports multiple currencies, multiple users with different access rights, multiple companies with real time consolidation and unlimited analytic plans.
</p>
</div>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="account_illu_03.png">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row">
<h2 class="oe_slogan">Dashboard & KPIs</h2>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="account_sc_06.png">
</div>
<div class="oe_span6">
<p class='oe_mt32'>
Get direct access to key information with dynamic and customizable dashboards. Analyse your financial activities with the drill-up, drill-down, drill-across and filter features.
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row">
<div class="oe_span12">
<h2 class="oe_slogan">Many companies already enjoy it</h2>
<h3 class="oe_slogan">Hear what they have to say !</h3>
</div>
<div class="oe_span6">
<div class="oe_quote">
<q>
OpenERP Accounting is a great way to record all business transactions
right when they happen. Awesome and cost-effective!
</q>
<cite class="oe_cite oe_clearfix oe_ml64">
<div class="oe_author">Wolfgang Taferner</div>
<div class="oe_job"><a href="http://tapo-it.at/en/" target="_blank">Tapo</a>, Austria.</div>
</cite>
</div>
</div>
<div class="oe_span6">
<div class="oe_quote">
<q>
We have found accounting module of OpenERP to be user
friendly and highly customizable. It proved to be an accounting gem.
</q>
<cite class="oe_cite oe_clearfix">
<img class="oe_photo" src="testimonial_sunil.jpg">
<div class="oe_author">Col. Sunil Prem.</div>
<div class="oe_job">Director of <a href="http://www.navyuginfo.com" target="_blank">Navyug Infosolutions Pvt. Ltd</a>.</div>
</cite>
</div>
</div>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1,20 +1,20 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account
# Els Van Vossel <evv@agaplan.eu>, 2012.
# Els Van Vossel <evv@agaplan.eu>, 2012, 2013.
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2012-12-19 18:03+0000\n"
"PO-Revision-Date: 2013-04-15 23:02+0000\n"
"Last-Translator: Els Van Vossel (Agaplan) <Unknown>\n"
"Language-Team: Els Van Vossel\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-03-16 05:20+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-04-17 05:15+0000\n"
"X-Generator: Launchpad (build 16567)\n"
"Language: nl\n"
#. module: account
@ -258,7 +258,7 @@ msgstr "Belgische rapporten"
#. module: account
#: model:mail.message.subtype,name:account.mt_invoice_validated
msgid "Validated"
msgstr ""
msgstr "Goedgekeurd"
#. module: account
#: model:account.account.type,name:account.account_type_income_view1
@ -473,14 +473,14 @@ msgstr ""
#. module: account
#: help:account.bank.statement.line,name:0
msgid "Originator to Beneficiary Information"
msgstr ""
msgstr "Informatie Afzender naar Begunstigde"
#. module: account
#. openerp-web
#: code:addons/account/static/src/xml/account_move_line_quickadd.xml:8
#, python-format
msgid "Period :"
msgstr ""
msgstr "Periode:"
#. module: account
#: field:account.account.template,chart_template_id:0
@ -494,6 +494,7 @@ msgstr "Boekhoudplansjabloon"
#: selection:account.invoice.refund,filter_refund:0
msgid "Modify: create refund, reconcile and create a new draft invoice"
msgstr ""
"Wijzigen: factuur crediteren, afpunten en een nieuwe conceptfactuur maken"
#. module: account
#: help:account.config.settings,tax_calculation_rounding_method:0
@ -803,7 +804,7 @@ msgstr "Stel de bankrekeningen van uw bedrijf in"
#. module: account
#: view:account.invoice.refund:0
msgid "Create Refund"
msgstr ""
msgstr "Creditnota maken"
#. module: account
#: constraint:account.move.line:0
@ -833,7 +834,7 @@ msgstr "Bent u zeker dat u de boeking wilt uitvoeren?"
#: code:addons/account/account_invoice.py:1330
#, python-format
msgid "Invoice partially paid: %s%s of %s%s (%s%s remaining)."
msgstr ""
msgstr "Factuur is gedeeltelijk betaald: %s%s of %s%s (%s%s blijft open)"
#. module: account
#: view:account.invoice:0
@ -1010,6 +1011,8 @@ msgid ""
" opening/closing fiscal "
"year process."
msgstr ""
"U kunt geen afpunting ongedaan maken als deze afpunting voortkomt uit een "
"heropening."
#. module: account
#: model:ir.actions.act_window,name:account.action_subscription_form_new
@ -1052,7 +1055,7 @@ msgstr "Aankoopjournaal"
#. module: account
#: model:mail.message.subtype,description:account.mt_invoice_paid
msgid "Invoice paid"
msgstr ""
msgstr "Factuur betaald"
#. module: account
#: view:validate.account.move:0
@ -1375,6 +1378,8 @@ msgid ""
"The amount expressed in the secondary currency must be positif when journal "
"item are debit and negatif when journal item are credit."
msgstr ""
"Het bedrag in secundaire munt moet positief zijn als de boekingslijn debet "
"is en negatief bij een creditbedrag."
#. module: account
#: view:account.invoice.cancel:0
@ -1940,7 +1945,7 @@ msgstr "Verkopen per rekeningtype"
#: model:account.payment.term,name:account.account_payment_term_15days
#: model:account.payment.term,note:account.account_payment_term_15days
msgid "15 Days"
msgstr ""
msgstr "15 dagen"
#. module: account
#: model:ir.ui.menu,name:account.periodical_processing_invoicing
@ -2084,7 +2089,7 @@ msgstr "Voorlopig rekeninguittreksel"
#. module: account
#: model:mail.message.subtype,description:account.mt_invoice_validated
msgid "Invoice validated"
msgstr ""
msgstr "Factuur goedgekeurd"
#. module: account
#: field:account.config.settings,module_account_check_writing:0
@ -2342,6 +2347,7 @@ msgid ""
"You cannot change the type of account to '%s' type as it contains journal "
"items!"
msgstr ""
"U kunt het rekeningtype niet wijzigen in '%s' omdat er al boekingen zijn."
#. module: account
#: model:ir.model,name:account.model_account_aged_trial_balance
@ -2358,7 +2364,7 @@ msgstr "Boekjaar afsluiten"
#: code:addons/account/static/src/xml/account_move_line_quickadd.xml:14
#, python-format
msgid "Journal :"
msgstr ""
msgstr "Journaal:"
#. module: account
#: sql_constraint:account.fiscal.position.tax:0
@ -2718,6 +2724,8 @@ msgid ""
"You cannot change the type of account from 'Closed' to any other type as it "
"contains journal items!"
msgstr ""
"U kunt het rekeningtype niet wijzigen van 'Afgesloten' in een ander type als "
"er boekingen zijn."
#. module: account
#: field:account.invoice.report,account_line_id:0
@ -2811,7 +2819,7 @@ msgstr "Rekeningeigenschappen"
#. module: account
#: selection:account.invoice.refund,filter_refund:0
msgid "Create a draft refund"
msgstr ""
msgstr "Maak een voorlopige creditnota"
#. module: account
#: view:account.partner.reconcile.process:0
@ -3360,7 +3368,7 @@ msgstr ""
#: view:account.unreconcile:0
#: view:account.unreconcile.reconcile:0
msgid "Unreconcile Transactions"
msgstr ""
msgstr "Afpuntingen ongedaan maken"
#. module: account
#: field:wizard.multi.charts.accounts,only_one_chart_template:0
@ -3558,7 +3566,7 @@ msgstr "Aantal cijfers voor de rekeningcode"
#. module: account
#: field:res.partner,property_supplier_payment_term:0
msgid "Supplier Payment Term"
msgstr ""
msgstr "Betaaltermijn leverancier"
#. module: account
#: view:account.fiscalyear:0
@ -3633,7 +3641,7 @@ msgstr "Elektronisch bestand"
#. module: account
#: field:account.move.line,reconcile:0
msgid "Reconcile Ref"
msgstr ""
msgstr "Afpuntingsreferentie"
#. module: account
#: field:account.config.settings,has_chart_of_accounts:0
@ -3734,6 +3742,88 @@ msgid ""
"</div>\n"
" "
msgstr ""
"\n"
"<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
" <p>Hallo ${object.partner_id.name},</p>\n"
"\n"
" <p>Er is een nieuwe factuur voor u: </p>\n"
" \n"
" <p style=\"border-left: 1px solid #8e0000; margin-left: 30px;\">\n"
" &nbsp;&nbsp;<strong>REFERENTIE</strong><br />\n"
" &nbsp;&nbsp;Factuurnummer: <strong>${object.number}</strong><br />\n"
" &nbsp;&nbsp;Totaal: <strong>${object.amount_total} "
"${object.currency_id.name}</strong><br />\n"
" &nbsp;&nbsp;Datum: ${object.date_invoice}<br />\n"
" % if object.origin:\n"
" &nbsp;&nbsp;Referentie: ${object.origin}<br />\n"
" % endif\n"
" % if object.user_id:\n"
" &nbsp;&nbsp;Uw contactpersoon: <a "
"href=\"mailto:${object.user_id.email or "
"''}?subject=Factuur%20${object.number}\">${object.user_id.name}</a>\n"
" % endif\n"
" </p> \n"
" \n"
" % if object.paypal_url:\n"
" <br/>\n"
" <p>U kunt ook onmiddellijk betalen via Paypal:</p>\n"
" <a style=\"margin-left: 120px;\" href=\"${object.paypal_url}\">\n"
" <img class=\"oe_edi_paypal_button\" "
"src=\"https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif\"/>\n"
" </a>\n"
" % endif\n"
" \n"
" <br/>\n"
" <p>Neem gerust contact met ons op als u vragen heeft.</p>\n"
" <p>Bedankt dat u hebt gekozen voor ${object.company_id.name or "
"'ons'}!</p>\n"
" <br/>\n"
" <br/>\n"
" <div style=\"width: 375px; margin: 0px; padding: 0px; background-color: "
"#8E0000; border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; "
"background-repeat: repeat no-repeat;\">\n"
" <h3 style=\"margin: 0px; padding: 2px 14px; font-size: 12px; color: "
"#DDD;\">\n"
" <strong style=\"text-"
"transform:uppercase;\">${object.company_id.name}</strong></h3>\n"
" </div>\n"
" <div style=\"width: 347px; margin: 0px; padding: 5px 14px; line-height: "
"16px; background-color: #F2F2F2;\">\n"
" <span style=\"color: #222; margin-bottom: 5px; display: block; \">\n"
" % if object.company_id.street:\n"
" ${object.company_id.street}<br/>\n"
" % endif\n"
" % if object.company_id.street2:\n"
" ${object.company_id.street2}<br/>\n"
" % endif\n"
" % if object.company_id.city or object.company_id.zip:\n"
" ${object.company_id.zip} ${object.company_id.city}<br/>\n"
" % endif\n"
" % if object.company_id.country_id:\n"
" ${object.company_id.state_id and ('%s, ' % "
"object.company_id.state_id.name) or ''} ${object.company_id.country_id.name "
"or ''}<br/>\n"
" % endif\n"
" </span>\n"
" % if object.company_id.phone:\n"
" <div style=\"margin-top: 0px; margin-right: 0px; margin-bottom: "
"0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: "
"0px; padding-left: 0px; \">\n"
" Tel.:&nbsp; ${object.company_id.phone}\n"
" </div>\n"
" % endif\n"
" % if object.company_id.website:\n"
" <div>\n"
" Web:&nbsp;<a "
"href=\"${object.company_id.website}\">${object.company_id.website}</a>\n"
" </div>\n"
" %endif\n"
" <p></p>\n"
" </div>\n"
"</div>\n"
" "
#. module: account
#: view:account.period:0
@ -3922,6 +4012,8 @@ msgid ""
"You cannot create journal items with a secondary currency without recording "
"both 'currency' and 'amount currency' field."
msgstr ""
"U kunt geen boekingslijnen in een secundaire munt maken zonder beide velden "
"'valuta' en 'bedrag valuta' in te vullen."
#. module: account
#: field:account.financial.report,display_detail:0
@ -4224,7 +4316,7 @@ msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_journal_cashbox_line
msgid "account.journal.cashbox.line"
msgstr ""
msgstr "account.journal.cashbox.line"
#. module: account
#: model:ir.model,name:account.model_account_partner_reconcile_process
@ -4498,7 +4590,7 @@ msgstr "Uw bankrekeningen instellen"
#. module: account
#: xsl:account.transfer:0
msgid "Partner ID"
msgstr ""
msgstr "Relatie-ID"
#. module: account
#: help:account.bank.statement,message_ids:0
@ -4704,6 +4796,8 @@ msgid ""
"This payment term will be used instead of the default one for sale orders "
"and customer invoices"
msgstr ""
"Deze betalingsvoorwaarde vervangt de standaardvoorwaarde van de huidige "
"relatie."
#. module: account
#: view:account.config.settings:0
@ -4731,7 +4825,7 @@ msgstr "Geboekte lijnen"
#. module: account
#: field:account.move.line,blocked:0
msgid "No Follow-up"
msgstr ""
msgstr "Geen aanmaning"
#. module: account
#: view:account.tax.template:0
@ -4858,6 +4952,7 @@ msgstr "Maand"
#, python-format
msgid "You cannot change the code of account which contains journal items!"
msgstr ""
"U kunt de code van een rekening niet wijzigen als er al boekingen zijn."
#. module: account
#: field:account.config.settings,purchase_sequence_prefix:0
@ -4895,7 +4990,7 @@ msgstr "Rek.type"
#. module: account
#: selection:account.journal,type:0
msgid "Bank and Checks"
msgstr ""
msgstr "Bank en cheques"
#. module: account
#: field:account.account.template,note:0
@ -4977,7 +5072,7 @@ msgstr "Schakel dit in als u ook rekeningen met een nulsaldo wilt weergeven."
#. module: account
#: field:account.move.reconcile,opening_reconciliation:0
msgid "Opening Entries Reconciliation"
msgstr ""
msgstr "Afpunting openingsboekingen"
#. module: account
#. openerp-web
@ -5018,7 +5113,7 @@ msgstr "Boekhoudplan"
#. module: account
#: field:account.invoice,reference_type:0
msgid "Payment Reference"
msgstr ""
msgstr "Betaalreferentie"
#. module: account
#: selection:account.financial.report,style_overwrite:0
@ -5092,7 +5187,7 @@ msgstr "Af te punten boekingen"
#. module: account
#: model:ir.model,name:account.model_account_tax_template
msgid "Templates for Taxes"
msgstr ""
msgstr "Btw-sjablonen"
#. module: account
#: sql_constraint:account.period:0
@ -5667,6 +5762,8 @@ msgstr "Doelbewegingen"
msgid ""
"Move cannot be deleted if linked to an invoice. (Invoice: %s - Move ID:%s)"
msgstr ""
"Boeking kan niet worden verwijderd als deze is gekoppeld aan een factuur "
"(Factuur: %s - boeking: %s)"
#. module: account
#: view:account.bank.statement:0
@ -6225,6 +6322,8 @@ msgid ""
"This payment term will be used instead of the default one for purchase "
"orders and supplier invoices"
msgstr ""
"Deze betalingsvoorwaarde vervangt de standaardvoorwaarde van de huidige "
"relatie voor aankooporders en aankoopfacturen."
#. module: account
#: help:account.automatic.reconcile,power:0
@ -6734,7 +6833,7 @@ msgstr "Analytische lijn"
#. module: account
#: model:ir.ui.menu,name:account.menu_action_model_form
msgid "Models"
msgstr ""
msgstr "Modellen"
#. module: account
#: code:addons/account/account_invoice.py:1091
@ -7055,6 +7154,12 @@ msgid ""
"due date, make sure that the payment term is not set on the invoice. If you "
"keep the payment term and the due date empty, it means direct payment."
msgstr ""
"Als u betalingstermijnen gebruikt, wordt de vervaldatum automatisch berekend "
"bij het maken van de boekingen. De betalingsvoorwaarde kan verschillende "
"vervaldatums berekenen, vb. 50% nu en 50% binnen een maand. Als u een "
"specifieke vervaldatum wilt instellen, gebruikt u beter geen "
"betalingstermijn. Als u zowel betalingstermijn als vervaldatum leeglaat, "
"gaat het om een contante betaling."
#. module: account
#: code:addons/account/account.py:414
@ -7296,6 +7401,8 @@ msgid ""
"If you unreconcile transactions, you must also verify all the actions that "
"are linked to those transactions because they will not be disabled"
msgstr ""
"Als u afgepunte transacties ongedaan maakt, moet u alle gekoppelde acties "
"nakijken, want deze worden niet ongedaan gemaakt."
#. module: account
#: view:account.account.template:0
@ -7330,6 +7437,7 @@ msgid ""
"You cannot provide a secondary currency if it is the same than the company "
"one."
msgstr ""
"U kunt geen secundaire munt ingeven die identiek is aan de firmamunt."
#. module: account
#: selection:account.tax.template,applicable_type:0
@ -7467,7 +7575,7 @@ msgstr "Manueel"
#. module: account
#: selection:account.invoice.refund,filter_refund:0
msgid "Cancel: create refund and reconcile"
msgstr ""
msgstr "Annuleren: maak een creditnota en punt af"
#. module: account
#: code:addons/account/wizard/account_report_aged_partner_balance.py:58
@ -7564,7 +7672,7 @@ msgstr "Alle boekingen"
#. module: account
#: constraint:account.move.reconcile:0
msgid "You can only reconcile journal items with the same partner."
msgstr ""
msgstr "U kunt enkel boekingen met dezelfde relatie afpunten."
#. module: account
#: view:account.journal.select:0
@ -7682,7 +7790,7 @@ msgstr ""
#. module: account
#: field:account.invoice,paypal_url:0
msgid "Paypal Url"
msgstr ""
msgstr "Paypal-url"
#. module: account
#: field:account.config.settings,module_account_voucher:0
@ -8390,7 +8498,7 @@ msgstr ""
#. module: account
#: field:account.move.line,amount_residual_currency:0
msgid "Residual Amount in Currency"
msgstr ""
msgstr "Restbedrag in valuta"
#. module: account
#: field:account.config.settings,sale_refund_sequence_prefix:0
@ -8444,6 +8552,8 @@ msgid ""
"Refund base on this type. You can not Modify and Cancel if the invoice is "
"already reconciled"
msgstr ""
"Creditnota voor dit type. U kunt niet wijzigen of annuleren als de factuur "
"al is afgepunt."
#. module: account
#: field:account.bank.statement.line,sequence:0
@ -8461,7 +8571,7 @@ msgstr "Volgorde"
#. module: account
#: field:account.config.settings,paypal_account:0
msgid "Paypal account"
msgstr ""
msgstr "Paypal-rekening"
#. module: account
#: selection:account.print.journal,sort_selection:0
@ -8730,7 +8840,7 @@ msgstr "Omgekeerde analytische balans -"
#: help:account.move.reconcile,opening_reconciliation:0
msgid ""
"Is this reconciliation produced by the opening of a new fiscal year ?."
msgstr ""
msgstr "Komt deze afpunting van een openingsboeking?"
#. module: account
#: view:account.analytic.line:0
@ -9011,7 +9121,7 @@ msgstr "Eindbalans"
#. module: account
#: field:account.journal,centralisation:0
msgid "Centralized Counterpart"
msgstr ""
msgstr "Gecentraliseerde tegenboeking"
#. module: account
#: help:account.move.line,blocked:0
@ -9047,6 +9157,12 @@ msgid ""
"invoice will be created \n"
" so that you can edit it."
msgstr ""
"Gebruik deze optie als u een factuur wilt annuleren en een nieuwe maken.\n"
" De creditnota wordt gemaakt, goedgekeurd "
"en afgepunt\n"
" met de huidige factuur. Een nieuwe, "
"voorlopige factuur wordt gemaakt\n"
" die u kunt bewerken."
#. module: account
#: model:process.transition,name:account.process_transition_filestatement0
@ -9079,7 +9195,7 @@ msgstr "Rekeningtypen"
#. module: account
#: model:email.template,subject:account.email_template_edi_invoice
msgid "${object.company_id.name} Invoice (Ref ${object.number or 'n/a'})"
msgstr ""
msgstr "${object.company_id.name} Factuur (Ref. ${object.number or 'nvt' })"
#. module: account
#: code:addons/account/account_move_line.py:1213
@ -9149,6 +9265,19 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klik om een journaal toe te voegen.\n"
" </p><p>\n"
" Een journaal groepeert boekingen in functie\n"
" van de dagelijkse bezigheden.\n"
" </p><p>\n"
" Een firma geruikt doorgaans een journaal per betaalmethode "
"(kas,\n"
" bankrekeningen, cheques), een aankoopdagboek, een "
"verkoopdagboek\n"
" en een diversendagboek.\n"
" </p>\n"
" "
#. module: account
#: model:ir.model,name:account.model_account_fiscalyear_close_state
@ -9276,6 +9405,9 @@ msgid ""
"computed. Because it is space consuming, we do not allow to use it while "
"doing a comparison."
msgstr ""
"Met deze optie krijgt u meer details over de manier waarop de saldi worden "
"berekend. Omdat dit ruimte inneemt, is deze optie niet mogelijk bij "
"vergelijkingen."
#. module: account
#: model:ir.model,name:account.model_account_fiscalyear_close
@ -9292,6 +9424,8 @@ msgstr "De code van de rekening moet uniek zijn per firma."
#: help:product.template,property_account_expense:0
msgid "This account will be used to value outgoing stock using cost price."
msgstr ""
"Deze rekening dient voor de voorraadwaardering van de uitgaande voorraad op "
"basis van de kostprijs."
#. module: account
#: view:account.invoice:0
@ -9354,6 +9488,17 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klik als u een nieuwe recurrente boeking wilt maken.\n"
" </p><p>\n"
" Een terugkerende boeking wordt regelmatig op een bepaald "
"tijdstip herhaald,\n"
" vb. bij vervallen van een contract of overeenkomst met een\n"
" klant of een leverancier. U kunt dergelijke boekingen "
"voorbereiden\n"
" zodat deze automatisch worden geboekt.\n"
" </p>\n"
" "
#. module: account
#: view:account.journal:0
@ -9396,6 +9541,8 @@ msgid ""
"This allows you to check writing and printing.\n"
" This installs the module account_check_writing."
msgstr ""
"Hiermee kunt u cheques schrijven en afdrukken.\n"
" Hiermee wordt de module account_check_writing geïnstalleerd."
#. module: account
#: model:res.groups,name:account.group_account_invoice
@ -9681,6 +9828,9 @@ msgid ""
"chart\n"
" of accounts."
msgstr ""
"Bevestigde facturen kunnen niet meer\n"
" worden gewijzigd. Facturen krijgen een uniek nummer\n"
" en de boekingen worden gemaakt."
#. module: account
#: model:process.node,note:account.process_node_bankstatement0
@ -9906,11 +10056,15 @@ msgid ""
"payments.\n"
" This installs the module account_payment."
msgstr ""
"Hiermee kunt u betaalopdrachten maken\n"
" * die als basis dienen voor verdere automatisering,\n"
" * om efficiënter betalingen te kunnen uitvoeren.\n"
" Hiermee wordt de module account_payment geïnstalleerd."
#. module: account
#: xsl:account.transfer:0
msgid "Document"
msgstr ""
msgstr "Document"
#. module: account
#: view:account.chart.template:0
@ -10132,7 +10286,7 @@ msgstr "Kan geen boekingen maken tussen verschillende firma's."
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_periodical_processing
msgid "Periodic Processing"
msgstr ""
msgstr "Periodieke verwerking"
#. module: account
#: view:account.invoice.report:0
@ -10212,7 +10366,7 @@ msgstr "Vervaldatum"
#: model:account.payment.term,name:account.account_payment_term_immediate
#: model:account.payment.term,note:account.account_payment_term_immediate
msgid "Immediate Payment"
msgstr ""
msgstr "Contante betaling"
#. module: account
#: code:addons/account/account.py:1464
@ -10424,11 +10578,16 @@ msgid ""
"analytic account.\n"
" This installs the module account_budget."
msgstr ""
"Hiermee kunnen accountants budgetten beheren.\n"
" Als de hoofdbudgetten zijn ingesteld, kunnen de "
"projectleiders\n"
" het geplande bedrag instellen per analytische rekening.\n"
" Hiermee wordt de module account_budget geïnstalleerd."
#. module: account
#: field:account.bank.statement.line,name:0
msgid "OBI"
msgstr ""
msgstr "Omschrijving"
#. module: account
#: help:res.partner,property_account_payable:0
@ -10915,6 +11074,8 @@ msgid ""
"If you unreconcile transactions, you must also verify all the actions that "
"are linked to those transactions because they will not be disable"
msgstr ""
"Als u afgepunte transacties ongedaan maakt, moet u alle gekoppelde acties "
"nakijken, want deze worden niet ongedaan gemaakt."
#. module: account
#: code:addons/account/account_move_line.py:1059
@ -10949,6 +11110,9 @@ msgid ""
"customer. The tool search can also be used to personalise your Invoices "
"reports and so, match this analysis to your needs."
msgstr ""
"Dit rapport biedt een overzicht van het bedrag gefactureerd aan uw klant. De "
"zoekfunctie kan worden aangepast om het overzicht van uw facturen te "
"personaliseren, zodat u de gewenste analyse krijgt."
#. module: account
#: view:account.partner.reconcile.process:0
@ -11207,6 +11371,16 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klik als u een nieuw btw-vak wilt toevoegen.\n"
" </p><p>\n"
" Afhankelijk van uw land, dient een btw-vak om uw btw-"
"aangifte in te vullen.\n"
" In OpenERP kunt u een btw-structuur instellen en elke btw-"
"berekening\n"
" kan in een of meer btw-vakken worden opgenomen.\n"
" </p>\n"
" "
#. module: account
#: selection:account.entries.report,month:0
@ -11233,6 +11407,18 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Selecteer de periode en het journaal.\n"
" </p><p>\n"
" Hiermee kan de boekhouder in een sneltempo boekingen "
"invoeren in\n"
" OpenERP. Als u een aankoopfactuur wilt inboeken,\n"
" begint u met de kostenrekening. OpenERP stelt automatisch\n"
" de betrokken btw voor die is gekoppeld aan deze rekening, "
"net\n"
" als de centralisatierekening.\n"
" </p>\n"
" "
#. module: account
#: help:account.invoice.line,account_id:0
@ -11403,7 +11589,7 @@ msgstr "Rekeningmodel"
#: code:addons/account/account_cash_statement.py:292
#, python-format
msgid "Loss"
msgstr ""
msgstr "Verlies"
#. module: account
#: selection:account.entries.report,month:0
@ -11475,7 +11661,7 @@ msgstr "Kostenrekening van productsjabloon"
#. module: account
#: field:res.partner,property_payment_term:0
msgid "Customer Payment Term"
msgstr ""
msgstr "Betaaltermijn klant"
#. module: account
#: help:accounting.report,label_filter:0

View File

@ -7,15 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2012-12-22 23:17+0000\n"
"Last-Translator: Fábio Martinelli - http://zupy.com.br "
"<webmaster@guaru.net>\n"
"PO-Revision-Date: 2013-04-18 17:44+0000\n"
"Last-Translator: Thiago Tognoli <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: 2013-03-16 05:19+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-04-19 05:24+0000\n"
"X-Generator: Launchpad (build 16567)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@ -431,7 +430,7 @@ msgstr "Data de criação"
#. module: account
#: selection:account.journal,type:0
msgid "Purchase Refund"
msgstr "Devolução da Venda"
msgstr "Devolução de Compra"
#. module: account
#: selection:account.journal,type:0
@ -12678,13 +12677,6 @@ msgstr ""
#~ msgid "This period is already closed !"
#~ msgstr "Este período já está fechado"
#, python-format
#~ msgid ""
#~ "Selected Move lines does not have any account move enties in draft state"
#~ msgstr ""
#~ "As linhas do movimento selecionado nao tem nenhuma conta a ser movida para o "
#~ "estado de esboço"
#~ msgid "Unpaid Customer Refunds"
#~ msgstr "Reembolsos a clientes não pagos"
@ -13232,6 +13224,13 @@ msgstr ""
#~ msgid "Can not %s draft/proforma/cancel invoice."
#~ msgstr "Não pode %s provisório/proforma/cancelar fatura."
#, python-format
#~ msgid ""
#~ "Selected Move lines does not have any account move enties in draft state"
#~ msgstr ""
#~ "As linhas de movimento selecionadas não tem nenhum movimento nesta conta no "
#~ "modo provisório"
#, python-format
#~ msgid "Can not pay draft/proforma/cancel invoice."
#~ msgstr "Não se pode pagar uma fatura provisória/proforma/cancelada"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -23,10 +23,16 @@ import datetime
from dateutil.relativedelta import relativedelta
import logging
from operator import itemgetter
from os.path import join as opj
import time
import urllib2
import urlparse
from openerp import netsvc, tools
try:
import simplejson as json
except ImportError:
import json # noqa
from openerp.release import serie
from openerp.tools.translate import _
from openerp.osv import fields, osv
@ -38,13 +44,28 @@ class account_installer(osv.osv_memory):
def _get_charts(self, cr, uid, context=None):
modules = self.pool.get('ir.module.module')
# try get the list on apps server
try:
apps_server = self.pool.get('ir.config_parameter').get_param(cr, uid, 'apps.server', 'https://apps.openerp.com')
up = urlparse.urlparse(apps_server)
url = '{0.scheme}://{0.netloc}/apps/charts?serie={1}'.format(up, serie)
j = urllib2.urlopen(url, timeout=3).read()
apps_charts = json.loads(j)
charts = dict(apps_charts)
except Exception:
charts = dict()
# Looking for the module with the 'Account Charts' category
category_name, category_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'module_category_localization_account_charts')
ids = modules.search(cr, uid, [('category_id', '=', category_id)], context=context)
charts = list(
sorted(((m.name, m.shortdesc)
for m in modules.browse(cr, uid, ids, context=context)),
key=itemgetter(1)))
if ids:
charts.update((m.name, m.shortdesc) for m in modules.browse(cr, uid, ids, context=context))
charts = sorted(charts.items(), key=itemgetter(1))
charts.insert(0, ('configurable', _('Custom')))
return charts
@ -57,9 +78,9 @@ class account_installer(osv.osv_memory):
"country."),
'date_start': fields.date('Start Date', required=True),
'date_stop': fields.date('End Date', required=True),
'period': fields.selection([('month', 'Monthly'), ('3months','3 Monthly')], 'Periods', required=True),
'period': fields.selection([('month', 'Monthly'), ('3months', '3 Monthly')], 'Periods', required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'has_default_company' : fields.boolean('Has Default Company', readonly=True),
'has_default_company': fields.boolean('Has Default Company', readonly=True),
}
def _default_company(self, cr, uid, context=None):
@ -78,30 +99,29 @@ class account_installer(osv.osv_memory):
'has_default_company': _default_has_default_company,
'charts': 'configurable'
}
def get_unconfigured_cmp(self, cr, uid, context=None):
""" get the list of companies that have not been configured yet
but don't care about the demo chart of accounts """
cmp_select = []
company_ids = self.pool.get('res.company').search(cr, uid, [], context=context)
cr.execute("SELECT company_id FROM account_account WHERE active = 't' AND account_account.parent_id IS NULL AND name != %s", ("Chart For Automated Tests",))
configured_cmp = [r[0] for r in cr.fetchall()]
return list(set(company_ids)-set(configured_cmp))
def check_unconfigured_cmp(self, cr, uid, context=None):
""" check if there are still unconfigured companies """
if not self.get_unconfigured_cmp(cr, uid, context=context):
raise osv.except_osv(_('No unconfigured company !'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
raise osv.except_osv(_('No Unconfigured Company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if context is None:context = {}
res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
if context is None: context = {}
res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
cmp_select = []
# display in the widget selection only the companies that haven't been configured yet
unconfigured_cmp = self.get_unconfigured_cmp(cr, uid, context=context)
for field in res['fields']:
if field == 'company_id':
res['fields'][field]['domain'] = [('id','in',unconfigured_cmp)]
res['fields'][field]['domain'] = [('id', 'in', unconfigured_cmp)]
res['fields'][field]['selection'] = [('', '')]
if unconfigured_cmp:
cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)]
@ -117,7 +137,7 @@ class account_installer(osv.osv_memory):
def execute(self, cr, uid, ids, context=None):
self.execute_simple(cr, uid, ids, context)
super(account_installer, self).execute(cr, uid, ids, context=context)
return super(account_installer, self).execute(cr, uid, ids, context=context)
def execute_simple(self, cr, uid, ids, context=None):
if context is None:
@ -129,8 +149,8 @@ class account_installer(osv.osv_memory):
if not f_ids:
name = code = res['date_start'][:4]
if int(name) != int(res['date_stop'][:4]):
name = res['date_start'][:4] +'-'+ res['date_stop'][:4]
code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4]
name = res['date_start'][:4] + '-' + res['date_stop'][:4]
code = res['date_start'][2:4] + '-' + res['date_stop'][2:4]
vals = {
'name': name,
'code': code,
@ -150,8 +170,7 @@ class account_installer(osv.osv_memory):
chart = self.read(cr, uid, ids, ['charts'],
context=context)[0]['charts']
_logger.debug('Installing chart of accounts %s', chart)
return modules | set([chart])
return (modules | set([chart])) - set(['has_default_company', 'configurable'])
account_installer()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,7 +38,6 @@ class ir_sequence_fiscalyear(osv.osv):
'Main Sequence must be different from current !'),
]
ir_sequence_fiscalyear()
class ir_sequence(osv.osv):
_inherit = 'ir.sequence'
@ -56,6 +55,5 @@ class ir_sequence(osv.osv):
return super(ir_sequence, self)._next(cr, uid, [line.sequence_id.id], context)
return super(ir_sequence, self)._next(cr, uid, seq_ids, context)
ir_sequence()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -66,7 +66,6 @@ class account_fiscal_position(osv.osv):
break
return account_id
account_fiscal_position()
class account_fiscal_position_tax(osv.osv):
_name = 'account.fiscal.position.tax'
@ -84,7 +83,6 @@ class account_fiscal_position_tax(osv.osv):
'A tax fiscal position could be defined only once time on same taxes.')
]
account_fiscal_position_tax()
class account_fiscal_position_account(osv.osv):
_name = 'account.fiscal.position.account'
@ -102,7 +100,6 @@ class account_fiscal_position_account(osv.osv):
'An account fiscal position could be defined only once time on same accounts.')
]
account_fiscal_position_account()
class res_partner(osv.osv):
_name = 'res.partner'
@ -233,9 +230,13 @@ class res_partner(osv.osv):
help="This payment term will be used instead of the default one for purchase orders and supplier invoices"),
'ref_companies': fields.one2many('res.company', 'partner_id',
'Companies that refers to partner'),
'last_reconciliation_date': fields.datetime('Latest Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the date of the last reconciliation made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 ways: either the last debit/credit entry was reconciled, either the user pressed the button "Fully Reconciled" in the manual reconciliation process')
'last_reconciliation_date': fields.datetime('Latest Full Reconciliation Date', help='Date on which the partner accounting entries were fully reconciled last time. It differs from the last date where a reconciliation has been made for this partner, as here we depict the fact that nothing more was to be reconciled at this date. This can be achieved in 2 different ways: either the last unreconciled debit/credit entry of this partner was reconciled, either the user pressed the button "Nothing more to reconcile" during the manual reconciliation process.')
}
res_partner()
def _commercial_fields(self, cr, uid, context=None):
return super(res_partner, self)._commercial_fields(cr, uid, context=context) + \
['debit_limit', 'property_account_payable', 'property_account_receivable', 'property_account_position',
'property_payment_term', 'property_supplier_payment_term', 'last_reconciliation_date']
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,6 +50,30 @@
</field>
</record>
<record id="action_open_partner_analytic_accounts" model="ir.actions.act_window">
<field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
<field name="name">Contracts/Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>
<field name="search_view_id" ref="view_account_analytic_account_search"/>
</record>
<record model="ir.ui.view" id="partner_view_buttons">
<field name="name">partner.view.buttons</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside">
<button type="action" string="Invoices"
name="%(account.action_invoice_tree)d"
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}" groups="account.group_account_invoice"/>
<button type="action" string="Journal Items" name="%(account.action_account_moves_all_tree)d" groups="account.group_account_user"/>
<button type="action" string="Contracts" name="%(account.action_open_partner_analytic_accounts)d"
groups="analytic.group_analytic_accounting"/>
</xpath>
</field>
</record>
<record id="action_account_fiscal_position_form" model="ir.actions.act_window">
<field name="name">Fiscal Positions</field>
<field name="res_model">account.fiscal.position</field>
@ -73,7 +97,7 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page string="History" position="before" version="7.0">
<page string="Accounting" col="4">
<page string="Accounting" col="4" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}">
<group>
<group>
<field name="property_account_position" widget="selection"/>
@ -103,20 +127,13 @@
</tree>
</field>
</page>
<page string="Accounting" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}">
<div>
<p>Accounting-related settings are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
</div>
</page>
</page>
</field>
</record>
<!-- Partners info tab view-->
<act_window
id="action_analytic_open"
name="Contracts/Analytic Accounts"
res_model="account.analytic.account"
context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
src_model="res.partner"
view_type="form"
view_mode="tree,form"/>
</data>
</openerp>

View File

@ -123,24 +123,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The accountant confirms the statement.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_accountingstatemententries0"/>
<field model="process.node" name="source_node_id" ref="account.process_node_draftstatement0"/>
<field name="target_node_id" ref="process_node_accountingstatemententries0"/>
<field name="source_node_id" ref="account.process_node_draftstatement0"/>
</record>
<record id="process_transition_analyticinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From analytic accounts&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft invoices.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftinvoices0"/>
<field model="process.node" name="source_node_id" ref="process_node_analytic0"/>
<field name="target_node_id" ref="process_node_draftinvoices0"/>
<field name="source_node_id" ref="process_node_analytic0"/>
</record>
<record id="process_transition_customerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoices are checked, validated and printed.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoiceinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
<field name="target_node_id" ref="process_node_invoiceinvoice0"/>
<field name="source_node_id" ref="process_node_draftinvoices0"/>
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
</record>
@ -148,40 +148,40 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the invoice.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_accountingentries0"/>
<field model="process.node" name="source_node_id" ref="process_node_invoiceinvoice0"/>
<field name="target_node_id" ref="process_node_accountingentries0"/>
<field name="source_node_id" ref="process_node_invoiceinvoice0"/>
</record>
<record id="process_transition_entriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries are the first input of the reconciliation.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_accountingentries0"/>
<field name="target_node_id" ref="process_node_reconciliation0"/>
<field name="source_node_id" ref="process_node_accountingentries0"/>
</record>
<record id="process_transition_statemententries0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Manual or automatic creation of payment entries according to the statements&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_paymententries0"/>
<field model="process.node" name="source_node_id" ref="process_node_bankstatement0"/>
<field name="target_node_id" ref="process_node_paymententries0"/>
<field name="source_node_id" ref="process_node_bankstatement0"/>
</record>
<record id="process_transition_paymentreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Payment entries are the second input of the reconciliation.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_paymententries0"/>
<field name="target_node_id" ref="process_node_reconciliation0"/>
<field name="source_node_id" ref="process_node_paymententries0"/>
</record>
<record id="process_transition_reconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice can be paid.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_paidinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_reconciliation0"/>
<field name="target_node_id" ref="process_node_paidinvoice0"/>
<field name="source_node_id" ref="process_node_reconciliation0"/>
</record>
<!--

View File

@ -68,8 +68,8 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Automatic import of the bank statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import of the statement in the system from an electronic file&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_electronicfile0"/>
<field name="target_node_id" ref="process_node_draftstatement0"/>
<field name="source_node_id" ref="process_node_electronicfile0"/>
</record>
<record id="process_transition_invoicemanually0" model="process.transition">
@ -77,17 +77,17 @@
<field eval="&quot;&quot;&quot;Manual entry&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A statement with manual entries becomes a draft statement.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_manually0"/>
<field name="target_node_id" ref="process_node_draftstatement0"/>
<field name="source_node_id" ref="process_node_manually0"/>
</record>
<record id="process_transition_invoiceimport0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Import from invoice or payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import of the statement in the system from a supplier or customer invoice&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_importinvoice0"/>
<field name="target_node_id" ref="process_node_draftstatement0"/>
<field name="source_node_id" ref="process_node_importinvoice0"/>
</record>
</data>
</openerp>
</openerp>

View File

@ -111,16 +111,16 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From analytic accounts&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft supplier invoices.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
<field model="process.node" name="source_node_id" ref="process_node_analyticcost0"/>
<field name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
<field name="source_node_id" ref="process_node_analyticcost0"/>
</record>
<record id="process_transition_suppliercustomerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoices are validated. &quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
<field name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
<field name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
</record>
@ -128,40 +128,40 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the invoice. &quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplieraccountingentries0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
<field name="target_node_id" ref="process_node_supplieraccountingentries0"/>
<field name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
</record>
<record id="process_transition_supplierentriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries are an input of the reconciliation.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplieraccountingentries0"/>
<field name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field name="source_node_id" ref="process_node_supplieraccountingentries0"/>
</record>
<record id="process_transition_paymentorderbank0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The payment order is sent to the bank.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierbankstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierpaymentorder0"/>
<field name="target_node_id" ref="process_node_supplierbankstatement0"/>
<field name="source_node_id" ref="process_node_supplierpaymentorder0"/>
</record>
<record id="process_transition_paymentorderreconcilation0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Bank statements are entered in the system.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierbankstatement0"/>
<field name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field name="source_node_id" ref="process_node_supplierbankstatement0"/>
</record>
<record id="process_transition_supplierreconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;System payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice's state turns to “done” (i.e. paid) in the system.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierreconciliation0"/>
<field name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
<field name="source_node_id" ref="process_node_supplierreconciliation0"/>
</record>
</data>

View File

@ -39,7 +39,6 @@ class product_category(osv.osv):
view_load=True,
help="This account will be used for invoices to value expenses."),
}
product_category()
#----------------------------------------------------------
# Products
@ -70,6 +69,5 @@ class product_template(osv.osv):
help="This account will be used for invoices instead of the default one to value expenses for the current product."),
}
product_template()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -11,11 +11,11 @@
<page string="Accounting" groups="account.group_account_invoice">
<group name="properties">
<group>
<field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="account.group_account_user"/>
<field name="property_account_income" domain="[('type','=','other')]" groups="account.group_account_user"/>
<field name="taxes_id" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}" widget="many2many_tags"/>
</group>
<group>
<field name="property_account_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="account.group_account_user"/>
<field name="property_account_expense" domain="[('type','=','other')]" groups="account.group_account_user"/>
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags"/>
</group>
</group>

View File

@ -38,7 +38,6 @@ class account_analytic_journal(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
account_analytic_journal()
class account_journal(osv.osv):
_inherit="account.journal"
@ -47,6 +46,5 @@ class account_journal(osv.osv):
'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal', help="Journal for analytic entries"),
}
account_journal()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -31,7 +31,7 @@
<search string="Analytic Account">
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
<field name="date"/>
<field name="partner_id"/>
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
<field name="manager_id"/>
<field name="parent_id"/>
<field name="user_id"/>
@ -68,6 +68,7 @@
<field name="parent_id" invisible="1"/>
<field name="type"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="template_id" invisible="1"/>
</tree>
</field>
</record>
@ -77,6 +78,7 @@
<field name="name">Analytic Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.account</field>
<field name="context">{}</field> <!-- repair invalid context by setting empty one -->
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_analytic_account_tree"/>

View File

@ -21,7 +21,6 @@
import time
from openerp import pooler
from openerp.report import report_sxw
#

View File

@ -21,7 +21,6 @@
import time
from openerp import pooler
from openerp.report import report_sxw
class account_analytic_cost_ledger(report_sxw.rml_parse):

View File

@ -21,7 +21,6 @@
import time
from openerp import pooler
from openerp.report import report_sxw
class account_inverted_analytic_balance(report_sxw.rml_parse):

View File

@ -20,7 +20,6 @@
##############################################################################
import time
from openerp import pooler
from openerp.report import report_sxw
class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):

View File

@ -52,7 +52,6 @@ class account_analytic_balance(osv.osv_memory):
'datas': datas,
}
account_analytic_balance()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -46,5 +46,4 @@ class account_analytic_chart(osv.osv_memory):
result['context'] = str(result_context)
return result
account_analytic_chart()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -52,5 +52,4 @@ class account_analytic_cost_ledger_journal_report(osv.osv_memory):
'datas': datas,
}
account_analytic_cost_ledger_journal_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -52,5 +52,4 @@ class account_analytic_cost_ledger(osv.osv_memory):
'datas': datas,
}
account_analytic_cost_ledger()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -51,5 +51,4 @@ class account_analytic_inverted_balance(osv.osv_memory):
'datas': datas,
}
account_analytic_inverted_balance()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -71,5 +71,4 @@ class account_analytic_journal_report(osv.osv_memory):
res.update({'analytic_account_journal_id': journal_ids})
return res
account_analytic_journal_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -53,6 +53,5 @@ class project_account_analytic_line(osv.osv_memory):
'search_view_id': id['res_id'],
}
project_account_analytic_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -81,6 +81,5 @@ class analytic_entries_report(osv.osv):
a.move_id,a.product_id,a.product_uom_id
)
""")
analytic_entries_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -81,7 +81,7 @@ class account_entries_report(osv.osv):
period_obj = self.pool.get('account.period')
for arg in args:
if arg[0] == 'period_id' and arg[2] == 'current_period':
current_period = period_obj.find(cr, uid)[0]
current_period = period_obj.find(cr, uid, context=context)[0]
args.append(['period_id','in',[current_period]])
break
elif arg[0] == 'period_id' and arg[2] == 'current_year':
@ -100,7 +100,7 @@ class account_entries_report(osv.osv):
fiscalyear_obj = self.pool.get('account.fiscalyear')
period_obj = self.pool.get('account.period')
if context.get('period', False) == 'current_period':
current_period = period_obj.find(cr, uid)[0]
current_period = period_obj.find(cr, uid, context=context)[0]
domain.append(['period_id','in',[current_period]])
elif context.get('year', False) == 'current_year':
current_year = fiscalyear_obj.find(cr, uid)
@ -152,6 +152,5 @@ class account_entries_report(osv.osv):
where l.state != 'draft'
)
""")
account_entries_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,7 +23,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
##############################################################################

View File

@ -70,6 +70,7 @@ class account_invoice_report(osv.osv):
'categ_id': fields.many2one('product.category','Category of Product', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'commercial_partner_id': fields.many2one('res.partner', 'Partner Company', help="Commercial Entity"),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),
'price_total': fields.float('Total Without Tax', readonly=True),
@ -98,17 +99,18 @@ class account_invoice_report(osv.osv):
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
'residual': fields.float('Total Residual', readonly=True),
'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
'country_id': fields.many2one('res.country', 'Country of the Partner Company'),
}
_order = 'date desc'
def _select(self):
select_str = """
SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id,
SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id, sub.country_id,
sub.payment_term, sub.period_id, sub.uom_name, sub.currency_id, sub.journal_id,
sub.fiscal_position, sub.user_id, sub.company_id, sub.nbr, sub.type, sub.state,
sub.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id,
sub.product_qty, sub.price_total / cr.rate as price_total, sub.price_average /cr.rate as price_average,
cr.rate as currency_rate, sub.residual / cr.rate as residual
cr.rate as currency_rate, sub.residual / cr.rate as residual, sub.commercial_partner_id as commercial_partner_id
"""
return select_str
@ -170,7 +172,9 @@ class account_invoice_report(osv.osv):
LEFT JOIN account_invoice a ON a.id = l.invoice_id
WHERE a.id = ai.id)
ELSE 1::bigint
END::numeric AS residual
END::numeric AS residual,
ai.commercial_partner_id as commercial_partner_id,
partner.country_id
"""
return select_str
@ -178,6 +182,7 @@ class account_invoice_report(osv.osv):
from_str = """
FROM account_invoice_line ail
JOIN account_invoice ai ON ai.id = ail.invoice_id
JOIN res_partner partner ON ai.commercial_partner_id = partner.id
LEFT JOIN product_product pr ON pr.id = ail.product_id
left JOIN product_template pt ON pt.id = pr.product_tmpl_id
LEFT JOIN product_uom u ON u.id = ail.uos_id
@ -193,7 +198,7 @@ class account_invoice_report(osv.osv):
ai.partner_id, ai.payment_term, ai.period_id, u.name, ai.currency_id, ai.journal_id,
ai.fiscal_position, ai.user_id, ai.company_id, ai.type, ai.state, pt.categ_id,
ai.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual,
ai.amount_total, u.uom_type, u.category_id
ai.amount_total, u.uom_type, u.category_id, ai.commercial_partner_id, partner.country_id
"""
return group_by_str
@ -210,13 +215,12 @@ class account_invoice_report(osv.osv):
cr.id IN (SELECT id
FROM res_currency_rate cr2
WHERE (cr2.currency_id = sub.currency_id)
AND ((sub.date IS NOT NULL AND cr.name <= sub.date)
OR (sub.date IS NULL AND cr.name <= NOW()))
AND ((sub.date IS NOT NULL AND cr2.name <= sub.date)
OR (sub.date IS NULL AND cr2.name <= NOW()))
ORDER BY name DESC LIMIT 1)
)""" % (
self._table,
self._select(), self._sub_select(), self._from(), self._group_by()))
account_invoice_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -14,6 +14,8 @@
<field name="type" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="commercial_partner_id" invisible="1"/>
<field name="country_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
<field name="categ_id" invisible="1"/>
@ -65,7 +67,9 @@
<field name="user_id" />
<field name="categ_id" filter_domain="[('categ_id', 'child_of', self)]"/>
<group expand="1" string="Group By...">
<filter string="Partner" name="partner" icon="terp-partner" context="{'group_by':'partner_id','residual_visible':True}"/>
<filter string="Partner" name="partner_id" context="{'group_by':'partner_id','residual_visible':True}"/>
<filter string="Commercial Partner" name="commercial_partner_id" context="{'group_by':'commercial_partner_id','residual_visible':True}"/>
<filter string="Commercial Partner's Country" name="country_id" context="{'group_by':'country_id'}"/>
<filter string="Salesperson" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Due Date" icon="terp-go-today" context="{'group_by':'date_due'}"/>
<filter string="Period" icon="terp-go-month" context="{'group_by':'period_id'}" name="period"/>

View File

@ -99,42 +99,39 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Footer" fontName="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Table" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0" fontName="Helvetica"/>
<paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard"/>
<paraStyle name="Text body" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index"/>
<paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Footer"/>
<paraStyle name="Horizontal Line" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
<paraStyle name="Table" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0"/>
<paraStyle name="Preformatted Text" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
@ -144,12 +141,12 @@
<pto_header><!-- Must be after setLang() -->
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
<tr>
<td> <para style="terp_tblheader_Details">Description</para> </td>
<td> <para style="terp_tblheader_Details_Centre">Taxes</para> </td>
<td> <para style="terp_tblheader_Details_Centre">Quantity</para> </td>
<td> <para style="terp_tblheader_Details_Right">Unit Price </para> </td>
<td> <para style="terp_tblheader_Details_Right">Disc.(%)</para> </td>
<td> <para style="terp_tblheader_Details_Right">Price</para> </td>
<td><para style="terp_tblheader_Details"><b>Description</b></para></td>
<td><para style="terp_tblheader_Details_Centre"><b>Taxes</b></para></td>
<td><para style="terp_tblheader_Details_Centre"><b>Quantity</b></para></td>
<td><para style="terp_tblheader_Details_Right"><b>Unit Price</b></para></td>
<td><para style="terp_tblheader_Details_Right"><b>Disc.(%)</b></para></td>
<td><para style="terp_tblheader_Details_Right"><b>Price</b></para></td>
</tr>
</blockTable>
</pto_header>
@ -168,33 +165,33 @@
</para>
<para style="terp_default_8">Tel. : [[ (o.partner_id.phone) or removeParentNode('para') ]]</para>
<para style="terp_default_8">Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]]</para>
<para style="terp_default_8">VAT : [[ (o.partner_id.vat) or removeParentNode('para') ]]</para>
<para style="terp_default_8">TIN : [[ (o.partner_id.vat) or removeParentNode('para') ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
<para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header"><b>Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_header"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para>
<para style="terp_header"><b>Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para>
<para style="terp_header"><b>Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_header"><b>Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_header"><b>Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_header"><b>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Description</para>
<para style="terp_tblheader_General_Centre"><b>Description</b></para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Invoice Date</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Source</para>
<para style="terp_tblheader_General_Centre"><b>Invoice Date</b></para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Customer Code</para>
<para style="terp_tblheader_General_Centre"><b>Source</b></para>
</td>
<td>
<para style="terp_tblheader_General_Centre"><b>Customer Code</b></para>
</td>
</tr>
</blockTable>
@ -220,22 +217,22 @@
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
<tr>
<td>
<para style="terp_tblheader_General">Description</para>
<para style="terp_tblheader_General"><b>Description</b></para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Taxes</para>
<para style="terp_tblheader_General_Centre"><b>Taxes</b></para>
</td>
<td>
<para style="terp_tblheader_General_Right">Quantity</para>
<para style="terp_tblheader_General_Right"><b>Quantity</b></para>
</td>
<td>
<para style="terp_tblheader_General_Right">Unit Price</para>
<para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
</td>
<td>
<para style="terp_tblheader_General_Right">Disc.(%)</para>
<para style="terp_tblheader_General_Right"><b>Disc.(%)</b></para>
</td>
<td>
<para style="terp_tblheader_General_Right">Price</para>
<para style="terp_tblheader_General_Right"><b>Price</b></para>
</td>
</tr>
</blockTable>
@ -298,10 +295,10 @@
</para>
</td>
<td>
<para style="terp_tblheader_Details">Total:</para>
<para style="terp_tblheader_Details"><b>Total:</b></para>
</td>
<td>
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
<para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>
</td>
</tr>
</blockTable>
@ -311,13 +308,13 @@
<blockTable colWidths="205.0,71.0,71.0,183.0" style="Table9">
<tr>
<td>
<para style="terp_tblheader_Details">Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</para>
<para style="terp_tblheader_Details"><b>Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</b></para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Base </para>
<para style="terp_tblheader_Details_Right"><b>Base </b></para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Amount </para>
<para style="terp_tblheader_Details_Right"><b>Amount </b></para>
</td>
<td>
<para style="terp_default_8">
@ -361,7 +358,7 @@
<blockTable colWidths="120.0,410.0" style="Table1">
<tr>
<td>
<para style="terp_default_Bold_9">Fiscal Position Remark : </para>
<para style="terp_default_Bold_9"><b>Fiscal Position Remark : </b></para>
</td>
<td>
<para style="terp_default_9">[[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>

View File

@ -22,7 +22,6 @@
import time
from openerp.report import report_sxw
from openerp import pooler
class Overdue(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
@ -38,7 +37,7 @@ class Overdue(report_sxw.rml_parse):
def _tel_get(self,partner):
if not partner:
return False
res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
res_partner = self.pool['res.partner']
addresses = res_partner.address_get(self.cr, self.uid, [partner.id], ['invoice'])
adr_id = addresses and addresses['invoice'] or False
if adr_id:
@ -49,7 +48,7 @@ class Overdue(report_sxw.rml_parse):
return False
def _lines_get(self, partner):
moveline_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
moveline_obj = self.pool['account.move.line']
movelines = moveline_obj.search(self.cr, self.uid,
[('partner_id', '=', partner.id),
('account_id.type', 'in', ['receivable', 'payable']),
@ -58,13 +57,10 @@ class Overdue(report_sxw.rml_parse):
return movelines
def _message(self, obj, company):
company_pool = pooler.get_pool(self.cr.dbname).get('res.company')
company_pool = self.pool['res.company']
message = company_pool.browse(self.cr, self.uid, company.id, {'lang':obj.lang}).overdue_msg
return message.split('\n')
report_sxw.report_sxw('report.account.overdue', 'res.partner',
'addons/account/report/account_print_overdue.rml', parser=Overdue)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,7 +23,6 @@ import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
from openerp import pooler
from openerp import tools
from openerp.osv import fields,osv
@ -67,7 +66,6 @@ class report_account_receivable(osv.osv):
group by
to_char(date,'YYYY:IW'), a.type
)""")
report_account_receivable()
#a.type in ('receivable','payable')
class temp_range(osv.osv):
@ -78,7 +76,6 @@ class temp_range(osv.osv):
'name': fields.char('Range',size=64)
}
temp_range()
class report_aged_receivable(osv.osv):
_name = "report.aged.receivable"
@ -123,7 +120,7 @@ class report_aged_receivable(osv.osv):
""" This view will be used in dashboard
The reason writing this code here is, we need to check date range from today to first date of fiscal year.
"""
pool_obj_fy = pooler.get_pool(cr.dbname).get('account.fiscalyear')
pool_obj_fy = self.pool['account.fiscalyear']
today = time.strftime('%Y-%m-%d')
fy_id = pool_obj_fy.find(cr, uid, exception=False)
LIST_RANGES = []
@ -141,14 +138,13 @@ class report_aged_receivable(osv.osv):
cr.execute('delete from temp_range')
for range in LIST_RANGES:
pooler.get_pool(cr.dbname).get('temp.range').create(cr, uid, {'name':range})
self.pool['temp.range'].create(cr, uid, {'name':range})
cr.execute("""
create or replace view report_aged_receivable as (
select id,name from temp_range
)""")
report_aged_receivable()
class report_invoice_created(osv.osv):
_name = "report.invoice.created"
@ -201,7 +197,6 @@ class report_invoice_created(osv.osv):
AND
(to_date(to_char(inv.create_date, 'YYYY-MM-dd'),'YYYY-MM-dd') > (CURRENT_DATE-15))
)""")
report_invoice_created()
class report_account_type_sales(osv.osv):
_name = "report.account_type.sales"
@ -242,7 +237,6 @@ class report_account_type_sales(osv.osv):
group by
to_char(inv.date_invoice, 'YYYY'),to_char(inv.date_invoice,'MM'),inv.currency_id, inv.period_id, inv_line.product_id, account.user_type
)""")
report_account_type_sales()
class report_account_sales(osv.osv):
@ -284,6 +278,5 @@ class report_account_sales(osv.osv):
group by
to_char(inv.date_invoice, 'YYYY'),to_char(inv.date_invoice,'MM'),inv.currency_id, inv.period_id, inv_line.product_id, account.id
)""")
report_account_sales()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -78,6 +78,5 @@ class account_treasury_report(osv.osv):
group by p.id, p.fiscalyear_id, p.date_start, am.company_id
)
""")
account_treasury_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -19,9 +19,9 @@
#
##############################################################################
from openerp import pooler
from openerp.tools.translate import _
# Mixin to use with rml_parse, so self.pool will be defined.
class common_report_header(object):
def _sum_debit(self, period_id=False, journal_id=False):
@ -75,17 +75,17 @@ class common_report_header(object):
def get_start_period(self, data):
if data.get('form', False) and data['form'].get('period_from', False):
return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,data['form']['period_from']).name
return self.pool.get('account.period').browse(self.cr,self.uid,data['form']['period_from']).name
return ''
def get_end_period(self, data):
if data.get('form', False) and data['form'].get('period_to', False):
return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr, self.uid, data['form']['period_to']).name
return self.pool.get('account.period').browse(self.cr, self.uid, data['form']['period_to']).name
return ''
def _get_account(self, data):
if data.get('form', False) and data['form'].get('chart_account_id', False):
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).name
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).name
return ''
def _get_sortby(self, data):
@ -120,12 +120,12 @@ class common_report_header(object):
def _get_fiscalyear(self, data):
if data.get('form', False) and data['form'].get('fiscalyear_id', False):
return pooler.get_pool(self.cr.dbname).get('account.fiscalyear').browse(self.cr, self.uid, data['form']['fiscalyear_id']).name
return self.pool.get('account.fiscalyear').browse(self.cr, self.uid, data['form']['fiscalyear_id']).name
return ''
def _get_company(self, data):
if data.get('form', False) and data['form'].get('chart_account_id', False):
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.name
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.name
return ''
def _get_journal(self, data):
@ -137,7 +137,7 @@ class common_report_header(object):
def _get_currency(self, data):
if data.get('form', False) and data['form'].get('chart_account_id', False):
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.symbol
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.symbol
return ''
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -25,6 +25,7 @@ from dateutil.relativedelta import relativedelta
from operator import itemgetter
from os.path import join as opj
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT as DF
from openerp.tools.translate import _
from openerp.osv import fields, osv
from openerp import tools
@ -132,12 +133,43 @@ class account_config_settings(osv.osv_memory):
count = self.pool.get('res.company').search_count(cr, uid, [], context=context)
return bool(count == 1)
def _get_default_fiscalyear_data(self, cr, uid, company_id, context=None):
"""Compute default period, starting and ending date for fiscalyear
- if in a fiscal year, use its period, starting and ending date
- if past fiscal year, use its period, and new dates [ending date of the latest +1 day ; ending date of the latest +1 year]
- if no fiscal year, use monthly, 1st jan, 31th dec of this year
:return: (date_start, date_stop, period) at format DEFAULT_SERVER_DATETIME_FORMAT
"""
fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid,
[('date_start', '<=', time.strftime(DF)), ('date_stop', '>=', time.strftime(DF)),
('company_id', '=', company_id)])
if fiscalyear_ids:
# is in a current fiscal year, use this one
fiscalyear = self.pool.get('account.fiscalyear').browse(cr, uid, fiscalyear_ids[0], context=context)
if len(fiscalyear.period_ids) == 5: # 4 periods of 3 months + opening period
period = '3months'
else:
period = 'month'
return (fiscalyear.date_start, fiscalyear.date_stop, period)
else:
past_fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid,
[('date_stop', '<=', time.strftime(DF)), ('company_id', '=', company_id)])
if past_fiscalyear_ids:
# use the latest fiscal, sorted by (start_date, id)
latest_year = self.pool.get('account.fiscalyear').browse(cr, uid, past_fiscalyear_ids[-1], context=context)
latest_stop = datetime.datetime.strptime(latest_year.date_stop, DF)
if len(latest_year.period_ids) == 5:
period = '3months'
else:
period = 'month'
return ((latest_stop+datetime.timedelta(days=1)).strftime(DF), latest_stop.replace(year=latest_stop.year+1).strftime(DF), period)
else:
return (time.strftime('%Y-01-01'), time.strftime('%Y-12-31'), 'month')
_defaults = {
'company_id': _default_company,
'has_default_company': _default_has_default_company,
'date_start': lambda *a: time.strftime('%Y-01-01'),
'date_stop': lambda *a: time.strftime('%Y-12-31'),
'period': 'month',
}
def create(self, cr, uid, values, context=None):
@ -161,6 +193,7 @@ class account_config_settings(osv.osv_memory):
fiscalyear_count = self.pool.get('account.fiscalyear').search_count(cr, uid,
[('date_start', '<=', time.strftime('%Y-%m-%d')), ('date_stop', '>=', time.strftime('%Y-%m-%d')),
('company_id', '=', company_id)])
date_start, date_stop, period = self._get_default_fiscalyear_data(cr, uid, company_id, context=context)
values = {
'expects_chart_of_accounts': company.expects_chart_of_accounts,
'currency_id': company.currency_id.id,
@ -170,6 +203,9 @@ class account_config_settings(osv.osv_memory):
'has_fiscal_year': bool(fiscalyear_count),
'chart_template_id': False,
'tax_calculation_rounding_method': company.tax_calculation_rounding_method,
'date_start': date_start,
'date_stop': date_stop,
'period': period,
}
# update journals and sequences
for journal_type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
@ -302,4 +338,10 @@ class account_config_settings(osv.osv_memory):
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
dp.write({'digits': config.decimal_precision})
def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):
if analytic_accounting:
return {'value': {
'module_account_accountant': True,
}}
return {}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -130,7 +130,7 @@
<label for="module_account_accountant"/>
</div>
<div>
<field name="group_analytic_accounting" class="oe_inline"/>
<field name="group_analytic_accounting" class="oe_inline" on_change="onchange_analytic_accounting(group_analytic_accounting, context)"/>
<label for="group_analytic_accounting"/>
</div>
<div>

View File

@ -43,6 +43,5 @@ class res_currency_account(osv.osv):
rate = float(tot2)/float(tot1)
return rate
res_currency_account()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -26,7 +26,7 @@ openerp.account = function (instance) {
if (this.partners) {
this.$el.prepend(QWeb.render("AccountReconciliation", {widget: this}));
this.$(".oe_account_recon_previous").click(function() {
self.current_partner = (self.current_partner - 1) % self.partners.length;
self.current_partner = (((self.current_partner - 1) % self.partners.length) + self.partners.length) % self.partners.length;
self.search_by_partner();
});
this.$(".oe_account_recon_next").click(function() {

View File

@ -22,13 +22,13 @@
<button class="oe_account_recon_next oe_button" href="javascript:void(0)">&gt;</button>
</div>
<div>
Last Reconciliation: <t t-esc="widget.last_reconciliation_date" />
Latest Manual Reconciliation Processed: <t t-esc="widget.last_reconciliation_date" />
</div>
</div>
<div>
<button class="oe_account_recon_reconcile oe_button oe_highlight" href="javascript:void(0)"
disabled="">Reconcile</button>
<button class="oe_account_recom_mark_as_reconciled oe_button" href="javascript:void(0)">Nothing to reconcile</button>
<button class="oe_account_recom_mark_as_reconciled oe_button" href="javascript:void(0)">Nothing more to reconcile</button>
</div>
</t>
</div>

View File

@ -7,7 +7,7 @@
import time
journal = self._default_journal_id(cr, uid, {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu',
'journal_type': 'bank', 'period_id': time.strftime('%m'), 'active_ids': [ref('menu_bank_statement_tree')], 'active_id': ref('menu_bank_statement_tree')})
assert journal, _('Journal has not been selected')
assert journal, 'Journal has not been selected'
-
I create a bank statement with Opening and Closing balance 0.
-

View File

@ -14,8 +14,9 @@
-
!python {model: account.invoice}: |
import os
from openerp import netsvc, tools
(data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.account_invoice_customer0')], {}, {})
import openerp.report
from openerp import tools
data, format = openerp.report.render_report(cr, uid, [ref('account.account_invoice_customer0')], 'account.invoice', {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data)
@ -24,8 +25,9 @@
-
!python {model: res.partner}: |
import os
from openerp import netsvc, tools
(data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_1'),ref('base.res_partner_2'),ref('base.res_partner_12')], {}, {})
import openerp.report
from openerp import tools
data, format = openerp.report.render_report(cr, uid, [ref('base.res_partner_1'),ref('base.res_partner_2'),ref('base.res_partner_12')], 'account.overdue', {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data)
-

View File

@ -41,7 +41,7 @@
ids = self.search(cr, uid, [('ref', '=', 'My Test Model')])
self.button_validate(cr, uid, ids, {})
moves = self.browse(cr, uid, ids)[0]
assert(moves.state == 'posted'), _('Journal Entries are not in posted state')
assert(moves.state == 'posted'), 'Journal Entries are not in posted state'
-
Then I create Recurring Lines
-
@ -57,7 +57,7 @@
self.compute(cr, uid, [ref('test_recurring_lines')], {'lang': u'en_US', 'active_model': 'ir.ui.menu',
'active_ids': [ref('menu_action_subscription_form')], 'tz': False, 'active_id': ref('menu_action_subscription_form')})
subscription_lines = subscription_line_obj.search(cr, uid, [('subscription_id', '=', ref('test_recurring_lines'))])
assert subscription_lines, _('Subscription lines has not been created')
assert subscription_lines, 'Subscription lines has not been created'
-
I provide date in 'Generate Entries' wizard
-
@ -69,5 +69,5 @@
!python {model: account.subscription.generate}: |
res = self.action_generate(cr, uid, [ref('account_subscription_generate')], {'lang': u'en_US', 'active_model': 'ir.ui.menu',
'active_ids': [ref('menu_generate_subscription')], 'tz': False, 'active_id': ref('menu_generate_subscription')})
assert res, _('Move for subscription lines has not been created')
assert res, 'Move for subscription lines has not been created'

View File

@ -246,6 +246,5 @@ class account_automatic_reconcile(osv.osv_memory):
'context': context,
}
account_automatic_reconcile()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -73,6 +73,5 @@ class account_change_currency(osv.osv_memory):
obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context)
return {'type': 'ir.actions.act_window_close'}
account_change_currency()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -105,6 +105,5 @@ class account_chart(osv.osv_memory):
'fiscalyear': _get_fiscalyear,
}
account_chart()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -93,6 +93,5 @@ class accounting_report(osv.osv_memory):
'datas': data,
}
accounting_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -278,6 +278,5 @@ class account_fiscalyear_close(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
account_fiscalyear_close()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -56,6 +56,5 @@ class account_fiscalyear_close_state(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
account_fiscalyear_close_state()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -181,9 +181,9 @@ class account_invoice_refund(osv.osv_memory):
invoice = invoice[0]
del invoice['id']
invoice_lines = inv_line_obj.browse(cr, uid, invoice['invoice_line'], context=context)
invoice_lines = inv_obj._refund_cleanup_lines(cr, uid, invoice_lines)
invoice_lines = inv_obj._refund_cleanup_lines(cr, uid, invoice_lines, context=context)
tax_lines = inv_tax_obj.browse(cr, uid, invoice['tax_line'], context=context)
tax_lines = inv_obj._refund_cleanup_lines(cr, uid, tax_lines)
tax_lines = inv_obj._refund_cleanup_lines(cr, uid, tax_lines, context=context)
invoice.update({
'type': inv.type,
'date_invoice': date,
@ -220,6 +220,5 @@ class account_invoice_refund(osv.osv_memory):
return self.compute_refund(cr, uid, ids, data_refund, context=context)
account_invoice_refund()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,7 +21,6 @@
from openerp.osv import osv
from openerp.tools.translate import _
from openerp import pooler
class account_invoice_confirm(osv.osv_memory):
"""
@ -34,8 +33,7 @@ class account_invoice_confirm(osv.osv_memory):
def invoice_confirm(self, cr, uid, ids, context=None):
if context is None:
context = {}
pool_obj = pooler.get_pool(cr.dbname)
account_invoice_obj = pool_obj.get('account.invoice')
account_invoice_obj = self.pool['account.invoice']
data_inv = account_invoice_obj.read(cr, uid, context['active_ids'], ['state'], context=context)
for record in data_inv:
if record['state'] not in ('draft','proforma','proforma2'):
@ -44,7 +42,6 @@ class account_invoice_confirm(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
account_invoice_confirm()
class account_invoice_cancel(osv.osv_memory):
"""
@ -58,8 +55,7 @@ class account_invoice_cancel(osv.osv_memory):
def invoice_cancel(self, cr, uid, ids, context=None):
if context is None:
context = {}
pool_obj = pooler.get_pool(cr.dbname)
account_invoice_obj = pool_obj.get('account.invoice')
account_invoice_obj = self.pool['account.invoice']
data_inv = account_invoice_obj.read(cr, uid, context['active_ids'], ['state'], context=context)
for record in data_inv:
if record['state'] in ('cancel','paid'):
@ -67,6 +63,5 @@ class account_invoice_cancel(osv.osv_memory):
account_invoice_obj.signal_invoice_cancel(cr , uid, [record['id']])
return {'type': 'ir.actions.act_window_close'}
account_invoice_cancel()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -45,6 +45,5 @@ class account_journal_select(osv.osv_memory):
result['context'] = str({'journal_id': journal_id, 'period_id': period_id})
return result
account_journal_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -59,6 +59,5 @@ the bank account\nin the journal definition for reconciliation.'))
'type': 'ir.actions.act_window'
}
account_move_bank_reconcile()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,6 +50,5 @@ class account_move_line_reconcile_select(osv.osv_memory):
'type': 'ir.actions.act_window'
}
account_move_line_reconcile_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -67,6 +67,5 @@ class account_move_line_select(osv.osv_memory):
result['domain']=result['domain'][0:-1]+','+domain+result['domain'][-1]
return result
account_move_line_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -39,6 +39,5 @@ class account_move_line_unreconcile_select(osv.osv_memory):
'type': 'ir.actions.act_window'
}
account_move_line_unreconcile_select()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -43,6 +43,5 @@ class account_open_closed_fiscalyear(osv.osv_memory):
cr.execute('delete from account_move where id IN %s', (tuple(ids_move),))
return {'type': 'ir.actions.act_window_close'}
account_open_closed_fiscalyear()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -55,6 +55,5 @@ class account_period_close(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
account_period_close()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -91,7 +91,6 @@ class account_move_line_reconcile(osv.osv_memory):
period_id, journal_id, context=context)
return {'type': 'ir.actions.act_window_close'}
account_move_line_reconcile()
class account_move_line_reconcile_writeoff(osv.osv_memory):
"""
@ -149,7 +148,6 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
context['analytic_id'] = data['analytic_id'][0]
if context['date_p']:
date = context['date_p']
ids = period_obj.find(cr, uid, dt=date, context=context)
if ids:
period_id = ids[0]
@ -158,6 +156,5 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
period_id, journal_id, context=context)
return {'type': 'ir.actions.act_window_close'}
account_move_line_reconcile_writeoff()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -98,6 +98,5 @@ class account_partner_reconcile_process(osv.osv_memory):
'next_partner_id': _get_partner,
}
account_partner_reconcile_process()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,6 +38,5 @@ class account_balance_report(osv.osv_memory):
data = self.pre_print_report(cr, uid, ids, data, context=context)
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data}
account_balance_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -86,6 +86,5 @@ class account_aged_trial_balance(osv.osv_memory):
'datas': data
}
account_aged_trial_balance()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,7 +38,6 @@ class account_central_journal(osv.osv_memory):
'datas': data,
}
account_central_journal()
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -178,6 +178,5 @@ class account_common_report(osv.osv_memory):
data['form']['used_context'] = used_context
return self._print_report(cr, uid, ids, data, context=context)
account_common_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -41,7 +41,6 @@ class account_common_account_report(osv.osv_memory):
data['form'].update(self.read(cr, uid, ids, ['display_account'], context=context)[0])
return data
account_common_account_report()
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,6 +50,5 @@ class account_common_journal_report(osv.osv_memory):
data['form']['active_ids'] = self.pool.get('account.journal.period').search(cr, uid, [('journal_id', 'in', data['form']['journal_ids']), ('period_id', 'in', period_list)], context=context)
return data
account_common_journal_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -42,7 +42,6 @@ class account_common_partner_report(osv.osv_memory):
data['form'].update(self.read(cr, uid, ids, ['result_selection'], context=context)[0])
return data
account_common_partner_report()
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -34,7 +34,6 @@ class account_general_journal(osv.osv_memory):
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()
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -58,6 +58,5 @@ class account_report_general_ledger(osv.osv_memory):
return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger_landscape', 'datas': data}
return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger', 'datas': data}
account_report_general_ledger()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -50,6 +50,5 @@ class account_partner_balance(osv.osv_memory):
'datas': data,
}
account_partner_balance()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -67,6 +67,5 @@ class account_partner_ledger(osv.osv_memory):
'datas': data,
}
account_partner_ledger()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

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