[MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130606135313-u3mbe1a8yeussnck
|
@ -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',
|
'project/wizard/project_account_analytic_line_view.xml',
|
||||||
'account_end_fy.xml',
|
'account_end_fy.xml',
|
||||||
'account_invoice_view.xml',
|
'account_invoice_view.xml',
|
||||||
'partner_view.xml',
|
|
||||||
'data/account_data.xml',
|
'data/account_data.xml',
|
||||||
'data/data_account_type.xml',
|
'data/data_account_type.xml',
|
||||||
'data/configurable_account_chart.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_journal_report_view.xml',
|
||||||
'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
|
'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
|
||||||
'project/wizard/account_analytic_chart_view.xml',
|
'project/wizard/account_analytic_chart_view.xml',
|
||||||
|
'partner_view.xml',
|
||||||
'product_view.xml',
|
'product_view.xml',
|
||||||
'account_assert_test.xml',
|
'account_assert_test.xml',
|
||||||
'process/statement_process.xml',
|
'process/statement_process.xml',
|
||||||
|
|
|
@ -1034,9 +1034,15 @@ class account_period(osv.osv):
|
||||||
context = {}
|
context = {}
|
||||||
ids = []
|
ids = []
|
||||||
if name:
|
if name:
|
||||||
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
|
ids = self.search(cr, user,
|
||||||
|
[('code', 'ilike', name)] + args,
|
||||||
|
limit=limit,
|
||||||
|
context=context)
|
||||||
if not ids:
|
if not ids:
|
||||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
|
ids = self.search(cr, user,
|
||||||
|
[('name', operator, name)] + args,
|
||||||
|
limit=limit,
|
||||||
|
context=context)
|
||||||
return self.name_get(cr, user, ids, context=context)
|
return self.name_get(cr, user, ids, context=context)
|
||||||
|
|
||||||
def write(self, cr, uid, ids, vals, context=None):
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
|
@ -1059,10 +1065,14 @@ class account_period(osv.osv):
|
||||||
raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.'))
|
raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.'))
|
||||||
if period_date_start > period_date_stop:
|
if period_date_start > period_date_stop:
|
||||||
raise osv.except_osv(_('Error!'), _('Start period should precede then end period.'))
|
raise osv.except_osv(_('Error!'), _('Start period should precede then end period.'))
|
||||||
|
|
||||||
|
# /!\ We do not include a criterion on the company_id field below, to allow producing consolidated reports
|
||||||
|
# on multiple companies. It will only work when start/end periods are selected and no fiscal year is chosen.
|
||||||
|
|
||||||
#for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search).
|
#for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search).
|
||||||
if period_from.special:
|
if period_from.special:
|
||||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)])
|
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)])
|
||||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)])
|
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('special', '=', False)])
|
||||||
|
|
||||||
|
|
||||||
class account_journal_period(osv.osv):
|
class account_journal_period(osv.osv):
|
||||||
|
@ -1670,7 +1680,7 @@ class account_move_reconcile(osv.osv):
|
||||||
elif reconcile.line_partial_ids:
|
elif reconcile.line_partial_ids:
|
||||||
first_partner = reconcile.line_partial_ids[0].partner_id.id
|
first_partner = reconcile.line_partial_ids[0].partner_id.id
|
||||||
move_lines = reconcile.line_partial_ids
|
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 False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -1854,6 +1864,12 @@ class account_tax_code(osv.osv):
|
||||||
_order = 'code'
|
_order = 'code'
|
||||||
|
|
||||||
|
|
||||||
|
def get_precision_tax():
|
||||||
|
def change_digit_tax(cr):
|
||||||
|
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
|
||||||
|
return (16, res+3)
|
||||||
|
return change_digit_tax
|
||||||
|
|
||||||
class account_tax(osv.osv):
|
class account_tax(osv.osv):
|
||||||
"""
|
"""
|
||||||
A tax object.
|
A tax object.
|
||||||
|
@ -1874,12 +1890,6 @@ class account_tax(osv.osv):
|
||||||
default.update({'name': name + _(' (Copy)')})
|
default.update({'name': name + _(' (Copy)')})
|
||||||
return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
|
return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
|
||||||
|
|
||||||
def get_precision_tax():
|
|
||||||
def change_digit_tax(cr):
|
|
||||||
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
|
|
||||||
return (16, res+2)
|
|
||||||
return change_digit_tax
|
|
||||||
|
|
||||||
_name = 'account.tax'
|
_name = 'account.tax'
|
||||||
_description = 'Tax'
|
_description = 'Tax'
|
||||||
_columns = {
|
_columns = {
|
||||||
|
@ -2795,7 +2805,7 @@ class account_tax_template(osv.osv):
|
||||||
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
|
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
|
||||||
'name': fields.char('Tax Name', size=64, required=True),
|
'name': fields.char('Tax Name', size=64, required=True),
|
||||||
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."),
|
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."),
|
||||||
'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
|
'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."),
|
||||||
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
|
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
|
||||||
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
|
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
|
||||||
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
|
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
|
||||||
|
|
|
@ -6,16 +6,19 @@
|
||||||
-->
|
-->
|
||||||
<record id="account_financial_report_profitandloss0" model="account.financial.report">
|
<record id="account_financial_report_profitandloss0" model="account.financial.report">
|
||||||
<field name="name">Profit and Loss</field>
|
<field name="name">Profit and Loss</field>
|
||||||
|
<field name="sign" eval="-1" />
|
||||||
<field name="type">sum</field>
|
<field name="type">sum</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="account_financial_report_income0" model="account.financial.report">
|
<record id="account_financial_report_income0" model="account.financial.report">
|
||||||
<field name="name">Income</field>
|
<field name="name">Income</field>
|
||||||
|
<field name="sign" eval="-1" />
|
||||||
<field name="parent_id" ref="account_financial_report_profitandloss0"/>
|
<field name="parent_id" ref="account_financial_report_profitandloss0"/>
|
||||||
<field name="display_detail">detail_with_hierarchy</field>
|
<field name="display_detail">detail_with_hierarchy</field>
|
||||||
<field name="type">account_type</field>
|
<field name="type">account_type</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="account_financial_report_expense0" model="account.financial.report">
|
<record id="account_financial_report_expense0" model="account.financial.report">
|
||||||
<field name="name">Expense</field>
|
<field name="name">Expense</field>
|
||||||
|
<field name="sign" eval="-1" />
|
||||||
<field name="parent_id" ref="account_financial_report_profitandloss0"/>
|
<field name="parent_id" ref="account_financial_report_profitandloss0"/>
|
||||||
<field name="display_detail">detail_with_hierarchy</field>
|
<field name="display_detail">detail_with_hierarchy</field>
|
||||||
<field name="type">account_type</field>
|
<field name="type">account_type</field>
|
||||||
|
|
|
@ -20,10 +20,11 @@
|
||||||
</p>
|
</p>
|
||||||
<group>
|
<group>
|
||||||
<field name="charts" class="oe_inline"/>
|
<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>
|
||||||
<group string="Configure your Fiscal Year" groups="account.group_account_user">
|
<group string="Configure your Fiscal Year" groups="account.group_account_user">
|
||||||
<field name="has_default_company" invisible="1" />
|
<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"/>
|
<label for="date_start" string="Date Range"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="date_start" on_change="on_change_start_date(date_start)" class="oe_inline"/> -
|
<field name="date_start" on_change="on_change_start_date(date_start)" class="oe_inline"/> -
|
||||||
|
|
|
@ -89,13 +89,43 @@ class account_invoice(osv.osv):
|
||||||
return [('none', _('Free Reference'))]
|
return [('none', _('Free Reference'))]
|
||||||
|
|
||||||
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
||||||
|
"""Function of the field residua. It computes the residual amount (balance) for each invoice"""
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
|
ctx = context.copy()
|
||||||
result = {}
|
result = {}
|
||||||
|
currency_obj = self.pool.get('res.currency')
|
||||||
for invoice in self.browse(cr, uid, ids, context=context):
|
for invoice in self.browse(cr, uid, ids, context=context):
|
||||||
|
nb_inv_in_partial_rec = max_invoice_id = 0
|
||||||
result[invoice.id] = 0.0
|
result[invoice.id] = 0.0
|
||||||
if invoice.move_id:
|
if invoice.move_id:
|
||||||
for m in invoice.move_id.line_id:
|
for aml in invoice.move_id.line_id:
|
||||||
if m.account_id.type in ('receivable','payable'):
|
if aml.account_id.type in ('receivable','payable'):
|
||||||
result[invoice.id] += m.amount_residual_currency
|
if aml.currency_id and aml.currency_id.id == invoice.currency_id.id:
|
||||||
|
result[invoice.id] += aml.amount_residual_currency
|
||||||
|
else:
|
||||||
|
ctx['date'] = aml.date
|
||||||
|
result[invoice.id] += currency_obj.compute(cr, uid, aml.company_id.currency_id.id, invoice.currency_id.id, aml.amount_residual, context=ctx)
|
||||||
|
|
||||||
|
if aml.reconcile_partial_id.line_partial_ids:
|
||||||
|
#we check if the invoice is partially reconciled and if there are other invoices
|
||||||
|
#involved in this partial reconciliation (and we sum these invoices)
|
||||||
|
for line in aml.reconcile_partial_id.line_partial_ids:
|
||||||
|
if line.invoice:
|
||||||
|
nb_inv_in_partial_rec += 1
|
||||||
|
#store the max invoice id as for this invoice we will make a balance instead of a simple division
|
||||||
|
max_invoice_id = max(max_invoice_id, line.invoice.id)
|
||||||
|
if nb_inv_in_partial_rec:
|
||||||
|
#if there are several invoices in a partial reconciliation, we split the residual by the number
|
||||||
|
#of invoice to have a sum of residual amounts that matches the partner balance
|
||||||
|
new_value = currency_obj.round(cr, uid, invoice.currency_id, result[invoice.id] / nb_inv_in_partial_rec)
|
||||||
|
if invoice.id == max_invoice_id:
|
||||||
|
#if it's the last the invoice of the bunch of invoices partially reconciled together, we make a
|
||||||
|
#balance to avoid rounding errors
|
||||||
|
result[invoice.id] = result[invoice.id] - ((nb_inv_in_partial_rec - 1) * new_value)
|
||||||
|
else:
|
||||||
|
result[invoice.id] = new_value
|
||||||
|
|
||||||
#prevent the residual amount on the invoice to be less than 0
|
#prevent the residual amount on the invoice to be less than 0
|
||||||
result[invoice.id] = max(result[invoice.id], 0.0)
|
result[invoice.id] = max(result[invoice.id], 0.0)
|
||||||
return result
|
return result
|
||||||
|
@ -635,6 +665,26 @@ class account_invoice(osv.osv):
|
||||||
self.create_workflow(cr, uid, ids)
|
self.create_workflow(cr, uid, ids)
|
||||||
return True
|
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
|
# Workflow stuff
|
||||||
#################
|
#################
|
||||||
|
|
||||||
|
@ -722,7 +772,7 @@ class account_invoice(osv.osv):
|
||||||
inv = self.browse(cr, uid, id)
|
inv = self.browse(cr, uid, id)
|
||||||
cur_obj = self.pool.get('res.currency')
|
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'):
|
if inv.type in ('out_invoice', 'in_refund'):
|
||||||
sign = 1
|
sign = 1
|
||||||
else:
|
else:
|
||||||
|
@ -769,6 +819,7 @@ class account_invoice(osv.osv):
|
||||||
return move_lines
|
return move_lines
|
||||||
|
|
||||||
def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj):
|
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:
|
if not inv.tax_line:
|
||||||
for tax in compute_taxes.values():
|
for tax in compute_taxes.values():
|
||||||
ait_obj.create(cr, uid, tax)
|
ait_obj.create(cr, uid, tax)
|
||||||
|
@ -782,7 +833,7 @@ class account_invoice(osv.osv):
|
||||||
if not key in compute_taxes:
|
if not key in compute_taxes:
|
||||||
raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
|
raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
|
||||||
base = compute_taxes[key]['base']
|
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.'))
|
raise osv.except_osv(_('Warning!'), _('Tax base different!\nClick on compute to update the tax base.'))
|
||||||
for key in compute_taxes:
|
for key in compute_taxes:
|
||||||
if not key in tax_key:
|
if not key in tax_key:
|
||||||
|
@ -869,7 +920,7 @@ class account_invoice(osv.osv):
|
||||||
ctx.update({'lang': inv.partner_id.lang})
|
ctx.update({'lang': inv.partner_id.lang})
|
||||||
if not inv.date_invoice:
|
if not inv.date_invoice:
|
||||||
self.write(cr, uid, [inv.id], {'date_invoice': fields.date.context_today(self,cr,uid,context=context)}, context=ctx)
|
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
|
# create the analytical lines
|
||||||
# one move line per invoice line
|
# one move line per invoice line
|
||||||
iml = self._get_analytic_lines(cr, uid, inv.id, context=ctx)
|
iml = self._get_analytic_lines(cr, uid, inv.id, context=ctx)
|
||||||
|
@ -985,7 +1036,8 @@ class account_invoice(osv.osv):
|
||||||
'line_id': line,
|
'line_id': line,
|
||||||
'journal_id': journal_id,
|
'journal_id': journal_id,
|
||||||
'date': date,
|
'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
|
period_id = inv.period_id and inv.period_id.id or False
|
||||||
ctx.update(company_id=inv.company_id.id)
|
ctx.update(company_id=inv.company_id.id)
|
||||||
|
@ -1438,6 +1490,7 @@ class account_invoice_line(osv.osv):
|
||||||
result = {}
|
result = {}
|
||||||
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
|
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
|
||||||
|
|
||||||
|
result['name'] = res.partner_ref
|
||||||
if type in ('out_invoice','out_refund'):
|
if type in ('out_invoice','out_refund'):
|
||||||
a = res.property_account_income.id
|
a = res.property_account_income.id
|
||||||
if not a:
|
if not a:
|
||||||
|
@ -1452,19 +1505,21 @@ class account_invoice_line(osv.osv):
|
||||||
|
|
||||||
if type in ('out_invoice', 'out_refund'):
|
if type in ('out_invoice', 'out_refund'):
|
||||||
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
|
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
|
||||||
|
if res.description_sale:
|
||||||
|
result['name'] += '\n'+res.description_sale
|
||||||
else:
|
else:
|
||||||
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
|
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
|
||||||
|
if res.description_purchase:
|
||||||
|
result['name'] += '\n'+res.description_purchase
|
||||||
|
|
||||||
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
|
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
|
||||||
|
|
||||||
if type in ('in_invoice', 'in_refund'):
|
if type in ('in_invoice', 'in_refund'):
|
||||||
result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
|
result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
|
||||||
else:
|
else:
|
||||||
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
|
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
|
||||||
result['name'] = res.partner_ref
|
|
||||||
|
|
||||||
result['uos_id'] = uom_id or res.uom_id.id
|
result['uos_id'] = uom_id or res.uom_id.id
|
||||||
if res.description:
|
|
||||||
result['name'] += '\n'+res.description
|
|
||||||
|
|
||||||
domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}
|
domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}
|
||||||
|
|
||||||
|
@ -1517,8 +1572,7 @@ class account_invoice_line(osv.osv):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=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:
|
for line in inv.invoice_line:
|
||||||
mres = self.move_line_get_item(cr, uid, line, context)
|
mres = self.move_line_get_item(cr, uid, line, context)
|
||||||
if not mres:
|
if not mres:
|
||||||
|
@ -1662,8 +1716,7 @@ class account_invoice_tax(osv.osv):
|
||||||
cur_obj = self.pool.get('res.currency')
|
cur_obj = self.pool.get('res.currency')
|
||||||
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
|
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
|
||||||
cur = inv.currency_id
|
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 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']:
|
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={}
|
val={}
|
||||||
|
|
|
@ -197,7 +197,7 @@
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
<field name="account_id" groups="account.group_account_user"
|
<field name="account_id" groups="account.group_account_user"
|
||||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
|
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
|
||||||
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
|
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
|
||||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
||||||
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
|
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
|
||||||
|
@ -320,7 +320,7 @@
|
||||||
<group>
|
<group>
|
||||||
<field string="Customer" name="partner_id"
|
<field string="Customer" name="partner_id"
|
||||||
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_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}"
|
context="{'search_default_customer':1, 'show_address': 1}"
|
||||||
options='{"always_reload": True}'
|
options='{"always_reload": True}'
|
||||||
domain="[('customer', '=', True)]"/>
|
domain="[('customer', '=', True)]"/>
|
||||||
<field name="fiscal_position" widget="selection" />
|
<field name="fiscal_position" widget="selection" />
|
||||||
|
@ -353,7 +353,7 @@
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
<field name="account_id" groups="account.group_account_user"
|
<field name="account_id" groups="account.group_account_user"
|
||||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
|
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
|
||||||
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
|
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
|
||||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
||||||
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
|
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
|
||||||
|
|
|
@ -626,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_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, '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_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']),
|
(_check_currency_company, "You cannot provide a secondary currency if it is the same than the company one." , ['currency_id']),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -907,9 +907,7 @@
|
||||||
<label for="type"/>
|
<label for="type"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="amount" class="oe_inline"
|
<field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
|
||||||
attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
|
|
||||||
<label string="%%" attrs="{'invisible':[('type','<>','percent')]}"/>
|
|
||||||
</div>
|
</div>
|
||||||
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||||
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||||
|
@ -2111,10 +2109,8 @@
|
||||||
<group attrs="{'invisible': [('only_one_chart_template','=',True)]}">
|
<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)]"/>
|
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
|
||||||
</group>
|
</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>
|
<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="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'))]"/>
|
<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)]}"/>
|
<label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
|
||||||
|
|
|
@ -313,8 +313,8 @@
|
||||||
<field name="code">TSAJ</field>
|
<field name="code">TSAJ</field>
|
||||||
<field name="type">sale</field>
|
<field name="type">sale</field>
|
||||||
<field name="sequence_id" ref="sequence_sale_journal"/>
|
<field name="sequence_id" ref="sequence_sale_journal"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
|
<field name="default_credit_account_id" ref="a_sale"/>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
|
<field name="default_debit_account_id" ref="a_sale"/>
|
||||||
<field name="analytic_journal_id" ref="cose_journal_sale"/>
|
<field name="analytic_journal_id" ref="cose_journal_sale"/>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
</record>
|
</record>
|
||||||
|
@ -323,8 +323,8 @@
|
||||||
<field name="code">TSCNJ</field>
|
<field name="code">TSCNJ</field>
|
||||||
<field name="type">sale_refund</field>
|
<field name="type">sale_refund</field>
|
||||||
<field name="sequence_id" ref="sequence_refund_sales_journal"/>
|
<field name="sequence_id" ref="sequence_refund_sales_journal"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
|
<field name="default_credit_account_id" ref="a_sale"/>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
|
<field name="default_debit_account_id" ref="a_sale"/>
|
||||||
<field name="analytic_journal_id" ref="cose_journal_sale"/>
|
<field name="analytic_journal_id" ref="cose_journal_sale"/>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
</record>
|
</record>
|
||||||
|
@ -334,8 +334,8 @@
|
||||||
<field name="code">TEXJ</field>
|
<field name="code">TEXJ</field>
|
||||||
<field name="type">purchase</field>
|
<field name="type">purchase</field>
|
||||||
<field name="sequence_id" ref="sequence_purchase_journal"/>
|
<field name="sequence_id" ref="sequence_purchase_journal"/>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
|
<field name="default_debit_account_id" ref="a_expense"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
|
<field name="default_credit_account_id" ref="a_expense"/>
|
||||||
<field name="analytic_journal_id" ref="exp"/>
|
<field name="analytic_journal_id" ref="exp"/>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
</record>
|
</record>
|
||||||
|
@ -344,8 +344,8 @@
|
||||||
<field name="code">TECNJ</field>
|
<field name="code">TECNJ</field>
|
||||||
<field name="type">purchase_refund</field>
|
<field name="type">purchase_refund</field>
|
||||||
<field name="sequence_id" ref="sequence_refund_purchase_journal"/>
|
<field name="sequence_id" ref="sequence_refund_purchase_journal"/>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
|
<field name="default_debit_account_id" ref="a_expense"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
|
<field name="default_credit_account_id" ref="a_expense"/>
|
||||||
<field name="analytic_journal_id" ref="exp"/>
|
<field name="analytic_journal_id" ref="exp"/>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
</record>
|
</record>
|
||||||
|
@ -355,8 +355,8 @@
|
||||||
<field name="code">TBNK</field>
|
<field name="code">TBNK</field>
|
||||||
<field name="type">bank</field>
|
<field name="type">bank</field>
|
||||||
<field name="sequence_id" ref="sequence_bank_journal"/>
|
<field name="sequence_id" ref="sequence_bank_journal"/>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="bnk"/>
|
<field name="default_debit_account_id" ref="bnk"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="bnk"/>
|
<field name="default_credit_account_id" ref="bnk"/>
|
||||||
<field name="analytic_journal_id" ref="sit"/>
|
<field name="analytic_journal_id" ref="sit"/>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
</record>
|
</record>
|
||||||
|
@ -365,8 +365,8 @@
|
||||||
<field name="code">TCHK</field>
|
<field name="code">TCHK</field>
|
||||||
<field name="type">bank</field>
|
<field name="type">bank</field>
|
||||||
<field name="sequence_id" ref="sequence_check_journal"/>
|
<field name="sequence_id" ref="sequence_check_journal"/>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="cash"/>
|
<field name="default_debit_account_id" ref="cash"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="cash"/>
|
<field name="default_credit_account_id" ref="cash"/>
|
||||||
<field name="analytic_journal_id" ref="sit"/>
|
<field name="analytic_journal_id" ref="sit"/>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
</record>
|
</record>
|
||||||
|
@ -374,9 +374,9 @@
|
||||||
<field name="name">Cash Journal - (test)</field>
|
<field name="name">Cash Journal - (test)</field>
|
||||||
<field name="code">TCSH</field>
|
<field name="code">TCSH</field>
|
||||||
<field name="type">cash</field>
|
<field name="type">cash</field>
|
||||||
<field name="profit_account_id" model="account.account" ref="rsa" />
|
<field name="profit_account_id" ref="rsa" />
|
||||||
<field name="loss_account_id" model="account.account" ref="rsa" />
|
<field name="loss_account_id" ref="rsa" />
|
||||||
<field name="internal_account_id" model="account.account" ref="rsa" />
|
<field name="internal_account_id" ref="rsa" />
|
||||||
<field name="with_last_closing_balance" eval="True" />
|
<field name="with_last_closing_balance" eval="True" />
|
||||||
<!--
|
<!--
|
||||||
Usually, cash payment methods requires a control at opening and closing.
|
Usually, cash payment methods requires a control at opening and closing.
|
||||||
|
@ -385,8 +385,8 @@
|
||||||
-->
|
-->
|
||||||
<field name="cash_control" eval="False"/>
|
<field name="cash_control" eval="False"/>
|
||||||
<field name="sequence_id" ref="sequence_cash_journal"/>
|
<field name="sequence_id" ref="sequence_cash_journal"/>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="cash"/>
|
<field name="default_debit_account_id" ref="cash"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="cash"/>
|
<field name="default_credit_account_id" ref="cash"/>
|
||||||
<field name="analytic_journal_id" ref="sit"/>
|
<field name="analytic_journal_id" ref="sit"/>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
</record>
|
</record>
|
||||||
|
@ -403,8 +403,8 @@
|
||||||
<field name="code">TOEJ</field>
|
<field name="code">TOEJ</field>
|
||||||
<field name="type">situation</field>
|
<field name="type">situation</field>
|
||||||
<field name="sequence_id" ref="sequence_opening_journal"/>
|
<field name="sequence_id" ref="sequence_opening_journal"/>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="o_income"/>
|
<field name="default_debit_account_id" ref="o_income"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="o_expense"/>
|
<field name="default_credit_account_id" ref="o_expense"/>
|
||||||
<field eval="True" name="centralisation"/>
|
<field eval="True" name="centralisation"/>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
</record>
|
</record>
|
||||||
|
@ -413,8 +413,8 @@
|
||||||
<field name="name">USD Bank Journal - (test)</field>
|
<field name="name">USD Bank Journal - (test)</field>
|
||||||
<field name="code">TUBK</field>
|
<field name="code">TUBK</field>
|
||||||
<field name="type">bank</field>
|
<field name="type">bank</field>
|
||||||
<field model="account.account" name="default_debit_account_id" ref="usd_bnk"/>
|
<field name="default_debit_account_id" ref="usd_bnk"/>
|
||||||
<field model="account.account" name="default_credit_account_id" ref="usd_bnk"/>
|
<field name="default_credit_account_id" ref="usd_bnk"/>
|
||||||
<field name="currency" ref="base.USD"/>
|
<field name="currency" ref="base.USD"/>
|
||||||
</record>
|
</record>
|
||||||
<!--
|
<!--
|
||||||
|
|
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 143 KiB |
|
@ -0,0 +1,205 @@
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row oe_spaced">
|
||||||
|
<h2 class="oe_slogan">Accounting Made Easy</h2>
|
||||||
|
<h3 class="oe_slogan">Beautiful, easy, full featured</h3>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<div class="oe_demo oe_picture oe_screenshot">
|
||||||
|
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=account">
|
||||||
|
<img src="account_sc_00.png" alt="Online Demo">
|
||||||
|
</a>
|
||||||
|
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
By far the most beautiful and full featured accounting software. OpenERP Accounting allows a better way to collaborate with your accountants, your customers and control your suppliers.</p>
|
||||||
|
<p>
|
||||||
|
Activate features on demand, from integrated analytic accounting to budget, assets and multiple companies consolidation.
|
||||||
|
</p>
|
||||||
|
<div class="oe_centeralign oe_websiteonly">
|
||||||
|
<a href="http://www.openerp.com/start" class="oe_button oe_big oe_tacky">Start your <span class="oe_emph">free</span> trial</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">A Smart User Interface</h2>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Record transactions in a few clicks and easily manage all financial activities
|
||||||
|
in one place. OpenERP's user interface is designed with productivity in mind.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_sc_01.png">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">A Better Way To Work – Together</h2>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_sc_02.png">
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Share access to your latest business numbers with your team and your accountant – so everyone is up to speed. From work, home or on the go.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Connect Your Bank Accounts</h2>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Import your bank statements and reconcile them in just a few clicks. Prepare payment orders based on your supplier invoices and payment terms.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture" src="account_illu_01.png">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container">
|
||||||
|
<h2 class="oe_slogan">Get Paid Faster</h2>
|
||||||
|
<h3 class="oe_slogan">Electronic invoicing and automated follow-ups</h3>
|
||||||
|
<div class="oe_row">
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_sc_03.png">
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Create and send professional invoices & get paid online. Get rid of the stress of having to constantly remind your debtors. Simply set-up and automate follow-ups to get paid quickly.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Sales Integration</h2>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Automatically create invoices from sales orders, delivery orders or base them on time and material. Re-invoice expenses on projects to your customer in just a few clicks.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_sc_04.png">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row">
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_sc_05.png">
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<h2 class="oe_slogan">Purchase Integration</h2>
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Control supplier invocies based on purchase orders. Get real-time inventory valuation reports automatically posted in your accounts.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Multi-Level Analytic Accounting</h2>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Integrate your analytic accounting operations with timesheets, projects, invoices, expenses, etc. No need to record transactions, all analytic entries are posted automatically following your business rules.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_sc_06.png">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Everything you need to grow</h2>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img src="account_illu_02.png">
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Manage your assets, track expenses, control budgets, multi-level analytic accounting; OpenERP has all the features you need to sustain all your business activities.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Scale With Your Organization</h2>
|
||||||
|
<h3 class="oe_slogan">Used by very small to very large organizations</h3>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
OpenERP supports multiple currencies, multiple users with different access rights, multiple companies with real time consolidation and unlimited analytic plans.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_illu_03.png">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Dashboard & KPIs</h2>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_sc_06.png">
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Get direct access to key information with dynamic and customizable dashboards. Analyse your financial activities with the drill-up, drill-down, drill-across and filter features.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row">
|
||||||
|
<div class="oe_span12">
|
||||||
|
<h2 class="oe_slogan">Many companies already enjoy it</h2>
|
||||||
|
<h3 class="oe_slogan">Hear what they have to say !</h3>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<div class="oe_quote">
|
||||||
|
<q>
|
||||||
|
OpenERP Accounting is a great way to record all business transactions
|
||||||
|
right when they happen. Awesome and cost-effective!
|
||||||
|
</q>
|
||||||
|
<cite class="oe_cite oe_clearfix oe_ml64">
|
||||||
|
<div class="oe_author">Wolfgang Taferner</div>
|
||||||
|
<div class="oe_job"><a href="http://tapo-it.at/en/" target="_blank">Tapo</a>, Austria.</div>
|
||||||
|
</cite>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<div class="oe_quote">
|
||||||
|
<q>
|
||||||
|
We have found accounting module of OpenERP to be user
|
||||||
|
friendly and highly customizable. It proved to be an accounting gem.
|
||||||
|
</q>
|
||||||
|
<cite class="oe_cite oe_clearfix">
|
||||||
|
<img class="oe_photo" src="testimonial_sunil.jpg">
|
||||||
|
<div class="oe_author">Col. Sunil Prem.</div>
|
||||||
|
<div class="oe_job">Director of <a href="http://www.navyuginfo.com" target="_blank">Navyug Infosolutions Pvt. Ltd</a>.</div>
|
||||||
|
</cite>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 2.9 KiB |
|
@ -7,14 +7,14 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||||
"PO-Revision-Date: 2013-03-14 06:41+0000\n"
|
"PO-Revision-Date: 2013-06-05 13:02+0000\n"
|
||||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:17+0000\n"
|
"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16667)\n"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||||
|
@ -465,7 +465,7 @@ msgstr "Шаблона плана счетов"
|
||||||
#. module: account
|
#. module: account
|
||||||
#: selection:account.invoice.refund,filter_refund:0
|
#: selection:account.invoice.refund,filter_refund:0
|
||||||
msgid "Modify: create refund, reconcile and create a new draft invoice"
|
msgid "Modify: create refund, reconcile and create a new draft invoice"
|
||||||
msgstr ""
|
msgstr "Изменить: создать возврат, сверить и создать новый счет"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: help:account.config.settings,tax_calculation_rounding_method:0
|
#: help:account.config.settings,tax_calculation_rounding_method:0
|
||||||
|
@ -704,6 +704,8 @@ msgid ""
|
||||||
"Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' "
|
"Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' "
|
||||||
"and 'draft' or ''}"
|
"and 'draft' or ''}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' "
|
||||||
|
"and 'draft' or ''}"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: view:account.period:0
|
#: view:account.period:0
|
||||||
|
@ -731,6 +733,8 @@ msgstr "Период журнала"
|
||||||
msgid ""
|
msgid ""
|
||||||
"You cannot create more than one move per period on a centralized journal."
|
"You cannot create more than one move per period on a centralized journal."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Вы не можете создать более одного движения за период в централизованном "
|
||||||
|
"журнале."
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: help:account.tax,account_analytic_paid_id:0
|
#: help:account.tax,account_analytic_paid_id:0
|
||||||
|
@ -911,6 +915,7 @@ msgid ""
|
||||||
"Print Report with the currency column if the currency differs from the "
|
"Print Report with the currency column if the currency differs from the "
|
||||||
"company currency."
|
"company currency."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Печать отчета с колонкой валюты, если валюта отличается от валюты компании."
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: report:account.analytic.account.quantity_cost_ledger:0
|
#: report:account.analytic.account.quantity_cost_ledger:0
|
||||||
|
@ -950,6 +955,10 @@ msgid ""
|
||||||
" </p>\n"
|
" </p>\n"
|
||||||
" "
|
" "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"<p>\n"
|
||||||
|
" Элементы журнала не найдены.\n"
|
||||||
|
" </p>\n"
|
||||||
|
" "
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: code:addons/account/account.py:1639
|
#: code:addons/account/account.py:1639
|
||||||
|
@ -1039,7 +1048,7 @@ msgstr "Обязательства"
|
||||||
#: code:addons/account/account_invoice.py:867
|
#: code:addons/account/account_invoice.py:867
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Please define sequence on the journal related to this invoice."
|
msgid "Please define sequence on the journal related to this invoice."
|
||||||
msgstr ""
|
msgstr "Пожалуйста, определите нумерацию в журнале, связанном с этим счетом."
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: view:account.entries.report:0
|
#: view:account.entries.report:0
|
||||||
|
@ -1517,6 +1526,9 @@ msgid ""
|
||||||
"And after getting confirmation from the bank it will be in 'Confirmed' "
|
"And after getting confirmation from the bank it will be in 'Confirmed' "
|
||||||
"status."
|
"status."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Когда новый отчет создан - статус станет \"Черновик\".\n"
|
||||||
|
"После получения подтверждения из банка, статус измениться на \" "
|
||||||
|
"Подтверждено\"."
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: field:account.invoice.report,state:0
|
#: field:account.invoice.report,state:0
|
||||||
|
@ -1560,6 +1572,8 @@ msgid ""
|
||||||
"There is no default debit account defined \n"
|
"There is no default debit account defined \n"
|
||||||
"on journal \"%s\"."
|
"on journal \"%s\"."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Дебетовый счет по умолчанию не определен\n"
|
||||||
|
"в журнале \"%s\"."
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: view:account.tax:0
|
#: view:account.tax:0
|
||||||
|
@ -1662,7 +1676,7 @@ msgstr ""
|
||||||
#. module: account
|
#. module: account
|
||||||
#: field:account.config.settings,company_footer:0
|
#: field:account.config.settings,company_footer:0
|
||||||
msgid "Bank accounts footer preview"
|
msgid "Bank accounts footer preview"
|
||||||
msgstr ""
|
msgstr "Просмотр нижнего колонтитула банковских счетов"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: selection:account.account,type:0
|
#: selection:account.account,type:0
|
||||||
|
@ -7386,7 +7400,7 @@ msgstr ""
|
||||||
#. module: account
|
#. module: account
|
||||||
#: field:account.config.settings,module_account_voucher:0
|
#: field:account.config.settings,module_account_voucher:0
|
||||||
msgid "Manage customer payments"
|
msgid "Manage customer payments"
|
||||||
msgstr ""
|
msgstr "Управление платежами заказчиков"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: help:report.invoice.created,origin:0
|
#: help:report.invoice.created,origin:0
|
||||||
|
@ -7415,7 +7429,7 @@ msgstr ""
|
||||||
#: model:ir.actions.act_window,name:account.action_invoice_tree1
|
#: model:ir.actions.act_window,name:account.action_invoice_tree1
|
||||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree1
|
#: model:ir.ui.menu,name:account.menu_action_invoice_tree1
|
||||||
msgid "Customer Invoices"
|
msgid "Customer Invoices"
|
||||||
msgstr "Счета клиенту"
|
msgstr "Счета заказчику"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: view:account.tax:0
|
#: view:account.tax:0
|
||||||
|
@ -10543,7 +10557,7 @@ msgstr "Состояние счета - сделано"
|
||||||
#. module: account
|
#. module: account
|
||||||
#: field:account.config.settings,module_account_followup:0
|
#: field:account.config.settings,module_account_followup:0
|
||||||
msgid "Manage customer payment follow-ups"
|
msgid "Manage customer payment follow-ups"
|
||||||
msgstr ""
|
msgstr "Управление напоминаниями заказчикам об оплатах"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: model:ir.model,name:account.model_report_account_sales
|
#: model:ir.model,name:account.model_report_account_sales
|
||||||
|
@ -11037,7 +11051,7 @@ msgstr "Счет расходов по шаблону ТМЦ"
|
||||||
#. module: account
|
#. module: account
|
||||||
#: field:res.partner,property_payment_term:0
|
#: field:res.partner,property_payment_term:0
|
||||||
msgid "Customer Payment Term"
|
msgid "Customer Payment Term"
|
||||||
msgstr ""
|
msgstr "Срок платежа заказчика"
|
||||||
|
|
||||||
#. module: account
|
#. module: account
|
||||||
#: help:accounting.report,label_filter:0
|
#: help:accounting.report,label_filter:0
|
||||||
|
|
|
@ -50,11 +50,12 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_account_analytic_account_form" model="ir.actions.act_window">
|
<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="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
|
||||||
<field name="name">Contracts/Analytic Accounts</field>
|
<field name="name">Contracts/Analytic Accounts</field>
|
||||||
<field name="res_model">account.analytic.account</field>
|
<field name="res_model">account.analytic.account</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
||||||
|
<field name="search_view_id" ref="view_account_analytic_account_search"/>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.ui.view" id="partner_view_buttons">
|
<record model="ir.ui.view" id="partner_view_buttons">
|
||||||
<field name="name">partner.view.buttons</field>
|
<field name="name">partner.view.buttons</field>
|
||||||
|
@ -67,7 +68,7 @@
|
||||||
name="%(account.action_invoice_tree)d"
|
name="%(account.action_invoice_tree)d"
|
||||||
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}" groups="account.group_account_invoice"/>
|
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="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_account_analytic_account_form)d"
|
<button type="action" string="Contracts" name="%(account.action_open_partner_analytic_accounts)d"
|
||||||
groups="analytic.group_analytic_accounting"/>
|
groups="analytic.group_analytic_accounting"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -123,24 +123,24 @@
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Confirm statement"""" name="name"/>
|
<field eval=""""Confirm statement"""" name="name"/>
|
||||||
<field eval=""""The accountant confirms the statement."""" name="note"/>
|
<field eval=""""The accountant confirms the statement."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_accountingstatemententries0"/>
|
<field name="target_node_id" ref="process_node_accountingstatemententries0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="account.process_node_draftstatement0"/>
|
<field name="source_node_id" ref="account.process_node_draftstatement0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_analyticinvoice0" model="process.transition">
|
<record id="process_transition_analyticinvoice0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""From analytic accounts"""" name="name"/>
|
<field eval=""""From analytic accounts"""" name="name"/>
|
||||||
<field eval=""""Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft invoices."""" name="note"/>
|
<field eval=""""Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft invoices."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_draftinvoices0"/>
|
<field name="target_node_id" ref="process_node_draftinvoices0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_analytic0"/>
|
<field name="source_node_id" ref="process_node_analytic0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_customerinvoice0" model="process.transition">
|
<record id="process_transition_customerinvoice0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Validation"""" name="name"/>
|
<field eval=""""Validation"""" name="name"/>
|
||||||
<field eval=""""Draft invoices are checked, validated and printed."""" name="note"/>
|
<field eval=""""Draft invoices are checked, validated and printed."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_invoiceinvoice0"/>
|
<field name="target_node_id" ref="process_node_invoiceinvoice0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
|
<field name="source_node_id" ref="process_node_draftinvoices0"/>
|
||||||
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
|
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
@ -148,40 +148,40 @@
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Validation"""" name="name"/>
|
<field eval=""""Validation"""" name="name"/>
|
||||||
<field eval=""""Accountant validates the accounting entries coming from the invoice."""" name="note"/>
|
<field eval=""""Accountant validates the accounting entries coming from the invoice."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_accountingentries0"/>
|
<field name="target_node_id" ref="process_node_accountingentries0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_invoiceinvoice0"/>
|
<field name="source_node_id" ref="process_node_invoiceinvoice0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_entriesreconcile0" model="process.transition">
|
<record id="process_transition_entriesreconcile0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Accounting entries"""" name="name"/>
|
<field eval=""""Accounting entries"""" name="name"/>
|
||||||
<field eval=""""Accounting entries are the first input of the reconciliation."""" name="note"/>
|
<field eval=""""Accounting entries are the first input of the reconciliation."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
|
<field name="target_node_id" ref="process_node_reconciliation0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_accountingentries0"/>
|
<field name="source_node_id" ref="process_node_accountingentries0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_statemententries0" model="process.transition">
|
<record id="process_transition_statemententries0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Validation"""" name="name"/>
|
<field eval=""""Validation"""" name="name"/>
|
||||||
<field eval=""""Manual or automatic creation of payment entries according to the statements"""" name="note"/>
|
<field eval=""""Manual or automatic creation of payment entries according to the statements"""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_paymententries0"/>
|
<field name="target_node_id" ref="process_node_paymententries0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_bankstatement0"/>
|
<field name="source_node_id" ref="process_node_bankstatement0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_paymentreconcile0" model="process.transition">
|
<record id="process_transition_paymentreconcile0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Payment entries"""" name="name"/>
|
<field eval=""""Payment entries"""" name="name"/>
|
||||||
<field eval=""""Payment entries are the second input of the reconciliation."""" name="note"/>
|
<field eval=""""Payment entries are the second input of the reconciliation."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
|
<field name="target_node_id" ref="process_node_reconciliation0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_paymententries0"/>
|
<field name="source_node_id" ref="process_node_paymententries0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_reconcilepaid0" model="process.transition">
|
<record id="process_transition_reconcilepaid0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Payment"""" name="name"/>
|
<field eval=""""Payment"""" name="name"/>
|
||||||
<field eval=""""As soon as the reconciliation is done, the invoice can be paid."""" name="note"/>
|
<field eval=""""As soon as the reconciliation is done, the invoice can be paid."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_paidinvoice0"/>
|
<field name="target_node_id" ref="process_node_paidinvoice0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_reconciliation0"/>
|
<field name="source_node_id" ref="process_node_reconciliation0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -68,8 +68,8 @@
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Automatic import of the bank statement"""" name="name"/>
|
<field eval=""""Automatic import of the bank statement"""" name="name"/>
|
||||||
<field eval=""""Import of the statement in the system from an electronic file"""" name="note"/>
|
<field eval=""""Import of the statement in the system from an electronic file"""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
|
<field name="target_node_id" ref="process_node_draftstatement0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_electronicfile0"/>
|
<field name="source_node_id" ref="process_node_electronicfile0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_invoicemanually0" model="process.transition">
|
<record id="process_transition_invoicemanually0" model="process.transition">
|
||||||
|
@ -77,16 +77,16 @@
|
||||||
<field eval=""""Manual entry"""" name="name"/>
|
<field eval=""""Manual entry"""" name="name"/>
|
||||||
<field eval=""""A statement with manual entries becomes a draft statement."""" name="note"/>
|
<field eval=""""A statement with manual entries becomes a draft statement."""" name="note"/>
|
||||||
|
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
|
<field name="target_node_id" ref="process_node_draftstatement0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_manually0"/>
|
<field name="source_node_id" ref="process_node_manually0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_invoiceimport0" model="process.transition">
|
<record id="process_transition_invoiceimport0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Import from invoice or payment"""" name="name"/>
|
<field eval=""""Import from invoice or payment"""" name="name"/>
|
||||||
<field eval=""""Import of the statement in the system from a supplier or customer invoice"""" name="note"/>
|
<field eval=""""Import of the statement in the system from a supplier or customer invoice"""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
|
<field name="target_node_id" ref="process_node_draftstatement0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_importinvoice0"/>
|
<field name="source_node_id" ref="process_node_importinvoice0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -111,16 +111,16 @@
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""From analytic accounts"""" name="name"/>
|
<field eval=""""From analytic accounts"""" name="name"/>
|
||||||
<field eval=""""Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft supplier invoices."""" name="note"/>
|
<field eval=""""Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft supplier invoices."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
|
<field name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_analyticcost0"/>
|
<field name="source_node_id" ref="process_node_analyticcost0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_suppliercustomerinvoice0" model="process.transition">
|
<record id="process_transition_suppliercustomerinvoice0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Validation"""" name="name"/>
|
<field eval=""""Validation"""" name="name"/>
|
||||||
<field eval=""""Draft invoices are validated. """" name="note"/>
|
<field eval=""""Draft invoices are validated. """" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
<field name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
|
<field name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
|
||||||
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
|
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
@ -128,40 +128,40 @@
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Validation"""" name="name"/>
|
<field eval=""""Validation"""" name="name"/>
|
||||||
<field eval=""""Accountant validates the accounting entries coming from the invoice. """" name="note"/>
|
<field eval=""""Accountant validates the accounting entries coming from the invoice. """" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_supplieraccountingentries0"/>
|
<field name="target_node_id" ref="process_node_supplieraccountingentries0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
<field name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_supplierentriesreconcile0" model="process.transition">
|
<record id="process_transition_supplierentriesreconcile0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Accounting entries"""" name="name"/>
|
<field eval=""""Accounting entries"""" name="name"/>
|
||||||
<field eval=""""Accounting entries are an input of the reconciliation."""" name="note"/>
|
<field eval=""""Accounting entries are an input of the reconciliation."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
|
<field name="target_node_id" ref="process_node_supplierreconciliation0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_supplieraccountingentries0"/>
|
<field name="source_node_id" ref="process_node_supplieraccountingentries0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_paymentorderbank0" model="process.transition">
|
<record id="process_transition_paymentorderbank0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Payment entries"""" name="name"/>
|
<field eval=""""Payment entries"""" name="name"/>
|
||||||
<field eval=""""The payment order is sent to the bank."""" name="note"/>
|
<field eval=""""The payment order is sent to the bank."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_supplierbankstatement0"/>
|
<field name="target_node_id" ref="process_node_supplierbankstatement0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_supplierpaymentorder0"/>
|
<field name="source_node_id" ref="process_node_supplierpaymentorder0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_paymentorderreconcilation0" model="process.transition">
|
<record id="process_transition_paymentorderreconcilation0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""Validation"""" name="name"/>
|
<field eval=""""Validation"""" name="name"/>
|
||||||
<field eval=""""Bank statements are entered in the system."""" name="note"/>
|
<field eval=""""Bank statements are entered in the system."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
|
<field name="target_node_id" ref="process_node_supplierreconciliation0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_supplierbankstatement0"/>
|
<field name="source_node_id" ref="process_node_supplierbankstatement0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="process_transition_supplierreconcilepaid0" model="process.transition">
|
<record id="process_transition_supplierreconcilepaid0" model="process.transition">
|
||||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||||
<field eval=""""System payment"""" name="name"/>
|
<field eval=""""System payment"""" name="name"/>
|
||||||
<field eval=""""As soon as the reconciliation is done, the invoice's state turns to “done” (i.e. paid) in the system."""" name="note"/>
|
<field eval=""""As soon as the reconciliation is done, the invoice's state turns to “done” (i.e. paid) in the system."""" name="note"/>
|
||||||
<field model="process.node" name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
|
<field name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
|
||||||
<field model="process.node" name="source_node_id" ref="process_node_supplierreconciliation0"/>
|
<field name="source_node_id" ref="process_node_supplierreconciliation0"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
<page string="Accounting" groups="account.group_account_invoice">
|
<page string="Accounting" groups="account.group_account_invoice">
|
||||||
<group name="properties">
|
<group name="properties">
|
||||||
<group>
|
<group>
|
||||||
<field name="property_account_income" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="account.group_account_user"/>
|
<field name="property_account_income" domain="[('type','=','other')]" groups="account.group_account_user"/>
|
||||||
<field name="taxes_id" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}" widget="many2many_tags"/>
|
<field name="taxes_id" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="account.group_account_user"/>
|
<field name="property_account_expense" domain="[('type','=','other')]" groups="account.group_account_user"/>
|
||||||
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags"/>
|
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
<field name="parent_id" invisible="1"/>
|
<field name="parent_id" invisible="1"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="company_id" groups="base.group_multi_company"/>
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
|
<field name="template_id" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -77,6 +78,7 @@
|
||||||
<field name="name">Analytic Accounts</field>
|
<field name="name">Analytic Accounts</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">account.analytic.account</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_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# 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
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
|
|
@ -99,12 +99,13 @@ class account_invoice_report(osv.osv):
|
||||||
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
|
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
|
||||||
'residual': fields.float('Total Residual', 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"),
|
'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'
|
_order = 'date desc'
|
||||||
|
|
||||||
def _select(self):
|
def _select(self):
|
||||||
select_str = """
|
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.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.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.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id,
|
||||||
|
@ -172,7 +173,8 @@ class account_invoice_report(osv.osv):
|
||||||
WHERE a.id = ai.id)
|
WHERE a.id = ai.id)
|
||||||
ELSE 1::bigint
|
ELSE 1::bigint
|
||||||
END::numeric AS residual,
|
END::numeric AS residual,
|
||||||
ai.commercial_partner_id as commercial_partner_id
|
ai.commercial_partner_id as commercial_partner_id,
|
||||||
|
partner.country_id
|
||||||
"""
|
"""
|
||||||
return select_str
|
return select_str
|
||||||
|
|
||||||
|
@ -180,6 +182,7 @@ class account_invoice_report(osv.osv):
|
||||||
from_str = """
|
from_str = """
|
||||||
FROM account_invoice_line ail
|
FROM account_invoice_line ail
|
||||||
JOIN account_invoice ai ON ai.id = ail.invoice_id
|
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_product pr ON pr.id = ail.product_id
|
||||||
left JOIN product_template pt ON pt.id = pr.product_tmpl_id
|
left JOIN product_template pt ON pt.id = pr.product_tmpl_id
|
||||||
LEFT JOIN product_uom u ON u.id = ail.uos_id
|
LEFT JOIN product_uom u ON u.id = ail.uos_id
|
||||||
|
@ -195,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.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.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.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual,
|
||||||
ai.amount_total, u.uom_type, u.category_id, ai.commercial_partner_id
|
ai.amount_total, u.uom_type, u.category_id, ai.commercial_partner_id, partner.country_id
|
||||||
"""
|
"""
|
||||||
return group_by_str
|
return group_by_str
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
<field name="partner_id" invisible="1"/>
|
<field name="partner_id" invisible="1"/>
|
||||||
<field name="commercial_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="product_id" invisible="1"/>
|
||||||
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
|
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
|
||||||
<field name="categ_id" invisible="1"/>
|
<field name="categ_id" invisible="1"/>
|
||||||
|
@ -68,6 +69,7 @@
|
||||||
<group expand="1" string="Group By...">
|
<group expand="1" string="Group By...">
|
||||||
<filter string="Partner" name="partner_id" 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" 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="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="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"/>
|
<filter string="Period" icon="terp-go-month" context="{'group_by':'period_id'}" name="period"/>
|
||||||
|
|
|
@ -99,42 +99,39 @@
|
||||||
<initialize>
|
<initialize>
|
||||||
<paraStyle name="all" alignment="justify"/>
|
<paraStyle name="all" alignment="justify"/>
|
||||||
</initialize>
|
</initialize>
|
||||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
<paraStyle name="Standard"/>
|
||||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
<paraStyle name="Text body" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
<paraStyle name="List" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
<paraStyle name="Table Contents" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
<paraStyle name="Caption" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
<paraStyle name="Index"/>
|
||||||
<paraStyle name="Index" fontName="Helvetica"/>
|
|
||||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="Footer"/>
|
||||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
<paraStyle name="Horizontal Line" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
|
||||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
|
||||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
||||||
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
|
||||||
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="Table" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0"/>
|
||||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="Preformatted Text" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<paraStyle name="Table" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
|
||||||
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0" fontName="Helvetica"/>
|
|
||||||
<paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
|
||||||
<images/>
|
<images/>
|
||||||
</stylesheet>
|
</stylesheet>
|
||||||
<story>
|
<story>
|
||||||
|
@ -144,12 +141,12 @@
|
||||||
<pto_header><!-- Must be after setLang() -->
|
<pto_header><!-- Must be after setLang() -->
|
||||||
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
|
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
|
||||||
<tr>
|
<tr>
|
||||||
<td> <para style="terp_tblheader_Details">Description</para> </td>
|
<td><para style="terp_tblheader_Details"><b>Description</b></para></td>
|
||||||
<td> <para style="terp_tblheader_Details_Centre">Taxes</para> </td>
|
<td><para style="terp_tblheader_Details_Centre"><b>Taxes</b></para></td>
|
||||||
<td> <para style="terp_tblheader_Details_Centre">Quantity</para> </td>
|
<td><para style="terp_tblheader_Details_Centre"><b>Quantity</b></para></td>
|
||||||
<td> <para style="terp_tblheader_Details_Right">Unit Price </para> </td>
|
<td><para style="terp_tblheader_Details_Right"><b>Unit Price</b></para></td>
|
||||||
<td> <para style="terp_tblheader_Details_Right">Disc.(%)</para> </td>
|
<td><para style="terp_tblheader_Details_Right"><b>Disc.(%)</b></para></td>
|
||||||
<td> <para style="terp_tblheader_Details_Right">Price</para> </td>
|
<td><para style="terp_tblheader_Details_Right"><b>Price</b></para></td>
|
||||||
</tr>
|
</tr>
|
||||||
</blockTable>
|
</blockTable>
|
||||||
</pto_header>
|
</pto_header>
|
||||||
|
@ -172,29 +169,29 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</blockTable>
|
</blockTable>
|
||||||
<para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
<para style="terp_header"><b>Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||||
<para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
|
<para style="terp_header"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para>
|
||||||
<para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
<para style="terp_header"><b>Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para>
|
||||||
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
<para style="terp_header"><b>Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||||
<para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
<para style="terp_header"><b>Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||||
<para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
<para style="terp_header"><b>Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||||
<para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
<para style="terp_header"><b>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||||
<para style="terp_default_8">
|
<para style="terp_default_8">
|
||||||
<font color="white"> </font>
|
<font color="white"> </font>
|
||||||
</para>
|
</para>
|
||||||
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
|
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Centre">Description</para>
|
<para style="terp_tblheader_General_Centre"><b>Description</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Centre">Invoice Date</para>
|
<para style="terp_tblheader_General_Centre"><b>Invoice Date</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Centre">Source</para>
|
<para style="terp_tblheader_General_Centre"><b>Source</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Centre">Customer Code</para>
|
<para style="terp_tblheader_General_Centre"><b>Customer Code</b></para>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</blockTable>
|
</blockTable>
|
||||||
|
@ -220,22 +217,22 @@
|
||||||
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
|
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General">Description</para>
|
<para style="terp_tblheader_General"><b>Description</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Centre">Taxes</para>
|
<para style="terp_tblheader_General_Centre"><b>Taxes</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Right">Quantity</para>
|
<para style="terp_tblheader_General_Right"><b>Quantity</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Right">Unit Price</para>
|
<para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Right">Disc.(%)</para>
|
<para style="terp_tblheader_General_Right"><b>Disc.(%)</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_General_Right">Price</para>
|
<para style="terp_tblheader_General_Right"><b>Price</b></para>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</blockTable>
|
</blockTable>
|
||||||
|
@ -298,10 +295,10 @@
|
||||||
</para>
|
</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_Details">Total:</para>
|
<para style="terp_tblheader_Details"><b>Total:</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
|
<para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</blockTable>
|
</blockTable>
|
||||||
|
@ -311,13 +308,13 @@
|
||||||
<blockTable colWidths="205.0,71.0,71.0,183.0" style="Table9">
|
<blockTable colWidths="205.0,71.0,71.0,183.0" style="Table9">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_Details">Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</para>
|
<para style="terp_tblheader_Details"><b>Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_Details_Right">Base </para>
|
<para style="terp_tblheader_Details_Right"><b>Base </b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_tblheader_Details_Right">Amount </para>
|
<para style="terp_tblheader_Details_Right"><b>Amount </b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_8">
|
<para style="terp_default_8">
|
||||||
|
@ -361,7 +358,7 @@
|
||||||
<blockTable colWidths="120.0,410.0" style="Table1">
|
<blockTable colWidths="120.0,410.0" style="Table1">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Bold_9">Fiscal Position Remark : </para>
|
<para style="terp_default_Bold_9"><b>Fiscal Position Remark : </b></para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_9">[[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>
|
<para style="terp_default_9">[[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>
|
||||||
|
|
|
@ -25,6 +25,7 @@ from dateutil.relativedelta import relativedelta
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from os.path import join as opj
|
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.tools.translate import _
|
||||||
from openerp.osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
from openerp import tools
|
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)
|
count = self.pool.get('res.company').search_count(cr, uid, [], context=context)
|
||||||
return bool(count == 1)
|
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 = {
|
_defaults = {
|
||||||
'company_id': _default_company,
|
'company_id': _default_company,
|
||||||
'has_default_company': _default_has_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):
|
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,
|
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')),
|
[('date_start', '<=', time.strftime('%Y-%m-%d')), ('date_stop', '>=', time.strftime('%Y-%m-%d')),
|
||||||
('company_id', '=', company_id)])
|
('company_id', '=', company_id)])
|
||||||
|
date_start, date_stop, period = self._get_default_fiscalyear_data(cr, uid, company_id, context=context)
|
||||||
values = {
|
values = {
|
||||||
'expects_chart_of_accounts': company.expects_chart_of_accounts,
|
'expects_chart_of_accounts': company.expects_chart_of_accounts,
|
||||||
'currency_id': company.currency_id.id,
|
'currency_id': company.currency_id.id,
|
||||||
|
@ -170,6 +203,9 @@ class account_config_settings(osv.osv_memory):
|
||||||
'has_fiscal_year': bool(fiscalyear_count),
|
'has_fiscal_year': bool(fiscalyear_count),
|
||||||
'chart_template_id': False,
|
'chart_template_id': False,
|
||||||
'tax_calculation_rounding_method': company.tax_calculation_rounding_method,
|
'tax_calculation_rounding_method': company.tax_calculation_rounding_method,
|
||||||
|
'date_start': date_start,
|
||||||
|
'date_stop': date_stop,
|
||||||
|
'period': period,
|
||||||
}
|
}
|
||||||
# update journals and sequences
|
# update journals and sequences
|
||||||
for journal_type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
|
for journal_type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
|
||||||
|
@ -302,4 +338,10 @@ class account_config_settings(osv.osv_memory):
|
||||||
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
|
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
|
||||||
dp.write({'digits': config.decimal_precision})
|
dp.write({'digits': config.decimal_precision})
|
||||||
|
|
||||||
|
def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):
|
||||||
|
if analytic_accounting:
|
||||||
|
return {'value': {
|
||||||
|
'module_account_accountant': True,
|
||||||
|
}}
|
||||||
|
return {}
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
<label for="module_account_accountant"/>
|
<label for="module_account_accountant"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<field name="group_analytic_accounting" class="oe_inline"/>
|
<field name="group_analytic_accounting" class="oe_inline" on_change="onchange_analytic_accounting(group_analytic_accounting, context)"/>
|
||||||
<label for="group_analytic_accounting"/>
|
<label for="group_analytic_accounting"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
from openerp.osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
import openerp.addons.decimal_precision as dp
|
import openerp.addons.decimal_precision as dp
|
||||||
from openerp.tools.translate import _
|
from openerp.tools.translate import _
|
||||||
|
@ -23,7 +22,7 @@ class CashBox(osv.osv_memory):
|
||||||
|
|
||||||
records = self.pool[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)
|
return self._run(cr, uid, ids, records, context=context)
|
||||||
|
|
||||||
def _run(self, cr, uid, ids, records, context=None):
|
def _run(self, cr, uid, ids, records, context=None):
|
||||||
for box in self.browse(cr, uid, ids, context=context):
|
for box in self.browse(cr, uid, ids, context=context):
|
||||||
|
|
|
@ -259,17 +259,14 @@ class account_analytic_account(osv.osv):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
if child_ids:
|
if child_ids:
|
||||||
cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount), 0.0) \
|
#Search all invoice lines not in cancelled state that refer to this analytic account
|
||||||
FROM account_analytic_line \
|
inv_line_obj = self.pool.get("account.invoice.line")
|
||||||
JOIN account_analytic_journal \
|
inv_lines = inv_line_obj.search(cr, uid, ['&', ('account_analytic_id', 'in', child_ids), ('invoice_id.state', '!=', 'cancel')], context=context)
|
||||||
ON account_analytic_line.journal_id = account_analytic_journal.id \
|
for line in inv_line_obj.browse(cr, uid, inv_lines, context=context):
|
||||||
WHERE account_analytic_line.account_id IN %s \
|
res[line.account_analytic_id.id] += line.price_subtotal
|
||||||
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)
|
|
||||||
for acc in self.browse(cr, uid, res.keys(), context=context):
|
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[acc.id] = res[acc.id] - (acc.timesheet_ca_invoiced or 0.0)
|
||||||
|
|
||||||
res_final = res
|
res_final = res
|
||||||
return res_final
|
return res_final
|
||||||
|
|
||||||
|
@ -481,7 +478,7 @@ class account_analytic_account(osv.osv):
|
||||||
'remaining_hours': fields.function(_remaining_hours_calc, type='float', string='Remaining Time',
|
'remaining_hours': fields.function(_remaining_hours_calc, type='float', string='Remaining Time',
|
||||||
help="Computed using the formula: Maximum Time - Total Worked Time"),
|
help="Computed using the formula: Maximum Time - Total Worked Time"),
|
||||||
'remaining_hours_to_invoice': fields.function(_remaining_hours_to_invoice_calc, type='float', string='Remaining Time',
|
'remaining_hours_to_invoice': fields.function(_remaining_hours_to_invoice_calc, type='float', string='Remaining Time',
|
||||||
help="Computed using the formula: Maximum Time - Total Invoiced Time"),
|
help="Computed using the formula: Expected on timesheets - Total invoiced on timesheets"),
|
||||||
'fix_price_to_invoice': fields.function(_fix_price_to_invoice_calc, type='float', string='Remaining Time',
|
'fix_price_to_invoice': fields.function(_fix_price_to_invoice_calc, type='float', string='Remaining Time',
|
||||||
help="Sum of quotations for this contract."),
|
help="Sum of quotations for this contract."),
|
||||||
'timesheet_ca_invoiced': fields.function(_timesheet_ca_invoiced_calc, type='float', string='Remaining Time',
|
'timesheet_ca_invoiced': fields.function(_timesheet_ca_invoiced_calc, type='float', string='Remaining Time',
|
||||||
|
@ -633,6 +630,21 @@ class account_analytic_account(osv.osv):
|
||||||
pass
|
pass
|
||||||
return result
|
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):
|
def _prepare_invoice(self, cr, uid, contract, context=None):
|
||||||
context = context or {}
|
context = context or {}
|
||||||
|
|
||||||
|
|
|
@ -98,8 +98,8 @@
|
||||||
<field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
|
<field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
|
||||||
</td><td class="oe_timesheet_action" attrs="{'invisible': ['|',('invoice_on_timesheets','=',False),('type','=','template')]}">
|
</td><td class="oe_timesheet_action" attrs="{'invisible': ['|',('invoice_on_timesheets','=',False),('type','=','template')]}">
|
||||||
<span attrs="{'invisible': [('ca_to_invoice','=',0.0)]}" class="oe_grey">
|
<span attrs="{'invisible': [('ca_to_invoice','=',0.0)]}" class="oe_grey">
|
||||||
<button name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
|
<button name="hr_to_invoice_timesheets"
|
||||||
type="action"
|
type="object"
|
||||||
class="oe_link"
|
class="oe_link"
|
||||||
string="⇒ Invoice"/>
|
string="⇒ Invoice"/>
|
||||||
or view
|
or view
|
||||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
|
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||||
"PO-Revision-Date: 2011-02-19 12:16+0000\n"
|
"PO-Revision-Date: 2013-05-31 07:35+0000\n"
|
||||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:25+0000\n"
|
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16660)\n"
|
||||||
|
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: view:account.analytic.account:0
|
#: view:account.analytic.account:0
|
||||||
|
@ -73,7 +73,7 @@ msgstr ""
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: view:account.analytic.account:0
|
#: view:account.analytic.account:0
|
||||||
msgid "⇒ Invoice"
|
msgid "⇒ Invoice"
|
||||||
msgstr ""
|
msgstr "⇒ Счет"
|
||||||
|
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: field:account.analytic.account,ca_invoiced:0
|
#: field:account.analytic.account,ca_invoiced:0
|
||||||
|
@ -196,6 +196,8 @@ msgid ""
|
||||||
"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
|
"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
|
||||||
"'normal','template'])]}"
|
"'normal','template'])]}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
|
||||||
|
"'normal','template'])]}"
|
||||||
|
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: field:account.analytic.account,real_margin_rate:0
|
#: field:account.analytic.account,real_margin_rate:0
|
||||||
|
@ -335,7 +337,7 @@ msgstr "Теоретическая выручка"
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: view:account.analytic.account:0
|
#: view:account.analytic.account:0
|
||||||
msgid "To Renew"
|
msgid "To Renew"
|
||||||
msgstr ""
|
msgstr "К продлению"
|
||||||
|
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: view:account.analytic.account:0
|
#: view:account.analytic.account:0
|
||||||
|
@ -431,7 +433,7 @@ msgstr ""
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: field:account.analytic.account,toinvoice_total:0
|
#: field:account.analytic.account,toinvoice_total:0
|
||||||
msgid "Total to Invoice"
|
msgid "Total to Invoice"
|
||||||
msgstr ""
|
msgstr "Всего в счет"
|
||||||
|
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: view:account.analytic.account:0
|
#: view:account.analytic.account:0
|
||||||
|
@ -546,18 +548,18 @@ msgstr "Дата последней операции по этому счету.
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: model:ir.model,name:account_analytic_analysis.model_sale_config_settings
|
#: model:ir.model,name:account_analytic_analysis.model_sale_config_settings
|
||||||
msgid "sale.config.settings"
|
msgid "sale.config.settings"
|
||||||
msgstr ""
|
msgstr "sale.config.settings"
|
||||||
|
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: field:sale.config.settings,group_template_required:0
|
#: field:sale.config.settings,group_template_required:0
|
||||||
msgid "Mandatory use of templates."
|
msgid "Mandatory use of templates."
|
||||||
msgstr ""
|
msgstr "Обязательное использование шаблонов."
|
||||||
|
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: model:ir.actions.act_window,name:account_analytic_analysis.template_of_contract_action
|
#: model:ir.actions.act_window,name:account_analytic_analysis.template_of_contract_action
|
||||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_template_of_contract_action
|
#: model:ir.ui.menu,name:account_analytic_analysis.menu_template_of_contract_action
|
||||||
msgid "Contract Template"
|
msgid "Contract Template"
|
||||||
msgstr ""
|
msgstr "Шаблон контракта"
|
||||||
|
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: view:account.analytic.account:0
|
#: view:account.analytic.account:0
|
||||||
|
@ -612,7 +614,7 @@ msgstr ""
|
||||||
#. module: account_analytic_analysis
|
#. module: account_analytic_analysis
|
||||||
#: view:account.analytic.account:0
|
#: view:account.analytic.account:0
|
||||||
msgid "Total"
|
msgid "Total"
|
||||||
msgstr ""
|
msgstr "Итого"
|
||||||
|
|
||||||
#~ msgid "Hours summary by user"
|
#~ msgid "Hours summary by user"
|
||||||
#~ msgstr "Итого часов по пользователям"
|
#~ msgstr "Итого часов по пользователям"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<record id="analytic_default_comp_rule" model="ir.rule">
|
<record id="analytic_default_comp_rule" model="ir.rule">
|
||||||
<field name="name">Analytic Default multi company rule</field>
|
<field name="name">Analytic Default multi company rule</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_account_analytic_default"/>
|
<field name="model_id" ref="model_account_analytic_default"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||||
"PO-Revision-Date: 2012-12-28 10:00+0000\n"
|
"PO-Revision-Date: 2013-05-31 07:41+0000\n"
|
||||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:26+0000\n"
|
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16660)\n"
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: field:account.analytic.plan.instance,account4_ids:0
|
#: field:account.analytic.plan.instance,account4_ids:0
|
||||||
|
@ -48,7 +48,7 @@ msgstr "Ставка (%)"
|
||||||
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
|
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "The total should be between %s and %s."
|
msgid "The total should be between %s and %s."
|
||||||
msgstr ""
|
msgstr "Итог должен быть между %s и %s."
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: view:account.analytic.plan:0
|
#: view:account.analytic.plan:0
|
||||||
|
@ -131,7 +131,7 @@ msgstr "Не показывать пустые строки"
|
||||||
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
|
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "There are no analytic lines related to account %s."
|
msgid "There are no analytic lines related to account %s."
|
||||||
msgstr ""
|
msgstr "Нет позиций аналитики относящихся к счету %s."
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: field:account.analytic.plan.instance,account3_ids:0
|
#: field:account.analytic.plan.instance,account3_ids:0
|
||||||
|
@ -315,7 +315,7 @@ msgstr "Журнал аналитики"
|
||||||
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
|
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Please put a name and a code before saving the model."
|
msgid "Please put a name and a code before saving the model."
|
||||||
msgstr ""
|
msgstr "Пожалуйста, введите имя и код перед сохранением модели."
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: report:account.analytic.account.crossovered.analytic:0
|
#: report:account.analytic.account.crossovered.analytic:0
|
||||||
|
@ -347,7 +347,7 @@ msgstr "Журнал"
|
||||||
#: code:addons/account_analytic_plans/account_analytic_plans.py:486
|
#: code:addons/account_analytic_plans/account_analytic_plans.py:486
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "You have to define an analytic journal on the '%s' journal."
|
msgid "You have to define an analytic journal on the '%s' journal."
|
||||||
msgstr ""
|
msgstr "Вы должны определить журнал аналитики для журнала '%s'"
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: code:addons/account_analytic_plans/account_analytic_plans.py:342
|
#: code:addons/account_analytic_plans/account_analytic_plans.py:342
|
||||||
|
@ -375,7 +375,7 @@ msgstr "Позиция счета"
|
||||||
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
|
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "There is no analytic plan defined."
|
msgid "There is no analytic plan defined."
|
||||||
msgstr ""
|
msgstr "Аналитический план счетов не определен."
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
|
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
|
||||||
|
@ -402,7 +402,7 @@ msgstr "Разнесение аналитики"
|
||||||
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
|
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "A model with this name and code already exists."
|
msgid "A model with this name and code already exists."
|
||||||
msgstr ""
|
msgstr "Модель с таким названием и кодом уже существует."
|
||||||
|
|
||||||
#. module: account_analytic_plans
|
#. module: account_analytic_plans
|
||||||
#: help:account.analytic.plan.line,root_analytic_id:0
|
#: help:account.analytic.plan.line,root_analytic_id:0
|
||||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
||||||
"Project-Id-Version: openobject-addons\n"
|
"Project-Id-Version: openobject-addons\n"
|
||||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||||
"PO-Revision-Date: 2011-07-12 12:04+0000\n"
|
"PO-Revision-Date: 2013-05-31 08:06+0000\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||||
"Language-Team: Russian <ru@li.org>\n"
|
"Language-Team: Russian <ru@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:50+0000\n"
|
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16660)\n"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:account.asset.asset:0
|
#: view:account.asset.asset:0
|
||||||
|
@ -148,7 +148,7 @@ msgstr ""
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: help:account.asset.asset,method_period:0
|
#: help:account.asset.asset,method_period:0
|
||||||
msgid "The amount of time between two depreciations, in months"
|
msgid "The amount of time between two depreciations, in months"
|
||||||
msgstr ""
|
msgstr "Количество времени между амортизациями, в месяцах"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.depreciation.line,depreciation_date:0
|
#: field:account.asset.depreciation.line,depreciation_date:0
|
||||||
|
@ -160,7 +160,7 @@ msgstr "Дата амортизации"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: constraint:account.asset.asset:0
|
#: constraint:account.asset.asset:0
|
||||||
msgid "Error ! You cannot create recursive assets."
|
msgid "Error ! You cannot create recursive assets."
|
||||||
msgstr ""
|
msgstr "Ошибка! Нельзя создавать рекурсивные активы."
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:asset.asset.report,posted_value:0
|
#: field:asset.asset.report,posted_value:0
|
||||||
|
@ -205,7 +205,7 @@ msgstr "# позиций амортизации"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.asset,method_period:0
|
#: field:account.asset.asset,method_period:0
|
||||||
msgid "Number of Months in a Period"
|
msgid "Number of Months in a Period"
|
||||||
msgstr ""
|
msgstr "Количество месяцев в периоде"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:asset.asset.report:0
|
#: view:asset.asset.report:0
|
||||||
|
@ -234,7 +234,7 @@ msgstr "Счет активов"
|
||||||
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
|
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
|
||||||
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
|
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
|
||||||
msgid "Compute Assets"
|
msgid "Compute Assets"
|
||||||
msgstr ""
|
msgstr "Вычислить активы"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.category,method_period:0
|
#: field:account.asset.category,method_period:0
|
||||||
|
@ -265,12 +265,12 @@ msgstr "Изменить длительность"
|
||||||
#: help:account.asset.category,method_number:0
|
#: help:account.asset.category,method_number:0
|
||||||
#: help:account.asset.history,method_number:0
|
#: help:account.asset.history,method_number:0
|
||||||
msgid "The number of depreciations needed to depreciate your asset"
|
msgid "The number of depreciations needed to depreciate your asset"
|
||||||
msgstr ""
|
msgstr "Количество амортизаций необходимых для обесценивания актива"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:account.asset.category:0
|
#: view:account.asset.category:0
|
||||||
msgid "Analytic Information"
|
msgid "Analytic Information"
|
||||||
msgstr ""
|
msgstr "Аналитическая информация"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.category,account_analytic_id:0
|
#: field:account.asset.category,account_analytic_id:0
|
||||||
|
@ -293,7 +293,7 @@ msgstr ""
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.depreciation.line,remaining_value:0
|
#: field:account.asset.depreciation.line,remaining_value:0
|
||||||
msgid "Next Period Depreciation"
|
msgid "Next Period Depreciation"
|
||||||
msgstr ""
|
msgstr "Следующий период амортизации"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: help:account.asset.history,method_period:0
|
#: help:account.asset.history,method_period:0
|
||||||
|
@ -344,7 +344,7 @@ msgstr "Поиск категории актива"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:asset.modify:0
|
#: view:asset.modify:0
|
||||||
msgid "months"
|
msgid "months"
|
||||||
msgstr ""
|
msgstr "месяцы"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: model:ir.model,name:account_asset.model_account_invoice_line
|
#: model:ir.model,name:account_asset.model_account_invoice_line
|
||||||
|
@ -372,7 +372,7 @@ msgstr ""
|
||||||
#: view:asset.depreciation.confirmation.wizard:0
|
#: view:asset.depreciation.confirmation.wizard:0
|
||||||
#: view:asset.modify:0
|
#: view:asset.modify:0
|
||||||
msgid "or"
|
msgid "or"
|
||||||
msgstr ""
|
msgstr "или"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.asset,note:0
|
#: field:account.asset.asset,note:0
|
||||||
|
@ -406,7 +406,7 @@ msgstr ""
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:asset.asset.report:0
|
#: view:asset.asset.report:0
|
||||||
msgid "Assets in running state"
|
msgid "Assets in running state"
|
||||||
msgstr ""
|
msgstr "Активы в рабочем состоянии"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:account.asset.asset:0
|
#: view:account.asset.asset:0
|
||||||
|
@ -427,7 +427,7 @@ msgstr ""
|
||||||
#: field:account.asset.asset,state:0
|
#: field:account.asset.asset,state:0
|
||||||
#: field:asset.asset.report,state:0
|
#: field:asset.asset.report,state:0
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr ""
|
msgstr "Статус"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.asset,partner_id:0
|
#: field:account.asset.asset,partner_id:0
|
||||||
|
@ -474,12 +474,12 @@ msgstr "Вычислить"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:account.asset.history:0
|
#: view:account.asset.history:0
|
||||||
msgid "Asset History"
|
msgid "Asset History"
|
||||||
msgstr ""
|
msgstr "История актива"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
|
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
|
||||||
msgid "asset.depreciation.confirmation.wizard"
|
msgid "asset.depreciation.confirmation.wizard"
|
||||||
msgstr ""
|
msgstr "asset.depreciation.confirmation.wizard"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.asset,active:0
|
#: field:account.asset.asset,active:0
|
||||||
|
@ -505,7 +505,7 @@ msgstr "История"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:asset.depreciation.confirmation.wizard:0
|
#: view:asset.depreciation.confirmation.wizard:0
|
||||||
msgid "Compute Asset"
|
msgid "Compute Asset"
|
||||||
msgstr ""
|
msgstr "Вычислить актив"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:asset.depreciation.confirmation.wizard,period_id:0
|
#: field:asset.depreciation.confirmation.wizard,period_id:0
|
||||||
|
@ -521,7 +521,7 @@ msgstr "Общий"
|
||||||
#: field:account.asset.asset,prorata:0
|
#: field:account.asset.asset,prorata:0
|
||||||
#: field:account.asset.category,prorata:0
|
#: field:account.asset.category,prorata:0
|
||||||
msgid "Prorata Temporis"
|
msgid "Prorata Temporis"
|
||||||
msgstr ""
|
msgstr "По истечении срока"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: model:ir.model,name:account_asset.model_account_invoice
|
#: model:ir.model,name:account_asset.model_account_invoice
|
||||||
|
@ -553,7 +553,7 @@ msgstr "Элементы журнала"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:asset.modify:0
|
#: view:asset.modify:0
|
||||||
msgid "Asset Durations to Modify"
|
msgid "Asset Durations to Modify"
|
||||||
msgstr ""
|
msgstr "Актив - интервал времени для изменения"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.asset,purchase_date:0
|
#: field:account.asset.asset,purchase_date:0
|
||||||
|
@ -574,6 +574,8 @@ msgid ""
|
||||||
"Choose the period for which you want to automatically post the depreciation "
|
"Choose the period for which you want to automatically post the depreciation "
|
||||||
"lines of running assets"
|
"lines of running assets"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Выберите период, за который вы хотите автоматически создавать записи "
|
||||||
|
"амортизации для актива"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:account.asset.asset:0
|
#: view:account.asset.asset:0
|
||||||
|
@ -588,12 +590,12 @@ msgstr "Метод амортизации"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.depreciation.line,amount:0
|
#: field:account.asset.depreciation.line,amount:0
|
||||||
msgid "Current Depreciation"
|
msgid "Current Depreciation"
|
||||||
msgstr ""
|
msgstr "Текущая аммортизация"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.asset,name:0
|
#: field:account.asset.asset,name:0
|
||||||
msgid "Asset Name"
|
msgid "Asset Name"
|
||||||
msgstr ""
|
msgstr "Название актива"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.category,open_asset:0
|
#: field:account.asset.category,open_asset:0
|
||||||
|
@ -618,7 +620,7 @@ msgstr "Журнал"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.history,name:0
|
#: field:account.asset.history,name:0
|
||||||
msgid "History name"
|
msgid "History name"
|
||||||
msgstr ""
|
msgstr "Название истории"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.depreciation.line,depreciated_value:0
|
#: field:account.asset.depreciation.line,depreciated_value:0
|
||||||
|
@ -657,7 +659,7 @@ msgstr ""
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.asset,purchase_value:0
|
#: field:account.asset.asset,purchase_value:0
|
||||||
msgid "Gross Value"
|
msgid "Gross Value"
|
||||||
msgstr ""
|
msgstr "Валовая стоимость"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.category,name:0
|
#: field:account.asset.category,name:0
|
||||||
|
@ -703,12 +705,12 @@ msgstr ""
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.depreciation.line,sequence:0
|
#: field:account.asset.depreciation.line,sequence:0
|
||||||
msgid "Sequence"
|
msgid "Sequence"
|
||||||
msgstr ""
|
msgstr "Нумерация"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: help:account.asset.category,method_period:0
|
#: help:account.asset.category,method_period:0
|
||||||
msgid "State here the time between 2 depreciations, in months"
|
msgid "State here the time between 2 depreciations, in months"
|
||||||
msgstr ""
|
msgstr "Время между двумя амортизациями в месяцах"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: field:account.asset.history,date:0
|
#: field:account.asset.history,date:0
|
||||||
|
@ -729,7 +731,7 @@ msgstr "Число амортизаций"
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:account.asset.asset:0
|
#: view:account.asset.asset:0
|
||||||
msgid "Create Move"
|
msgid "Create Move"
|
||||||
msgstr ""
|
msgstr "Создать перемещение"
|
||||||
|
|
||||||
#. module: account_asset
|
#. module: account_asset
|
||||||
#: view:account.asset.asset:0
|
#: view:account.asset.asset:0
|
||||||
|
|
|
@ -0,0 +1,741 @@
|
||||||
|
# Thai translation for openobject-addons
|
||||||
|
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
|
||||||
|
# This file is distributed under the same license as the openobject-addons package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: openobject-addons\n"
|
||||||
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||||
|
"PO-Revision-Date: 2013-05-15 10:09+0000\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: Thai <th@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Launchpad-Export-Date: 2013-05-16 05:12+0000\n"
|
||||||
|
"X-Generator: Launchpad (build 16626)\n"
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Assets in draft and open states"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,method_end:0
|
||||||
|
#: field:account.asset.history,method_end:0
|
||||||
|
#: field:asset.modify,method_end:0
|
||||||
|
msgid "Ending date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,value_residual:0
|
||||||
|
msgid "Residual Value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,account_expense_depreciation_id:0
|
||||||
|
msgid "Depr. Expense Account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
msgid "Group By..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:asset.asset.report,gross_value:0
|
||||||
|
msgid "Gross Amount"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
#: field:account.asset.depreciation.line,asset_id:0
|
||||||
|
#: field:account.asset.history,asset_id:0
|
||||||
|
#: field:account.move.line,asset_id:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: field:asset.asset.report,asset_id:0
|
||||||
|
#: model:ir.model,name:account_asset.model_account_asset_asset
|
||||||
|
msgid "Asset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.asset,prorata:0
|
||||||
|
#: help:account.asset.category,prorata:0
|
||||||
|
msgid ""
|
||||||
|
"Indicates that the first depreciation entry for this asset have to be done "
|
||||||
|
"from the purchase date instead of the first January"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: selection:account.asset.asset,method:0
|
||||||
|
#: selection:account.asset.category,method:0
|
||||||
|
msgid "Linear"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,company_id:0
|
||||||
|
#: field:account.asset.category,company_id:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: field:asset.asset.report,company_id:0
|
||||||
|
msgid "Company"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.modify:0
|
||||||
|
msgid "Modify"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: selection:account.asset.asset,state:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: selection:asset.asset.report,state:0
|
||||||
|
msgid "Running"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Set to Draft"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: model:ir.actions.act_window,name:account_asset.action_asset_asset_report
|
||||||
|
#: model:ir.model,name:account_asset.model_asset_asset_report
|
||||||
|
#: model:ir.ui.menu,name:account_asset.menu_action_asset_asset_report
|
||||||
|
msgid "Assets Analysis"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:asset.modify,name:0
|
||||||
|
msgid "Reason"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,method_progress_factor:0
|
||||||
|
#: field:account.asset.category,method_progress_factor:0
|
||||||
|
msgid "Degressive Factor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal
|
||||||
|
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_list_normal
|
||||||
|
msgid "Asset Categories"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
#: field:account.asset.asset,account_move_line_ids:0
|
||||||
|
#: field:account.move.line,entry_ids:0
|
||||||
|
#: model:ir.actions.act_window,name:account_asset.act_entries_open
|
||||||
|
msgid "Entries"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
#: field:account.asset.asset,depreciation_line_ids:0
|
||||||
|
msgid "Depreciation Lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.asset,salvage_value:0
|
||||||
|
msgid "It is the amount you plan to have that you cannot depreciate."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.asset,method_period:0
|
||||||
|
msgid "The amount of time between two depreciations, in months"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,depreciation_date:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: field:asset.asset.report,depreciation_date:0
|
||||||
|
msgid "Depreciation Date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: constraint:account.asset.asset:0
|
||||||
|
msgid "Error ! You cannot create recursive assets."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:asset.asset.report,posted_value:0
|
||||||
|
msgid "Posted Amount"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_form
|
||||||
|
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_form
|
||||||
|
#: model:ir.ui.menu,name:account_asset.menu_finance_assets
|
||||||
|
#: model:ir.ui.menu,name:account_asset.menu_finance_config_assets
|
||||||
|
msgid "Assets"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,account_depreciation_id:0
|
||||||
|
msgid "Depreciation Account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
#: view:account.asset.category:0
|
||||||
|
#: view:account.asset.history:0
|
||||||
|
#: view:asset.modify:0
|
||||||
|
#: field:asset.modify,note:0
|
||||||
|
msgid "Notes"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,move_id:0
|
||||||
|
msgid "Depreciation Entry"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: field:asset.asset.report,nbr:0
|
||||||
|
msgid "# of Depreciation Lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,method_period:0
|
||||||
|
msgid "Number of Months in a Period"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
msgid "Assets in draft state"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,method_end:0
|
||||||
|
#: selection:account.asset.asset,method_time:0
|
||||||
|
#: selection:account.asset.category,method_time:0
|
||||||
|
#: selection:account.asset.history,method_time:0
|
||||||
|
msgid "Ending Date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,code:0
|
||||||
|
msgid "Reference"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Account Asset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
|
||||||
|
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
|
||||||
|
msgid "Compute Assets"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,method_period:0
|
||||||
|
#: field:account.asset.history,method_period:0
|
||||||
|
#: field:asset.modify,method_period:0
|
||||||
|
msgid "Period Length"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: selection:account.asset.asset,state:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: selection:asset.asset.report,state:0
|
||||||
|
msgid "Draft"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
msgid "Date of asset purchase"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Change Duration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.asset,method_number:0
|
||||||
|
#: help:account.asset.category,method_number:0
|
||||||
|
#: help:account.asset.history,method_number:0
|
||||||
|
msgid "The number of depreciations needed to depreciate your asset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.category:0
|
||||||
|
msgid "Analytic Information"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,account_analytic_id:0
|
||||||
|
msgid "Analytic account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,method:0
|
||||||
|
#: field:account.asset.category,method:0
|
||||||
|
msgid "Computation Method"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: constraint:account.asset.asset:0
|
||||||
|
msgid ""
|
||||||
|
"Prorata temporis can be applied only for time method \"number of "
|
||||||
|
"depreciations\"."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,remaining_value:0
|
||||||
|
msgid "Next Period Depreciation"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.history,method_period:0
|
||||||
|
msgid "Time in month between two depreciations"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.modify:0
|
||||||
|
#: model:ir.actions.act_window,name:account_asset.action_asset_modify
|
||||||
|
#: model:ir.model,name:account_asset.model_asset_modify
|
||||||
|
msgid "Modify Asset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,salvage_value:0
|
||||||
|
msgid "Salvage Value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,category_id:0
|
||||||
|
#: view:account.asset.category:0
|
||||||
|
#: field:account.invoice.line,asset_category_id:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
msgid "Asset Category"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Assets in closed state"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,parent_id:0
|
||||||
|
msgid "Parent Asset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.history:0
|
||||||
|
#: model:ir.model,name:account_asset.model_account_asset_history
|
||||||
|
msgid "Asset history"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.category:0
|
||||||
|
msgid "Search Asset Category"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.modify:0
|
||||||
|
msgid "months"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.model,name:account_asset.model_account_invoice_line
|
||||||
|
msgid "Invoice Line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Depreciation Board"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:asset.asset.report,unposted_value:0
|
||||||
|
msgid "Unposted Amount"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,method_time:0
|
||||||
|
#: field:account.asset.category,method_time:0
|
||||||
|
#: field:account.asset.history,method_time:0
|
||||||
|
msgid "Time Method"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.depreciation.confirmation.wizard:0
|
||||||
|
#: view:asset.modify:0
|
||||||
|
msgid "or"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,note:0
|
||||||
|
#: field:account.asset.category,note:0
|
||||||
|
#: field:account.asset.history,note:0
|
||||||
|
msgid "Note"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.history,method_time:0
|
||||||
|
msgid ""
|
||||||
|
"The method to use to compute the dates and number of depreciation lines.\n"
|
||||||
|
"Number of Depreciations: Fix the number of depreciation lines and the time "
|
||||||
|
"between 2 depreciations.\n"
|
||||||
|
"Ending Date: Choose the time between 2 depreciations and the date the "
|
||||||
|
"depreciations won't go beyond."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.asset,method_time:0
|
||||||
|
#: help:account.asset.category,method_time:0
|
||||||
|
msgid ""
|
||||||
|
"Choose the method to use to compute the dates and number of depreciation "
|
||||||
|
"lines.\n"
|
||||||
|
" * Number of Depreciations: Fix the number of depreciation lines and the "
|
||||||
|
"time between 2 depreciations.\n"
|
||||||
|
" * Ending Date: Choose the time between 2 depreciations and the date the "
|
||||||
|
"depreciations won't go beyond."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
msgid "Assets in running state"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Closed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.asset,state:0
|
||||||
|
msgid ""
|
||||||
|
"When an asset is created, the status is 'Draft'.\n"
|
||||||
|
"If the asset is confirmed, the status goes in 'Running' and the depreciation "
|
||||||
|
"lines can be posted in the accounting.\n"
|
||||||
|
"You can manually close an asset when the depreciation is over. If the last "
|
||||||
|
"line of depreciation is posted, the asset automatically goes in that status."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,state:0
|
||||||
|
#: field:asset.asset.report,state:0
|
||||||
|
msgid "Status"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,partner_id:0
|
||||||
|
#: field:asset.asset.report,partner_id:0
|
||||||
|
msgid "Partner"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
msgid "Posted depreciation lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,child_ids:0
|
||||||
|
msgid "Children Assets"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
msgid "Date of depreciation"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.history,user_id:0
|
||||||
|
msgid "User"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,account_asset_id:0
|
||||||
|
msgid "Asset Account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
msgid "Extended Filters..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
#: view:asset.depreciation.confirmation.wizard:0
|
||||||
|
msgid "Compute"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.history:0
|
||||||
|
msgid "Asset History"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
|
||||||
|
msgid "asset.depreciation.confirmation.wizard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,active:0
|
||||||
|
msgid "Active"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,parent_state:0
|
||||||
|
msgid "State of Asset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,name:0
|
||||||
|
msgid "Depreciation Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
#: field:account.asset.asset,history_ids:0
|
||||||
|
msgid "History"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.depreciation.confirmation.wizard:0
|
||||||
|
msgid "Compute Asset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:asset.depreciation.confirmation.wizard,period_id:0
|
||||||
|
msgid "Period"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "General"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,prorata:0
|
||||||
|
#: field:account.asset.category,prorata:0
|
||||||
|
msgid "Prorata Temporis"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.model,name:account_asset.model_account_invoice
|
||||||
|
msgid "Invoice"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Set to Close"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.depreciation.confirmation.wizard:0
|
||||||
|
#: view:asset.modify:0
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: selection:account.asset.asset,state:0
|
||||||
|
#: selection:asset.asset.report,state:0
|
||||||
|
msgid "Close"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.model,name:account_asset.model_account_move_line
|
||||||
|
msgid "Journal Items"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.modify:0
|
||||||
|
msgid "Asset Durations to Modify"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,purchase_date:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: field:asset.asset.report,purchase_date:0
|
||||||
|
msgid "Purchase Date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: selection:account.asset.asset,method:0
|
||||||
|
#: selection:account.asset.category,method:0
|
||||||
|
msgid "Degressive"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:asset.depreciation.confirmation.wizard,period_id:0
|
||||||
|
msgid ""
|
||||||
|
"Choose the period for which you want to automatically post the depreciation "
|
||||||
|
"lines of running assets"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Current"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.category:0
|
||||||
|
msgid "Depreciation Method"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,amount:0
|
||||||
|
msgid "Current Depreciation"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,name:0
|
||||||
|
msgid "Asset Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,open_asset:0
|
||||||
|
msgid "Skip Draft State"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.category:0
|
||||||
|
msgid "Depreciation Dates"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,currency_id:0
|
||||||
|
msgid "Currency"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,journal_id:0
|
||||||
|
msgid "Journal"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.history,name:0
|
||||||
|
msgid "History name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,depreciated_value:0
|
||||||
|
msgid "Amount Already Depreciated"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.asset,method:0
|
||||||
|
#: help:account.asset.category,method:0
|
||||||
|
msgid ""
|
||||||
|
"Choose the method to use to compute the amount of depreciation lines.\n"
|
||||||
|
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n"
|
||||||
|
" * Degressive: Calculated on basis of: Residual Value * Degressive Factor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,move_check:0
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: field:asset.asset.report,move_check:0
|
||||||
|
msgid "Posted"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.actions.act_window,help:account_asset.action_asset_asset_report
|
||||||
|
msgid ""
|
||||||
|
"<p>\n"
|
||||||
|
" From this report, you can have an overview on all depreciation. "
|
||||||
|
"The\n"
|
||||||
|
" tool search can also be used to personalise your Assets reports "
|
||||||
|
"and\n"
|
||||||
|
" so, match this analysis to your needs;\n"
|
||||||
|
" </p>\n"
|
||||||
|
" "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,purchase_value:0
|
||||||
|
msgid "Gross Value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.category,name:0
|
||||||
|
msgid "Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.category,open_asset:0
|
||||||
|
msgid ""
|
||||||
|
"Check this if you want to automatically confirm the assets of this category "
|
||||||
|
"when created by invoices."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:asset.asset.report,name:0
|
||||||
|
msgid "Year"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.model,name:account_asset.model_account_asset_depreciation_line
|
||||||
|
msgid "Asset depreciation line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.category:0
|
||||||
|
#: field:asset.asset.report,asset_category_id:0
|
||||||
|
#: model:ir.model,name:account_asset.model_account_asset_category
|
||||||
|
msgid "Asset category"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:asset.asset.report:0
|
||||||
|
#: field:asset.asset.report,depreciation_value:0
|
||||||
|
msgid "Amount of Depreciation Lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: code:addons/account_asset/wizard/wizard_asset_compute.py:49
|
||||||
|
#, python-format
|
||||||
|
msgid "Created Asset Moves"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.depreciation.line,sequence:0
|
||||||
|
msgid "Sequence"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: help:account.asset.category,method_period:0
|
||||||
|
msgid "State here the time between 2 depreciations, in months"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.history,date:0
|
||||||
|
msgid "Date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: field:account.asset.asset,method_number:0
|
||||||
|
#: selection:account.asset.asset,method_time:0
|
||||||
|
#: field:account.asset.category,method_number:0
|
||||||
|
#: selection:account.asset.category,method_time:0
|
||||||
|
#: field:account.asset.history,method_number:0
|
||||||
|
#: selection:account.asset.history,method_time:0
|
||||||
|
#: field:asset.modify,method_number:0
|
||||||
|
msgid "Number of Depreciations"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Create Move"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: view:account.asset.asset:0
|
||||||
|
msgid "Confirm Asset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_asset
|
||||||
|
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_tree
|
||||||
|
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_tree
|
||||||
|
msgid "Asset Hierarchy"
|
||||||
|
msgstr ""
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Thai translation for openobject-addons
|
||||||
|
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
|
||||||
|
# This file is distributed under the same license as the openobject-addons package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: openobject-addons\n"
|
||||||
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||||
|
"PO-Revision-Date: 2013-05-15 07:04+0000\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: Thai <th@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Launchpad-Export-Date: 2013-05-16 05:12+0000\n"
|
||||||
|
"X-Generator: Launchpad (build 16626)\n"
|
||||||
|
|
||||||
|
#. module: account_cancel
|
||||||
|
#: view:account.invoice:0
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
|
@ -8,14 +8,14 @@ msgstr ""
|
||||||
"Project-Id-Version: openobject-addons\n"
|
"Project-Id-Version: openobject-addons\n"
|
||||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||||
"PO-Revision-Date: 2012-12-11 13:00+0000\n"
|
"PO-Revision-Date: 2013-06-03 07:47+0000\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||||
"Language-Team: Russian <ru@li.org>\n"
|
"Language-Team: Russian <ru@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:51+0000\n"
|
"X-Launchpad-Export-Date: 2013-06-04 05:20+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16660)\n"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: selection:res.company,check_layout:0
|
#: selection:res.company,check_layout:0
|
||||||
|
@ -25,13 +25,13 @@ msgstr ""
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: report:account.print.check.top:0
|
#: report:account.print.check.top:0
|
||||||
msgid "Open Balance"
|
msgid "Open Balance"
|
||||||
msgstr ""
|
msgstr "Открытый баланс"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: view:account.check.write:0
|
#: view:account.check.write:0
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "Print Check"
|
msgid "Print Check"
|
||||||
msgstr ""
|
msgstr "Напечатать чек"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: selection:res.company,check_layout:0
|
#: selection:res.company,check_layout:0
|
||||||
|
@ -82,7 +82,7 @@ msgstr "Описание"
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: model:ir.model,name:account_check_writing.model_account_journal
|
#: model:ir.model,name:account_check_writing.model_account_journal
|
||||||
msgid "Journal"
|
msgid "Journal"
|
||||||
msgstr ""
|
msgstr "Журнал"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: model:ir.actions.act_window,name:account_check_writing.action_write_check
|
#: model:ir.actions.act_window,name:account_check_writing.action_write_check
|
||||||
|
@ -95,14 +95,14 @@ msgstr ""
|
||||||
#: report:account.print.check.middle:0
|
#: report:account.print.check.middle:0
|
||||||
#: report:account.print.check.top:0
|
#: report:account.print.check.top:0
|
||||||
msgid "Discount"
|
msgid "Discount"
|
||||||
msgstr ""
|
msgstr "Скидка"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: report:account.print.check.bottom:0
|
#: report:account.print.check.bottom:0
|
||||||
#: report:account.print.check.middle:0
|
#: report:account.print.check.middle:0
|
||||||
#: report:account.print.check.top:0
|
#: report:account.print.check.top:0
|
||||||
msgid "Original Amount"
|
msgid "Original Amount"
|
||||||
msgstr ""
|
msgstr "Первоначальная сумма"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: field:res.company,check_layout:0
|
#: field:res.company,check_layout:0
|
||||||
|
@ -119,7 +119,7 @@ msgstr ""
|
||||||
#: report:account.print.check.middle:0
|
#: report:account.print.check.middle:0
|
||||||
#: report:account.print.check.top:0
|
#: report:account.print.check.top:0
|
||||||
msgid "Payment"
|
msgid "Payment"
|
||||||
msgstr ""
|
msgstr "Платеж"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: field:account.journal,use_preprint_check:0
|
#: field:account.journal,use_preprint_check:0
|
||||||
|
@ -153,7 +153,7 @@ msgstr ""
|
||||||
#: report:account.print.check.middle:0
|
#: report:account.print.check.middle:0
|
||||||
#: report:account.print.check.top:0
|
#: report:account.print.check.top:0
|
||||||
msgid "Due Date"
|
msgid "Due Date"
|
||||||
msgstr ""
|
msgstr "Дата исполнения"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_middle
|
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_middle
|
||||||
|
@ -163,13 +163,13 @@ msgstr ""
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: model:ir.model,name:account_check_writing.model_res_company
|
#: model:ir.model,name:account_check_writing.model_res_company
|
||||||
msgid "Companies"
|
msgid "Companies"
|
||||||
msgstr ""
|
msgstr "Компании"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: code:addons/account_check_writing/wizard/account_check_batch_printing.py:59
|
#: code:addons/account_check_writing/wizard/account_check_batch_printing.py:59
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Error!"
|
msgid "Error!"
|
||||||
msgstr ""
|
msgstr "Ошибка!"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: help:account.check.write,check_number:0
|
#: help:account.check.write,check_number:0
|
||||||
|
@ -202,12 +202,12 @@ msgstr ""
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: view:account.check.write:0
|
#: view:account.check.write:0
|
||||||
msgid "or"
|
msgid "or"
|
||||||
msgstr ""
|
msgstr "или"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: field:account.voucher,amount_in_word:0
|
#: field:account.voucher,amount_in_word:0
|
||||||
msgid "Amount in Word"
|
msgid "Amount in Word"
|
||||||
msgstr ""
|
msgstr "Сумма прописью"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: model:ir.model,name:account_check_writing.model_account_check_write
|
#: model:ir.model,name:account_check_writing.model_account_check_write
|
||||||
|
@ -217,7 +217,7 @@ msgstr ""
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: view:account.check.write:0
|
#: view:account.check.write:0
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr ""
|
msgstr "Отмена"
|
||||||
|
|
||||||
#. module: account_check_writing
|
#. module: account_check_writing
|
||||||
#: field:account.check.write,check_number:0
|
#: field:account.check.write,check_number:0
|
||||||
|
|
|
@ -165,9 +165,8 @@ class res_partner(osv.osv):
|
||||||
else:
|
else:
|
||||||
action_text = partner.latest_followup_level_id_without_lit.manual_action_note or ''
|
action_text = partner.latest_followup_level_id_without_lit.manual_action_note or ''
|
||||||
|
|
||||||
#Check date: put the minimum date if it existed already
|
#Check date: only change when it did not exist already
|
||||||
action_date = (partner.payment_next_action_date and min(partner.payment_next_action_date, fields.date.context_today(self, cr, uid, context=context))
|
action_date = partner.payment_next_action_date or fields.date.context_today(self, cr, uid, context=context)
|
||||||
) or fields.date.context_today(self, cr, uid, context=context)
|
|
||||||
|
|
||||||
# Check responsible: if partner has not got a responsible already, take from follow-up
|
# Check responsible: if partner has not got a responsible already, take from follow-up
|
||||||
responsible_id = False
|
responsible_id = False
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
<field name="model">res.partner</field>
|
<field name="model">res.partner</field>
|
||||||
<field name="priority" eval="20"/>
|
<field name="priority" eval="20"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Customer Followup">
|
<tree string="Customer Followup" create="false" delete="false">
|
||||||
<field name="display_name"/>
|
<field name="display_name"/>
|
||||||
<field name="payment_next_action_date"/>
|
<field name="payment_next_action_date"/>
|
||||||
<field name="payment_next_action"/>
|
<field name="payment_next_action"/>
|
||||||
<field name="user_id" invisible="1"/>
|
<field name="user_id" invisible="1"/>
|
||||||
|
<field name="country_id" invisible="1"/>
|
||||||
<field name="parent_id" invisible="1"/>
|
<field name="parent_id" invisible="1"/>
|
||||||
<field name="payment_responsible_id"/>
|
<field name="payment_responsible_id"/>
|
||||||
<field name="payment_earliest_due_date"/>
|
<field name="payment_earliest_due_date"/>
|
||||||
|
@ -97,7 +98,7 @@
|
||||||
<button name="action_done" type="object" string="⇾ Mark as Done"
|
<button name="action_done" type="object" string="⇾ Mark as Done"
|
||||||
help="Click to mark the action as done." class="oe_link"
|
help="Click to mark the action as done." class="oe_link"
|
||||||
attrs="{'invisible':[('payment_next_action_date','=', False)]}"
|
attrs="{'invisible':[('payment_next_action_date','=', False)]}"
|
||||||
groups="base.group_partner_manager"/>
|
groups="account.group_account_user"/>
|
||||||
<field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>
|
<field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||||
"PO-Revision-Date: 2011-11-11 15:21+0000\n"
|
"PO-Revision-Date: 2013-05-31 10:28+0000\n"
|
||||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:11+0000\n"
|
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16660)\n"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: model:email.template,subject:account_followup.email_template_account_followup_default
|
#: model:email.template,subject:account_followup.email_template_account_followup_default
|
||||||
|
@ -22,7 +22,7 @@ msgstr ""
|
||||||
#: model:email.template,subject:account_followup.email_template_account_followup_level1
|
#: model:email.template,subject:account_followup.email_template_account_followup_level1
|
||||||
#: model:email.template,subject:account_followup.email_template_account_followup_level2
|
#: model:email.template,subject:account_followup.email_template_account_followup_level2
|
||||||
msgid "${user.company_id.name} Payment Reminder"
|
msgid "${user.company_id.name} Payment Reminder"
|
||||||
msgstr ""
|
msgstr "${user.company_id.name} напоминание о платеже"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: help:res.partner,latest_followup_level_id:0
|
#: help:res.partner,latest_followup_level_id:0
|
||||||
|
@ -43,12 +43,12 @@ msgstr "Дальнейшие действия"
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.followup.line:0
|
#: view:account_followup.followup.line:0
|
||||||
msgid "%(date)s"
|
msgid "%(date)s"
|
||||||
msgstr ""
|
msgstr "%(date)s"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: field:res.partner,payment_next_action_date:0
|
#: field:res.partner,payment_next_action_date:0
|
||||||
msgid "Next Action Date"
|
msgid "Next Action Date"
|
||||||
msgstr ""
|
msgstr "Дата следующего действия"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.followup.line:0
|
#: view:account_followup.followup.line:0
|
||||||
|
@ -64,7 +64,7 @@ msgstr ""
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:res.partner:0
|
#: view:res.partner:0
|
||||||
msgid "⇾ Mark as Done"
|
msgid "⇾ Mark as Done"
|
||||||
msgstr ""
|
msgstr "⇾ отметить как сделанное"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: field:account_followup.followup.line,manual_action_note:0
|
#: field:account_followup.followup.line,manual_action_note:0
|
||||||
|
@ -94,7 +94,7 @@ msgstr "Тема эл.письма"
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.followup.line:0
|
#: view:account_followup.followup.line:0
|
||||||
msgid "%(user_signature)s"
|
msgid "%(user_signature)s"
|
||||||
msgstr ""
|
msgstr "%(user_signature)s"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.followup.line:0
|
#: view:account_followup.followup.line:0
|
||||||
|
@ -109,19 +109,19 @@ msgstr ""
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: field:account_followup.print,email_body:0
|
#: field:account_followup.print,email_body:0
|
||||||
msgid "Email Body"
|
msgid "Email Body"
|
||||||
msgstr ""
|
msgstr "Тело эл. письма"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: model:ir.actions.act_window,name:account_followup.action_account_followup_print
|
#: model:ir.actions.act_window,name:account_followup.action_account_followup_print
|
||||||
msgid "Send Follow-Ups"
|
msgid "Send Follow-Ups"
|
||||||
msgstr ""
|
msgstr "Послать напоминания"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: report:account_followup.followup.print:0
|
#: report:account_followup.followup.print:0
|
||||||
#: code:addons/account_followup/account_followup.py:263
|
#: code:addons/account_followup/account_followup.py:263
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Amount"
|
msgid "Amount"
|
||||||
msgstr ""
|
msgstr "Сумма"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: help:res.partner,payment_next_action:0
|
#: help:res.partner,payment_next_action:0
|
||||||
|
@ -133,7 +133,7 @@ msgstr ""
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:res.partner:0
|
#: view:res.partner:0
|
||||||
msgid "No Responsible"
|
msgid "No Responsible"
|
||||||
msgstr ""
|
msgstr "Нет ответственного"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: model:account_followup.followup.line,description:account_followup.demo_followup_line2
|
#: model:account_followup.followup.line,description:account_followup.demo_followup_line2
|
||||||
|
@ -209,17 +209,17 @@ msgstr "Всего по дебету"
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: field:res.partner,payment_next_action:0
|
#: field:res.partner,payment_next_action:0
|
||||||
msgid "Next Action"
|
msgid "Next Action"
|
||||||
msgstr ""
|
msgstr "Следующее действие"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.followup.line:0
|
#: view:account_followup.followup.line:0
|
||||||
msgid ": Partner Name"
|
msgid ": Partner Name"
|
||||||
msgstr ""
|
msgstr ": Название партнера"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: field:account_followup.followup.line,manual_action_responsible_id:0
|
#: field:account_followup.followup.line,manual_action_responsible_id:0
|
||||||
msgid "Assign a Responsible"
|
msgid "Assign a Responsible"
|
||||||
msgstr ""
|
msgstr "Назначить ответственного"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.followup:0
|
#: view:account_followup.followup:0
|
||||||
|
@ -305,7 +305,7 @@ msgstr ""
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.followup.line:0
|
#: view:account_followup.followup.line:0
|
||||||
msgid "%(partner_name)s"
|
msgid "%(partner_name)s"
|
||||||
msgstr ""
|
msgstr "%(partner_name)s"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: model:email.template,body_html:account_followup.email_template_account_followup_level1
|
#: model:email.template,body_html:account_followup.email_template_account_followup_level1
|
||||||
|
@ -377,7 +377,7 @@ msgstr "Определяет порядок вывода списка напом
|
||||||
#: code:addons/account_followup/wizard/account_followup_print.py:166
|
#: code:addons/account_followup/wizard/account_followup_print.py:166
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid " will be sent"
|
msgid " will be sent"
|
||||||
msgstr ""
|
msgstr " будет отправлен"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.followup.line:0
|
#: view:account_followup.followup.line:0
|
||||||
|
@ -388,7 +388,7 @@ msgstr ""
|
||||||
#: view:account_followup.followup.line:0
|
#: view:account_followup.followup.line:0
|
||||||
#: field:account_followup.followup.line,send_letter:0
|
#: field:account_followup.followup.line,send_letter:0
|
||||||
msgid "Send a Letter"
|
msgid "Send a Letter"
|
||||||
msgstr ""
|
msgstr "Отправить письмо"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: model:ir.actions.act_window,name:account_followup.action_account_followup_definition_form
|
#: model:ir.actions.act_window,name:account_followup.action_account_followup_definition_form
|
||||||
|
@ -466,7 +466,7 @@ msgstr "Напечатанное сообщение"
|
||||||
#: code:addons/account_followup/wizard/account_followup_print.py:155
|
#: code:addons/account_followup/wizard/account_followup_print.py:155
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Anybody"
|
msgid "Anybody"
|
||||||
msgstr ""
|
msgstr "Кто угодно"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: help:account_followup.followup.line,send_email:0
|
#: help:account_followup.followup.line,send_email:0
|
||||||
|
@ -528,7 +528,7 @@ msgstr ""
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:res.partner:0
|
#: view:res.partner:0
|
||||||
msgid "Search Partner"
|
msgid "Search Partner"
|
||||||
msgstr ""
|
msgstr "Поиск партнера"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: model:ir.ui.menu,name:account_followup.account_followup_print_menu
|
#: model:ir.ui.menu,name:account_followup.account_followup_print_menu
|
||||||
|
@ -554,7 +554,7 @@ msgstr ""
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:account_followup.print:0
|
#: view:account_followup.print:0
|
||||||
msgid "or"
|
msgid "or"
|
||||||
msgstr ""
|
msgstr "или"
|
||||||
|
|
||||||
#. module: account_followup
|
#. module: account_followup
|
||||||
#: view:res.partner:0
|
#: view:res.partner:0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<field name="name">account_followup.stat.tree</field>
|
<field name="name">account_followup.stat.tree</field>
|
||||||
<field name="model">account_followup.stat</field>
|
<field name="model">account_followup.stat</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Follow-up lines">
|
<tree string="Follow-up lines" create="false">
|
||||||
<field name="partner_id"/>
|
<field name="partner_id"/>
|
||||||
<field name="date_move"/>
|
<field name="date_move"/>
|
||||||
<field name="date_move_last"/>
|
<field name="date_move_last"/>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<record id="account_followup_comp_rule" model="ir.rule">
|
<record id="account_followup_comp_rule" model="ir.rule">
|
||||||
<field name="name">Account Follow-up multi company rule</field>
|
<field name="name">Account Follow-up multi company rule</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_account_followup_followup"/>
|
<field name="model_id" ref="model_account_followup_followup"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -15,21 +15,21 @@
|
||||||
|
|
||||||
<record id="payment_mode_comp_rule" model="ir.rule">
|
<record id="payment_mode_comp_rule" model="ir.rule">
|
||||||
<field name="name">Payment Mode company rule</field>
|
<field name="name">Payment Mode company rule</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_payment_mode"/>
|
<field name="model_id" ref="model_payment_mode"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="payment_order_comp_rule" model="ir.rule">
|
<record id="payment_order_comp_rule" model="ir.rule">
|
||||||
<field name="name">Payment order multi company rule</field>
|
<field name="name">Payment order multi company rule</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_payment_order"/>
|
<field name="model_id" ref="model_payment_order"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="payment_line_comp_rule" model="ir.rule">
|
<record id="payment_line_comp_rule" model="ir.rule">
|
||||||
<field name="name">Payment line multi company rule</field>
|
<field name="name">Payment line multi company rule</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_payment_line"/>
|
<field name="model_id" ref="model_payment_line"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -23,6 +23,7 @@ import time
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
from openerp.osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
|
from openerp.tools.translate import _
|
||||||
|
|
||||||
class payment_order_create(osv.osv_memory):
|
class payment_order_create(osv.osv_memory):
|
||||||
"""
|
"""
|
||||||
|
@ -108,7 +109,7 @@ class payment_order_create(osv.osv_memory):
|
||||||
context.update({'line_ids': line_ids})
|
context.update({'line_ids': line_ids})
|
||||||
model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context)
|
model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context)
|
||||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||||
return {'name': ('Entrie Lines'),
|
return {'name': _('Entry Lines'),
|
||||||
'context': context,
|
'context': context,
|
||||||
'view_type': 'form',
|
'view_type': 'form',
|
||||||
'view_mode': 'form',
|
'view_mode': 'form',
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# 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
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,241 @@
|
||||||
|
# Russian translation for openobject-addons
|
||||||
|
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
|
||||||
|
# This file is distributed under the same license as the openobject-addons package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: openobject-addons\n"
|
||||||
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||||
|
"PO-Revision-Date: 2013-06-05 07:09+0000\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: Russian <ru@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
|
||||||
|
"X-Generator: Launchpad (build 16667)\n"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: view:accounting.assert.test:0
|
||||||
|
msgid ""
|
||||||
|
"Code should always set a variable named `result` with the result of your "
|
||||||
|
"test, that can be a list or\n"
|
||||||
|
"a dictionary. If `result` is an empty list, it means that the test was "
|
||||||
|
"succesful. Otherwise it will\n"
|
||||||
|
"try to translate and print what is inside `result`.\n"
|
||||||
|
"\n"
|
||||||
|
"If the result of your test is a dictionary, you can set a variable named "
|
||||||
|
"`column_order` to choose in\n"
|
||||||
|
"what order you want to print `result`'s content.\n"
|
||||||
|
"\n"
|
||||||
|
"Should you need them, you can also use the following variables into your "
|
||||||
|
"code:\n"
|
||||||
|
" * cr: cursor to the database\n"
|
||||||
|
" * uid: ID of the current user\n"
|
||||||
|
"\n"
|
||||||
|
"In any ways, the code must be legal python statements with correct "
|
||||||
|
"indentation (if needed).\n"
|
||||||
|
"\n"
|
||||||
|
"Example: \n"
|
||||||
|
" sql = '''SELECT id, name, ref, date\n"
|
||||||
|
" FROM account_move_line \n"
|
||||||
|
" WHERE account_id IN (SELECT id FROM account_account WHERE type "
|
||||||
|
"= 'view')\n"
|
||||||
|
" '''\n"
|
||||||
|
" cr.execute(sql)\n"
|
||||||
|
" result = cr.dictfetchall()"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_02
|
||||||
|
msgid "Test 2: Opening a fiscal year"
|
||||||
|
msgstr "Проверка 2: Открытие фискального года"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_05
|
||||||
|
msgid ""
|
||||||
|
"Check that reconciled invoice for Sales/Purchases has reconciled entries for "
|
||||||
|
"Payable and Receivable Accounts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_03
|
||||||
|
msgid ""
|
||||||
|
"Check if movement lines are balanced and have the same date and period"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: field:accounting.assert.test,name:0
|
||||||
|
msgid "Test Name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: report:account.test.assert.print:0
|
||||||
|
msgid "Accouting tests on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_01
|
||||||
|
msgid "Test 1: General balance"
|
||||||
|
msgstr "Проверка 1: Общий баланс"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_06
|
||||||
|
msgid "Check that paid/reconciled invoices are not in 'Open' state"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_05_2
|
||||||
|
msgid ""
|
||||||
|
"Check that reconciled account moves, that define Payable and Receivable "
|
||||||
|
"accounts, are belonging to reconciled invoices"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: view:accounting.assert.test:0
|
||||||
|
msgid "Tests"
|
||||||
|
msgstr "Проверки"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: field:accounting.assert.test,desc:0
|
||||||
|
msgid "Test Description"
|
||||||
|
msgstr "Описание проверки"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: view:accounting.assert.test:0
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "Описание"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_06_1
|
||||||
|
msgid "Check that there's no move for any account with « View » account type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_08
|
||||||
|
msgid "Test 9 : Accounts and partners on account moves"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:ir.actions.act_window,name:account_test.action_accounting_assert
|
||||||
|
#: model:ir.actions.report.xml,name:account_test.account_assert_test_report
|
||||||
|
#: model:ir.ui.menu,name:account_test.menu_action_license
|
||||||
|
msgid "Accounting Tests"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: code:addons/account_test/report/account_test_report.py:74
|
||||||
|
#, python-format
|
||||||
|
msgid "The test was passed successfully"
|
||||||
|
msgstr "Проверка прошла успешно"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: field:accounting.assert.test,active:0
|
||||||
|
msgid "Active"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_06
|
||||||
|
msgid "Test 6 : Invoices status"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:ir.model,name:account_test.model_accounting_assert_test
|
||||||
|
msgid "accounting.assert.test"
|
||||||
|
msgstr "accounting.assert.test"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_05
|
||||||
|
msgid ""
|
||||||
|
"Test 5.1 : Payable and Receivable accountant lines of reconciled invoices"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: field:accounting.assert.test,code_exec:0
|
||||||
|
msgid "Python code"
|
||||||
|
msgstr "Код на Python"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_07
|
||||||
|
msgid ""
|
||||||
|
"Check on bank statement that the Closing Balance = Starting Balance + sum of "
|
||||||
|
"statement lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_07
|
||||||
|
msgid "Test 8 : Closing balance on bank statements"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_03
|
||||||
|
msgid "Test 3: Movement lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_05_2
|
||||||
|
msgid "Test 5.2 : Reconcilied invoices and Payable/Receivable accounts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: view:accounting.assert.test:0
|
||||||
|
msgid "Expression"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_04
|
||||||
|
msgid "Test 4: Totally reconciled mouvements"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_04
|
||||||
|
msgid "Check if the totally reconciled movements are balanced"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: field:accounting.assert.test,sequence:0
|
||||||
|
msgid "Sequence"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_02
|
||||||
|
msgid ""
|
||||||
|
"Check if the balance of the new opened fiscal year matches with last year's "
|
||||||
|
"balance"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: view:accounting.assert.test:0
|
||||||
|
msgid "Python Code"
|
||||||
|
msgstr "Код на Python"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:ir.actions.act_window,help:account_test.action_accounting_assert
|
||||||
|
msgid ""
|
||||||
|
"<p class=\"oe_view_nocontent_create\">\n"
|
||||||
|
" Click to create Accounting Test.\n"
|
||||||
|
" </p>\n"
|
||||||
|
" "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_01
|
||||||
|
msgid "Check the balance: Debit sum = Credit sum"
|
||||||
|
msgstr "Проверяет баланс: сумма дебита = сумма кредита"
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,desc:account_test.account_test_08
|
||||||
|
msgid "Check that general accounts and partners on account moves are active"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: model:accounting.assert.test,name:account_test.account_test_06_1
|
||||||
|
msgid "Test 7: « View » account type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_test
|
||||||
|
#: view:accounting.assert.test:0
|
||||||
|
msgid "Code Help"
|
||||||
|
msgstr ""
|
|
@ -67,6 +67,7 @@ This module manages:
|
||||||
'test/sales_payment.yml',
|
'test/sales_payment.yml',
|
||||||
'test/account_voucher_report.yml',
|
'test/account_voucher_report.yml',
|
||||||
'test/case1_usd_usd.yml',
|
'test/case1_usd_usd.yml',
|
||||||
|
'test/case1_usd_usd_payment_rate.yml',
|
||||||
'test/case2_usd_eur_debtor_in_eur.yml',
|
'test/case2_usd_eur_debtor_in_eur.yml',
|
||||||
'test/case2_usd_eur_debtor_in_usd.yml',
|
'test/case2_usd_eur_debtor_in_usd.yml',
|
||||||
'test/case3_eur_eur.yml',
|
'test/case3_eur_eur.yml',
|
||||||
|
|
|
@ -26,6 +26,19 @@ from openerp.osv import fields, osv
|
||||||
import openerp.addons.decimal_precision as dp
|
import openerp.addons.decimal_precision as dp
|
||||||
from openerp.tools.translate import _
|
from openerp.tools.translate import _
|
||||||
from openerp.tools import float_compare
|
from openerp.tools import float_compare
|
||||||
|
from openerp.report import report_sxw
|
||||||
|
|
||||||
|
class res_currency(osv.osv):
|
||||||
|
_inherit = "res.currency"
|
||||||
|
|
||||||
|
def _get_current_rate(self, cr, uid, ids, name, arg, context=None):
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
|
res = super(res_currency, self)._get_current_rate(cr, uid, ids, name, arg, context=context)
|
||||||
|
if context.get('voucher_special_currency') in ids and context.get('voucher_special_currency_rate'):
|
||||||
|
res[context.get('voucher_special_currency')] = context.get('voucher_special_currency_rate')
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
class res_company(osv.osv):
|
class res_company(osv.osv):
|
||||||
_inherit = "res.company"
|
_inherit = "res.company"
|
||||||
|
@ -153,7 +166,7 @@ class account_voucher(osv.osv):
|
||||||
journal = journal_pool.browse(cr, uid, journal_id, context=context)
|
journal = journal_pool.browse(cr, uid, journal_id, context=context)
|
||||||
if journal.currency:
|
if journal.currency:
|
||||||
return journal.currency.id
|
return journal.currency.id
|
||||||
return False
|
return self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
|
||||||
|
|
||||||
def _get_partner(self, cr, uid, context=None):
|
def _get_partner(self, cr, uid, context=None):
|
||||||
if context is None: context = {}
|
if context is None: context = {}
|
||||||
|
@ -222,26 +235,26 @@ class account_voucher(osv.osv):
|
||||||
def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_currency, type, context=None):
|
def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_currency, type, context=None):
|
||||||
context = context or {}
|
context = context or {}
|
||||||
if not line_dr_ids and not line_cr_ids:
|
if not line_dr_ids and not line_cr_ids:
|
||||||
return {'value':{}}
|
return {'value':{'writeoff_amount': 0.0}}
|
||||||
line_osv = self.pool.get("account.voucher.line")
|
line_osv = self.pool.get("account.voucher.line")
|
||||||
line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context)
|
line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context)
|
||||||
line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context)
|
line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context)
|
||||||
|
|
||||||
#compute the field is_multi_currency that is used to hide/display options linked to secondary currency on the voucher
|
#compute the field is_multi_currency that is used to hide/display options linked to secondary currency on the voucher
|
||||||
is_multi_currency = False
|
is_multi_currency = False
|
||||||
if voucher_currency:
|
#loop on the voucher lines to see if one of these has a secondary currency. If yes, we need to see the options
|
||||||
# if the voucher currency is not False, it means it is different than the company currency and we need to display the options
|
|
||||||
is_multi_currency = True
|
|
||||||
else:
|
|
||||||
#loop on the voucher lines to see if one of these has a secondary currency. If yes, we need to define the options
|
|
||||||
for voucher_line in line_dr_ids+line_cr_ids:
|
for voucher_line in line_dr_ids+line_cr_ids:
|
||||||
company_currency = False
|
line_id = voucher_line.get('id') and self.pool.get('account.voucher.line').browse(cr, uid, voucher_line['id'], context=context).move_line_id.id or voucher_line.get('move_line_id')
|
||||||
company_currency = voucher_line.get('move_line_id', False) and self.pool.get('account.move.line').browse(cr, uid, voucher_line.get('move_line_id'), context=context).company_id.currency_id.id
|
if line_id and self.pool.get('account.move.line').browse(cr, uid, line_id, context=context).currency_id:
|
||||||
if voucher_line.get('currency_id', company_currency) != company_currency:
|
|
||||||
is_multi_currency = True
|
is_multi_currency = True
|
||||||
break
|
break
|
||||||
return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, type), 'is_multi_currency': is_multi_currency}}
|
return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, type), 'is_multi_currency': is_multi_currency}}
|
||||||
|
|
||||||
|
def _get_journal_currency(self, cr, uid, ids, name, args, context=None):
|
||||||
|
res = {}
|
||||||
|
for voucher in self.browse(cr, uid, ids, context=context):
|
||||||
|
res[voucher.id] = voucher.journal_id.currency and voucher.journal_id.currency.id or voucher.company_id.currency_id.id
|
||||||
|
return res
|
||||||
|
|
||||||
def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None):
|
def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None):
|
||||||
if not ids: return {}
|
if not ids: return {}
|
||||||
currency_obj = self.pool.get('res.currency')
|
currency_obj = self.pool.get('res.currency')
|
||||||
|
@ -258,20 +271,48 @@ class account_voucher(osv.osv):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _paid_amount_in_company_currency(self, cr, uid, ids, name, args, context=None):
|
def _paid_amount_in_company_currency(self, cr, uid, ids, name, args, context=None):
|
||||||
if not ids: return {}
|
if context is None:
|
||||||
|
context = {}
|
||||||
res = {}
|
res = {}
|
||||||
rate = 1.0
|
|
||||||
for voucher in self.browse(cr, uid, ids, context=context):
|
|
||||||
if voucher.currency_id:
|
|
||||||
if voucher.company_id.currency_id.id == voucher.payment_rate_currency_id.id:
|
|
||||||
rate = 1 / voucher.payment_rate
|
|
||||||
else:
|
|
||||||
ctx = context.copy()
|
ctx = context.copy()
|
||||||
ctx.update({'date': voucher.date})
|
for v in self.browse(cr, uid, ids, context=context):
|
||||||
voucher_rate = self.browse(cr, uid, voucher.id, context=ctx).currency_id.rate
|
ctx.update({'date': v.date})
|
||||||
company_currency_rate = voucher.company_id.currency_id.rate
|
#make a new call to browse in order to have the right date in the context, to get the right currency rate
|
||||||
rate = voucher_rate * company_currency_rate
|
voucher = self.browse(cr, uid, v.id, context=ctx)
|
||||||
res[voucher.id] = voucher.amount / rate
|
ctx.update({
|
||||||
|
'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,
|
||||||
|
'voucher_special_currency_rate': voucher.currency_id.rate * voucher.payment_rate,})
|
||||||
|
res[voucher.id] = self.pool.get('res.currency').compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, voucher.amount, context=ctx)
|
||||||
|
return res
|
||||||
|
|
||||||
|
def _get_currency_help_label(self, cr, uid, currency_id, payment_rate, payment_rate_currency_id, context=None):
|
||||||
|
"""
|
||||||
|
This function builds a string to help the users to understand the behavior of the payment rate fields they can specify on the voucher.
|
||||||
|
This string is only used to improve the usability in the voucher form view and has no other effect.
|
||||||
|
|
||||||
|
:param currency_id: the voucher currency
|
||||||
|
:type currency_id: integer
|
||||||
|
:param payment_rate: the value of the payment_rate field of the voucher
|
||||||
|
:type payment_rate: float
|
||||||
|
:param payment_rate_currency_id: the value of the payment_rate_currency_id field of the voucher
|
||||||
|
:type payment_rate_currency_id: integer
|
||||||
|
:return: translated string giving a tip on what's the effect of the current payment rate specified
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
rml_parser = report_sxw.rml_parse(cr, uid, 'currency_help_label', context=context)
|
||||||
|
currency_pool = self.pool.get('res.currency')
|
||||||
|
currency_str = payment_rate_str = ''
|
||||||
|
if currency_id:
|
||||||
|
currency_str = rml_parser.formatLang(1, currency_obj=currency_pool.browse(cr, uid, currency_id, context=context))
|
||||||
|
if payment_rate_currency_id:
|
||||||
|
payment_rate_str = rml_parser.formatLang(payment_rate, currency_obj=currency_pool.browse(cr, uid, payment_rate_currency_id, context=context))
|
||||||
|
currency_help_label = _('At the operation date, the exchange rate was\n%s = %s') % (currency_str, payment_rate_str)
|
||||||
|
return currency_help_label
|
||||||
|
|
||||||
|
def _fnct_currency_help_label(self, cr, uid, ids, name, args, context=None):
|
||||||
|
res = {}
|
||||||
|
for voucher in self.browse(cr, uid, ids, context=context):
|
||||||
|
res[voucher.id] = self._get_currency_help_label(cr, uid, voucher.currency_id.id, voucher.payment_rate, voucher.payment_rate_currency_id.id, context=context)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
_name = 'account.voucher'
|
_name = 'account.voucher'
|
||||||
|
@ -304,8 +345,7 @@ class account_voucher(osv.osv):
|
||||||
domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}),
|
domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}),
|
||||||
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||||
'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}),
|
'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}),
|
||||||
# 'currency_id':fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
'currency_id': fields.function(_get_journal_currency, type='many2one', relation='res.currency', string='Currency', readonly=True, required=True),
|
||||||
'currency_id': fields.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', readonly=True),
|
|
||||||
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||||
'state':fields.selection(
|
'state':fields.selection(
|
||||||
[('draft','Draft'),
|
[('draft','Draft'),
|
||||||
|
@ -346,6 +386,7 @@ class account_voucher(osv.osv):
|
||||||
help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'),
|
help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'),
|
||||||
'paid_amount_in_company_currency': fields.function(_paid_amount_in_company_currency, string='Paid Amount in Company Currency', type='float', readonly=True),
|
'paid_amount_in_company_currency': fields.function(_paid_amount_in_company_currency, string='Paid Amount in Company Currency', type='float', readonly=True),
|
||||||
'is_multi_currency': fields.boolean('Multi Currency Voucher', help='Fields with internal purpose only that depicts if the voucher is a multi currency one or not'),
|
'is_multi_currency': fields.boolean('Multi Currency Voucher', help='Fields with internal purpose only that depicts if the voucher is a multi currency one or not'),
|
||||||
|
'currency_help_label': fields.function(_fnct_currency_help_label, type='text', string="Helping Sentence", help="This sentence helps you to know how to specify the payment rate by giving you the direct effect it has"),
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'active': True,
|
'active': True,
|
||||||
|
@ -422,6 +463,8 @@ class account_voucher(osv.osv):
|
||||||
partner_pool = self.pool.get('res.partner')
|
partner_pool = self.pool.get('res.partner')
|
||||||
position_pool = self.pool.get('account.fiscal.position')
|
position_pool = self.pool.get('account.fiscal.position')
|
||||||
line_pool = self.pool.get('account.voucher.line')
|
line_pool = self.pool.get('account.voucher.line')
|
||||||
|
if not line_ids:
|
||||||
|
line_ids = []
|
||||||
res = {
|
res = {
|
||||||
'tax_amount': False,
|
'tax_amount': False,
|
||||||
'amount': False,
|
'amount': False,
|
||||||
|
@ -516,23 +559,26 @@ class account_voucher(osv.osv):
|
||||||
return default
|
return default
|
||||||
|
|
||||||
def onchange_rate(self, cr, uid, ids, rate, amount, currency_id, payment_rate_currency_id, company_id, context=None):
|
def onchange_rate(self, cr, uid, ids, rate, amount, currency_id, payment_rate_currency_id, company_id, context=None):
|
||||||
res = {'value': {'paid_amount_in_company_currency': amount}}
|
res = {'value': {'paid_amount_in_company_currency': amount, 'currency_help_label': self._get_currency_help_label(cr, uid, currency_id, rate, payment_rate_currency_id, context=context)}}
|
||||||
|
if rate and amount and currency_id:
|
||||||
company_currency = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id
|
company_currency = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id
|
||||||
if rate and amount and currency_id:# and currency_id == payment_rate_currency_id:
|
#context should contain the date, the payment currency and the payment rate specified on the voucher
|
||||||
voucher_rate = self.pool.get('res.currency').browse(cr, uid, currency_id, context).rate
|
amount_in_company_currency = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency.id, amount, context=context)
|
||||||
if company_currency.id == payment_rate_currency_id:
|
res['value']['paid_amount_in_company_currency'] = amount_in_company_currency
|
||||||
company_rate = rate
|
|
||||||
else:
|
|
||||||
company_rate = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id.rate
|
|
||||||
res['value']['paid_amount_in_company_currency'] = amount / voucher_rate * company_rate
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def onchange_amount(self, cr, uid, ids, amount, rate, partner_id, journal_id, currency_id, ttype, date, payment_rate_currency_id, company_id, context=None):
|
def onchange_amount(self, cr, uid, ids, amount, rate, partner_id, journal_id, currency_id, ttype, date, payment_rate_currency_id, company_id, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context)
|
|
||||||
ctx = context.copy()
|
ctx = context.copy()
|
||||||
ctx.update({'date': date})
|
ctx.update({'date': date})
|
||||||
|
#read the voucher rate with the right date in the context
|
||||||
|
currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id
|
||||||
|
voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate']
|
||||||
|
ctx.update({
|
||||||
|
'voucher_special_currency': payment_rate_currency_id,
|
||||||
|
'voucher_special_currency_rate': rate * voucher_rate})
|
||||||
|
res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=ctx)
|
||||||
vals = self.onchange_rate(cr, uid, ids, rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
|
vals = self.onchange_rate(cr, uid, ids, rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
|
||||||
for key in vals.keys():
|
for key in vals.keys():
|
||||||
res[key].update(vals[key])
|
res[key].update(vals[key])
|
||||||
|
@ -546,6 +592,7 @@ class account_voucher(osv.osv):
|
||||||
journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
|
journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
|
||||||
company_id = journal.company_id.id
|
company_id = journal.company_id.id
|
||||||
payment_rate = 1.0
|
payment_rate = 1.0
|
||||||
|
currency_id = currency_id or journal.company_id.currency_id.id
|
||||||
payment_rate_currency_id = currency_id
|
payment_rate_currency_id = currency_id
|
||||||
ctx = context.copy()
|
ctx = context.copy()
|
||||||
ctx.update({'date': date})
|
ctx.update({'date': date})
|
||||||
|
@ -561,24 +608,62 @@ class account_voucher(osv.osv):
|
||||||
# is not in the voucher currency
|
# is not in the voucher currency
|
||||||
payment_rate_currency_id = voucher_line['currency_id']
|
payment_rate_currency_id = voucher_line['currency_id']
|
||||||
tmp = currency_obj.browse(cr, uid, payment_rate_currency_id, context=ctx).rate
|
tmp = currency_obj.browse(cr, uid, payment_rate_currency_id, context=ctx).rate
|
||||||
voucher_currency_id = currency_id or journal.company_id.currency_id.id
|
payment_rate = tmp / currency_obj.browse(cr, uid, currency_id, context=ctx).rate
|
||||||
payment_rate = tmp / currency_obj.browse(cr, uid, voucher_currency_id, context=ctx).rate
|
|
||||||
break
|
break
|
||||||
|
vals['value'].update({
|
||||||
|
'payment_rate': payment_rate,
|
||||||
|
'currency_id': currency_id,
|
||||||
|
'payment_rate_currency_id': payment_rate_currency_id
|
||||||
|
})
|
||||||
|
#read the voucher rate with the right date in the context
|
||||||
|
voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate']
|
||||||
|
ctx.update({
|
||||||
|
'voucher_special_currency_rate': payment_rate * voucher_rate,
|
||||||
|
'voucher_special_currency': payment_rate_currency_id})
|
||||||
res = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
|
res = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
|
||||||
for key in res.keys():
|
for key in res.keys():
|
||||||
vals[key].update(res[key])
|
vals[key].update(res[key])
|
||||||
vals['value'].update({'payment_rate': payment_rate})
|
|
||||||
if payment_rate_currency_id:
|
|
||||||
vals['value'].update({'payment_rate_currency_id': payment_rate_currency_id})
|
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
|
def basic_onchange_partner(self, cr, uid, ids, partner_id, journal_id, ttype, context=None):
|
||||||
|
partner_pool = self.pool.get('res.partner')
|
||||||
|
journal_pool = self.pool.get('account.journal')
|
||||||
|
res = {'value': {'account_id': False}}
|
||||||
|
if not partner_id or not journal_id:
|
||||||
|
return res
|
||||||
|
|
||||||
|
journal = journal_pool.browse(cr, uid, journal_id, context=context)
|
||||||
|
partner = partner_pool.browse(cr, uid, partner_id, context=context)
|
||||||
|
account_id = False
|
||||||
|
if journal.type in ('sale','sale_refund'):
|
||||||
|
account_id = partner.property_account_receivable.id
|
||||||
|
elif journal.type in ('purchase', 'purchase_refund','expense'):
|
||||||
|
account_id = partner.property_account_payable.id
|
||||||
|
else:
|
||||||
|
account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
|
||||||
|
|
||||||
|
res['value']['account_id'] = account_id
|
||||||
|
return res
|
||||||
|
|
||||||
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=None):
|
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=None):
|
||||||
if not journal_id:
|
if not journal_id:
|
||||||
return {}
|
return {}
|
||||||
res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context)
|
if context is None:
|
||||||
vals = self.recompute_payment_rate(cr, uid, ids, res, currency_id, date, ttype, journal_id, amount, context=context)
|
context = {}
|
||||||
|
#TODO: comment me and use me directly in the sales/purchases views
|
||||||
|
res = self.basic_onchange_partner(cr, uid, ids, partner_id, journal_id, ttype, context=context)
|
||||||
|
if ttype in ['sale', 'purchase']:
|
||||||
|
return res
|
||||||
|
ctx = context.copy()
|
||||||
|
# not passing the payment_rate currency and the payment_rate in the context but it's ok because they are reset in recompute_payment_rate
|
||||||
|
ctx.update({'date': date})
|
||||||
|
vals = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=ctx)
|
||||||
|
vals2 = self.recompute_payment_rate(cr, uid, ids, vals, currency_id, date, ttype, journal_id, amount, context=context)
|
||||||
for key in vals.keys():
|
for key in vals.keys():
|
||||||
res[key].update(vals[key])
|
res[key].update(vals[key])
|
||||||
|
for key in vals2.keys():
|
||||||
|
res[key].update(vals2[key])
|
||||||
|
#TODO: can probably be removed now
|
||||||
#TODO: onchange_partner_id() should not returns [pre_line, line_dr_ids, payment_rate...] for type sale, and not
|
#TODO: onchange_partner_id() should not returns [pre_line, line_dr_ids, payment_rate...] for type sale, and not
|
||||||
# [pre_line, line_cr_ids, payment_rate...] for type purchase.
|
# [pre_line, line_cr_ids, payment_rate...] for type purchase.
|
||||||
# We should definitively split account.voucher object in two and make distinct on_change functions. In the
|
# We should definitively split account.voucher object in two and make distinct on_change functions. In the
|
||||||
|
@ -621,8 +706,6 @@ class account_voucher(osv.osv):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
context_multi_currency = context.copy()
|
context_multi_currency = context.copy()
|
||||||
if date:
|
|
||||||
context_multi_currency.update({'date': date})
|
|
||||||
|
|
||||||
currency_pool = self.pool.get('res.currency')
|
currency_pool = self.pool.get('res.currency')
|
||||||
move_line_pool = self.pool.get('account.move.line')
|
move_line_pool = self.pool.get('account.move.line')
|
||||||
|
@ -646,18 +729,6 @@ class account_voucher(osv.osv):
|
||||||
journal = journal_pool.browse(cr, uid, journal_id, context=context)
|
journal = journal_pool.browse(cr, uid, journal_id, context=context)
|
||||||
partner = partner_pool.browse(cr, uid, partner_id, context=context)
|
partner = partner_pool.browse(cr, uid, partner_id, context=context)
|
||||||
currency_id = currency_id or journal.company_id.currency_id.id
|
currency_id = currency_id or journal.company_id.currency_id.id
|
||||||
account_id = False
|
|
||||||
if journal.type in ('sale','sale_refund'):
|
|
||||||
account_id = partner.property_account_receivable.id
|
|
||||||
elif journal.type in ('purchase', 'purchase_refund','expense'):
|
|
||||||
account_id = partner.property_account_payable.id
|
|
||||||
else:
|
|
||||||
account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
|
|
||||||
|
|
||||||
default['value']['account_id'] = account_id
|
|
||||||
|
|
||||||
if journal.type not in ('cash', 'bank'):
|
|
||||||
return default
|
|
||||||
|
|
||||||
total_credit = 0.0
|
total_credit = 0.0
|
||||||
total_debit = 0.0
|
total_debit = 0.0
|
||||||
|
@ -715,12 +786,13 @@ class account_voucher(osv.osv):
|
||||||
if _remove_noise_in_o2m():
|
if _remove_noise_in_o2m():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if line.currency_id and currency_id==line.currency_id.id:
|
if line.currency_id and currency_id == line.currency_id.id:
|
||||||
amount_original = abs(line.amount_currency)
|
amount_original = abs(line.amount_currency)
|
||||||
amount_unreconciled = abs(line.amount_residual_currency)
|
amount_unreconciled = abs(line.amount_residual_currency)
|
||||||
else:
|
else:
|
||||||
amount_original = currency_pool.compute(cr, uid, company_currency, currency_id, line.credit or line.debit or 0.0)
|
#always use the amount booked in the company currency as the basis of the conversion into the voucher currency
|
||||||
amount_unreconciled = currency_pool.compute(cr, uid, company_currency, currency_id, abs(line.amount_residual))
|
amount_original = currency_pool.compute(cr, uid, company_currency, currency_id, line.credit or line.debit or 0.0, context=context_multi_currency)
|
||||||
|
amount_unreconciled = currency_pool.compute(cr, uid, company_currency, currency_id, abs(line.amount_residual), context=context_multi_currency)
|
||||||
line_currency_id = line.currency_id and line.currency_id.id or company_currency
|
line_currency_id = line.currency_id and line.currency_id.id or company_currency
|
||||||
rs = {
|
rs = {
|
||||||
'name':line.move_id.name,
|
'name':line.move_id.name,
|
||||||
|
@ -766,10 +838,15 @@ class account_voucher(osv.osv):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
res = {'value': {}}
|
res = {'value': {}}
|
||||||
|
if currency_id:
|
||||||
#set the default payment rate of the voucher and compute the paid amount in company currency
|
#set the default payment rate of the voucher and compute the paid amount in company currency
|
||||||
if currency_id and currency_id == payment_rate_currency_id:
|
|
||||||
ctx = context.copy()
|
ctx = context.copy()
|
||||||
ctx.update({'date': date})
|
ctx.update({'date': date})
|
||||||
|
#read the voucher rate with the right date in the context
|
||||||
|
voucher_rate = self.pool.get('res.currency').read(cr, uid, currency_id, ['rate'], context=ctx)['rate']
|
||||||
|
ctx.update({
|
||||||
|
'voucher_special_currency_rate': payment_rate * voucher_rate,
|
||||||
|
'voucher_special_currency': payment_rate_currency_id})
|
||||||
vals = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
|
vals = self.onchange_rate(cr, uid, ids, payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context=ctx)
|
||||||
for key in vals.keys():
|
for key in vals.keys():
|
||||||
res[key].update(vals[key])
|
res[key].update(vals[key])
|
||||||
|
@ -789,7 +866,8 @@ class account_voucher(osv.osv):
|
||||||
period_pool = self.pool.get('account.period')
|
period_pool = self.pool.get('account.period')
|
||||||
currency_obj = self.pool.get('res.currency')
|
currency_obj = self.pool.get('res.currency')
|
||||||
ctx = context.copy()
|
ctx = context.copy()
|
||||||
ctx.update({'company_id': company_id})
|
ctx.update({'company_id': company_id, 'account_period_prefer_normal': True})
|
||||||
|
voucher_currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id
|
||||||
pids = period_pool.find(cr, uid, date, context=ctx)
|
pids = period_pool.find(cr, uid, date, context=ctx)
|
||||||
if pids:
|
if pids:
|
||||||
res['value'].update({'period_id':pids[0]})
|
res['value'].update({'period_id':pids[0]})
|
||||||
|
@ -798,9 +876,8 @@ class account_voucher(osv.osv):
|
||||||
payment_rate = 1.0
|
payment_rate = 1.0
|
||||||
if payment_rate_currency_id != currency_id:
|
if payment_rate_currency_id != currency_id:
|
||||||
tmp = currency_obj.browse(cr, uid, payment_rate_currency_id, context=ctx).rate
|
tmp = currency_obj.browse(cr, uid, payment_rate_currency_id, context=ctx).rate
|
||||||
voucher_currency_id = currency_id or self.pool.get('res.company').browse(cr, uid, company_id, context=ctx).currency_id.id
|
|
||||||
payment_rate = tmp / currency_obj.browse(cr, uid, voucher_currency_id, context=ctx).rate
|
payment_rate = tmp / currency_obj.browse(cr, uid, voucher_currency_id, context=ctx).rate
|
||||||
vals = self.onchange_payment_rate_currency(cr, uid, ids, currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context=context)
|
vals = self.onchange_payment_rate_currency(cr, uid, ids, voucher_currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context=context)
|
||||||
vals['value'].update({'payment_rate': payment_rate})
|
vals['value'].update({'payment_rate': payment_rate})
|
||||||
for key in vals.keys():
|
for key in vals.keys():
|
||||||
res[key].update(vals[key])
|
res[key].update(vals[key])
|
||||||
|
@ -823,7 +900,15 @@ class account_voucher(osv.osv):
|
||||||
currency_id = False
|
currency_id = False
|
||||||
if journal.currency:
|
if journal.currency:
|
||||||
currency_id = journal.currency.id
|
currency_id = journal.currency.id
|
||||||
|
else:
|
||||||
|
currency_id = journal.company_id.currency_id.id
|
||||||
vals['value'].update({'currency_id': currency_id})
|
vals['value'].update({'currency_id': currency_id})
|
||||||
|
#in case we want to register the payment directly from an invoice, it's confusing to allow to switch the journal
|
||||||
|
#without seeing that the amount is expressed in the journal currency, and not in the invoice currency. So to avoid
|
||||||
|
#this common mistake, we simply reset the amount to 0 if the currency is not the invoice currency.
|
||||||
|
if context.get('payment_expected_currency') and currency_id != context.get('payment_expected_currency'):
|
||||||
|
vals['value']['amount'] = 0
|
||||||
|
amount = 0
|
||||||
res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context)
|
res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context)
|
||||||
for key in res.keys():
|
for key in res.keys():
|
||||||
vals[key].update(res[key])
|
vals[key].update(res[key])
|
||||||
|
@ -905,8 +990,8 @@ class account_voucher(osv.osv):
|
||||||
current_currency = self._get_current_currency(cr, uid, voucher_id, context)
|
current_currency = self._get_current_currency(cr, uid, voucher_id, context)
|
||||||
if current_currency <> company_currency:
|
if current_currency <> company_currency:
|
||||||
context_multi_currency = context.copy()
|
context_multi_currency = context.copy()
|
||||||
voucher_brw = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context)
|
voucher = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context)
|
||||||
context_multi_currency.update({'date': voucher_brw.date})
|
context_multi_currency.update({'date': voucher.date})
|
||||||
return context_multi_currency
|
return context_multi_currency
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
@ -921,33 +1006,33 @@ class account_voucher(osv.osv):
|
||||||
:return: mapping between fieldname and value of account move line to create
|
:return: mapping between fieldname and value of account move line to create
|
||||||
:rtype: dict
|
:rtype: dict
|
||||||
'''
|
'''
|
||||||
voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
||||||
debit = credit = 0.0
|
debit = credit = 0.0
|
||||||
# TODO: is there any other alternative then the voucher type ??
|
# TODO: is there any other alternative then the voucher type ??
|
||||||
# ANSWER: We can have payment and receipt "In Advance".
|
# ANSWER: We can have payment and receipt "In Advance".
|
||||||
# TODO: Make this logic available.
|
# TODO: Make this logic available.
|
||||||
# -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt
|
# -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt
|
||||||
if voucher_brw.type in ('purchase', 'payment'):
|
if voucher.type in ('purchase', 'payment'):
|
||||||
credit = voucher_brw.paid_amount_in_company_currency
|
credit = voucher.paid_amount_in_company_currency
|
||||||
elif voucher_brw.type in ('sale', 'receipt'):
|
elif voucher.type in ('sale', 'receipt'):
|
||||||
debit = voucher_brw.paid_amount_in_company_currency
|
debit = voucher.paid_amount_in_company_currency
|
||||||
if debit < 0: credit = -debit; debit = 0.0
|
if debit < 0: credit = -debit; debit = 0.0
|
||||||
if credit < 0: debit = -credit; credit = 0.0
|
if credit < 0: debit = -credit; credit = 0.0
|
||||||
sign = debit - credit < 0 and -1 or 1
|
sign = debit - credit < 0 and -1 or 1
|
||||||
#set the first line of the voucher
|
#set the first line of the voucher
|
||||||
move_line = {
|
move_line = {
|
||||||
'name': voucher_brw.name or '/',
|
'name': voucher.name or '/',
|
||||||
'debit': debit,
|
'debit': debit,
|
||||||
'credit': credit,
|
'credit': credit,
|
||||||
'account_id': voucher_brw.account_id.id,
|
'account_id': voucher.account_id.id,
|
||||||
'move_id': move_id,
|
'move_id': move_id,
|
||||||
'journal_id': voucher_brw.journal_id.id,
|
'journal_id': voucher.journal_id.id,
|
||||||
'period_id': voucher_brw.period_id.id,
|
'period_id': voucher.period_id.id,
|
||||||
'partner_id': voucher_brw.partner_id.id,
|
'partner_id': voucher.partner_id.id,
|
||||||
'currency_id': company_currency <> current_currency and current_currency or False,
|
'currency_id': company_currency <> current_currency and current_currency or False,
|
||||||
'amount_currency': company_currency <> current_currency and sign * voucher_brw.amount or 0.0,
|
'amount_currency': company_currency <> current_currency and sign * voucher.amount or 0.0,
|
||||||
'date': voucher_brw.date,
|
'date': voucher.date,
|
||||||
'date_maturity': voucher_brw.date_due
|
'date_maturity': voucher.date_due
|
||||||
}
|
}
|
||||||
return move_line
|
return move_line
|
||||||
|
|
||||||
|
@ -960,31 +1045,31 @@ class account_voucher(osv.osv):
|
||||||
:rtype: dict
|
:rtype: dict
|
||||||
'''
|
'''
|
||||||
seq_obj = self.pool.get('ir.sequence')
|
seq_obj = self.pool.get('ir.sequence')
|
||||||
voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
||||||
if voucher_brw.number:
|
if voucher.number:
|
||||||
name = voucher_brw.number
|
name = voucher.number
|
||||||
elif voucher_brw.journal_id.sequence_id:
|
elif voucher.journal_id.sequence_id:
|
||||||
if not voucher_brw.journal_id.sequence_id.active:
|
if not voucher.journal_id.sequence_id.active:
|
||||||
raise osv.except_osv(_('Configuration Error !'),
|
raise osv.except_osv(_('Configuration Error !'),
|
||||||
_('Please activate the sequence of selected journal !'))
|
_('Please activate the sequence of selected journal !'))
|
||||||
c = dict(context)
|
c = dict(context)
|
||||||
c.update({'fiscalyear_id': voucher_brw.period_id.fiscalyear_id.id})
|
c.update({'fiscalyear_id': voucher.period_id.fiscalyear_id.id})
|
||||||
name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=c)
|
name = seq_obj.next_by_id(cr, uid, voucher.journal_id.sequence_id.id, context=c)
|
||||||
else:
|
else:
|
||||||
raise osv.except_osv(_('Error!'),
|
raise osv.except_osv(_('Error!'),
|
||||||
_('Please define a sequence on the journal.'))
|
_('Please define a sequence on the journal.'))
|
||||||
if not voucher_brw.reference:
|
if not voucher.reference:
|
||||||
ref = name.replace('/','')
|
ref = name.replace('/','')
|
||||||
else:
|
else:
|
||||||
ref = voucher_brw.reference
|
ref = voucher.reference
|
||||||
|
|
||||||
move = {
|
move = {
|
||||||
'name': name,
|
'name': name,
|
||||||
'journal_id': voucher_brw.journal_id.id,
|
'journal_id': voucher.journal_id.id,
|
||||||
'narration': voucher_brw.narration,
|
'narration': voucher.narration,
|
||||||
'date': voucher_brw.date,
|
'date': voucher.date,
|
||||||
'ref': ref,
|
'ref': ref,
|
||||||
'period_id': voucher_brw.period_id.id,
|
'period_id': voucher.period_id.id,
|
||||||
}
|
}
|
||||||
return move
|
return move
|
||||||
|
|
||||||
|
@ -1011,6 +1096,9 @@ class account_voucher(osv.osv):
|
||||||
raise osv.except_osv(_('Insufficient Configuration!'),_("You should configure the 'Gain Exchange Rate Account' in the accounting settings, to manage automatically the booking of accounting entries related to differences between exchange rates."))
|
raise osv.except_osv(_('Insufficient Configuration!'),_("You should configure the 'Gain Exchange Rate Account' in the accounting settings, to manage automatically the booking of accounting entries related to differences between exchange rates."))
|
||||||
# Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise
|
# Even if the amount_currency is never filled, we need to pass the foreign currency because otherwise
|
||||||
# the receivable/payable account may have a secondary currency, which render this field mandatory
|
# the receivable/payable account may have a secondary currency, which render this field mandatory
|
||||||
|
if line.account_id.currency_id:
|
||||||
|
account_currency_id = line.account_id.currency_id.id
|
||||||
|
else:
|
||||||
account_currency_id = company_currency <> current_currency and current_currency or False
|
account_currency_id = company_currency <> current_currency and current_currency or False
|
||||||
move_line = {
|
move_line = {
|
||||||
'journal_id': line.voucher_id.journal_id.id,
|
'journal_id': line.voucher_id.journal_id.id,
|
||||||
|
@ -1054,16 +1142,11 @@ class account_voucher(osv.osv):
|
||||||
:return: the amount in the currency of the voucher's company
|
:return: the amount in the currency of the voucher's company
|
||||||
:rtype: float
|
:rtype: float
|
||||||
'''
|
'''
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
currency_obj = self.pool.get('res.currency')
|
currency_obj = self.pool.get('res.currency')
|
||||||
voucher = self.browse(cr, uid, voucher_id, context=context)
|
voucher = self.browse(cr, uid, voucher_id, context=context)
|
||||||
res = amount
|
return currency_obj.compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, amount, context=context)
|
||||||
if voucher.payment_rate_currency_id.id == voucher.company_id.currency_id.id:
|
|
||||||
# the rate specified on the voucher is for the company currency
|
|
||||||
res = currency_obj.round(cr, uid, voucher.company_id.currency_id, (amount * voucher.payment_rate))
|
|
||||||
else:
|
|
||||||
# the rate specified on the voucher is not relevant, we use all the rates in the system
|
|
||||||
res = currency_obj.compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, amount, context=context)
|
|
||||||
return res
|
|
||||||
|
|
||||||
def voucher_move_line_create(self, cr, uid, voucher_id, line_total, move_id, company_currency, current_currency, context=None):
|
def voucher_move_line_create(self, cr, uid, voucher_id, line_total, move_id, company_currency, current_currency, context=None):
|
||||||
'''
|
'''
|
||||||
|
@ -1087,39 +1170,45 @@ class account_voucher(osv.osv):
|
||||||
tot_line = line_total
|
tot_line = line_total
|
||||||
rec_lst_ids = []
|
rec_lst_ids = []
|
||||||
|
|
||||||
voucher_brw = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context)
|
date = self.read(cr, uid, voucher_id, ['date'], context=context)['date']
|
||||||
ctx = context.copy()
|
ctx = context.copy()
|
||||||
ctx.update({'date': voucher_brw.date})
|
ctx.update({'date': date})
|
||||||
|
voucher = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context=ctx)
|
||||||
|
voucher_currency = voucher.journal_id.currency or voucher.company_id.currency_id
|
||||||
|
ctx.update({
|
||||||
|
'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate ,
|
||||||
|
'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,})
|
||||||
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
|
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
|
||||||
for line in voucher_brw.line_ids:
|
for line in voucher.line_ids:
|
||||||
#create one move line per voucher line where amount is not 0.0
|
#create one move line per voucher line where amount is not 0.0
|
||||||
# AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)
|
# AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)
|
||||||
if not line.amount and not (line.move_line_id and not float_compare(line.move_line_id.debit, line.move_line_id.credit, precision_rounding=prec) and not float_compare(line.move_line_id.debit, 0.0, precision_rounding=prec)):
|
if not line.amount and not (line.move_line_id and not float_compare(line.move_line_id.debit, line.move_line_id.credit, precision_rounding=prec) and not float_compare(line.move_line_id.debit, 0.0, precision_rounding=prec)):
|
||||||
continue
|
continue
|
||||||
# convert the amount set on the voucher line into the currency of the voucher's company
|
# convert the amount set on the voucher line into the currency of the voucher's company
|
||||||
amount = self._convert_amount(cr, uid, line.untax_amount or line.amount, voucher_brw.id, context=ctx)
|
# this calls res_curreny.compute() with the right context, so that it will take either the rate on the voucher if it is relevant or will use the default behaviour
|
||||||
|
amount = self._convert_amount(cr, uid, line.untax_amount or line.amount, voucher.id, context=ctx)
|
||||||
# if the amount encoded in voucher is equal to the amount unreconciled, we need to compute the
|
# if the amount encoded in voucher is equal to the amount unreconciled, we need to compute the
|
||||||
# currency rate difference
|
# currency rate difference
|
||||||
if line.amount == line.amount_unreconciled:
|
if line.amount == line.amount_unreconciled:
|
||||||
if not line.move_line_id:
|
if not line.move_line_id:
|
||||||
raise osv.except_osv(_('Wrong voucher line'),_("The invoice you are willing to pay is not valid anymore."))
|
raise osv.except_osv(_('Wrong voucher line'),_("The invoice you are willing to pay is not valid anymore."))
|
||||||
sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1
|
sign = voucher.type in ('payment', 'purchase') and -1 or 1
|
||||||
currency_rate_difference = sign * (line.move_line_id.amount_residual - amount)
|
currency_rate_difference = sign * (line.move_line_id.amount_residual - amount)
|
||||||
else:
|
else:
|
||||||
currency_rate_difference = 0.0
|
currency_rate_difference = 0.0
|
||||||
move_line = {
|
move_line = {
|
||||||
'journal_id': voucher_brw.journal_id.id,
|
'journal_id': voucher.journal_id.id,
|
||||||
'period_id': voucher_brw.period_id.id,
|
'period_id': voucher.period_id.id,
|
||||||
'name': line.name or '/',
|
'name': line.name or '/',
|
||||||
'account_id': line.account_id.id,
|
'account_id': line.account_id.id,
|
||||||
'move_id': move_id,
|
'move_id': move_id,
|
||||||
'partner_id': voucher_brw.partner_id.id,
|
'partner_id': voucher.partner_id.id,
|
||||||
'currency_id': line.move_line_id and (company_currency <> line.move_line_id.currency_id.id and line.move_line_id.currency_id.id) or False,
|
'currency_id': line.move_line_id and (company_currency <> line.move_line_id.currency_id.id and line.move_line_id.currency_id.id) or False,
|
||||||
'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False,
|
'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False,
|
||||||
'quantity': 1,
|
'quantity': 1,
|
||||||
'credit': 0.0,
|
'credit': 0.0,
|
||||||
'debit': 0.0,
|
'debit': 0.0,
|
||||||
'date': voucher_brw.date
|
'date': voucher.date
|
||||||
}
|
}
|
||||||
if amount < 0:
|
if amount < 0:
|
||||||
amount = -amount
|
amount = -amount
|
||||||
|
@ -1135,9 +1224,9 @@ class account_voucher(osv.osv):
|
||||||
tot_line -= amount
|
tot_line -= amount
|
||||||
move_line['credit'] = amount
|
move_line['credit'] = amount
|
||||||
|
|
||||||
if voucher_brw.tax_id and voucher_brw.type in ('sale', 'purchase'):
|
if voucher.tax_id and voucher.type in ('sale', 'purchase'):
|
||||||
move_line.update({
|
move_line.update({
|
||||||
'account_tax_id': voucher_brw.tax_id.id,
|
'account_tax_id': voucher.tax_id.id,
|
||||||
})
|
})
|
||||||
|
|
||||||
if move_line.get('account_tax_id', False):
|
if move_line.get('account_tax_id', False):
|
||||||
|
@ -1149,7 +1238,6 @@ class account_voucher(osv.osv):
|
||||||
foreign_currency_diff = 0.0
|
foreign_currency_diff = 0.0
|
||||||
amount_currency = False
|
amount_currency = False
|
||||||
if line.move_line_id:
|
if line.move_line_id:
|
||||||
voucher_currency = voucher_brw.currency_id and voucher_brw.currency_id.id or voucher_brw.journal_id.company_id.currency_id.id
|
|
||||||
# We want to set it on the account move line as soon as the original line had a foreign currency
|
# We want to set it on the account move line as soon as the original line had a foreign currency
|
||||||
if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency:
|
if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency:
|
||||||
# we compute the amount in that foreign currency.
|
# we compute the amount in that foreign currency.
|
||||||
|
@ -1157,22 +1245,19 @@ class account_voucher(osv.osv):
|
||||||
# if the voucher and the voucher line share the same currency, there is no computation to do
|
# if the voucher and the voucher line share the same currency, there is no computation to do
|
||||||
sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
|
sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
|
||||||
amount_currency = sign * (line.amount)
|
amount_currency = sign * (line.amount)
|
||||||
elif line.move_line_id.currency_id.id == voucher_brw.payment_rate_currency_id.id:
|
|
||||||
# if the rate is specified on the voucher, we must use it
|
|
||||||
voucher_rate = currency_obj.browse(cr, uid, voucher_currency, context=ctx).rate
|
|
||||||
amount_currency = (move_line['debit'] - move_line['credit']) * voucher_brw.payment_rate * voucher_rate
|
|
||||||
else:
|
else:
|
||||||
# otherwise we use the rates of the system (giving the voucher date in the context)
|
# if the rate is specified on the voucher, it will be used thanks to the special keys in the context
|
||||||
|
# otherwise we use the rates of the system
|
||||||
amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx)
|
amount_currency = currency_obj.compute(cr, uid, company_currency, line.move_line_id.currency_id.id, move_line['debit']-move_line['credit'], context=ctx)
|
||||||
if line.amount == line.amount_unreconciled and line.move_line_id.currency_id.id == voucher_currency:
|
if line.amount == line.amount_unreconciled:
|
||||||
sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1
|
sign = voucher.type in ('payment', 'purchase') and -1 or 1
|
||||||
foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency
|
foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency
|
||||||
|
|
||||||
move_line['amount_currency'] = amount_currency
|
move_line['amount_currency'] = amount_currency
|
||||||
voucher_line = move_line_obj.create(cr, uid, move_line)
|
voucher_line = move_line_obj.create(cr, uid, move_line)
|
||||||
rec_ids = [voucher_line, line.move_line_id.id]
|
rec_ids = [voucher_line, line.move_line_id.id]
|
||||||
|
|
||||||
if not currency_obj.is_zero(cr, uid, voucher_brw.company_id.currency_id, currency_rate_difference):
|
if not currency_obj.is_zero(cr, uid, voucher.company_id.currency_id, currency_rate_difference):
|
||||||
# Change difference entry in company currency
|
# Change difference entry in company currency
|
||||||
exch_lines = self._get_exchange_lines(cr, uid, line, move_id, currency_rate_difference, company_currency, current_currency, context=context)
|
exch_lines = self._get_exchange_lines(cr, uid, line, move_id, currency_rate_difference, company_currency, current_currency, context=context)
|
||||||
new_id = move_line_obj.create(cr, uid, exch_lines[0],context)
|
new_id = move_line_obj.create(cr, uid, exch_lines[0],context)
|
||||||
|
@ -1219,32 +1304,32 @@ class account_voucher(osv.osv):
|
||||||
currency_obj = self.pool.get('res.currency')
|
currency_obj = self.pool.get('res.currency')
|
||||||
move_line = {}
|
move_line = {}
|
||||||
|
|
||||||
voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
||||||
current_currency_obj = voucher_brw.currency_id or voucher_brw.journal_id.company_id.currency_id
|
current_currency_obj = voucher.currency_id or voucher.journal_id.company_id.currency_id
|
||||||
|
|
||||||
if not currency_obj.is_zero(cr, uid, current_currency_obj, line_total):
|
if not currency_obj.is_zero(cr, uid, current_currency_obj, line_total):
|
||||||
diff = line_total
|
diff = line_total
|
||||||
account_id = False
|
account_id = False
|
||||||
write_off_name = ''
|
write_off_name = ''
|
||||||
if voucher_brw.payment_option == 'with_writeoff':
|
if voucher.payment_option == 'with_writeoff':
|
||||||
account_id = voucher_brw.writeoff_acc_id.id
|
account_id = voucher.writeoff_acc_id.id
|
||||||
write_off_name = voucher_brw.comment
|
write_off_name = voucher.comment
|
||||||
elif voucher_brw.type in ('sale', 'receipt'):
|
elif voucher.type in ('sale', 'receipt'):
|
||||||
account_id = voucher_brw.partner_id.property_account_receivable.id
|
account_id = voucher.partner_id.property_account_receivable.id
|
||||||
else:
|
else:
|
||||||
account_id = voucher_brw.partner_id.property_account_payable.id
|
account_id = voucher.partner_id.property_account_payable.id
|
||||||
sign = voucher_brw.type == 'payment' and -1 or 1
|
sign = voucher.type == 'payment' and -1 or 1
|
||||||
move_line = {
|
move_line = {
|
||||||
'name': write_off_name or name,
|
'name': write_off_name or name,
|
||||||
'account_id': account_id,
|
'account_id': account_id,
|
||||||
'move_id': move_id,
|
'move_id': move_id,
|
||||||
'partner_id': voucher_brw.partner_id.id,
|
'partner_id': voucher.partner_id.id,
|
||||||
'date': voucher_brw.date,
|
'date': voucher.date,
|
||||||
'credit': diff > 0 and diff or 0.0,
|
'credit': diff > 0 and diff or 0.0,
|
||||||
'debit': diff < 0 and -diff or 0.0,
|
'debit': diff < 0 and -diff or 0.0,
|
||||||
'amount_currency': company_currency <> current_currency and (sign * -1 * voucher_brw.writeoff_amount) or False,
|
'amount_currency': company_currency <> current_currency and (sign * -1 * voucher.writeoff_amount) or False,
|
||||||
'currency_id': company_currency <> current_currency and current_currency or False,
|
'currency_id': company_currency <> current_currency and current_currency or False,
|
||||||
'analytic_account_id': voucher_brw.analytic_id and voucher_brw.analytic_id.id or False,
|
'analytic_account_id': voucher.analytic_id and voucher.analytic_id.id or False,
|
||||||
}
|
}
|
||||||
|
|
||||||
return move_line
|
return move_line
|
||||||
|
@ -1345,13 +1430,17 @@ class account_voucher_line(osv.osv):
|
||||||
_order = "move_line_id"
|
_order = "move_line_id"
|
||||||
|
|
||||||
# If the payment is in the same currency than the invoice, we keep the same amount
|
# If the payment is in the same currency than the invoice, we keep the same amount
|
||||||
# Otherwise, we compute from company currency to payment currency
|
# Otherwise, we compute from invoice currency to payment currency
|
||||||
def _compute_balance(self, cr, uid, ids, name, args, context=None):
|
def _compute_balance(self, cr, uid, ids, name, args, context=None):
|
||||||
currency_pool = self.pool.get('res.currency')
|
currency_pool = self.pool.get('res.currency')
|
||||||
rs_data = {}
|
rs_data = {}
|
||||||
for line in self.browse(cr, uid, ids, context=context):
|
for line in self.browse(cr, uid, ids, context=context):
|
||||||
ctx = context.copy()
|
ctx = context.copy()
|
||||||
ctx.update({'date': line.voucher_id.date})
|
ctx.update({'date': line.voucher_id.date})
|
||||||
|
voucher_rate = self.pool.get('res.currency').read(cr, uid, line.voucher_id.currency_id.id, ['rate'], context=ctx)['rate']
|
||||||
|
ctx.update({
|
||||||
|
'voucher_special_currency': line.voucher_id.payment_rate_currency_id and line.voucher_id.payment_rate_currency_id.id or False,
|
||||||
|
'voucher_special_currency_rate': line.voucher_id.payment_rate * voucher_rate})
|
||||||
res = {}
|
res = {}
|
||||||
company_currency = line.voucher_id.journal_id.company_id.currency_id.id
|
company_currency = line.voucher_id.journal_id.company_id.currency_id.id
|
||||||
voucher_currency = line.voucher_id.currency_id and line.voucher_id.currency_id.id or company_currency
|
voucher_currency = line.voucher_id.currency_id and line.voucher_id.currency_id.id or company_currency
|
||||||
|
@ -1361,13 +1450,11 @@ class account_voucher_line(osv.osv):
|
||||||
res['amount_original'] = 0.0
|
res['amount_original'] = 0.0
|
||||||
res['amount_unreconciled'] = 0.0
|
res['amount_unreconciled'] = 0.0
|
||||||
elif move_line.currency_id and voucher_currency==move_line.currency_id.id:
|
elif move_line.currency_id and voucher_currency==move_line.currency_id.id:
|
||||||
res['amount_original'] = currency_pool.compute(cr, uid, move_line.currency_id.id, voucher_currency, abs(move_line.amount_currency), context=ctx)
|
res['amount_original'] = abs(move_line.amount_currency)
|
||||||
res['amount_unreconciled'] = currency_pool.compute(cr, uid, move_line.currency_id and move_line.currency_id.id or company_currency, voucher_currency, abs(move_line.amount_residual_currency), context=ctx)
|
res['amount_unreconciled'] = abs(move_line.amount_residual_currency)
|
||||||
elif move_line and move_line.credit > 0:
|
|
||||||
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit, context=ctx)
|
|
||||||
res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, abs(move_line.amount_residual), context=ctx)
|
|
||||||
else:
|
else:
|
||||||
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit, context=ctx)
|
#always use the amount booked in the company currency as the basis of the conversion into the voucher currency
|
||||||
|
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit or move_line.debit or 0.0, context=ctx)
|
||||||
res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, abs(move_line.amount_residual), context=ctx)
|
res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, abs(move_line.amount_residual), context=ctx)
|
||||||
|
|
||||||
rs_data[line.id] = res
|
rs_data[line.id] = res
|
||||||
|
|
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 21 KiB |
|
@ -0,0 +1,140 @@
|
||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row oe_spaced">
|
||||||
|
<h2 class="oe_slogan">Invoicing Made Easy</h2>
|
||||||
|
<h3 class="oe_slogan">Send professional invoices & get paid online</h3>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<div class="oe_demo oe_picture oe_screenshot">
|
||||||
|
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=account">
|
||||||
|
<img src="account_sc_00.png" alt="Online Demo">
|
||||||
|
</a>
|
||||||
|
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Create and send professional looking invoices & get paid
|
||||||
|
online. It automatically integrates with other apps to bill
|
||||||
|
automatically based on your activities.
|
||||||
|
</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">
|
||||||
|
<h2 class="oe_slogan">Send Invoices With No Effort</h2>
|
||||||
|
<div class="oe_row">
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Send invoices directly to your clients in just a click. The
|
||||||
|
invoice is automatically attached to the email as a PDF file.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<img class="oe_picture oe_screenshot" src="account_sc_03.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_02.png">
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Get paid online with paypal or other payment processing service. 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">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">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Analyse Your Sales & Costs</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 invoicing by product, customer, salesperson, etc.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row">
|
||||||
|
<h2 class="oe_slogan">Integration With Other Apps</h2>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<p class='oe_mt32'>
|
||||||
|
Bill automatically based on sales orders, delivery orders, contracts or on time and
|
||||||
|
material. Define recurrencies to produce recurring invoice automatically.
|
||||||
|
</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_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 allowed us to automate sending 10.000 invoices per month.
|
||||||
|
</q>
|
||||||
|
<cite class="oe_cite oe_clearfix">
|
||||||
|
<img class="oe_photo" src="bazile.png">
|
||||||
|
<div class="oe_author">Yves Morel</div>
|
||||||
|
<div class="oe_job">Director of <a href="http://www.bazile.fr" target="_blank">Bazile Telecom</a>.</div>
|
||||||
|
</cite>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span6">
|
||||||
|
<div class="oe_quote">
|
||||||
|
<q>
|
||||||
|
We have found invoicing module of OpenERP to be user
|
||||||
|
friendly and highly customizable.
|
||||||
|
</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>
|
||||||
|
<section class="oe_container oe_separator">
|
||||||
|
</section>
|
After Width: | Height: | Size: 2.9 KiB |
|
@ -7,24 +7,24 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
|
||||||
"PO-Revision-Date: 2012-05-10 17:46+0000\n"
|
"PO-Revision-Date: 2013-05-29 13:17+0000\n"
|
||||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:33+0000\n"
|
"X-Launchpad-Export-Date: 2013-05-30 05:45+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16652)\n"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.bank.statement.line,voucher_id:0
|
#: field:account.bank.statement.line,voucher_id:0
|
||||||
msgid "Reconciliation"
|
msgid "Reconciliation"
|
||||||
msgstr ""
|
msgstr "Сверка"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.model,name:account_voucher.model_account_config_settings
|
#: model:ir.model,name:account_voucher.model_account_config_settings
|
||||||
msgid "account.config.settings"
|
msgid "account.config.settings"
|
||||||
msgstr ""
|
msgstr "account.config.settings"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: code:addons/account_voucher/account_voucher.py:369
|
#: code:addons/account_voucher/account_voucher.py:369
|
||||||
|
@ -45,7 +45,7 @@ msgstr "Общая сумма"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "Open Customer Journal Entries"
|
msgid "Open Customer Journal Entries"
|
||||||
msgstr ""
|
msgstr "Открыть записи журнала по заказчику"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -63,7 +63,7 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "(Update)"
|
msgid "(Update)"
|
||||||
msgstr ""
|
msgstr "(Обновить)"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -90,7 +90,7 @@ msgstr "Март"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,message_unread:0
|
#: field:account.voucher,message_unread:0
|
||||||
msgid "Unread Messages"
|
msgid "Unread Messages"
|
||||||
msgstr ""
|
msgstr "Непрочитанные"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -115,13 +115,13 @@ msgstr "Номер транзакции."
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:sale.receipt.report:0
|
#: view:sale.receipt.report:0
|
||||||
msgid "Group by year of Invoice Date"
|
msgid "Group by year of Invoice Date"
|
||||||
msgstr ""
|
msgstr "Группировать по году в дате счета"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:sale.receipt.report:0
|
#: view:sale.receipt.report:0
|
||||||
#: field:sale.receipt.report,user_id:0
|
#: field:sale.receipt.report,user_id:0
|
||||||
msgid "Salesperson"
|
msgid "Salesperson"
|
||||||
msgstr ""
|
msgstr "Продавец"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -135,6 +135,8 @@ msgid ""
|
||||||
"You can not change the journal as you already reconciled some statement "
|
"You can not change the journal as you already reconciled some statement "
|
||||||
"lines!"
|
"lines!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Вы не можете изменить журнал, так как вы уже сверили некоторые позиции "
|
||||||
|
"документа!"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -145,7 +147,7 @@ msgstr "Утвердить"
|
||||||
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
|
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
|
||||||
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
|
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
|
||||||
msgid "Supplier Payments"
|
msgid "Supplier Payments"
|
||||||
msgstr ""
|
msgstr "Оплаты поставщикам"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.actions.act_window,help:account_voucher.action_purchase_receipt
|
#: model:ir.actions.act_window,help:account_voucher.action_purchase_receipt
|
||||||
|
@ -167,7 +169,7 @@ msgstr "Искать ваучеры"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,writeoff_acc_id:0
|
#: field:account.voucher,writeoff_acc_id:0
|
||||||
msgid "Counterpart Account"
|
msgid "Counterpart Account"
|
||||||
msgstr ""
|
msgstr "Корреспондирующий счет"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,account_id:0
|
#: field:account.voucher,account_id:0
|
||||||
|
@ -189,7 +191,7 @@ msgstr "OK"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher.line,reconcile:0
|
#: field:account.voucher.line,reconcile:0
|
||||||
msgid "Full Reconcile"
|
msgid "Full Reconcile"
|
||||||
msgstr ""
|
msgstr "Полная сверка"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,date_due:0
|
#: field:account.voucher,date_due:0
|
||||||
|
@ -207,7 +209,7 @@ msgstr "Примечания"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,message_ids:0
|
#: field:account.voucher,message_ids:0
|
||||||
msgid "Messages"
|
msgid "Messages"
|
||||||
msgstr ""
|
msgstr "Сообщения"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.actions.act_window,name:account_voucher.action_purchase_receipt
|
#: model:ir.actions.act_window,name:account_voucher.action_purchase_receipt
|
||||||
|
@ -225,7 +227,7 @@ msgstr "Элемент журнала"
|
||||||
#: code:addons/account_voucher/account_voucher.py:981
|
#: code:addons/account_voucher/account_voucher.py:981
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Error!"
|
msgid "Error!"
|
||||||
msgstr ""
|
msgstr "Ошибка!"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher.line,amount:0
|
#: field:account.voucher.line,amount:0
|
||||||
|
@ -235,7 +237,7 @@ msgstr "Суммма"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "Payment Options"
|
msgid "Payment Options"
|
||||||
msgstr ""
|
msgstr "Варианты оплаты"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -254,6 +256,8 @@ msgstr "Отменено"
|
||||||
msgid ""
|
msgid ""
|
||||||
"You have to configure account base code and account tax code on the '%s' tax!"
|
"You have to configure account base code and account tax code on the '%s' tax!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Вы должны настроить код базового счета и код налогового счета для налога "
|
||||||
|
"'%s'!"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.actions.act_window,help:account_voucher.action_sale_receipt
|
#: model:ir.actions.act_window,help:account_voucher.action_sale_receipt
|
||||||
|
@ -271,7 +275,7 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: help:account.voucher,message_unread:0
|
#: help:account.voucher,message_unread:0
|
||||||
msgid "If checked new messages require your attention."
|
msgid "If checked new messages require your attention."
|
||||||
msgstr ""
|
msgstr "Если отмечено, новые сообщения требуют вашего внимания."
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.model,name:account_voucher.model_account_bank_statement_line
|
#: model:ir.model,name:account_voucher.model_account_bank_statement_line
|
||||||
|
@ -294,12 +298,12 @@ msgstr "Налог"
|
||||||
#: code:addons/account_voucher/account_voucher.py:879
|
#: code:addons/account_voucher/account_voucher.py:879
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Invalid Action!"
|
msgid "Invalid Action!"
|
||||||
msgstr ""
|
msgstr "Неверное действие!"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,comment:0
|
#: field:account.voucher,comment:0
|
||||||
msgid "Counterpart Comment"
|
msgid "Counterpart Comment"
|
||||||
msgstr ""
|
msgstr "Корреспондирующий коментарий"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher.line,account_analytic_id:0
|
#: field:account.voucher.line,account_analytic_id:0
|
||||||
|
@ -312,6 +316,8 @@ msgid ""
|
||||||
"Holds the Chatter summary (number of messages, ...). This summary is "
|
"Holds the Chatter summary (number of messages, ...). This summary is "
|
||||||
"directly in html format in order to be inserted in kanban views."
|
"directly in html format in order to be inserted in kanban views."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Содержит сводку по Чаттеру (количество сообщений,...). Эта сводка в формате "
|
||||||
|
"html для возможности использования в канбан виде"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -326,7 +332,7 @@ msgstr "Информация о платеже"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "(update)"
|
msgid "(update)"
|
||||||
msgstr ""
|
msgstr "(обновить)"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -395,7 +401,7 @@ msgstr "Ваучер поставщика"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,message_follower_ids:0
|
#: field:account.voucher,message_follower_ids:0
|
||||||
msgid "Followers"
|
msgid "Followers"
|
||||||
msgstr ""
|
msgstr "Подписчики"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: selection:account.voucher.line,type:0
|
#: selection:account.voucher.line,type:0
|
||||||
|
@ -406,7 +412,7 @@ msgstr "Дебет"
|
||||||
#: code:addons/account_voucher/account_voucher.py:1547
|
#: code:addons/account_voucher/account_voucher.py:1547
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Unable to change journal !"
|
msgid "Unable to change journal !"
|
||||||
msgstr ""
|
msgstr "Невозможно изменить журнал!"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:sale.receipt.report:0
|
#: view:sale.receipt.report:0
|
||||||
|
@ -446,7 +452,7 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "Open Supplier Journal Entries"
|
msgid "Open Supplier Journal Entries"
|
||||||
msgstr ""
|
msgstr "Открыть журнал проводок по поставщику"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.actions.act_window,name:account_voucher.action_review_voucher_list
|
#: model:ir.actions.act_window,name:account_voucher.action_review_voucher_list
|
||||||
|
@ -461,7 +467,7 @@ msgstr "Памятка"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "Are you sure to unreconcile and cancel this record ?"
|
msgid "Are you sure to unreconcile and cancel this record ?"
|
||||||
msgstr ""
|
msgstr "Вы уверены, что надо отменить сверку и саму запись ?"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,is_multi_currency:0
|
#: field:account.voucher,is_multi_currency:0
|
||||||
|
@ -494,13 +500,13 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,writeoff_amount:0
|
#: field:account.voucher,writeoff_amount:0
|
||||||
msgid "Difference Amount"
|
msgid "Difference Amount"
|
||||||
msgstr ""
|
msgstr "Сумма разницы"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:sale.receipt.report:0
|
#: view:sale.receipt.report:0
|
||||||
#: field:sale.receipt.report,due_delay:0
|
#: field:sale.receipt.report,due_delay:0
|
||||||
msgid "Avg. Due Delay"
|
msgid "Avg. Due Delay"
|
||||||
msgstr ""
|
msgstr "Средн. задержка"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: code:addons/account_voucher/invoice.py:34
|
#: code:addons/account_voucher/invoice.py:34
|
||||||
|
@ -554,7 +560,7 @@ msgstr "Оплаченная сумма"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,payment_option:0
|
#: field:account.voucher,payment_option:0
|
||||||
msgid "Payment Difference"
|
msgid "Payment Difference"
|
||||||
msgstr ""
|
msgstr "Оплата разницы"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -568,7 +574,7 @@ msgstr "Для проверки"
|
||||||
#: code:addons/account_voucher/account_voucher.py:1194
|
#: code:addons/account_voucher/account_voucher.py:1194
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "change"
|
msgid "change"
|
||||||
msgstr ""
|
msgstr "изменить"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: code:addons/account_voucher/account_voucher.py:1014
|
#: code:addons/account_voucher/account_voucher.py:1014
|
||||||
|
@ -599,7 +605,7 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.invoice:0
|
#: view:account.invoice:0
|
||||||
msgid "Register Payment"
|
msgid "Register Payment"
|
||||||
msgstr ""
|
msgstr "Регистрация оплаты"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.statement.from.invoice.lines,line_ids:0
|
#: field:account.statement.from.invoice.lines,line_ids:0
|
||||||
|
@ -614,7 +620,7 @@ msgstr "декабрём"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:sale.receipt.report:0
|
#: view:sale.receipt.report:0
|
||||||
msgid "Group by month of Invoice Date"
|
msgid "Group by month of Invoice Date"
|
||||||
msgstr ""
|
msgstr "Группировать по месяцу даты счета"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:sale.receipt.report:0
|
#: view:sale.receipt.report:0
|
||||||
|
@ -647,7 +653,7 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "Are you sure to unreconcile this record?"
|
msgid "Are you sure to unreconcile this record?"
|
||||||
msgstr ""
|
msgstr "Вы уверены в отмене сверки"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,company_id:0
|
#: field:account.voucher,company_id:0
|
||||||
|
@ -665,13 +671,13 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: selection:account.voucher,payment_option:0
|
#: selection:account.voucher,payment_option:0
|
||||||
msgid "Reconcile Payment Balance"
|
msgid "Reconcile Payment Balance"
|
||||||
msgstr ""
|
msgstr "Сверка платежного баланса"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: code:addons/account_voucher/account_voucher.py:975
|
#: code:addons/account_voucher/account_voucher.py:975
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Configuration Error !"
|
msgid "Configuration Error !"
|
||||||
msgstr ""
|
msgstr "Ошибка конфигурации !"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
@ -695,18 +701,18 @@ msgstr ""
|
||||||
#: field:account.voucher,state:0
|
#: field:account.voucher,state:0
|
||||||
#: view:sale.receipt.report:0
|
#: view:sale.receipt.report:0
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr ""
|
msgstr "Статус"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "Allocation"
|
msgid "Allocation"
|
||||||
msgstr ""
|
msgstr "Распределение"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.statement.from.invoice.lines:0
|
#: view:account.statement.from.invoice.lines:0
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "or"
|
msgid "or"
|
||||||
msgstr ""
|
msgstr "или"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: selection:sale.receipt.report,month:0
|
#: selection:sale.receipt.report,month:0
|
||||||
|
@ -716,7 +722,7 @@ msgstr "Август"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
msgid "Validate Payment"
|
msgid "Validate Payment"
|
||||||
msgstr ""
|
msgstr "Утвердить оплату"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: help:account.voucher,audit:0
|
#: help:account.voucher,audit:0
|
||||||
|
@ -724,6 +730,8 @@ msgid ""
|
||||||
"Check this box if you are unsure of that journal entry and if you want to "
|
"Check this box if you are unsure of that journal entry and if you want to "
|
||||||
"note it as 'to be reviewed' by an accounting expert."
|
"note it as 'to be reviewed' by an accounting expert."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Отметьте, если вы не уверены в этой проводке журнала и хотите отметить её "
|
||||||
|
"\"для проверки\" опытному бухгалтеру."
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: selection:sale.receipt.report,month:0
|
#: selection:sale.receipt.report,month:0
|
||||||
|
@ -734,7 +742,7 @@ msgstr "Октябрь"
|
||||||
#: code:addons/account_voucher/account_voucher.py:976
|
#: code:addons/account_voucher/account_voucher.py:976
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Please activate the sequence of selected journal !"
|
msgid "Please activate the sequence of selected journal !"
|
||||||
msgstr ""
|
msgstr "Пожалуйста, включите нумерацию выбранного журнала!"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: selection:sale.receipt.report,month:0
|
#: selection:sale.receipt.report,month:0
|
||||||
|
@ -749,7 +757,7 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,paid:0
|
#: field:account.voucher,paid:0
|
||||||
msgid "Paid"
|
msgid "Paid"
|
||||||
msgstr ""
|
msgstr "Оплачено"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.actions.act_window,name:account_voucher.action_sale_receipt
|
#: model:ir.actions.act_window,name:account_voucher.action_sale_receipt
|
||||||
|
@ -760,7 +768,7 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,message_is_follower:0
|
#: field:account.voucher,message_is_follower:0
|
||||||
msgid "Is a Follower"
|
msgid "Is a Follower"
|
||||||
msgstr ""
|
msgstr "Подписан"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,analytic_id:0
|
#: field:account.voucher,analytic_id:0
|
||||||
|
@ -787,7 +795,7 @@ msgstr "Расширенные фильтры..."
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,paid_amount_in_company_currency:0
|
#: field:account.voucher,paid_amount_in_company_currency:0
|
||||||
msgid "Paid Amount in Company Currency"
|
msgid "Paid Amount in Company Currency"
|
||||||
msgstr ""
|
msgstr "Оплаченная сумма в валюте компании"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.bank.statement.line,amount_reconciled:0
|
#: field:account.bank.statement.line,amount_reconciled:0
|
||||||
|
@ -814,7 +822,7 @@ msgstr "Предыдущие платежи ?"
|
||||||
#: code:addons/account_voucher/account_voucher.py:1112
|
#: code:addons/account_voucher/account_voucher.py:1112
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "The invoice you are willing to pay is not valid anymore."
|
msgid "The invoice you are willing to pay is not valid anymore."
|
||||||
msgstr ""
|
msgstr "Счет, который вы готовы платить, уже не актуален ."
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: selection:sale.receipt.report,month:0
|
#: selection:sale.receipt.report,month:0
|
||||||
|
@ -830,30 +838,30 @@ msgstr "Журнал ваучеров"
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.model,name:account_voucher.model_res_company
|
#: model:ir.model,name:account_voucher.model_res_company
|
||||||
msgid "Companies"
|
msgid "Companies"
|
||||||
msgstr ""
|
msgstr "Компании"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,message_summary:0
|
#: field:account.voucher,message_summary:0
|
||||||
msgid "Summary"
|
msgid "Summary"
|
||||||
msgstr ""
|
msgstr "Итог"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: field:account.voucher,active:0
|
#: field:account.voucher,active:0
|
||||||
msgid "Active"
|
msgid "Active"
|
||||||
msgstr ""
|
msgstr "Активно"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: code:addons/account_voucher/account_voucher.py:982
|
#: code:addons/account_voucher/account_voucher.py:982
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Please define a sequence on the journal."
|
msgid "Please define a sequence on the journal."
|
||||||
msgstr ""
|
msgstr "Пожалуйста, определите нумерацию журнала."
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.actions.act_window,name:account_voucher.act_pay_voucher
|
#: model:ir.actions.act_window,name:account_voucher.act_pay_voucher
|
||||||
#: model:ir.actions.act_window,name:account_voucher.action_vendor_receipt
|
#: model:ir.actions.act_window,name:account_voucher.action_vendor_receipt
|
||||||
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_receipt
|
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_receipt
|
||||||
msgid "Customer Payments"
|
msgid "Customer Payments"
|
||||||
msgstr ""
|
msgstr "Платежи клиентов"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: model:ir.actions.act_window,name:account_voucher.action_sale_receipt_report_all
|
#: model:ir.actions.act_window,name:account_voucher.action_sale_receipt_report_all
|
||||||
|
@ -865,7 +873,7 @@ msgstr ""
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:sale.receipt.report:0
|
#: view:sale.receipt.report:0
|
||||||
msgid "Group by Invoice Date"
|
msgid "Group by Invoice Date"
|
||||||
msgstr ""
|
msgstr "Группировать по дате счета"
|
||||||
|
|
||||||
#. module: account_voucher
|
#. module: account_voucher
|
||||||
#: view:account.voucher:0
|
#: view:account.voucher:0
|
||||||
|
|
|
@ -41,6 +41,7 @@ class invoice(osv.osv):
|
||||||
'target': 'new',
|
'target': 'new',
|
||||||
'domain': '[]',
|
'domain': '[]',
|
||||||
'context': {
|
'context': {
|
||||||
|
'payment_expected_currency': inv.currency_id.id,
|
||||||
'default_partner_id': self.pool.get('res.partner')._find_accounting_partner(inv.partner_id).id,
|
'default_partner_id': self.pool.get('res.partner')._find_accounting_partner(inv.partner_id).id,
|
||||||
'default_amount': inv.type in ('out_refund', 'in_refund') and -inv.residual or inv.residual,
|
'default_amount': inv.type in ('out_refund', 'in_refund') and -inv.residual or inv.residual,
|
||||||
'default_reference': inv.name,
|
'default_reference': inv.name,
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<data noupdate="1">
|
<data noupdate="1">
|
||||||
<record id="voucher_comp_rule" model="ir.rule">
|
<record id="voucher_comp_rule" model="ir.rule">
|
||||||
<field name="name">Voucher multi-company</field>
|
<field name="name">Voucher multi-company</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_account_voucher"/>
|
<field name="model_id" ref="model_account_voucher"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="voucher_line_comp_rule" model="ir.rule">
|
<record id="voucher_line_comp_rule" model="ir.rule">
|
||||||
<field name="name">Voucher Line multi-company</field>
|
<field name="name">Voucher Line multi-company</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_account_voucher_line"/>
|
<field name="model_id" ref="model_account_voucher_line"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
account_id: account.cash
|
account_id: account.cash
|
||||||
amount: 1000.0
|
amount: 1000.0
|
||||||
company_id: base.main_company
|
company_id: base.main_company
|
||||||
journal_id: account.bank_journal
|
journal_id: account.sales_journal
|
||||||
name: Voucher for Axelor
|
name: Voucher for Axelor
|
||||||
narration: Basic Pc
|
narration: Basic Pc
|
||||||
line_cr_ids:
|
line_cr_ids:
|
||||||
|
|
|
@ -0,0 +1,247 @@
|
||||||
|
-
|
||||||
|
In order to check the Account_voucher module with multi-currency in OpenERP,
|
||||||
|
I create 2 Invoices in USD and make 1 Payment in USD based on the currency rating given by the bank which is slightly different that the one encoded in OpenERP
|
||||||
|
-
|
||||||
|
I set the income and expense currency accounts on the main company
|
||||||
|
-
|
||||||
|
!python {model: res.company}: |
|
||||||
|
from datetime import datetime
|
||||||
|
vals = {
|
||||||
|
'income_currency_exchange_account_id': ref('account.o_expense'),
|
||||||
|
'expense_currency_exchange_account_id': ref('account.o_expense')}
|
||||||
|
self.write(cr, uid, ref('base.main_company'), vals)
|
||||||
|
-
|
||||||
|
I create currency USD in OpenERP for January of 1.333333 Rate
|
||||||
|
-
|
||||||
|
!python {model: res.currency.rate}: |
|
||||||
|
from datetime import datetime
|
||||||
|
curr_id = self.pool.get('res.currency').search(cr, uid, [('name', '=', 'USD')])[0]
|
||||||
|
date = '%s-01-01' %(datetime.now().year)
|
||||||
|
ids = self.search(cr, uid, [('currency_id','=',curr_id), ('name', '=', date)])
|
||||||
|
self.write(cr, uid, ids, {'rate': 1.333333})
|
||||||
|
-
|
||||||
|
I create currency USD in OpenERP for February of 1.250000 Rate
|
||||||
|
-
|
||||||
|
!record {model: res.currency.rate, id: feb_usd}:
|
||||||
|
currency_id: base.USD
|
||||||
|
name: !eval "'%s-02-01' %(datetime.now().year)"
|
||||||
|
rate: 1.250000
|
||||||
|
|
||||||
|
-
|
||||||
|
I create currency USD in OpenERP for March of 1.111111 Rate
|
||||||
|
-
|
||||||
|
!record {model: res.currency.rate, id: mar_usd}:
|
||||||
|
currency_id: base.USD
|
||||||
|
name: !eval "'%s-03-01' %(datetime.now().year)"
|
||||||
|
rate: 1.111111
|
||||||
|
|
||||||
|
-
|
||||||
|
I create currency USD in OpenERP for April of 1.052632 Rate
|
||||||
|
-
|
||||||
|
!record {model: res.currency.rate, id: apr_usd}:
|
||||||
|
currency_id: base.USD
|
||||||
|
name: !eval "'%s-04-01' %(datetime.now().year)"
|
||||||
|
rate: 1.052632
|
||||||
|
|
||||||
|
-
|
||||||
|
I create a cash account with currency USD
|
||||||
|
-
|
||||||
|
!record {model: account.account, id: account_cash_usd_id}:
|
||||||
|
currency_id: base.USD
|
||||||
|
name: "cash account in usd"
|
||||||
|
code: "Xcash usd"
|
||||||
|
type: 'liquidity'
|
||||||
|
user_type: "account.data_account_type_cash"
|
||||||
|
|
||||||
|
-
|
||||||
|
I create a bank journal with USD as currency
|
||||||
|
-
|
||||||
|
!record {model: account.journal, id: bank_journal_USD}:
|
||||||
|
name: Bank Journal(USD)
|
||||||
|
code: BUSD
|
||||||
|
type: bank
|
||||||
|
analytic_journal_id: account.sit
|
||||||
|
sequence_id: account.sequence_bank_journal
|
||||||
|
default_debit_account_id: account_cash_usd_id
|
||||||
|
default_credit_account_id: account_cash_usd_id
|
||||||
|
currency: base.USD
|
||||||
|
company_id: base.main_company
|
||||||
|
|
||||||
|
-
|
||||||
|
I create a new partner Kate Mc Kay
|
||||||
|
-
|
||||||
|
!record {model: res.partner, id: res_partner_mc_kay}:
|
||||||
|
name: "Mc Kay Kate"
|
||||||
|
property_account_receivable: account.a_recv
|
||||||
|
property_account_payable: account.a_pay
|
||||||
|
-
|
||||||
|
I create the first invoice on 1st January for 200 USD
|
||||||
|
-
|
||||||
|
!record {model: account.invoice, id: account_invoice_jan_payment_rate}:
|
||||||
|
account_id: account.a_recv
|
||||||
|
company_id: base.main_company
|
||||||
|
currency_id: base.USD
|
||||||
|
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
|
||||||
|
period_id: account.period_1
|
||||||
|
invoice_line:
|
||||||
|
- account_id: account.a_sale
|
||||||
|
name: '[PCSC234] PC Assemble SC234'
|
||||||
|
price_unit: 200.0
|
||||||
|
quantity: 1.0
|
||||||
|
product_id: product.product_product_3
|
||||||
|
uos_id: product.product_uom_unit
|
||||||
|
journal_id: account.sales_journal
|
||||||
|
partner_id: res_partner_mc_kay
|
||||||
|
reference_type: none
|
||||||
|
-
|
||||||
|
I Validate invoice by clicking on Validate button
|
||||||
|
-
|
||||||
|
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_jan_payment_rate}
|
||||||
|
-
|
||||||
|
I check that first invoice move is correct for debtor account (debit - credit == 150.0)
|
||||||
|
-
|
||||||
|
!python {model: account.invoice}: |
|
||||||
|
invoice_id = self.browse(cr, uid, ref("account_invoice_jan_payment_rate"))
|
||||||
|
assert invoice_id.move_id, "Move not created for open invoice"
|
||||||
|
move_line_obj = self.pool.get('account.move.line')
|
||||||
|
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
|
||||||
|
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
||||||
|
assert (move_line.debit - move_line.credit == 150.0), "Invoice move is not correct for debtors account"
|
||||||
|
-
|
||||||
|
I create the second invoice on 1st February for 100 USD
|
||||||
|
-
|
||||||
|
!record {model: account.invoice, id: account_invoice_feb_payment_rate}:
|
||||||
|
account_id: account.a_recv
|
||||||
|
company_id: base.main_company
|
||||||
|
currency_id: base.USD
|
||||||
|
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
|
||||||
|
period_id: account.period_2
|
||||||
|
invoice_line:
|
||||||
|
- account_id: account.a_sale
|
||||||
|
name: '[PCSC234] PC Assemble SC234'
|
||||||
|
price_unit: 100.0
|
||||||
|
quantity: 1.0
|
||||||
|
product_id: product.product_product_3
|
||||||
|
uos_id: product.product_uom_unit
|
||||||
|
journal_id: account.sales_journal
|
||||||
|
partner_id: res_partner_mc_kay
|
||||||
|
reference_type: none
|
||||||
|
-
|
||||||
|
I Validate invoice by clicking on Validate button
|
||||||
|
-
|
||||||
|
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_feb_payment_rate}
|
||||||
|
-
|
||||||
|
I check that second invoice move is correct for debtor account (debit - credit == 80)
|
||||||
|
-
|
||||||
|
!python {model: account.invoice}: |
|
||||||
|
invoice_id = self.browse(cr, uid, ref("account_invoice_feb_payment_rate"))
|
||||||
|
assert invoice_id.move_id, "Move not created for open invoice"
|
||||||
|
move_line_obj = self.pool.get('account.move.line')
|
||||||
|
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
|
||||||
|
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
||||||
|
assert (move_line.debit - move_line.credit == 80), "Invoice move is not correct for debtors account"
|
||||||
|
|
||||||
|
-
|
||||||
|
I set the context that will be used for the encoding of all the vouchers of this file
|
||||||
|
-
|
||||||
|
!context
|
||||||
|
'type': 'receipt'
|
||||||
|
-
|
||||||
|
On the first March, I create the first voucher of payment with values 240 USD, journal USD, and specifying that $1 = 0.8€
|
||||||
|
-
|
||||||
|
!record {model: account.voucher, id: account_voucher_1_case1_payment_rate, view: view_vendor_receipt_form}:
|
||||||
|
account_id: account.cash
|
||||||
|
amount: 240.0
|
||||||
|
company_id: base.main_company
|
||||||
|
journal_id: bank_journal_USD
|
||||||
|
name: 'Payment: Case 1 USD/USD payment rate'
|
||||||
|
partner_id: res_partner_mc_kay
|
||||||
|
period_id: account.period_3
|
||||||
|
date: !eval time.strftime("%Y-03-01")
|
||||||
|
payment_option: 'with_writeoff'
|
||||||
|
writeoff_acc_id: account.a_expense
|
||||||
|
comment: 'Write Off'
|
||||||
|
payment_rate: 0.8
|
||||||
|
payment_rate_currency_id: base.EUR
|
||||||
|
|
||||||
|
-
|
||||||
|
I fill amounts 180 for the invoice of 200$ and 70 for the invoice of 100$>
|
||||||
|
-
|
||||||
|
!python {model: account.voucher}: |
|
||||||
|
vals = {}
|
||||||
|
voucher_id = self.browse(cr, uid, ref('account_voucher_1_case1_payment_rate'))
|
||||||
|
data = []
|
||||||
|
for item in voucher_id.line_cr_ids:
|
||||||
|
if item.amount_unreconciled == 200.00:
|
||||||
|
data += [(item.id, 180.0)]
|
||||||
|
else:
|
||||||
|
data += [(item.id, 70.0)]
|
||||||
|
for line_id, amount in data:
|
||||||
|
self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount})
|
||||||
|
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
|
||||||
|
-
|
||||||
|
I check that writeoff amount computed is -10.0
|
||||||
|
-
|
||||||
|
!python {model: account.voucher}: |
|
||||||
|
voucher = ref('account_voucher_1_case1_payment_rate')
|
||||||
|
voucher_id = self.browse(cr, uid, voucher)
|
||||||
|
assert (voucher_id.writeoff_amount == -10.0), "Writeoff amount is not -10.0"
|
||||||
|
-
|
||||||
|
I confirm the voucher
|
||||||
|
-
|
||||||
|
!python {model: account.voucher}: |
|
||||||
|
voucher = ref('account_voucher_1_case1_payment_rate')
|
||||||
|
self.signal_proforma_voucher(cr, uid, [voucher])
|
||||||
|
-
|
||||||
|
I check that the move of my first voucher is valid
|
||||||
|
-
|
||||||
|
!python {model: account.voucher}: |
|
||||||
|
voucher = ref('account_voucher_1_case1_payment_rate')
|
||||||
|
voucher_id = self.browse(cr, uid, voucher)
|
||||||
|
move_line_obj = self.pool.get('account.move.line')
|
||||||
|
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||||
|
for move_line in move_line_obj.browse(cr, uid, move_lines):
|
||||||
|
assert move_line.state == 'valid', "Voucher move is not valid"
|
||||||
|
-
|
||||||
|
I check that my debtor account is correct
|
||||||
|
-
|
||||||
|
I check that the debtor account has 2 new lines with -180 and -70 as amount_currency columns and that their credit columns are respectively 144 and 56
|
||||||
|
-
|
||||||
|
I check that my write-off is correct. 8 debit and 10 amount_currency
|
||||||
|
-
|
||||||
|
!python {model: account.voucher}: |
|
||||||
|
voucher = ref('account_voucher_1_case1_payment_rate')
|
||||||
|
voucher_id = self.browse(cr, uid, voucher)
|
||||||
|
move_line_obj = self.pool.get('account.move.line')
|
||||||
|
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||||
|
for move_line in move_line_obj.browse(cr, uid, move_lines):
|
||||||
|
if move_line.amount_currency == -180.00:
|
||||||
|
assert move_line.credit == 144.00, "Debtor account has wrong entry."
|
||||||
|
elif move_line.amount_currency == -70.00:
|
||||||
|
assert move_line.credit == 56.00, "Debtor account has wrong entry."
|
||||||
|
elif move_line.amount_currency == 10.00:
|
||||||
|
assert move_line.debit == 8.00, "Writeoff amount is wrong: Got a debit of %s (expected 8,00€)" % (move_line.debit)
|
||||||
|
elif move_line.amount_currency == 240.00:
|
||||||
|
assert move_line.debit == 192.00, "Bank entry is wrong."
|
||||||
|
else:
|
||||||
|
assert False, "Unrecognized journal entry"
|
||||||
|
-
|
||||||
|
I check the residual amount of Invoice1, should be 20 in amount_currency and 6 in amount_residual
|
||||||
|
-
|
||||||
|
!python {model: account.invoice}: |
|
||||||
|
invoice_id = self.browse(cr, uid, ref("account_invoice_jan_payment_rate"))
|
||||||
|
move_line_obj = self.pool.get('account.move.line')
|
||||||
|
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
|
||||||
|
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
||||||
|
assert (move_line.amount_residual == 6.0) , "Residual amount is not correct for first Invoice"
|
||||||
|
assert (move_line.amount_residual_currency == 20.0) , "Residual amount in currency is not correct for first Invoice"
|
||||||
|
-
|
||||||
|
I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual
|
||||||
|
-
|
||||||
|
!python {model: account.invoice}: |
|
||||||
|
invoice_id = self.browse(cr, uid, ref("account_invoice_feb_payment_rate"))
|
||||||
|
move_line_obj = self.pool.get('account.move.line')
|
||||||
|
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
|
||||||
|
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
||||||
|
assert (move_line.amount_residual == 24.0) , "Residual amount is not correct for second Invoice"
|
||||||
|
assert (move_line.amount_residual_currency == 30.0) , "Residual amount in currency is not correct for second Invoice"
|
|
@ -201,7 +201,7 @@
|
||||||
move_line_obj = self.pool.get('account.move.line')
|
move_line_obj = self.pool.get('account.move.line')
|
||||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
|
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
|
||||||
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
||||||
assert (move_line.amount_residual_currency == 55.56 and move_line.amount_residual == 20) , "Residual amount is not correct for first Invoice"
|
assert (move_line.amount_residual_currency == 55.56 and move_line.amount_residual == 20) , "Residual amount is not correct for first Invoice. Got %s USD (%s EUR)" %(move_line.amount_residual_currency, move_line.amount_residual)
|
||||||
-
|
-
|
||||||
I check the residual amuont of Invoice2, should be 22.22 in residual currency and 10 in amount_residual
|
I check the residual amuont of Invoice2, should be 22.22 in residual currency and 10 in amount_residual
|
||||||
-
|
-
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
-
|
-
|
||||||
I check that the debtor account has 1 new line with -298.78 as amount_currency columns and 149.39 of credit and currency is CAD.
|
I check that the debtor account has 1 new line with -298.78 as amount_currency columns and 149.39 of credit and currency is CAD.
|
||||||
-
|
-
|
||||||
I check that my currency rate difference is correct. 0 in debit with no amount_currency
|
I check that my currency rate difference is correct. 0 in debit with 98.78 CAD as amount_currency
|
||||||
-
|
-
|
||||||
I check that my writeoff is correct. 11.05 credit and -13.26 amount_currency
|
I check that my writeoff is correct. 11.05 credit and -13.26 amount_currency
|
||||||
-
|
-
|
||||||
|
@ -176,7 +176,8 @@
|
||||||
elif move_line.amount_currency == -298.78:
|
elif move_line.amount_currency == -298.78:
|
||||||
assert move_line.credit == 149.39, "Debtor account has wrong entry."
|
assert move_line.credit == 149.39, "Debtor account has wrong entry."
|
||||||
elif move_line.debit == 0.00 and move_line.credit == 0.00:
|
elif move_line.debit == 0.00 and move_line.credit == 0.00:
|
||||||
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
|
assert move_line.amount_currency == 98.78, "Incorrect Currency Difference, got %s as amount_currency (expected 98.78)." % (move_line.amount_currency)
|
||||||
|
assert move_line.currency_id.id == ref('base.CAD'), "Incorrect Currency Difference, got %s (expected 'CAD')" % (move_line.currency_id.name)
|
||||||
elif move_line.credit == 10.61:
|
elif move_line.credit == 10.61:
|
||||||
assert move_line.amount_currency == -13.26, "Writeoff amount is wrong."
|
assert move_line.amount_currency == -13.26, "Writeoff amount is wrong."
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
currency: base.USD
|
currency: base.USD
|
||||||
company_id: base.main_company
|
company_id: base.main_company
|
||||||
-
|
-
|
||||||
I create an invoice
|
On the first of January, I create an invoice of 1000€
|
||||||
-
|
-
|
||||||
!record {model: account.invoice, id: account_invoice_eur_usd}:
|
!record {model: account.invoice, id: account_invoice_eur_usd}:
|
||||||
account_id: account.a_recv
|
account_id: account.a_recv
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
!context
|
!context
|
||||||
'type': 'receipt'
|
'type': 'receipt'
|
||||||
-
|
-
|
||||||
I create the voucher of payment with values 1350 USD, journal USD,
|
On the first of February, I create the voucher of payment with values 1350 USD, journal USD,
|
||||||
-
|
-
|
||||||
!record {model: account.voucher, id: account_voucher_eur_usd_case, view: view_vendor_receipt_form}:
|
!record {model: account.voucher, id: account_voucher_eur_usd_case, view: view_vendor_receipt_form}:
|
||||||
account_id: account.cash
|
account_id: account.cash
|
||||||
|
|
|
@ -46,6 +46,9 @@
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- TODO: merge the 3 voucher form views of this file into a single view -->
|
||||||
|
<!-- Low priority view... If we open a voucher from a m2o, for example. -->
|
||||||
<record model="ir.ui.view" id="view_low_priority_payment_form">
|
<record model="ir.ui.view" id="view_low_priority_payment_form">
|
||||||
<field name="name">account.voucher.payment.low.priority.form</field>
|
<field name="name">account.voucher.payment.low.priority.form</field>
|
||||||
<field name="model">account.voucher</field>
|
<field name="model">account.voucher</field>
|
||||||
|
@ -107,7 +110,7 @@
|
||||||
</group>
|
</group>
|
||||||
<group string="Other Information" col="4">
|
<group string="Other Information" col="4">
|
||||||
<field name="currency_id" colspan="4" groups="base.group_multi_currency"/>
|
<field name="currency_id" colspan="4" groups="base.group_multi_currency"/>
|
||||||
<field name="payment_rate" required="1" on_change="onchange_rate(payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context)" colspan="3"/>
|
<field name="payment_rate" required="1" colspan="3" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
||||||
<field name="payment_rate_currency_id" colspan="1" nolabel="1" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
|
<field name="payment_rate_currency_id" colspan="1" nolabel="1" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
|
||||||
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
||||||
<field name="number" colspan="4"/>
|
<field name="number" colspan="4"/>
|
||||||
|
@ -119,6 +122,7 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- Supplier Payment -->
|
||||||
<record model="ir.ui.view" id="view_vendor_payment_form">
|
<record model="ir.ui.view" id="view_vendor_payment_form">
|
||||||
<field name="name">account.voucher.payment.form</field>
|
<field name="name">account.voucher.payment.form</field>
|
||||||
<field name="model">account.voucher</field>
|
<field name="model">account.voucher</field>
|
||||||
|
@ -157,7 +161,7 @@
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Payment Information">
|
<page string="Payment Information">
|
||||||
<label for="line_dr_ids"/>
|
<label for="line_dr_ids"/>
|
||||||
<field name="line_dr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
|
<field name="line_dr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
|
||||||
<tree string="Supplier Invoices and Outstanding transactions" editable="bottom" colors="gray:amount==0">
|
<tree string="Supplier Invoices and Outstanding transactions" editable="bottom" colors="gray:amount==0">
|
||||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||||
on_change="onchange_move_line_id(move_line_id)"
|
on_change="onchange_move_line_id(move_line_id)"
|
||||||
|
@ -173,7 +177,7 @@
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
<label for="line_cr_ids" attrs="{'invisible': [('pre_line','=',False)]}"/>
|
<label for="line_cr_ids" attrs="{'invisible': [('pre_line','=',False)]}"/>
|
||||||
<field name="line_cr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}">
|
<field name="line_cr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
|
||||||
<tree string="Credits" editable="bottom" colors="gray:amount==0">
|
<tree string="Credits" editable="bottom" colors="gray:amount==0">
|
||||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||||
on_change="onchange_move_line_id(move_line_id)"
|
on_change="onchange_move_line_id(move_line_id)"
|
||||||
|
@ -193,12 +197,16 @@
|
||||||
<field name="narration" colspan="2" nolabel="1"/>
|
<field name="narration" colspan="2" nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<group col="4" attrs="{'invisible':[('currency_id','=',False),('is_multi_currency','=',False)]}">
|
<group col="2" attrs="{'invisible':[('is_multi_currency','=',False)]}">
|
||||||
<separator string="Currency Options" colspan="4"/>
|
<separator string="Currency Options" colspan="2"/>
|
||||||
<field name="is_multi_currency" invisible="1"/>
|
<field name="is_multi_currency" invisible="1"/>
|
||||||
<field name="payment_rate" required="1" on_change="onchange_rate(payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context)" colspan="3"/>
|
<label for="payment_rate" colspan="1"/>
|
||||||
<field name="payment_rate_currency_id" colspan="1" nolabel="1" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
|
<div>
|
||||||
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
<field name="payment_rate" required="1" class="oe_inline" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
||||||
|
<field name="payment_rate_currency_id" class="oe_inline" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
|
||||||
|
</div>
|
||||||
|
<field name="currency_help_label" colspan="2" nolabel="1" class="oe_grey"/>
|
||||||
|
<field name="paid_amount_in_company_currency" colspan="2" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group col="2">
|
<group col="2">
|
||||||
<separator string="Payment Options" colspan="2"/>
|
<separator string="Payment Options" colspan="2"/>
|
||||||
|
@ -282,6 +290,7 @@
|
||||||
<menuitem action="action_vendor_payment" icon="STOCK_JUSTIFY_FILL" sequence="12"
|
<menuitem action="action_vendor_payment" icon="STOCK_JUSTIFY_FILL" sequence="12"
|
||||||
id="menu_action_vendor_payment" parent="account.menu_finance_payables"/>
|
id="menu_action_vendor_payment" parent="account.menu_finance_payables"/>
|
||||||
|
|
||||||
|
<!-- Register Payment Form (old Pay Invoice wizard) -->
|
||||||
<record model="ir.ui.view" id="view_vendor_receipt_dialog_form">
|
<record model="ir.ui.view" id="view_vendor_receipt_dialog_form">
|
||||||
<field name="name">account.voucher.receipt.dialog.form</field>
|
<field name="name">account.voucher.receipt.dialog.form</field>
|
||||||
<field name="model">account.voucher</field>
|
<field name="model">account.voucher</field>
|
||||||
|
@ -305,6 +314,7 @@
|
||||||
on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)"
|
on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)"
|
||||||
string="Payment Method"/>
|
string="Payment Method"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
|
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
|
||||||
<field name="period_id"/>
|
<field name="period_id"/>
|
||||||
|
@ -319,6 +329,21 @@
|
||||||
<field name="type" invisible="True"/>
|
<field name="type" invisible="True"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="writeoff_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||||
|
<field name="payment_option" required="1"/>
|
||||||
|
<field name="writeoff_acc_id"
|
||||||
|
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
|
||||||
|
domain="[('type','=','other')]"/>
|
||||||
|
<field name="comment"
|
||||||
|
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
|
||||||
|
<field name="analytic_id"
|
||||||
|
groups="analytic.group_analytic_accounting"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
<notebook invisible="1">
|
<notebook invisible="1">
|
||||||
<page string="Payment Information" groups="base.group_user">
|
<page string="Payment Information" groups="base.group_user">
|
||||||
<label for="line_cr_ids"/>
|
<label for="line_cr_ids"/>
|
||||||
|
@ -358,23 +383,12 @@
|
||||||
<group>
|
<group>
|
||||||
<field name="narration" colspan="2" nolabel="1"/>
|
<field name="narration" colspan="2" nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group col="4" attrs="{'invisible':[('currency_id','=',False),('is_multi_currency','=',False)]}">
|
<group col="4" attrs="{'invisible':[('is_multi_currency','=',False)]}">
|
||||||
<field name="is_multi_currency" invisible="1"/>
|
<field name="is_multi_currency" invisible="1"/>
|
||||||
<field name="payment_rate" required="1" on_change="onchange_rate(payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context)" colspan="3"/>
|
<field name="payment_rate" required="1" colspan="3" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
||||||
<field name="payment_rate_currency_id" colspan="1" nolabel="1" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
|
<field name="payment_rate_currency_id" colspan="1" nolabel="1" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
|
||||||
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
|
||||||
<field name="writeoff_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
||||||
<field name="payment_option" required="1"/>
|
|
||||||
<field name="writeoff_acc_id"
|
|
||||||
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
|
|
||||||
domain="[('type','=','other')]"/>
|
|
||||||
<field name="comment"
|
|
||||||
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
|
|
||||||
<field name="analytic_id"
|
|
||||||
groups="analytic.group_analytic_accounting"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
|
@ -387,6 +401,7 @@
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Customer Payment -->
|
||||||
<record model="ir.ui.view" id="view_vendor_receipt_form">
|
<record model="ir.ui.view" id="view_vendor_receipt_form">
|
||||||
<field name="name">account.voucher.receipt.form</field>
|
<field name="name">account.voucher.receipt.form</field>
|
||||||
<field name="model">account.voucher</field>
|
<field name="model">account.voucher</field>
|
||||||
|
@ -467,10 +482,14 @@
|
||||||
<group>
|
<group>
|
||||||
<field name="narration" colspan="2" nolabel="1"/>
|
<field name="narration" colspan="2" nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group col="4" attrs="{'invisible':[('currency_id','=',False),('is_multi_currency','=',False)]}">
|
<group col="4" attrs="{'invisible':[('is_multi_currency','=',False)]}">
|
||||||
<field name="is_multi_currency" invisible="1"/>
|
<field name="is_multi_currency" invisible="1"/>
|
||||||
<field name="payment_rate" required="1" on_change="onchange_rate(payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context)" colspan="3"/>
|
<label for="payment_rate" colspan="1"/>
|
||||||
<field name="payment_rate_currency_id" colspan="1" nolabel="1" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
|
<div>
|
||||||
|
<field name="payment_rate" required="1" class="oe_inline" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
||||||
|
<field name="payment_rate_currency_id" class="oe_inline" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
|
||||||
|
</div>
|
||||||
|
<field name="currency_help_label" colspan="2" nolabel="1" class="oe_grey"/>
|
||||||
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
|
|
|
@ -145,6 +145,13 @@
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
|
<group col="4" invisible="1">
|
||||||
|
<field name="is_multi_currency" invisible="1"/>
|
||||||
|
<field name="currency_help_label" invisible="1"/>
|
||||||
|
<field name="payment_rate" invisible="1"/>
|
||||||
|
<field name="payment_rate_currency_id" invisible="1"/>
|
||||||
|
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
||||||
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
<div class="oe_chatter">
|
<div class="oe_chatter">
|
||||||
<field name="message_follower_ids" widget="mail_followers"/>
|
<field name="message_follower_ids" widget="mail_followers"/>
|
||||||
|
@ -237,6 +244,7 @@
|
||||||
on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"
|
on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"
|
||||||
groups="account.group_account_user"/>
|
groups="account.group_account_user"/>
|
||||||
<field name="paid_amount_in_company_currency" invisible="1"/>
|
<field name="paid_amount_in_company_currency" invisible="1"/>
|
||||||
|
<field name="currency_help_label" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
|
|
||||||
<record id="analytic_comp_rule" model="ir.rule">
|
<record id="analytic_comp_rule" model="ir.rule">
|
||||||
<field name="name">Analytic multi company rule</field>
|
<field name="name">Analytic multi company rule</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_account_analytic_account"/>
|
<field name="model_id" ref="model_account_analytic_account"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="analytic_line_comp_rule" model="ir.rule">
|
<record id="analytic_line_comp_rule" model="ir.rule">
|
||||||
<field name="name">Analytic line multi company rule</field>
|
<field name="name">Analytic line multi company rule</field>
|
||||||
<field model="ir.model" name="model_id" ref="model_account_analytic_line"/>
|
<field name="model_id" ref="model_account_analytic_line"/>
|
||||||
<field eval="True" name="global"/>
|
<field eval="True" name="global"/>
|
||||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -543,6 +543,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||||
fixes = group(fixes, ('model_name', 'field_name'))
|
fixes = group(fixes, ('model_name', 'field_name'))
|
||||||
|
|
||||||
for line in data:
|
for line in data:
|
||||||
|
queries = []
|
||||||
table_name = self.pool[line['model_id']]._table if line['model_id'] in self.pool else None
|
table_name = self.pool[line['model_id']]._table if line['model_id'] in self.pool else None
|
||||||
|
|
||||||
# check if custom sql exists:
|
# check if custom sql exists:
|
||||||
|
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
@ -8,21 +8,21 @@ msgstr ""
|
||||||
"Project-Id-Version: openobject-addons\n"
|
"Project-Id-Version: openobject-addons\n"
|
||||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||||
"PO-Revision-Date: 2013-03-23 11:37+0000\n"
|
"PO-Revision-Date: 2013-05-28 06:19+0000\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Глория Хрусталёва <gloriya@hushmail.com>\n"
|
||||||
"Language-Team: Russian <ru@li.org>\n"
|
"Language-Team: Russian <ru@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-24 04:45+0000\n"
|
"X-Launchpad-Export-Date: 2013-05-29 05:37+0000\n"
|
||||||
"X-Generator: Launchpad (build 16540)\n"
|
"X-Generator: Launchpad (build 16640)\n"
|
||||||
|
|
||||||
#. module: auth_openid
|
#. module: auth_openid
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:24
|
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:24
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Username"
|
msgid "Username"
|
||||||
msgstr ""
|
msgstr "Имя пользователя"
|
||||||
|
|
||||||
#. module: auth_openid
|
#. module: auth_openid
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
|
@ -30,7 +30,7 @@ msgstr ""
|
||||||
#: view:res.users:0
|
#: view:res.users:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "OpenID"
|
msgid "OpenID"
|
||||||
msgstr ""
|
msgstr "OpenID"
|
||||||
|
|
||||||
#. module: auth_openid
|
#. module: auth_openid
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
|
@ -46,14 +46,14 @@ msgstr ""
|
||||||
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:10
|
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:10
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Google"
|
msgid "Google"
|
||||||
msgstr ""
|
msgstr "Google"
|
||||||
|
|
||||||
#. module: auth_openid
|
#. module: auth_openid
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:11
|
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:11
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Launchpad"
|
msgid "Launchpad"
|
||||||
msgstr ""
|
msgstr "Launchpad"
|
||||||
|
|
||||||
#. module: auth_openid
|
#. module: auth_openid
|
||||||
#: help:res.users,openid_email:0
|
#: help:res.users,openid_email:0
|
||||||
|
@ -82,7 +82,7 @@ msgstr ""
|
||||||
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:8
|
#: code:addons/auth_openid/static/src/xml/auth_openid.xml:8
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Password"
|
msgid "Password"
|
||||||
msgstr ""
|
msgstr "Пароль"
|
||||||
|
|
||||||
#. module: auth_openid
|
#. module: auth_openid
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
|
@ -94,4 +94,4 @@ msgstr ""
|
||||||
#. module: auth_openid
|
#. module: auth_openid
|
||||||
#: model:ir.model,name:auth_openid.model_res_users
|
#: model:ir.model,name:auth_openid.model_res_users
|
||||||
msgid "Users"
|
msgid "Users"
|
||||||
msgstr ""
|
msgstr "Пользователи"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# OpenERP, Open Source Management Solution
|
# OpenERP, Open Source Management Solution
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# OpenERP, Open Source Management Solution
|
# OpenERP, Open Source Management Solution
|
||||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
||||||
"Project-Id-Version: openobject-addons\n"
|
"Project-Id-Version: openobject-addons\n"
|
||||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||||
"PO-Revision-Date: 2012-12-11 06:59+0000\n"
|
"PO-Revision-Date: 2013-05-27 12:12+0000\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Глория Хрусталёва <gloriya@hushmail.com>\n"
|
||||||
"Language-Team: Russian <ru@li.org>\n"
|
"Language-Team: Russian <ru@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:52+0000\n"
|
"X-Launchpad-Export-Date: 2013-05-28 05:17+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16640)\n"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:res.partner,signup_type:0
|
#: field:res.partner,signup_type:0
|
||||||
|
@ -25,25 +25,25 @@ msgstr ""
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:base.config.settings,auth_signup_uninvited:0
|
#: field:base.config.settings,auth_signup_uninvited:0
|
||||||
msgid "Allow external users to sign up"
|
msgid "Allow external users to sign up"
|
||||||
msgstr ""
|
msgstr "Разрешить регистрацию внешним пользователям"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:16
|
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:16
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Confirm Password"
|
msgid "Confirm Password"
|
||||||
msgstr ""
|
msgstr "Подтвердите пароль"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: help:base.config.settings,auth_signup_uninvited:0
|
#: help:base.config.settings,auth_signup_uninvited:0
|
||||||
msgid "If unchecked, only invited users may sign up."
|
msgid "If unchecked, only invited users may sign up."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Если отмечено, только приглашенные пользователи могут зарегистрироваться"
|
"Если не отмечено, только приглашенные пользователи могут зарегистрироваться"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: model:ir.model,name:auth_signup.model_base_config_settings
|
#: model:ir.model,name:auth_signup.model_base_config_settings
|
||||||
msgid "base.config.settings"
|
msgid "base.config.settings"
|
||||||
msgstr ""
|
msgstr "base.config.settings"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: code:addons/auth_signup/res_users.py:265
|
#: code:addons/auth_signup/res_users.py:265
|
||||||
|
@ -57,17 +57,17 @@ msgstr "Невозможно отправить письмо: у пользов
|
||||||
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:28
|
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:28
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Reset password"
|
msgid "Reset password"
|
||||||
msgstr ""
|
msgstr "Сброс пароля"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:base.config.settings,auth_signup_template_user_id:0
|
#: field:base.config.settings,auth_signup_template_user_id:0
|
||||||
msgid "Template user for new users created through signup"
|
msgid "Template user for new users created through signup"
|
||||||
msgstr ""
|
msgstr "Шаблон новых пользователей, созданных в процессе регистрации"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: model:email.template,subject:auth_signup.reset_password_email
|
#: model:email.template,subject:auth_signup.reset_password_email
|
||||||
msgid "Password reset"
|
msgid "Password reset"
|
||||||
msgstr ""
|
msgstr "Сброс пароля"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
|
@ -88,12 +88,12 @@ msgstr ""
|
||||||
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:26
|
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:26
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Sign Up"
|
msgid "Sign Up"
|
||||||
msgstr ""
|
msgstr "Регистрация"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: selection:res.users,state:0
|
#: selection:res.users,state:0
|
||||||
msgid "New"
|
msgid "New"
|
||||||
msgstr ""
|
msgstr "Новый"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: code:addons/auth_signup/res_users.py:258
|
#: code:addons/auth_signup/res_users.py:258
|
||||||
|
@ -104,7 +104,7 @@ msgstr ""
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:res.users,state:0
|
#: field:res.users,state:0
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr ""
|
msgstr "Статус"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: model:email.template,body_html:auth_signup.reset_password_email
|
#: model:email.template,body_html:auth_signup.reset_password_email
|
||||||
|
@ -118,18 +118,27 @@ msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"<p>Note: If you do not expect this, you can safely ignore this email.</p>"
|
"<p>Note: If you do not expect this, you can safely ignore this email.</p>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
"<p>Был запрошен сброс пароля для аккаунта OpenERP связанного с этим адресом "
|
||||||
|
"эл.почты</p>\n"
|
||||||
|
"\n"
|
||||||
|
"<p>Вы можете сменить пароль, проследовав по <a "
|
||||||
|
"href=\"${object.signup_url}\">ссылке</a>.</p>\n"
|
||||||
|
"\n"
|
||||||
|
"<p>Примечание: если вы не запрашивали сброс пароля, просто проигнорируйте "
|
||||||
|
"данное письмо</p>"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_signup/static/src/js/auth_signup.js:111
|
#: code:addons/auth_signup/static/src/js/auth_signup.js:111
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Please enter a name."
|
msgid "Please enter a name."
|
||||||
msgstr ""
|
msgstr "Пожалуйста, введите имя"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: model:ir.model,name:auth_signup.model_res_users
|
#: model:ir.model,name:auth_signup.model_res_users
|
||||||
msgid "Users"
|
msgid "Users"
|
||||||
msgstr ""
|
msgstr "Пользователи"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:res.partner,signup_url:0
|
#: field:res.partner,signup_url:0
|
||||||
|
@ -146,7 +155,7 @@ msgstr "Пожалуйста, введите имя пользователя."
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: selection:res.users,state:0
|
#: selection:res.users,state:0
|
||||||
msgid "Active"
|
msgid "Active"
|
||||||
msgstr ""
|
msgstr "Активен"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: code:addons/auth_signup/res_users.py:269
|
#: code:addons/auth_signup/res_users.py:269
|
||||||
|
@ -155,39 +164,41 @@ msgid ""
|
||||||
"Cannot send email: no outgoing email server configured.\n"
|
"Cannot send email: no outgoing email server configured.\n"
|
||||||
"You can configure it under Settings/General Settings."
|
"You can configure it under Settings/General Settings."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Невозможно отправить email: не настроены сервера исходящей почты.\n"
|
||||||
|
"Вы можете настроить их в меню Настройки/Общие настройки"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:12
|
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:12
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Username"
|
msgid "Username"
|
||||||
msgstr ""
|
msgstr "Имя пользователя"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:8
|
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:8
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr ""
|
msgstr "Имя"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_signup/static/src/js/auth_signup.js:170
|
#: code:addons/auth_signup/static/src/js/auth_signup.js:170
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Please enter a username or email address."
|
msgid "Please enter a username or email address."
|
||||||
msgstr ""
|
msgstr "Пожалуйста, введите имя пользователя или адрес эл. почты."
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: selection:res.users,state:0
|
#: selection:res.users,state:0
|
||||||
msgid "Resetting Password"
|
msgid "Resetting Password"
|
||||||
msgstr ""
|
msgstr "Переустановка пароля"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:13
|
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:13
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Username (Email)"
|
msgid "Username (Email)"
|
||||||
msgstr ""
|
msgstr "Имя пользователя (Email)"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:res.partner,signup_expiration:0
|
#: field:res.partner,signup_expiration:0
|
||||||
|
@ -198,13 +209,15 @@ msgstr ""
|
||||||
#: help:base.config.settings,auth_signup_reset_password:0
|
#: help:base.config.settings,auth_signup_reset_password:0
|
||||||
msgid "This allows users to trigger a password reset from the Login page."
|
msgid "This allows users to trigger a password reset from the Login page."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Это позволяет пользователям запросить сброс пароля со страницы входа в "
|
||||||
|
"систему."
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:22
|
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:22
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Log in"
|
msgid "Log in"
|
||||||
msgstr ""
|
msgstr "Вход"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:res.partner,signup_valid:0
|
#: field:res.partner,signup_valid:0
|
||||||
|
@ -222,7 +235,7 @@ msgstr ""
|
||||||
#: code:addons/auth_signup/static/src/js/auth_signup.js:170
|
#: code:addons/auth_signup/static/src/js/auth_signup.js:170
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Login"
|
msgid "Login"
|
||||||
msgstr ""
|
msgstr "Вход"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
|
@ -236,7 +249,7 @@ msgstr ""
|
||||||
#: code:addons/auth_signup/static/src/js/auth_signup.js:120
|
#: code:addons/auth_signup/static/src/js/auth_signup.js:120
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Passwords do not match; please retype them."
|
msgid "Passwords do not match; please retype them."
|
||||||
msgstr ""
|
msgstr "Пароли не совпадают; пожалуйста, введите их заново."
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
|
@ -244,7 +257,7 @@ msgstr ""
|
||||||
#: code:addons/auth_signup/static/src/js/auth_signup.js:167
|
#: code:addons/auth_signup/static/src/js/auth_signup.js:167
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "No database selected !"
|
msgid "No database selected !"
|
||||||
msgstr ""
|
msgstr "Не выбрана база данных!"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: view:res.users:0
|
#: view:res.users:0
|
||||||
|
@ -254,14 +267,14 @@ msgstr ""
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:base.config.settings,auth_signup_reset_password:0
|
#: field:base.config.settings,auth_signup_reset_password:0
|
||||||
msgid "Enable password reset from Login page"
|
msgid "Enable password reset from Login page"
|
||||||
msgstr ""
|
msgstr "Включить сброс пароля со страницы входа"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:27
|
#: code:addons/auth_signup/static/src/xml/auth_signup.xml:27
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Back to Login"
|
msgid "Back to Login"
|
||||||
msgstr ""
|
msgstr "Вернуться к странице входа"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
|
@ -273,7 +286,7 @@ msgstr ""
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: model:ir.model,name:auth_signup.model_res_partner
|
#: model:ir.model,name:auth_signup.model_res_partner
|
||||||
msgid "Partner"
|
msgid "Partner"
|
||||||
msgstr ""
|
msgstr "Партнер"
|
||||||
|
|
||||||
#. module: auth_signup
|
#. module: auth_signup
|
||||||
#: field:res.partner,signup_token:0
|
#: field:res.partner,signup_token:0
|
||||||
|
|
|
@ -23,6 +23,7 @@ import random
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
from urlparse import urljoin
|
from urlparse import urljoin
|
||||||
|
|
||||||
|
from openerp.addons.base.ir.ir_mail_server import MailDeliveryException
|
||||||
from openerp.osv import osv, fields
|
from openerp.osv import osv, fields
|
||||||
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
|
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
|
||||||
from openerp.tools.safe_eval import safe_eval
|
from openerp.tools.safe_eval import safe_eval
|
||||||
|
@ -55,19 +56,22 @@ class res_partner(osv.Model):
|
||||||
def _get_signup_url_for_action(self, cr, uid, ids, action='login', view_type=None, menu_id=None, res_id=None, model=None, context=None):
|
def _get_signup_url_for_action(self, cr, uid, ids, action='login', view_type=None, menu_id=None, res_id=None, model=None, context=None):
|
||||||
""" generate a signup url for the given partner ids and action, possibly overriding
|
""" generate a signup url for the given partner ids and action, possibly overriding
|
||||||
the url state components (menu_id, id, view_type) """
|
the url state components (menu_id, id, view_type) """
|
||||||
|
if context is None:
|
||||||
|
context= {}
|
||||||
res = dict.fromkeys(ids, False)
|
res = dict.fromkeys(ids, False)
|
||||||
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
|
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
|
||||||
for partner in self.browse(cr, uid, ids, context):
|
for partner in self.browse(cr, uid, ids, context):
|
||||||
# when required, make sure the partner has a valid signup token
|
# when required, make sure the partner has a valid signup token
|
||||||
if context and context.get('signup_valid') and not partner.user_ids:
|
if context.get('signup_valid') and not partner.user_ids:
|
||||||
self.signup_prepare(cr, uid, [partner.id], context=context)
|
self.signup_prepare(cr, uid, [partner.id], context=context)
|
||||||
partner.refresh()
|
partner.refresh()
|
||||||
|
|
||||||
# the parameters to encode for the query and fragment part of url
|
# the parameters to encode for the query and fragment part of url
|
||||||
query = {'db': cr.dbname}
|
query = {'db': cr.dbname}
|
||||||
fragment = {'action': action, 'type': partner.signup_type}
|
signup_type = context.get('signup_force_type_in_url', partner.signup_type or '')
|
||||||
|
fragment = {'action': action, 'type': signup_type}
|
||||||
|
|
||||||
if partner.signup_token:
|
if partner.signup_token and signup_type:
|
||||||
fragment['token'] = partner.signup_token
|
fragment['token'] = partner.signup_token
|
||||||
elif partner.user_ids:
|
elif partner.user_ids:
|
||||||
fragment['db'] = cr.dbname
|
fragment['db'] = cr.dbname
|
||||||
|
@ -103,6 +107,9 @@ class res_partner(osv.Model):
|
||||||
def action_signup_prepare(self, cr, uid, ids, context=None):
|
def action_signup_prepare(self, cr, uid, ids, context=None):
|
||||||
return self.signup_prepare(cr, uid, ids, context=context)
|
return self.signup_prepare(cr, uid, ids, context=context)
|
||||||
|
|
||||||
|
def signup_cancel(self, cr, uid, ids, context=None):
|
||||||
|
return self.write(cr, uid, ids, {'signup_token': False, 'signup_type': False, 'signup_expiration': False}, context=context)
|
||||||
|
|
||||||
def signup_prepare(self, cr, uid, ids, signup_type="signup", expiration=False, context=None):
|
def signup_prepare(self, cr, uid, ids, signup_type="signup", expiration=False, context=None):
|
||||||
""" generate a new token for the partners with the given validity, if necessary
|
""" generate a new token for the partners with the given validity, if necessary
|
||||||
:param expiration: the expiration datetime of the token (string, optional)
|
:param expiration: the expiration datetime of the token (string, optional)
|
||||||
|
@ -202,7 +209,7 @@ class res_users(osv.Model):
|
||||||
})
|
})
|
||||||
if partner.company_id:
|
if partner.company_id:
|
||||||
values['company_id'] = partner.company_id.id
|
values['company_id'] = partner.company_id.id
|
||||||
values['company_ids'] = [(6,0,[partner.company_id.id])]
|
values['company_ids'] = [(6, 0, [partner.company_id.id])]
|
||||||
self._signup_create_user(cr, uid, values, context=context)
|
self._signup_create_user(cr, uid, values, context=context)
|
||||||
else:
|
else:
|
||||||
# no token, sign up an external user
|
# no token, sign up an external user
|
||||||
|
@ -259,25 +266,26 @@ class res_users(osv.Model):
|
||||||
pass
|
pass
|
||||||
if not bool(template):
|
if not bool(template):
|
||||||
template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'reset_password_email')
|
template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'reset_password_email')
|
||||||
mail_obj = self.pool.get('mail.mail')
|
|
||||||
assert template._name == 'email.template'
|
assert template._name == 'email.template'
|
||||||
|
|
||||||
for user in self.browse(cr, uid, ids, context):
|
for user in self.browse(cr, uid, ids, context):
|
||||||
if not user.email:
|
if not user.email:
|
||||||
raise osv.except_osv(_("Cannot send email: user has no email address."), user.name)
|
raise osv.except_osv(_("Cannot send email: user has no email address."), user.name)
|
||||||
mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, True, context=context)
|
try:
|
||||||
mail_state = mail_obj.read(cr, uid, mail_id, ['state'], context=context)
|
self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, force_send=True, raise_exception=True, context=context)
|
||||||
|
except Exception:
|
||||||
if mail_state and mail_state['state'] == 'exception':
|
raise
|
||||||
raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context)
|
|
||||||
else:
|
|
||||||
return True
|
|
||||||
|
|
||||||
def create(self, cr, uid, values, context=None):
|
def create(self, cr, uid, values, context=None):
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
# overridden to automatically invite user to sign up
|
# overridden to automatically invite user to sign up
|
||||||
user_id = super(res_users, self).create(cr, uid, values, context=context)
|
user_id = super(res_users, self).create(cr, uid, values, context=context)
|
||||||
user = self.browse(cr, uid, user_id, context=context)
|
user = self.browse(cr, uid, user_id, context=context)
|
||||||
if context and context.get('reset_password') and user.email:
|
if user.email and not context.get('no_reset_password'):
|
||||||
ctx = dict(context, create_user=True)
|
context.update({'create_user': True})
|
||||||
self.action_reset_password(cr, uid, [user.id], context=ctx)
|
try:
|
||||||
|
self.action_reset_password(cr, uid, [user.id], context=context)
|
||||||
|
except MailDeliveryException:
|
||||||
|
self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context)
|
||||||
return user_id
|
return user_id
|
||||||
|
|
|
@ -31,9 +31,11 @@
|
||||||
<!-- add Reset Password button -->
|
<!-- add Reset Password button -->
|
||||||
<xpath expr="//div[@class='oe_right oe_button_box']//button" position="replace">
|
<xpath expr="//div[@class='oe_right oe_button_box']//button" position="replace">
|
||||||
<button string="Send Reset Password Instructions"
|
<button string="Send Reset Password Instructions"
|
||||||
|
class="oe_link"
|
||||||
type="object" name="action_reset_password"
|
type="object" name="action_reset_password"
|
||||||
attrs="{'invisible': [('state', '!=', 'active')]}"/>
|
attrs="{'invisible': [('state', '!=', 'active')]}"/>
|
||||||
<button string="Send an Invitation Email"
|
<button string="Send an Invitation Email"
|
||||||
|
class="oe_link"
|
||||||
type="object" name="action_reset_password" context="{'create_user': 1}"
|
type="object" name="action_reset_password" context="{'create_user': 1}"
|
||||||
attrs="{'invisible': [('state', '!=', 'new')]}"/>
|
attrs="{'invisible': [('state', '!=', 'new')]}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
|
@ -7,7 +7,7 @@ openerp.auth_signup = function(instance) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.signup_enabled = false;
|
this.signup_enabled = false;
|
||||||
this.reset_password_enabled = false;
|
this.reset_password_enabled = false;
|
||||||
return this._super().then(function() {
|
return this._super().always(function() {
|
||||||
|
|
||||||
// Switches the login box to the select mode whith mode == [default|signup|reset]
|
// Switches the login box to the select mode whith mode == [default|signup|reset]
|
||||||
self.on('change:login_mode', self, function() {
|
self.on('change:login_mode', self, function() {
|
||||||
|
@ -57,14 +57,14 @@ openerp.auth_signup = function(instance) {
|
||||||
self.signup_enabled = result.signup;
|
self.signup_enabled = result.signup;
|
||||||
self.reset_password_enabled = result.reset_password;
|
self.reset_password_enabled = result.reset_password;
|
||||||
if (!self.signup_enabled || self.$("form input[name=login]").val()){
|
if (!self.signup_enabled || self.$("form input[name=login]").val()){
|
||||||
self.set('login_mode', 'default');
|
self.set('login_mode', self.params.type || 'default');
|
||||||
} else {
|
} else {
|
||||||
self.set('login_mode', 'signup');
|
self.set('login_mode', 'signup');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// TODO: support multiple database mode
|
// TODO: support multiple database mode
|
||||||
self.set('login_mode', 'default');
|
self.set('login_mode', self.params.type || 'default');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -50,6 +50,7 @@ class base_action_rule(osv.osv):
|
||||||
|
|
||||||
_name = 'base.action.rule'
|
_name = 'base.action.rule'
|
||||||
_description = 'Action Rules'
|
_description = 'Action Rules'
|
||||||
|
_order = 'sequence'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'name': fields.char('Rule Name', size=64, required=True),
|
'name': fields.char('Rule Name', size=64, required=True),
|
||||||
|
@ -61,7 +62,11 @@ class base_action_rule(osv.osv):
|
||||||
help="When unchecked, the rule is hidden and will not be executed."),
|
help="When unchecked, the rule is hidden and will not be executed."),
|
||||||
'sequence': fields.integer('Sequence',
|
'sequence': fields.integer('Sequence',
|
||||||
help="Gives the sequence order when displaying a list of rules."),
|
help="Gives the sequence order when displaying a list of rules."),
|
||||||
|
'kind': fields.selection(
|
||||||
|
[('on_create', 'On Creation'), ('on_write', 'On Update'), ('on_time', 'Based on Timed Condition')],
|
||||||
|
string='When to Run'),
|
||||||
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
|
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
|
||||||
|
help="When should the condition be triggered. If present, will be checked by the scheduler. If empty, will be checked at creation and update.",
|
||||||
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"),
|
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"),
|
||||||
'trg_date_range': fields.integer('Delay after trigger date',
|
'trg_date_range': fields.integer('Delay after trigger date',
|
||||||
help="Delay after the trigger date." \
|
help="Delay after the trigger date." \
|
||||||
|
@ -78,10 +83,10 @@ class base_action_rule(osv.osv):
|
||||||
ondelete='restrict',
|
ondelete='restrict',
|
||||||
domain="[('model_id', '=', model_id.model)]",
|
domain="[('model_id', '=', model_id.model)]",
|
||||||
help="If present, this condition must be satisfied before the update of the record."),
|
help="If present, this condition must be satisfied before the update of the record."),
|
||||||
'filter_id': fields.many2one('ir.filters', string='After Update Filter',
|
'filter_id': fields.many2one('ir.filters', string='Filter',
|
||||||
ondelete='restrict',
|
ondelete='restrict',
|
||||||
domain="[('model_id', '=', model_id.model)]",
|
domain="[('model_id', '=', model_id.model)]",
|
||||||
help="If present, this condition must be satisfied after the update of the record."),
|
help="If present, this condition must be satisfied before executing the action rule."),
|
||||||
'last_run': fields.datetime('Last Run', readonly=1),
|
'last_run': fields.datetime('Last Run', readonly=1),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +95,15 @@ class base_action_rule(osv.osv):
|
||||||
'trg_date_range_type': 'day',
|
'trg_date_range_type': 'day',
|
||||||
}
|
}
|
||||||
|
|
||||||
_order = 'sequence'
|
def onchange_kind(self, cr, uid, ids, kind, context=None):
|
||||||
|
clear_fields = []
|
||||||
|
if kind == 'on_create':
|
||||||
|
clear_fields = ['filter_pre_id', 'trg_date_id', 'trg_date_range', 'trg_date_range_type']
|
||||||
|
elif kind == 'on_write':
|
||||||
|
clear_fields = ['trg_date_id', 'trg_date_range', 'trg_date_range_type']
|
||||||
|
elif kind == 'on_time':
|
||||||
|
clear_fields = ['filter_pre_id']
|
||||||
|
return {'value': dict.fromkeys(clear_fields, False)}
|
||||||
|
|
||||||
def _filter(self, cr, uid, action, action_filter, record_ids, context=None):
|
def _filter(self, cr, uid, action, action_filter, record_ids, context=None):
|
||||||
""" filter the list record_ids that satisfy the action filter """
|
""" filter the list record_ids that satisfy the action filter """
|
||||||
|
@ -105,14 +118,7 @@ class base_action_rule(osv.osv):
|
||||||
|
|
||||||
def _process(self, cr, uid, action, record_ids, context=None):
|
def _process(self, cr, uid, action, record_ids, context=None):
|
||||||
""" process the given action on the records """
|
""" process the given action on the records """
|
||||||
# execute server actions
|
|
||||||
model = self.pool[action.model_id.model]
|
model = self.pool[action.model_id.model]
|
||||||
if action.server_action_ids:
|
|
||||||
server_action_ids = map(int, action.server_action_ids)
|
|
||||||
for record in model.browse(cr, uid, record_ids, context):
|
|
||||||
action_server_obj = self.pool.get('ir.actions.server')
|
|
||||||
ctx = dict(context, active_model=model._name, active_ids=[record.id], active_id=record.id)
|
|
||||||
action_server_obj.run(cr, uid, server_action_ids, context=ctx)
|
|
||||||
|
|
||||||
# modify records
|
# modify records
|
||||||
values = {}
|
values = {}
|
||||||
|
@ -127,13 +133,21 @@ class base_action_rule(osv.osv):
|
||||||
follower_ids = map(int, action.act_followers)
|
follower_ids = map(int, action.act_followers)
|
||||||
model.message_subscribe(cr, uid, record_ids, follower_ids, context=context)
|
model.message_subscribe(cr, uid, record_ids, follower_ids, context=context)
|
||||||
|
|
||||||
|
# execute server actions
|
||||||
|
if action.server_action_ids:
|
||||||
|
server_action_ids = map(int, action.server_action_ids)
|
||||||
|
for record in model.browse(cr, uid, record_ids, context):
|
||||||
|
action_server_obj = self.pool.get('ir.actions.server')
|
||||||
|
ctx = dict(context, active_model=model._name, active_ids=[record.id], active_id=record.id)
|
||||||
|
action_server_obj.run(cr, uid, server_action_ids, context=ctx)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _wrap_create(self, old_create, model):
|
def _wrap_create(self, old_create, model):
|
||||||
""" Return a wrapper around `old_create` calling both `old_create` and
|
""" Return a wrapper around `old_create` calling both `old_create` and
|
||||||
`_process`, in that order.
|
`_process`, in that order.
|
||||||
"""
|
"""
|
||||||
def wrapper(cr, uid, vals, context=None):
|
def create(cr, uid, vals, context=None):
|
||||||
# avoid loops or cascading actions
|
# avoid loops or cascading actions
|
||||||
if context and context.get('action'):
|
if context and context.get('action'):
|
||||||
return old_create(cr, uid, vals, context=context)
|
return old_create(cr, uid, vals, context=context)
|
||||||
|
@ -141,8 +155,8 @@ class base_action_rule(osv.osv):
|
||||||
context = dict(context or {}, action=True)
|
context = dict(context or {}, action=True)
|
||||||
new_id = old_create(cr, uid, vals, context=context)
|
new_id = old_create(cr, uid, vals, context=context)
|
||||||
|
|
||||||
# as it is a new record, we do not consider the actions that have a prefilter
|
# retrieve the action rules to run on creation
|
||||||
action_dom = [('model', '=', model), ('trg_date_id', '=', False), ('filter_pre_id', '=', False)]
|
action_dom = [('model', '=', model), ('kind', '=', 'on_create')]
|
||||||
action_ids = self.search(cr, uid, action_dom, context=context)
|
action_ids = self.search(cr, uid, action_dom, context=context)
|
||||||
|
|
||||||
# check postconditions, and execute actions on the records that satisfy them
|
# check postconditions, and execute actions on the records that satisfy them
|
||||||
|
@ -151,13 +165,13 @@ class base_action_rule(osv.osv):
|
||||||
self._process(cr, uid, action, [new_id], context=context)
|
self._process(cr, uid, action, [new_id], context=context)
|
||||||
return new_id
|
return new_id
|
||||||
|
|
||||||
return wrapper
|
return create
|
||||||
|
|
||||||
def _wrap_write(self, old_write, model):
|
def _wrap_write(self, old_write, model):
|
||||||
""" Return a wrapper around `old_write` calling both `old_write` and
|
""" Return a wrapper around `old_write` calling both `old_write` and
|
||||||
`_process`, in that order.
|
`_process`, in that order.
|
||||||
"""
|
"""
|
||||||
def wrapper(cr, uid, ids, vals, context=None):
|
def write(cr, uid, ids, vals, context=None):
|
||||||
# avoid loops or cascading actions
|
# avoid loops or cascading actions
|
||||||
if context and context.get('action'):
|
if context and context.get('action'):
|
||||||
return old_write(cr, uid, ids, vals, context=context)
|
return old_write(cr, uid, ids, vals, context=context)
|
||||||
|
@ -165,8 +179,8 @@ class base_action_rule(osv.osv):
|
||||||
context = dict(context or {}, action=True)
|
context = dict(context or {}, action=True)
|
||||||
ids = [ids] if isinstance(ids, (int, long, str)) else ids
|
ids = [ids] if isinstance(ids, (int, long, str)) else ids
|
||||||
|
|
||||||
# retrieve the action rules to possibly execute
|
# retrieve the action rules to run on update
|
||||||
action_dom = [('model', '=', model), ('trg_date_id', '=', False)]
|
action_dom = [('model', '=', model), ('kind', '=', 'on_write')]
|
||||||
action_ids = self.search(cr, uid, action_dom, context=context)
|
action_ids = self.search(cr, uid, action_dom, context=context)
|
||||||
actions = self.browse(cr, uid, action_ids, context=context)
|
actions = self.browse(cr, uid, action_ids, context=context)
|
||||||
|
|
||||||
|
@ -185,7 +199,7 @@ class base_action_rule(osv.osv):
|
||||||
self._process(cr, uid, action, post_ids, context=context)
|
self._process(cr, uid, action, post_ids, context=context)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return wrapper
|
return write
|
||||||
|
|
||||||
def _register_hook(self, cr, ids=None):
|
def _register_hook(self, cr, ids=None):
|
||||||
""" Wrap the methods `create` and `write` of the models specified by
|
""" Wrap the methods `create` and `write` of the models specified by
|
||||||
|
@ -224,8 +238,8 @@ class base_action_rule(osv.osv):
|
||||||
def _check(self, cr, uid, automatic=False, use_new_cursor=False, context=None):
|
def _check(self, cr, uid, automatic=False, use_new_cursor=False, context=None):
|
||||||
""" This Function is called by scheduler. """
|
""" This Function is called by scheduler. """
|
||||||
context = context or {}
|
context = context or {}
|
||||||
# retrieve all the action rules that have a trg_date_id and no precondition
|
# retrieve all the action rules to run based on a timed condition
|
||||||
action_dom = [('trg_date_id', '!=', False), ('filter_pre_id', '=', False)]
|
action_dom = [('kind', '=', 'on_time')]
|
||||||
action_ids = self.search(cr, uid, action_dom, context=context)
|
action_ids = self.search(cr, uid, action_dom, context=context)
|
||||||
for action in self.browse(cr, uid, action_ids, context=context):
|
for action in self.browse(cr, uid, action_ids, context=context):
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
|
|
|
@ -26,24 +26,32 @@
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Conditions">
|
<page string="Conditions">
|
||||||
<group>
|
<group>
|
||||||
<group name="filter" string="Filter Condition">
|
<field name="kind" required="1"
|
||||||
<field name="filter_pre_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
|
on_change="onchange_kind(kind)"/>
|
||||||
<field name="filter_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
|
<field name="filter_pre_id"
|
||||||
</group>
|
domain="[('model_id','=',model), ('user_id', '=', False)]"
|
||||||
<group name="timing" string="Timer">
|
context="{'default_model_id': model}"
|
||||||
<field name="trg_date_id"/>
|
attrs="{'invisible': [('kind', '!=', 'on_write')]}"/>
|
||||||
<label for="trg_date_range" string="Delay After Trigger Date" attrs="{'invisible': [('trg_date_id','=',False)]}"/>
|
<field name="filter_id"
|
||||||
|
domain="[('model_id','=',model), ('user_id', '=', False)]"
|
||||||
|
context="{'default_model_id': model}"/>
|
||||||
|
<field name="trg_date_id"
|
||||||
|
attrs="{'invisible': [('kind', '!=', 'on_time')], 'required': [('kind', '=', 'on_time')]}"/>
|
||||||
|
<label for="trg_date_range" string="Delay After Trigger Date"
|
||||||
|
attrs="{'invisible': [('trg_date_id','=',False)]}"/>
|
||||||
<div attrs="{'invisible': [('trg_date_id','=',False)]}">
|
<div attrs="{'invisible': [('trg_date_id','=',False)]}">
|
||||||
<field name="trg_date_range" class="oe_inline"/>
|
<field name="trg_date_range" class="oe_inline"/>
|
||||||
<field name="trg_date_range_type" class="oe_inline" attrs="{'required': [('trg_date_id','!=',False)]}"/>
|
<field name="trg_date_range_type" class="oe_inline" attrs="{'required': [('trg_date_id','!=',False)]}"/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
<p>
|
||||||
<p class="oe_grey">
|
Select when the action must be run, and add filters and/or timing conditions.
|
||||||
<b>Select a filter or a timer as condition.</b><br/> An action rule is checked when you create or modify the "Related Document Model". The precondition filter is checked right before the modification while the postcondition filter is checked after the modification. A precondition filter will therefore not work during a creation.<br/>
|
<br/>
|
||||||
<b>To create a new filter:</b><br/>
|
In order to create a new filter:
|
||||||
- Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)<br/>
|
<ul>
|
||||||
- In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"<br/>
|
<li>Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)</li>
|
||||||
|
<li>In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"</li>
|
||||||
|
</ul>
|
||||||
The filter must therefore be available in this page.
|
The filter must therefore be available in this page.
|
||||||
</p>
|
</p>
|
||||||
</page>
|
</page>
|
||||||
|
@ -76,6 +84,7 @@
|
||||||
<tree string="Action Rule">
|
<tree string="Action Rule">
|
||||||
<field name="sequence"/>
|
<field name="sequence"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
<field name="kind"/>
|
||||||
<field name="filter_id"/>
|
<field name="filter_id"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
||||||
"Project-Id-Version: openobject-addons\n"
|
"Project-Id-Version: openobject-addons\n"
|
||||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
|
||||||
"PO-Revision-Date: 2012-05-10 18:17+0000\n"
|
"PO-Revision-Date: 2013-05-31 10:23+0000\n"
|
||||||
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
|
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||||
"Language-Team: Russian <ru@li.org>\n"
|
"Language-Team: Russian <ru@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2013-03-16 05:46+0000\n"
|
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
|
||||||
"X-Generator: Launchpad (build 16532)\n"
|
"X-Generator: Launchpad (build 16660)\n"
|
||||||
|
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: selection:base.action.rule.lead.test,state:0
|
#: selection:base.action.rule.lead.test,state:0
|
||||||
|
@ -58,7 +58,7 @@ msgstr "Добавить подписчиков"
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: field:base.action.rule,act_user_id:0
|
#: field:base.action.rule,act_user_id:0
|
||||||
msgid "Set Responsible"
|
msgid "Set Responsible"
|
||||||
msgstr ""
|
msgstr "Указать ответственного"
|
||||||
|
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: help:base.action.rule,trg_date_range:0
|
#: help:base.action.rule,trg_date_range:0
|
||||||
|
@ -71,7 +71,7 @@ msgstr ""
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: model:ir.model,name:base_action_rule.model_base_action_rule_lead_test
|
#: model:ir.model,name:base_action_rule.model_base_action_rule_lead_test
|
||||||
msgid "base.action.rule.lead.test"
|
msgid "base.action.rule.lead.test"
|
||||||
msgstr ""
|
msgstr "base.action.rule.lead.test"
|
||||||
|
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: selection:base.action.rule.lead.test,state:0
|
#: selection:base.action.rule.lead.test,state:0
|
||||||
|
@ -142,7 +142,7 @@ msgstr "Часы"
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: view:base.action.rule:0
|
#: view:base.action.rule:0
|
||||||
msgid "To create a new filter:"
|
msgid "To create a new filter:"
|
||||||
msgstr ""
|
msgstr "Для создания нового фильтра:"
|
||||||
|
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: field:base.action.rule,active:0
|
#: field:base.action.rule,active:0
|
||||||
|
@ -167,7 +167,7 @@ msgstr ""
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: view:base.action.rule:0
|
#: view:base.action.rule:0
|
||||||
msgid "Filter Condition"
|
msgid "Filter Condition"
|
||||||
msgstr ""
|
msgstr "Условие фильтра"
|
||||||
|
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: view:base.action.rule:0
|
#: view:base.action.rule:0
|
||||||
|
@ -216,7 +216,7 @@ msgstr "Тип задержки"
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: view:base.action.rule:0
|
#: view:base.action.rule:0
|
||||||
msgid "Server actions to run"
|
msgid "Server actions to run"
|
||||||
msgstr ""
|
msgstr "Действия сервера для запуска"
|
||||||
|
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: help:base.action.rule,active:0
|
#: help:base.action.rule,active:0
|
||||||
|
@ -246,7 +246,7 @@ msgstr "Минуты"
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: field:base.action.rule,model_id:0
|
#: field:base.action.rule,model_id:0
|
||||||
msgid "Related Document Model"
|
msgid "Related Document Model"
|
||||||
msgstr ""
|
msgstr "Модель связанного документа"
|
||||||
|
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: help:base.action.rule,filter_pre_id:0
|
#: help:base.action.rule,filter_pre_id:0
|
||||||
|
@ -310,7 +310,7 @@ msgstr "Действия сервера"
|
||||||
#. module: base_action_rule
|
#. module: base_action_rule
|
||||||
#: field:base.action.rule.lead.test,name:0
|
#: field:base.action.rule.lead.test,name:0
|
||||||
msgid "Subject"
|
msgid "Subject"
|
||||||
msgstr ""
|
msgstr "Тема"
|
||||||
|
|
||||||
#~ msgid "Set State to"
|
#~ msgid "Set State to"
|
||||||
#~ msgstr "Уснатовить состояние в"
|
#~ msgstr "Уснатовить состояние в"
|
||||||
|
|
|
@ -19,7 +19,7 @@ class base_action_rule_test(common.TransactionCase):
|
||||||
'name': "Lead is in done state",
|
'name': "Lead is in done state",
|
||||||
'is_default': False,
|
'is_default': False,
|
||||||
'model_id': 'base.action.rule.lead.test',
|
'model_id': 'base.action.rule.lead.test',
|
||||||
'domain' : "[('state','=','done')]",
|
'domain': "[('state','=','done')]",
|
||||||
}, context=context)
|
}, context=context)
|
||||||
|
|
||||||
def create_filter_draft(self, cr, uid, context=None):
|
def create_filter_draft(self, cr, uid, context=None):
|
||||||
|
@ -40,16 +40,16 @@ class base_action_rule_test(common.TransactionCase):
|
||||||
'user_id': self.admin,
|
'user_id': self.admin,
|
||||||
}, context=context)
|
}, context=context)
|
||||||
|
|
||||||
def create_rule(self, cr, uid, filter_id=False, filter_pre_id=False, context=None):
|
def create_rule(self, cr, uid, kind, filter_id=False, filter_pre_id=False, context=None):
|
||||||
"""
|
"""
|
||||||
The "Rule 1" says that when a lead goes to the 'draft' state, the responsible for that lead changes to user "demo"
|
The "Rule 1" says that when a lead goes to the 'draft' state, the responsible for that lead changes to user "demo"
|
||||||
"""
|
"""
|
||||||
return self.base_action_rule.create(cr,uid,{
|
return self.base_action_rule.create(cr,uid,{
|
||||||
'name' : "Rule 1",
|
'name': "Rule 1",
|
||||||
'model_id': self.registry('ir.model').search(cr, uid, [('model','=','base.action.rule.lead.test')], context=context)[0],
|
'model_id': self.registry('ir.model').search(cr, uid, [('model','=','base.action.rule.lead.test')], context=context)[0],
|
||||||
'active' : 1,
|
'kind': kind,
|
||||||
'filter_pre_id' : filter_pre_id,
|
'filter_pre_id': filter_pre_id,
|
||||||
'filter_id' : filter_id,
|
'filter_id': filter_id,
|
||||||
'act_user_id': self.demo,
|
'act_user_id': self.demo,
|
||||||
}, context=context)
|
}, context=context)
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ class base_action_rule_test(common.TransactionCase):
|
||||||
"""
|
"""
|
||||||
cr, uid = self.cr, self.uid
|
cr, uid = self.cr, self.uid
|
||||||
filter_draft = self.create_filter_draft(cr, uid)
|
filter_draft = self.create_filter_draft(cr, uid)
|
||||||
self.create_rule(cr, uid, filter_pre_id=filter_draft)
|
self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft)
|
||||||
new_lead_id = self.create_lead_test_1(cr, uid)
|
new_lead_id = self.create_lead_test_1(cr, uid)
|
||||||
new_lead = self.model.browse(cr, uid, new_lead_id)
|
new_lead = self.model.browse(cr, uid, new_lead_id)
|
||||||
self.assertEquals(new_lead.state, 'draft')
|
self.assertEquals(new_lead.state, 'draft')
|
||||||
|
@ -73,11 +73,11 @@ class base_action_rule_test(common.TransactionCase):
|
||||||
|
|
||||||
def test_01_check_to_state_draft_post(self):
|
def test_01_check_to_state_draft_post(self):
|
||||||
"""
|
"""
|
||||||
Check that a new record (with state = draft) changes its responsible when there is a postcondition filter which check that the state is draft.
|
Check that a new record changes its responsible when there is a postcondition filter which check that the state is draft.
|
||||||
"""
|
"""
|
||||||
cr, uid = self.cr, self.uid
|
cr, uid = self.cr, self.uid
|
||||||
filter_draft = self.create_filter_draft(cr, uid)
|
filter_draft = self.create_filter_draft(cr, uid)
|
||||||
self.create_rule(cr, uid, filter_id=filter_draft)
|
self.create_rule(cr, uid, 'on_create')
|
||||||
new_lead_id = self.create_lead_test_1(cr, uid)
|
new_lead_id = self.create_lead_test_1(cr, uid)
|
||||||
new_lead = self.model.browse(cr, uid, new_lead_id)
|
new_lead = self.model.browse(cr, uid, new_lead_id)
|
||||||
self.assertEquals(new_lead.state, 'draft')
|
self.assertEquals(new_lead.state, 'draft')
|
||||||
|
@ -95,7 +95,7 @@ class base_action_rule_test(common.TransactionCase):
|
||||||
cr, uid = self.cr, self.uid
|
cr, uid = self.cr, self.uid
|
||||||
filter_draft = self.create_filter_draft(cr, uid)
|
filter_draft = self.create_filter_draft(cr, uid)
|
||||||
filter_done = self.create_filter_done(cr, uid)
|
filter_done = self.create_filter_done(cr, uid)
|
||||||
self.create_rule(cr, uid, filter_pre_id=filter_draft, filter_id=filter_done)
|
self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft, filter_id=filter_done)
|
||||||
new_lead_id = self.create_lead_test_1(cr, uid)
|
new_lead_id = self.create_lead_test_1(cr, uid)
|
||||||
new_lead = self.model.browse(cr, uid, new_lead_id)
|
new_lead = self.model.browse(cr, uid, new_lead_id)
|
||||||
self.assertEquals(new_lead.state, 'draft')
|
self.assertEquals(new_lead.state, 'draft')
|
||||||
|
@ -133,7 +133,7 @@ class base_action_rule_test(common.TransactionCase):
|
||||||
cr, uid = self.cr, self.uid
|
cr, uid = self.cr, self.uid
|
||||||
filter_draft = self.create_filter_draft(cr, uid)
|
filter_draft = self.create_filter_draft(cr, uid)
|
||||||
filter_done = self.create_filter_done(cr, uid)
|
filter_done = self.create_filter_done(cr, uid)
|
||||||
self.create_rule(cr, uid, filter_pre_id=filter_draft, filter_id=filter_done)
|
self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft, filter_id=filter_done)
|
||||||
new_lead_id = self.create_lead_test_1(cr, uid)
|
new_lead_id = self.create_lead_test_1(cr, uid)
|
||||||
new_lead = self.model.browse(cr, uid, new_lead_id)
|
new_lead = self.model.browse(cr, uid, new_lead_id)
|
||||||
self.assertEquals(new_lead.state, 'draft')
|
self.assertEquals(new_lead.state, 'draft')
|
||||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |