[MERGE] MErged lp:openobject-addons.

bzr revid: psa@tinyerp.com-20130524114959-s2pnc203w93ybzfv
This commit is contained in:
Paramjit Singh Sahota 2013-05-24 17:19:59 +05:30
commit 05432c1565
1058 changed files with 94147 additions and 13726 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"
@ -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,7 +1009,7 @@ 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:
@ -1026,6 +1020,9 @@ class account_period(osv.osv):
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
@ -1067,7 +1064,6 @@ class account_period(osv.osv):
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)])
account_period()
class account_journal_period(osv.osv):
_name = "account.journal.period"
@ -1124,7 +1120,6 @@ class account_journal_period(osv.osv):
}
_order = "period_id"
account_journal_period()
class account_fiscalyear(osv.osv):
_inherit = "account.fiscalyear"
@ -1141,7 +1136,6 @@ class account_fiscalyear(osv.osv):
})
return super(account_fiscalyear, self).copy(cr, uid, id, default=default, context=context)
account_fiscalyear()
#----------------------------------------------------------
# Entries
#----------------------------------------------------------
@ -1219,7 +1213,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 +1374,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 +1411,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 +1633,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 +1670,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 +1706,6 @@ class account_move_reconcile(osv.osv):
result.append((r.id,r.name))
return result
account_move_reconcile()
#----------------------------------------------------------
# Tax
@ -1791,7 +1785,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 +1853,6 @@ class account_tax_code(osv.osv):
]
_order = 'code'
account_tax_code()
class account_tax(osv.osv):
"""
@ -1883,7 +1876,7 @@ class account_tax(osv.osv):
def get_precision_tax():
def change_digit_tax(cr):
res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, SUPERUSER_ID, 'Account')
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
return (16, res+2)
return change_digit_tax
@ -2267,7 +2260,6 @@ class account_tax(osv.osv):
total += r['amount']
return res
account_tax()
# ---------------------------------------------------------
# Account Entries Models
@ -2379,7 +2371,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 +2394,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 +2467,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 +2495,6 @@ class account_subscription_line(osv.osv):
_rec_name = 'date'
account_subscription_line()
# ---------------------------------------------------------------
# Account Templates: Account, Tax, Tax Code and chart. + Wizard
@ -2514,7 +2502,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 +2629,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 +2682,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 +2753,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 +2785,6 @@ class account_chart_template(osv.osv):
'complete_tax_set': True,
}
account_chart_template()
class account_tax_template(osv.osv):
@ -2931,7 +2914,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 +2961,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 +2973,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 +2984,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 +3376,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 +3523,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 +3534,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
@ -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):
@ -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 _
@ -287,7 +286,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,
@ -314,7 +316,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'
@ -368,18 +370,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
@ -422,6 +412,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',
@ -644,6 +635,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
#################
@ -731,7 +742,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:
@ -778,6 +789,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)
@ -791,7 +803,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:
@ -878,7 +890,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)
@ -994,11 +1006,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
@ -1274,9 +1286,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,
@ -1529,8 +1539,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:
@ -1596,7 +1605,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"
@ -1675,8 +1683,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={}
@ -1747,15 +1754,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"/>
@ -320,7 +321,8 @@
<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}'/>
options='{"always_reload": True}'
domain="[('customer', '=', True)]"/>
<field name="fiscal_position" widget="selection" />
</group>
<group>
@ -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

@ -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
@ -742,7 +737,7 @@ 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, MAX(l.date) AS max_date
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)
@ -753,9 +748,14 @@ class account_move_line(osv.osv):
) AS s
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')
@ -980,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]
@ -1303,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

@ -1112,7 +1112,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 +1194,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 +1293,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 +1357,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 +1776,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 +2111,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:

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,206 @@
<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>
<span class="oe_demo_play">&nbsp;</span>
<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">
<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"

View File

@ -7,14 +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: 2013-01-30 03:58+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"PO-Revision-Date: 2013-04-25 09:04+0000\n"
"Last-Translator: Oliver Yuan <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:20+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-04-26 05:34+0000\n"
"X-Generator: Launchpad (build 16580)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@ -10748,7 +10748,7 @@ msgstr "手动的发票税(非主营业务纳税)"
#: code:addons/account/account_invoice.py:550
#, python-format
msgid "The payment term of supplier does not have a payment term line."
msgstr ""
msgstr "供应商付款条件没有包含付款条件行"
#. module: account
#: field:account.account,parent_right:0

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."))
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'
@ -236,6 +233,10 @@ class res_partner(osv.osv):
'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/Analytic Accounts" 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

@ -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

@ -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"/>
@ -77,6 +77,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

@ -168,7 +168,7 @@
</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>

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'):

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

@ -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

@ -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:

View File

@ -72,7 +72,6 @@ class account_print_journal(osv.osv_memory):
report_name = 'account.journal.period.print'
return {'type': 'ir.actions.report.xml', 'report_name': report_name, 'datas': data}
account_print_journal()
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -20,7 +20,6 @@
##############################################################################
from openerp.osv import osv
from openerp import netsvc
from openerp.tools.translate import _
class account_state_open(osv.osv_memory):
@ -38,6 +37,5 @@ class account_state_open(osv.osv_memory):
obj_invoice.signal_open_test(cr, uid, context['active_ids'][0])
return {'type': 'ir.actions.act_window_close'}
account_state_open()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -48,6 +48,5 @@ class account_subscription_generate(osv.osv_memory):
result['domain'] = str([('id','in',moves_created)])
return result
account_subscription_generate()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,7 +38,7 @@ class account_tax_chart(osv.osv_memory):
def _get_period(self, cr, uid, context=None):
"""Return default period value"""
period_ids = self.pool.get('account.period').find(cr, uid)
period_ids = self.pool.get('account.period').find(cr, uid, context=context)
return period_ids and period_ids[0] or False
def account_tax_chart_open_window(self, cr, uid, ids, context=None):
@ -73,6 +73,5 @@ class account_tax_chart(osv.osv_memory):
'target_move': 'posted'
}
account_tax_chart()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -33,7 +33,6 @@ class account_unreconcile(osv.osv_memory):
obj_move_line._remove_move_reconcile(cr, uid, context['active_ids'], context=context)
return {'type': 'ir.actions.act_window_close'}
account_unreconcile()
class account_unreconcile_reconcile(osv.osv_memory):
_name = "account.unreconcile.reconcile"
@ -48,6 +47,5 @@ class account_unreconcile_reconcile(osv.osv_memory):
obj_move_reconcile.unlink(cr, uid, rec_ids, context=context)
return {'type': 'ir.actions.act_window_close'}
account_unreconcile_reconcile()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

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

View File

@ -40,7 +40,6 @@ class validate_account_move(osv.osv_memory):
obj_move.button_validate(cr, uid, ids_move, context=context)
return {'type': 'ir.actions.act_window_close'}
validate_account_move()
class validate_account_move_lines(osv.osv_memory):
_name = "validate.account.move.lines"
@ -61,7 +60,6 @@ class validate_account_move_lines(osv.osv_memory):
raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.'))
obj_move.button_validate(cr, uid, move_ids, context)
return {'type': 'ir.actions.act_window_close'}
validate_account_move_lines()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

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

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python
from openerp.osv import fields, osv
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
@ -21,7 +20,7 @@ class CashBox(osv.osv_memory):
active_model = context.get('active_model', False) or False
active_ids = context.get('active_ids', []) or []
records = self.pool.get(active_model).browse(cr, uid, active_ids, context=context)
records = self.pool[active_model].browse(cr, uid, active_ids, context=context)
return self._run(cr, uid, ids, records, context=None)
@ -63,11 +62,12 @@ class CashBoxIn(CashBox):
'name' : box.name,
}
CashBoxIn()
class CashBoxOut(CashBox):
_name = 'cash.box.out'
_columns = CashBox._columns.copy()
def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):
amount = box.amount or 0.0
return {
@ -78,4 +78,3 @@ class CashBoxOut(CashBox):
'name' : box.name,
}
CashBoxOut()

View File

@ -259,17 +259,14 @@ class account_analytic_account(osv.osv):
return res
if child_ids:
cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount), 0.0) \
FROM account_analytic_line \
JOIN account_analytic_journal \
ON account_analytic_line.journal_id = account_analytic_journal.id \
WHERE account_analytic_line.account_id IN %s \
AND account_analytic_journal.type = 'sale' \
GROUP BY account_analytic_line.account_id", (child_ids,))
for account_id, sum in cr.fetchall():
res[account_id] = round(sum,2)
#Search all invoice lines not in cancelled state that refer to this analytic account
inv_line_obj = self.pool.get("account.invoice.line")
inv_lines = inv_line_obj.search(cr, uid, ['&', ('account_analytic_id', 'in', child_ids), ('invoice_id.state', '!=', 'cancel')], context=context)
for line in inv_line_obj.browse(cr, uid, inv_lines, context=context):
res[line.account_analytic_id.id] += line.price_subtotal
for acc in self.browse(cr, uid, res.keys(), context=context):
res[acc.id] = res[acc.id] - (acc.timesheet_ca_invoiced or 0.0)
res_final = res
return res_final
@ -352,11 +349,10 @@ class account_analytic_account(osv.osv):
res[account.id] = 0.0
sale_ids = sale_obj.search(cr, uid, [('project_id','=', account.id), ('state', '=', 'manual')], context=context)
for sale in sale_obj.browse(cr, uid, sale_ids, context=context):
if not sale.invoiced:
res[account.id] += sale.amount_untaxed
for invoice in sale.invoice_ids:
if invoice.state not in ('draft', 'cancel'):
res[account.id] -= invoice.amount_untaxed
res[account.id] += sale.amount_untaxed
for invoice in sale.invoice_ids:
if invoice.state != 'cancel':
res[account.id] -= invoice.amount_untaxed
return res
def _timesheet_ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None):
@ -634,6 +630,21 @@ class account_analytic_account(osv.osv):
pass
return result
def hr_to_invoice_timesheets(self, cr, uid, ids, context=None):
domain = [('invoice_id','=',False),('to_invoice','!=',False), ('journal_id.type', '=', 'general'), ('account_id', 'in', ids)]
names = [record.name for record in self.browse(cr, uid, ids, context=context)]
name = _('Timesheets to Invoice of %s') % ','.join(names)
return {
'type': 'ir.actions.act_window',
'name': name,
'view_type': 'form',
'view_mode': 'tree,form',
'domain' : domain,
'res_model': 'account.analytic.line',
'nodestroy': True,
}
def _prepare_invoice(self, cr, uid, contract, context=None):
context = context or {}

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