[MERGE] with 7.0
bzr revid: fka@tinyerp.com-20130515051235-i2opyehkanl77oud bzr revid: fka@tinyerp.com-20130520051543-kd6e5rhqb3c2j2w2 bzr revid: fka@tinyerp.com-20130522062104-u9f3sec8wxivuouv bzr revid: fka@tinyerp.com-20130531103058-mu8bja9j90m2newc bzr revid: fka@tinyerp.com-20130604053616-dq91e11sgmbhqxjz
This commit is contained in:
+21
-11
@@ -1040,9 +1040,15 @@ class account_period(osv.osv):
|
||||
context = {}
|
||||
ids = []
|
||||
if name:
|
||||
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
|
||||
ids = self.search(cr, user,
|
||||
[('code', 'ilike', name)] + args,
|
||||
limit=limit,
|
||||
context=context)
|
||||
if not ids:
|
||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
|
||||
ids = self.search(cr, user,
|
||||
[('name', operator, name)] + args,
|
||||
limit=limit,
|
||||
context=context)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
@@ -1065,10 +1071,14 @@ class account_period(osv.osv):
|
||||
raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.'))
|
||||
if period_date_start > period_date_stop:
|
||||
raise osv.except_osv(_('Error!'), _('Start period should precede then end period.'))
|
||||
|
||||
# /!\ We do not include a criterion on the company_id field below, to allow producing consolidated reports
|
||||
# on multiple companies. It will only work when start/end periods are selected and no fiscal year is chosen.
|
||||
|
||||
#for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search).
|
||||
if period_from.special:
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)])
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)])
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)])
|
||||
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('special', '=', False)])
|
||||
|
||||
account_period()
|
||||
|
||||
@@ -1867,6 +1877,12 @@ class account_tax_code(osv.osv):
|
||||
|
||||
account_tax_code()
|
||||
|
||||
def get_precision_tax():
|
||||
def change_digit_tax(cr):
|
||||
res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, SUPERUSER_ID, 'Account')
|
||||
return (16, res+3)
|
||||
return change_digit_tax
|
||||
|
||||
class account_tax(osv.osv):
|
||||
"""
|
||||
A tax object.
|
||||
@@ -1887,12 +1903,6 @@ class account_tax(osv.osv):
|
||||
default.update({'name': name + _(' (Copy)')})
|
||||
return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
|
||||
|
||||
def get_precision_tax():
|
||||
def change_digit_tax(cr):
|
||||
res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, SUPERUSER_ID, 'Account')
|
||||
return (16, res+2)
|
||||
return change_digit_tax
|
||||
|
||||
_name = 'account.tax'
|
||||
_description = 'Tax'
|
||||
_columns = {
|
||||
@@ -2818,7 +2828,7 @@ class account_tax_template(osv.osv):
|
||||
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
|
||||
'name': fields.char('Tax Name', size=64, required=True),
|
||||
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."),
|
||||
'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
|
||||
'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."),
|
||||
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
|
||||
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
|
||||
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
|
||||
|
||||
@@ -20,10 +20,11 @@
|
||||
</p>
|
||||
<group>
|
||||
<field name="charts" class="oe_inline"/>
|
||||
<field name="company_id" widget="selection"/><!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
</group>
|
||||
<group string="Configure your Fiscal Year" groups="account.group_account_user">
|
||||
<field name="has_default_company" invisible="1" />
|
||||
<field name="company_id" colspan="4" widget="selection" attrs="{'invisible' : [('has_default_company', '=', True)]}"/><!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
|
||||
<label for="date_start" string="Date Range"/>
|
||||
<div>
|
||||
<field name="date_start" on_change="on_change_start_date(date_start)" class="oe_inline"/> -
|
||||
|
||||
@@ -92,13 +92,43 @@ class account_invoice(osv.osv):
|
||||
return [('none', _('Free Reference'))]
|
||||
|
||||
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
||||
"""Function of the field residua. It computes the residual amount (balance) for each invoice"""
|
||||
if context is None:
|
||||
context = {}
|
||||
ctx = context.copy()
|
||||
result = {}
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
for invoice in self.browse(cr, uid, ids, context=context):
|
||||
nb_inv_in_partial_rec = max_invoice_id = 0
|
||||
result[invoice.id] = 0.0
|
||||
if invoice.move_id:
|
||||
for m in invoice.move_id.line_id:
|
||||
if m.account_id.type in ('receivable','payable'):
|
||||
result[invoice.id] += m.amount_residual_currency
|
||||
for aml in invoice.move_id.line_id:
|
||||
if aml.account_id.type in ('receivable','payable'):
|
||||
if aml.currency_id and aml.currency_id.id == invoice.currency_id.id:
|
||||
result[invoice.id] += aml.amount_residual_currency
|
||||
else:
|
||||
ctx['date'] = aml.date
|
||||
result[invoice.id] += currency_obj.compute(cr, uid, aml.company_id.currency_id.id, invoice.currency_id.id, aml.amount_residual, context=ctx)
|
||||
|
||||
if aml.reconcile_partial_id.line_partial_ids:
|
||||
#we check if the invoice is partially reconciled and if there are other invoices
|
||||
#involved in this partial reconciliation (and we sum these invoices)
|
||||
for line in aml.reconcile_partial_id.line_partial_ids:
|
||||
if line.invoice:
|
||||
nb_inv_in_partial_rec += 1
|
||||
#store the max invoice id as for this invoice we will make a balance instead of a simple division
|
||||
max_invoice_id = max(max_invoice_id, line.invoice.id)
|
||||
if nb_inv_in_partial_rec:
|
||||
#if there are several invoices in a partial reconciliation, we split the residual by the number
|
||||
#of invoice to have a sum of residual amounts that matches the partner balance
|
||||
new_value = currency_obj.round(cr, uid, invoice.currency_id, result[invoice.id] / nb_inv_in_partial_rec)
|
||||
if invoice.id == max_invoice_id:
|
||||
#if it's the last the invoice of the bunch of invoices partially reconciled together, we make a
|
||||
#balance to avoid rounding errors
|
||||
result[invoice.id] = result[invoice.id] - ((nb_inv_in_partial_rec - 1) * new_value)
|
||||
else:
|
||||
result[invoice.id] = new_value
|
||||
|
||||
#prevent the residual amount on the invoice to be less than 0
|
||||
result[invoice.id] = max(result[invoice.id], 0.0)
|
||||
return result
|
||||
@@ -717,7 +747,7 @@ class account_invoice(osv.osv):
|
||||
inv = self.browse(cr, uid, id)
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
if inv.type in ('out_invoice', 'in_refund'):
|
||||
sign = 1
|
||||
else:
|
||||
@@ -764,6 +794,7 @@ class account_invoice(osv.osv):
|
||||
return move_lines
|
||||
|
||||
def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj):
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id
|
||||
if not inv.tax_line:
|
||||
for tax in compute_taxes.values():
|
||||
ait_obj.create(cr, uid, tax)
|
||||
@@ -777,7 +808,7 @@ class account_invoice(osv.osv):
|
||||
if not key in compute_taxes:
|
||||
raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
|
||||
base = compute_taxes[key]['base']
|
||||
if abs(base - tax.base) > inv.company_id.currency_id.rounding:
|
||||
if abs(base - tax.base) > company_currency.rounding:
|
||||
raise osv.except_osv(_('Warning!'), _('Tax base different!\nClick on compute to update the tax base.'))
|
||||
for key in compute_taxes:
|
||||
if not key in tax_key:
|
||||
@@ -864,7 +895,7 @@ class account_invoice(osv.osv):
|
||||
ctx.update({'lang': inv.partner_id.lang})
|
||||
if not inv.date_invoice:
|
||||
self.write(cr, uid, [inv.id], {'date_invoice': fields.date.context_today(self,cr,uid,context=context)}, context=ctx)
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
# create the analytical lines
|
||||
# one move line per invoice line
|
||||
iml = self._get_analytic_lines(cr, uid, inv.id, context=ctx)
|
||||
@@ -980,7 +1011,8 @@ class account_invoice(osv.osv):
|
||||
'line_id': line,
|
||||
'journal_id': journal_id,
|
||||
'date': date,
|
||||
'narration':inv.comment
|
||||
'narration': inv.comment,
|
||||
'company_id': inv.company_id.id,
|
||||
}
|
||||
period_id = inv.period_id and inv.period_id.id or False
|
||||
ctx.update(company_id=inv.company_id.id,
|
||||
@@ -1513,8 +1545,7 @@ class account_invoice_line(osv.osv):
|
||||
if context is None:
|
||||
context = {}
|
||||
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
for line in inv.invoice_line:
|
||||
mres = self.move_line_get_item(cr, uid, line, context)
|
||||
if not mres:
|
||||
@@ -1659,8 +1690,7 @@ class account_invoice_tax(osv.osv):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
|
||||
cur = inv.currency_id
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
|
||||
company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id
|
||||
for line in inv.invoice_line:
|
||||
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, line.product_id, inv.partner_id)['taxes']:
|
||||
val={}
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
<field name="name"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="account_id" groups="account.group_account_user"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
|
||||
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
|
||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
||||
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
|
||||
@@ -352,7 +352,7 @@
|
||||
<field name="name"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="account_id" groups="account.group_account_user"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
|
||||
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
|
||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
|
||||
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
|
||||
|
||||
@@ -907,9 +907,7 @@
|
||||
<label for="type"/>
|
||||
<div>
|
||||
<field name="type"/>
|
||||
<field name="amount" class="oe_inline"
|
||||
attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
|
||||
<label string="%%" attrs="{'invisible':[('type','<>','percent')]}"/>
|
||||
<field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
|
||||
</div>
|
||||
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||
@@ -2123,10 +2121,8 @@
|
||||
<group attrs="{'invisible': [('only_one_chart_template','=',True)]}">
|
||||
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
|
||||
</group>
|
||||
<group groups="base.group_multi_company">
|
||||
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
<field name="currency_id" class="oe_inline"/>
|
||||
<field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
|
||||
<label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2012-12-21 23:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-14 01:08+0000\n"
|
||||
"Last-Translator: AhnJD <zion64@msn.com>\n"
|
||||
"Language-Team: Korean <ko@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-03-28 05:23+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-15 06:07+0000\n"
|
||||
"X-Generator: Launchpad (build 16617)\n"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||
@@ -92,7 +92,7 @@ msgstr "총 차변"
|
||||
msgid ""
|
||||
"Error!\n"
|
||||
"You cannot create recursive account templates."
|
||||
msgstr ""
|
||||
msgstr "순환구조를 가진 계정과목은 생성할 수 없습니다."
|
||||
|
||||
#. module: account
|
||||
#. openerp-web
|
||||
@@ -1299,7 +1299,7 @@ msgstr "세금 코드"
|
||||
#. module: account
|
||||
#: field:account.account,currency_mode:0
|
||||
msgid "Outgoing Currencies Rate"
|
||||
msgstr ""
|
||||
msgstr "외화매각 환율"
|
||||
|
||||
#. module: account
|
||||
#: view:account.analytic.account:0
|
||||
@@ -2425,7 +2425,7 @@ msgstr "설명"
|
||||
#: field:account.tax,price_include:0
|
||||
#: field:account.tax.template,price_include:0
|
||||
msgid "Tax Included in Price"
|
||||
msgstr ""
|
||||
msgstr "세금포함된 가격"
|
||||
|
||||
#. module: account
|
||||
#: view:account.subscription:0
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2013-04-30 16:24+0000\n"
|
||||
"Last-Translator: Andrius Preimantas <andrius.preimantas@gmail.com>\n"
|
||||
"PO-Revision-Date: 2013-05-18 08:01+0000\n"
|
||||
"Last-Translator: Andrius Bacianskas <anbalt@gmail.com>\n"
|
||||
"Language-Team: Lithuanian <lt@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-01 05:14+0000\n"
|
||||
"X-Generator: Launchpad (build 16580)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-19 06:12+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||
@@ -1206,7 +1206,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: field:report.account.receivable,name:0
|
||||
msgid "Week of Year"
|
||||
msgstr ""
|
||||
msgstr "Metų savaitė"
|
||||
|
||||
#. module: account
|
||||
#: field:account.report.general.ledger,landscape:0
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2013-05-01 19:40+0000\n"
|
||||
"PO-Revision-Date: 2013-05-27 12:50+0000\n"
|
||||
"Last-Translator: Erwin van der Ploeg (Endian Solutions) <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-02 06:08+0000\n"
|
||||
"X-Generator: Launchpad (build 16580)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-28 06:36+0000\n"
|
||||
"X-Generator: Launchpad (build 16640)\n"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||
@@ -3343,7 +3343,7 @@ msgstr "Augustus"
|
||||
#. module: account
|
||||
#: field:accounting.report,debit_credit:0
|
||||
msgid "Display Debit/Credit Columns"
|
||||
msgstr "Debet/Credit kolom weergaven"
|
||||
msgstr "Debet/Credit kolom weergeven"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.entries.report,month:0
|
||||
@@ -3459,7 +3459,7 @@ msgid ""
|
||||
"Click on compute to update the tax base."
|
||||
msgstr ""
|
||||
"Belasting grondslag verschil!\n"
|
||||
"Klik op berekenen om de belasting grondslag bij te werken"
|
||||
"Klik op \"Bijwerken\" om de belasting grondslag bij te werken"
|
||||
|
||||
#. module: account
|
||||
#: field:account.partner.ledger,page_split:0
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
<page string="Accounting" groups="account.group_account_invoice">
|
||||
<group name="properties">
|
||||
<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"/>
|
||||
</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"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="template_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
@@ -99,42 +99,39 @@
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer" fontName="Helvetica"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
||||
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Table" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0" fontName="Helvetica"/>
|
||||
<paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Standard"/>
|
||||
<paraStyle name="Text body" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index"/>
|
||||
|
||||
<paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="Footer"/>
|
||||
<paraStyle name="Horizontal Line" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
|
||||
<paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
|
||||
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
|
||||
|
||||
<paraStyle name="Table" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0"/>
|
||||
<paraStyle name="Preformatted Text" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
@@ -144,12 +141,12 @@
|
||||
<pto_header><!-- Must be after setLang() -->
|
||||
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
|
||||
<tr>
|
||||
<td> <para style="terp_tblheader_Details">Description</para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Centre">Taxes</para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Centre">Quantity</para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Right">Unit Price </para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Right">Disc.(%)</para> </td>
|
||||
<td> <para style="terp_tblheader_Details_Right">Price</para> </td>
|
||||
<td><para style="terp_tblheader_Details"><b>Description</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre"><b>Taxes</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Centre"><b>Quantity</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right"><b>Unit Price</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right"><b>Disc.(%)</b></para></td>
|
||||
<td><para style="terp_tblheader_Details_Right"><b>Price</b></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</pto_header>
|
||||
@@ -172,29 +169,29 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="terp_header"><b>Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_header"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para>
|
||||
<para style="terp_header"><b>Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para>
|
||||
<para style="terp_header"><b>Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_header"><b>Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_header"><b>Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_header"><b>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Description</para>
|
||||
<para style="terp_tblheader_General_Centre"><b>Description</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Invoice Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Source</para>
|
||||
<para style="terp_tblheader_General_Centre"><b>Invoice Date</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Customer Code</para>
|
||||
<para style="terp_tblheader_General_Centre"><b>Source</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre"><b>Customer Code</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -220,22 +217,22 @@
|
||||
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General">Description</para>
|
||||
<para style="terp_tblheader_General"><b>Description</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Taxes</para>
|
||||
<para style="terp_tblheader_General_Centre"><b>Taxes</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right">Quantity</para>
|
||||
<para style="terp_tblheader_General_Right"><b>Quantity</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right">Unit Price</para>
|
||||
<para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right">Disc.(%)</para>
|
||||
<para style="terp_tblheader_General_Right"><b>Disc.(%)</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Right">Price</para>
|
||||
<para style="terp_tblheader_General_Right"><b>Price</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -298,10 +295,10 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Total:</para>
|
||||
<para style="terp_tblheader_Details"><b>Total:</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
|
||||
<para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -311,13 +308,13 @@
|
||||
<blockTable colWidths="205.0,71.0,71.0,183.0" style="Table9">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</para>
|
||||
<para style="terp_tblheader_Details"><b>Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Base </para>
|
||||
<para style="terp_tblheader_Details_Right"><b>Base </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Amount </para>
|
||||
<para style="terp_tblheader_Details_Right"><b>Amount </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">
|
||||
@@ -361,7 +358,7 @@
|
||||
<blockTable colWidths="120.0,410.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Fiscal Position Remark : </para>
|
||||
<para style="terp_default_Bold_9"><b>Fiscal Position Remark : </b></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>
|
||||
|
||||
@@ -25,6 +25,7 @@ from dateutil.relativedelta import relativedelta
|
||||
from operator import itemgetter
|
||||
from os.path import join as opj
|
||||
|
||||
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT as DF
|
||||
from openerp.tools.translate import _
|
||||
from openerp.osv import fields, osv
|
||||
from openerp import tools
|
||||
@@ -132,12 +133,43 @@ class account_config_settings(osv.osv_memory):
|
||||
count = self.pool.get('res.company').search_count(cr, uid, [], context=context)
|
||||
return bool(count == 1)
|
||||
|
||||
def _get_default_fiscalyear_data(self, cr, uid, company_id, context=None):
|
||||
"""Compute default period, starting and ending date for fiscalyear
|
||||
- if in a fiscal year, use its period, starting and ending date
|
||||
- if past fiscal year, use its period, and new dates [ending date of the latest +1 day ; ending date of the latest +1 year]
|
||||
- if no fiscal year, use monthly, 1st jan, 31th dec of this year
|
||||
:return: (date_start, date_stop, period) at format DEFAULT_SERVER_DATETIME_FORMAT
|
||||
"""
|
||||
fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid,
|
||||
[('date_start', '<=', time.strftime(DF)), ('date_stop', '>=', time.strftime(DF)),
|
||||
('company_id', '=', company_id)])
|
||||
if fiscalyear_ids:
|
||||
# is in a current fiscal year, use this one
|
||||
fiscalyear = self.pool.get('account.fiscalyear').browse(cr, uid, fiscalyear_ids[0], context=context)
|
||||
if len(fiscalyear.period_ids) == 5: # 4 periods of 3 months + opening period
|
||||
period = '3months'
|
||||
else:
|
||||
period = 'month'
|
||||
return (fiscalyear.date_start, fiscalyear.date_stop, period)
|
||||
else:
|
||||
past_fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid,
|
||||
[('date_stop', '<=', time.strftime(DF)), ('company_id', '=', company_id)])
|
||||
if past_fiscalyear_ids:
|
||||
# use the latest fiscal, sorted by (start_date, id)
|
||||
latest_year = self.pool.get('account.fiscalyear').browse(cr, uid, past_fiscalyear_ids[-1], context=context)
|
||||
latest_stop = datetime.datetime.strptime(latest_year.date_stop, DF)
|
||||
if len(latest_year.period_ids) == 5:
|
||||
period = '3months'
|
||||
else:
|
||||
period = 'month'
|
||||
return ((latest_stop+datetime.timedelta(days=1)).strftime(DF), latest_stop.replace(year=latest_stop.year+1).strftime(DF), period)
|
||||
else:
|
||||
return (time.strftime('%Y-01-01'), time.strftime('%Y-12-31'), 'month')
|
||||
|
||||
|
||||
_defaults = {
|
||||
'company_id': _default_company,
|
||||
'has_default_company': _default_has_default_company,
|
||||
'date_start': lambda *a: time.strftime('%Y-01-01'),
|
||||
'date_stop': lambda *a: time.strftime('%Y-12-31'),
|
||||
'period': 'month',
|
||||
}
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
@@ -161,6 +193,7 @@ class account_config_settings(osv.osv_memory):
|
||||
fiscalyear_count = self.pool.get('account.fiscalyear').search_count(cr, uid,
|
||||
[('date_start', '<=', time.strftime('%Y-%m-%d')), ('date_stop', '>=', time.strftime('%Y-%m-%d')),
|
||||
('company_id', '=', company_id)])
|
||||
date_start, date_stop, period = self._get_default_fiscalyear_data(cr, uid, company_id, context=context)
|
||||
values = {
|
||||
'expects_chart_of_accounts': company.expects_chart_of_accounts,
|
||||
'currency_id': company.currency_id.id,
|
||||
@@ -170,6 +203,9 @@ class account_config_settings(osv.osv_memory):
|
||||
'has_fiscal_year': bool(fiscalyear_count),
|
||||
'chart_template_id': False,
|
||||
'tax_calculation_rounding_method': company.tax_calculation_rounding_method,
|
||||
'date_start': date_start,
|
||||
'date_stop': date_stop,
|
||||
'period': period,
|
||||
}
|
||||
# update journals and sequences
|
||||
for journal_type in ('sale', 'sale_refund', 'purchase', 'purchase_refund'):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python
|
||||
from openerp.osv import fields, osv
|
||||
import openerp.addons.decimal_precision as dp
|
||||
from openerp.tools.translate import _
|
||||
@@ -23,7 +22,7 @@ class CashBox(osv.osv_memory):
|
||||
|
||||
records = self.pool.get(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):
|
||||
for box in self.browse(cr, uid, ids, context=context):
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
+7
-7
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2012-12-21 23:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-22 09:56+0000\n"
|
||||
"Last-Translator: Pedro Manuel Baeza <pedro.baeza@gmail.com>\n"
|
||||
"Language-Team: Spanish <es@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-03-28 05:29+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-23 06:19+0000\n"
|
||||
"X-Generator: Launchpad (build 16640)\n"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
@@ -295,8 +295,8 @@ msgid ""
|
||||
"Prorata temporis can be applied only for time method \"number of "
|
||||
"depreciations\"."
|
||||
msgstr ""
|
||||
"Prorata temporis puede ser aplicado solo para método de tiempo \"numero de "
|
||||
"amortizaciones\""
|
||||
"El prorrateo de tiempo sólo se puede utilizar para el método de tiempo "
|
||||
"\"numero de amortizaciones\""
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,remaining_value:0
|
||||
@@ -546,7 +546,7 @@ msgstr "General"
|
||||
#: field:account.asset.asset,prorata:0
|
||||
#: field:account.asset.category,prorata:0
|
||||
msgid "Prorata Temporis"
|
||||
msgstr "Tiempo prorateado"
|
||||
msgstr "Tiempo prorrateado"
|
||||
|
||||
#. module: account_asset
|
||||
#: model:ir.model,name:account_asset.model_account_invoice
|
||||
|
||||
Executable → Regular
Executable → Regular
+9
-6
@@ -8,14 +8,15 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2013-02-12 09:04+0000\n"
|
||||
"Last-Translator: WANTELLET Sylvain <Swantellet@tetra-info.com>\n"
|
||||
"PO-Revision-Date: 2013-05-21 16:06+0000\n"
|
||||
"Last-Translator: Maxime Chambreuil (http://www.savoirfairelinux.com) "
|
||||
"<maxime.chambreuil@savoirfairelinux.com>\n"
|
||||
"Language-Team: French <fr@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-03-28 05:29+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-22 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
@@ -200,7 +201,7 @@ msgstr "Ecriture de dépreciation"
|
||||
#: code:addons/account_asset/account_asset.py:82
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
msgstr "Erreur!"
|
||||
|
||||
#. module: account_asset
|
||||
#: view:asset.asset.report:0
|
||||
@@ -614,6 +615,8 @@ msgstr "En cours"
|
||||
#, python-format
|
||||
msgid "You cannot delete an asset that contains posted depreciation lines."
|
||||
msgstr ""
|
||||
"Vous ne pouvez pas supprimer une immobilisation qui contient des lignes de "
|
||||
"dépréciations comptabilisées."
|
||||
|
||||
#. module: account_asset
|
||||
#: view:account.asset.category:0
|
||||
@@ -750,7 +753,7 @@ msgstr "Écritures d'amortissement créées"
|
||||
#. module: account_asset
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Add an internal note here..."
|
||||
msgstr ""
|
||||
msgstr "Ajouter une note interne ici…"
|
||||
|
||||
#. module: account_asset
|
||||
#: field:account.asset.depreciation.line,sequence:0
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -0,0 +1,758 @@
|
||||
# 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: 2013-03-07 08:37+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:55+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
|
||||
#: code:addons/account_asset/account_asset.py:82
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
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
|
||||
#: code:addons/account_asset/account_asset.py:82
|
||||
#, python-format
|
||||
msgid "You cannot delete an asset that contains posted depreciation lines."
|
||||
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
|
||||
#: view:account.asset.asset:0
|
||||
msgid "Add an internal note here..."
|
||||
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 ""
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -8,19 +8,19 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2012-12-21 23:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-09 10:15+0000\n"
|
||||
"Last-Translator: Florian Hatat <Unknown>\n"
|
||||
"Language-Team: French <fr@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-03-28 05:29+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-10 06:50+0000\n"
|
||||
"X-Generator: Launchpad (build 16598)\n"
|
||||
|
||||
#. module: account_cancel
|
||||
#: view:account.invoice:0
|
||||
msgid "Cancel Invoice"
|
||||
msgstr ""
|
||||
msgstr "Annuler la facture"
|
||||
|
||||
#~ msgid "Cancel"
|
||||
#~ msgstr "Annuler"
|
||||
|
||||
@@ -8,19 +8,19 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2012-12-21 23:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-11 23:16+0000\n"
|
||||
"Last-Translator: Damir Tušek <damir.tusek@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@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-03-28 05:29+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-12 06:27+0000\n"
|
||||
"X-Generator: Launchpad (build 16598)\n"
|
||||
|
||||
#. module: account_cancel
|
||||
#: view:account.invoice:0
|
||||
msgid "Cancel Invoice"
|
||||
msgstr ""
|
||||
msgstr "Storniraj račun"
|
||||
|
||||
#~ msgid "Cancel"
|
||||
#~ msgstr "Otkaži"
|
||||
|
||||
@@ -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: 2013-03-07 08:37+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:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: account_cancel
|
||||
#: view:account.invoice:0
|
||||
msgid "Cancel Invoice"
|
||||
msgstr ""
|
||||
@@ -165,9 +165,8 @@ class res_partner(osv.osv):
|
||||
else:
|
||||
action_text = partner.latest_followup_level_id_without_lit.manual_action_note or ''
|
||||
|
||||
#Check date: put the minimum date if it existed already
|
||||
action_date = (partner.payment_next_action_date and min(partner.payment_next_action_date, fields.date.context_today(self, cr, uid, context=context))
|
||||
) or fields.date.context_today(self, cr, uid, context=context)
|
||||
#Check date: only change when it did not exist already
|
||||
action_date = partner.payment_next_action_date or fields.date.context_today(self, cr, uid, context=context)
|
||||
|
||||
# Check responsible: if partner has not got a responsible already, take from follow-up
|
||||
responsible_id = False
|
||||
|
||||
@@ -9,11 +9,12 @@
|
||||
<field name="model">res.partner</field>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Customer Followup">
|
||||
<tree string="Customer Followup" create="false" delete="false">
|
||||
<field name="name"/>
|
||||
<field name="payment_next_action_date"/>
|
||||
<field name="payment_next_action"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="country_id" invisible="1"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<field name="payment_responsible_id"/>
|
||||
<field name="payment_earliest_due_date"/>
|
||||
@@ -95,7 +96,7 @@
|
||||
<button name="action_done" type="object" string="⇾ Mark as Done"
|
||||
help="Click to mark the action as done." class="oe_link"
|
||||
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, ..."/>
|
||||
</div>
|
||||
</group>
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2013-04-12 21:23+0000\n"
|
||||
"PO-Revision-Date: 2013-05-30 10:25+0000\n"
|
||||
"Last-Translator: Erwin van der Ploeg (Endian Solutions) <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-04-13 06:31+0000\n"
|
||||
"X-Generator: Launchpad (build 16564)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-31 07:00+0000\n"
|
||||
"X-Generator: Launchpad (build 16660)\n"
|
||||
|
||||
#. module: account_followup
|
||||
#: model:email.template,subject:account_followup.email_template_account_followup_default
|
||||
@@ -890,7 +890,7 @@ msgstr ""
|
||||
#. module: account_followup
|
||||
#: field:res.partner,payment_amount_due:0
|
||||
msgid "Amount Due"
|
||||
msgstr "Vervallen bedrag"
|
||||
msgstr "Verschuldigd bedrag"
|
||||
|
||||
#. module: account_followup
|
||||
#: field:account.move.line,followup_date:0
|
||||
@@ -961,7 +961,7 @@ msgstr "Boekingsregels"
|
||||
#: code:addons/account_followup/account_followup.py:281
|
||||
#, python-format
|
||||
msgid "Amount due"
|
||||
msgstr "Vervallen bedrag"
|
||||
msgstr "Verschuldigd bedrag"
|
||||
|
||||
#. module: account_followup
|
||||
#: report:account_followup.followup.print:0
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="name">account_followup.stat.tree</field>
|
||||
<field name="model">account_followup.stat</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Follow-up lines">
|
||||
<tree string="Follow-up lines" create="false">
|
||||
<field name="partner_id"/>
|
||||
<field name="date_move"/>
|
||||
<field name="date_move_last"/>
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2012-12-21 23:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-09 10:15+0000\n"
|
||||
"Last-Translator: Florian Hatat <Unknown>\n"
|
||||
"Language-Team: French <fr@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-03-28 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-10 06:50+0000\n"
|
||||
"X-Generator: Launchpad (build 16598)\n"
|
||||
|
||||
#. module: account_payment
|
||||
#: model:ir.actions.act_window,help:account_payment.action_payment_order_tree
|
||||
@@ -683,7 +683,7 @@ msgstr "Commande"
|
||||
#. module: account_payment
|
||||
#: view:payment.order:0
|
||||
msgid "Cancel Payments"
|
||||
msgstr ""
|
||||
msgstr "Annuler les paiements"
|
||||
|
||||
#. module: account_payment
|
||||
#: field:payment.order,total:0
|
||||
|
||||
@@ -23,6 +23,7 @@ import time
|
||||
from lxml import etree
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools.translate import _
|
||||
|
||||
class payment_order_create(osv.osv_memory):
|
||||
"""
|
||||
@@ -108,7 +109,7 @@ class payment_order_create(osv.osv_memory):
|
||||
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)
|
||||
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,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2012-12-21 23:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-27 10:03+0000\n"
|
||||
"Last-Translator: bajkar <Unknown>\n"
|
||||
"Language-Team: Polish <pl@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-03-28 05:31+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-28 06:36+0000\n"
|
||||
"X-Generator: Launchpad (build 16640)\n"
|
||||
|
||||
#. module: account_sequence
|
||||
#: view:account.sequence.installer:0
|
||||
@@ -122,7 +122,7 @@ msgstr "Sufiks"
|
||||
#. module: account_sequence
|
||||
#: view:account.sequence.installer:0
|
||||
msgid "title"
|
||||
msgstr ""
|
||||
msgstr "tytuł"
|
||||
|
||||
#. module: account_sequence
|
||||
#: field:account.sequence.installer,prefix:0
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ This module manages:
|
||||
'test/sales_payment.yml',
|
||||
'test/account_voucher_report.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_usd.yml',
|
||||
'test/case3_eur_eur.yml',
|
||||
|
||||
@@ -27,6 +27,25 @@ from openerp.osv import fields, osv
|
||||
import openerp.addons.decimal_precision as dp
|
||||
from openerp.tools.translate import _
|
||||
from openerp.tools import float_compare
|
||||
from openerp.report import report_sxw
|
||||
|
||||
class res_currency(osv.osv):
|
||||
_inherit = "res.currency"
|
||||
|
||||
def _current_rate(self, cr, uid, ids, name, arg, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = super(res_currency, self)._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
|
||||
|
||||
_columns = {
|
||||
# same definition of rate that in base in order to just overwrite the function
|
||||
'rate': fields.function(_current_rate, string='Current Rate', digits=(12,6),
|
||||
help='The rate of the currency to the currency of rate 1.'),
|
||||
}
|
||||
|
||||
|
||||
class res_company(osv.osv):
|
||||
_inherit = "res.company"
|
||||
@@ -156,7 +175,7 @@ class account_voucher(osv.osv):
|
||||
journal = journal_pool.browse(cr, uid, journal_id, context=context)
|
||||
if journal.currency:
|
||||
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):
|
||||
if context is None: context = {}
|
||||
@@ -225,21 +244,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):
|
||||
context = context or {}
|
||||
if not line_dr_ids and not line_cr_ids:
|
||||
return {'value':{'writeoff_amount': 0.0, 'is_multi_currency': False}}
|
||||
return {'value':{'writeoff_amount': 0.0}}
|
||||
line_osv = self.pool.get("account.voucher.line")
|
||||
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)
|
||||
|
||||
#compute the field is_multi_currency that is used to hide/display options linked to secondary currency on the voucher
|
||||
is_multi_currency = False
|
||||
#loop on the voucher lines to see if one of these has a secondary currency. If yes, we need to see the options
|
||||
for voucher_line in line_dr_ids+line_cr_ids:
|
||||
line_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).currency_id
|
||||
if line_currency:
|
||||
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')
|
||||
if line_id and self.pool.get('account.move.line').browse(cr, uid, line_id, context=context).currency_id:
|
||||
is_multi_currency = True
|
||||
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}}
|
||||
|
||||
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):
|
||||
if not ids: return {}
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
@@ -256,20 +280,48 @@ class account_voucher(osv.osv):
|
||||
return res
|
||||
|
||||
def _paid_amount_in_company_currency(self, cr, uid, ids, name, args, context=None):
|
||||
if not ids: return {}
|
||||
if context is None:
|
||||
context = {}
|
||||
res = {}
|
||||
ctx = context.copy()
|
||||
for v in self.browse(cr, uid, ids, context=context):
|
||||
ctx.update({'date': v.date})
|
||||
#make a new call to browse in order to have the right date in the context, to get the right currency rate
|
||||
voucher = self.browse(cr, uid, v.id, context=ctx)
|
||||
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 = {}
|
||||
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.update({'date': voucher.date})
|
||||
voucher_rate = self.browse(cr, uid, voucher.id, context=ctx).currency_id.rate
|
||||
company_currency_rate = voucher.company_id.currency_id.rate
|
||||
rate = voucher_rate * company_currency_rate
|
||||
res[voucher.id] = voucher.amount / rate
|
||||
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
|
||||
|
||||
_name = 'account.voucher'
|
||||
@@ -302,8 +354,7 @@ class account_voucher(osv.osv):
|
||||
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)]}),
|
||||
'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.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', readonly=True),
|
||||
'currency_id': fields.function(_get_journal_currency, type='many2one', relation='res.currency', string='Currency', readonly=True, required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'state':fields.selection(
|
||||
[('draft','Draft'),
|
||||
@@ -344,6 +395,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.'),
|
||||
'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'),
|
||||
'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 = {
|
||||
'active': True,
|
||||
@@ -420,6 +472,8 @@ class account_voucher(osv.osv):
|
||||
partner_pool = self.pool.get('res.partner')
|
||||
position_pool = self.pool.get('account.fiscal.position')
|
||||
line_pool = self.pool.get('account.voucher.line')
|
||||
if not line_ids:
|
||||
line_ids = []
|
||||
res = {
|
||||
'tax_amount': False,
|
||||
'amount': False,
|
||||
@@ -514,23 +568,26 @@ class account_voucher(osv.osv):
|
||||
return default
|
||||
|
||||
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}}
|
||||
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:
|
||||
voucher_rate = self.pool.get('res.currency').browse(cr, uid, currency_id, context).rate
|
||||
if company_currency.id == payment_rate_currency_id:
|
||||
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
|
||||
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
|
||||
#context should contain the date, the payment currency and the payment rate specified on the voucher
|
||||
amount_in_company_currency = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency.id, amount, context=context)
|
||||
res['value']['paid_amount_in_company_currency'] = amount_in_company_currency
|
||||
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):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context)
|
||||
ctx = context.copy()
|
||||
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)
|
||||
for key in vals.keys():
|
||||
res[key].update(vals[key])
|
||||
@@ -544,6 +601,7 @@ class account_voucher(osv.osv):
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
|
||||
company_id = journal.company_id.id
|
||||
payment_rate = 1.0
|
||||
currency_id = currency_id or journal.company_id.currency_id.id
|
||||
payment_rate_currency_id = currency_id
|
||||
ctx = context.copy()
|
||||
ctx.update({'date': date})
|
||||
@@ -559,24 +617,62 @@ class account_voucher(osv.osv):
|
||||
# is not in the voucher currency
|
||||
payment_rate_currency_id = voucher_line['currency_id']
|
||||
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, voucher_currency_id, context=ctx).rate
|
||||
payment_rate = tmp / currency_obj.browse(cr, uid, currency_id, context=ctx).rate
|
||||
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)
|
||||
for key in res.keys():
|
||||
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
|
||||
|
||||
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):
|
||||
if not journal_id:
|
||||
return {}
|
||||
res = self.recompute_voucher_lines(cr, uid, ids, partner_id, journal_id, amount, currency_id, ttype, date, context=context)
|
||||
vals = self.recompute_payment_rate(cr, uid, ids, res, currency_id, date, ttype, journal_id, amount, context=context)
|
||||
if context is None:
|
||||
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():
|
||||
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
|
||||
# [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
|
||||
@@ -619,8 +715,6 @@ class account_voucher(osv.osv):
|
||||
if context is None:
|
||||
context = {}
|
||||
context_multi_currency = context.copy()
|
||||
if date:
|
||||
context_multi_currency.update({'date': date})
|
||||
|
||||
currency_pool = self.pool.get('res.currency')
|
||||
move_line_pool = self.pool.get('account.move.line')
|
||||
@@ -644,18 +738,6 @@ class account_voucher(osv.osv):
|
||||
journal = journal_pool.browse(cr, uid, journal_id, context=context)
|
||||
partner = partner_pool.browse(cr, uid, partner_id, context=context)
|
||||
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_debit = 0.0
|
||||
@@ -713,12 +795,13 @@ class account_voucher(osv.osv):
|
||||
if _remove_noise_in_o2m():
|
||||
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_unreconciled = abs(line.amount_residual_currency)
|
||||
else:
|
||||
amount_original = currency_pool.compute(cr, uid, company_currency, currency_id, line.credit or line.debit or 0.0)
|
||||
amount_unreconciled = currency_pool.compute(cr, uid, company_currency, currency_id, abs(line.amount_residual))
|
||||
#always use the amount booked in the company currency as the basis of the conversion into the voucher currency
|
||||
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
|
||||
rs = {
|
||||
'name':line.move_id.name,
|
||||
@@ -764,10 +847,15 @@ class account_voucher(osv.osv):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = {'value': {}}
|
||||
#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:
|
||||
if currency_id:
|
||||
#set the default payment rate of the voucher and compute the paid amount in company currency
|
||||
ctx = context.copy()
|
||||
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)
|
||||
for key in vals.keys():
|
||||
res[key].update(vals[key])
|
||||
@@ -788,6 +876,7 @@ class account_voucher(osv.osv):
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
ctx = context.copy()
|
||||
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)
|
||||
if pids:
|
||||
res['value'].update({'period_id':pids[0]})
|
||||
@@ -796,9 +885,8 @@ class account_voucher(osv.osv):
|
||||
payment_rate = 1.0
|
||||
if payment_rate_currency_id != currency_id:
|
||||
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
|
||||
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})
|
||||
for key in vals.keys():
|
||||
res[key].update(vals[key])
|
||||
@@ -824,6 +912,12 @@ class account_voucher(osv.osv):
|
||||
else:
|
||||
currency_id = journal.company_id.currency_id.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)
|
||||
for key in res.keys():
|
||||
vals[key].update(res[key])
|
||||
@@ -910,8 +1004,8 @@ class account_voucher(osv.osv):
|
||||
current_currency = self._get_current_currency(cr, uid, voucher_id, context)
|
||||
if current_currency <> company_currency:
|
||||
context_multi_currency = context.copy()
|
||||
voucher_brw = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context)
|
||||
context_multi_currency.update({'date': voucher_brw.date})
|
||||
voucher = self.pool.get('account.voucher').browse(cr, uid, voucher_id, context)
|
||||
context_multi_currency.update({'date': voucher.date})
|
||||
return context_multi_currency
|
||||
return context
|
||||
|
||||
@@ -926,33 +1020,33 @@ class account_voucher(osv.osv):
|
||||
:return: mapping between fieldname and value of account move line to create
|
||||
: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
|
||||
# TODO: is there any other alternative then the voucher type ??
|
||||
# ANSWER: We can have payment and receipt "In Advance".
|
||||
# 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
|
||||
if voucher_brw.type in ('purchase', 'payment'):
|
||||
credit = voucher_brw.paid_amount_in_company_currency
|
||||
elif voucher_brw.type in ('sale', 'receipt'):
|
||||
debit = voucher_brw.paid_amount_in_company_currency
|
||||
if voucher.type in ('purchase', 'payment'):
|
||||
credit = voucher.paid_amount_in_company_currency
|
||||
elif voucher.type in ('sale', 'receipt'):
|
||||
debit = voucher.paid_amount_in_company_currency
|
||||
if debit < 0: credit = -debit; debit = 0.0
|
||||
if credit < 0: debit = -credit; credit = 0.0
|
||||
sign = debit - credit < 0 and -1 or 1
|
||||
#set the first line of the voucher
|
||||
move_line = {
|
||||
'name': voucher_brw.name or '/',
|
||||
'name': voucher.name or '/',
|
||||
'debit': debit,
|
||||
'credit': credit,
|
||||
'account_id': voucher_brw.account_id.id,
|
||||
'account_id': voucher.account_id.id,
|
||||
'move_id': move_id,
|
||||
'journal_id': voucher_brw.journal_id.id,
|
||||
'period_id': voucher_brw.period_id.id,
|
||||
'partner_id': voucher_brw.partner_id.id,
|
||||
'journal_id': voucher.journal_id.id,
|
||||
'period_id': voucher.period_id.id,
|
||||
'partner_id': voucher.partner_id.id,
|
||||
'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,
|
||||
'date': voucher_brw.date,
|
||||
'date_maturity': voucher_brw.date_due
|
||||
'amount_currency': company_currency <> current_currency and sign * voucher.amount or 0.0,
|
||||
'date': voucher.date,
|
||||
'date_maturity': voucher.date_due
|
||||
}
|
||||
return move_line
|
||||
|
||||
@@ -965,31 +1059,31 @@ class account_voucher(osv.osv):
|
||||
:rtype: dict
|
||||
'''
|
||||
seq_obj = self.pool.get('ir.sequence')
|
||||
voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
||||
if voucher_brw.number:
|
||||
name = voucher_brw.number
|
||||
elif voucher_brw.journal_id.sequence_id:
|
||||
if not voucher_brw.journal_id.sequence_id.active:
|
||||
voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
||||
if voucher.number:
|
||||
name = voucher.number
|
||||
elif voucher.journal_id.sequence_id:
|
||||
if not voucher.journal_id.sequence_id.active:
|
||||
raise osv.except_osv(_('Configuration Error !'),
|
||||
_('Please activate the sequence of selected journal !'))
|
||||
c = dict(context)
|
||||
c.update({'fiscalyear_id': voucher_brw.period_id.fiscalyear_id.id})
|
||||
name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=c)
|
||||
c.update({'fiscalyear_id': voucher.period_id.fiscalyear_id.id})
|
||||
name = seq_obj.next_by_id(cr, uid, voucher.journal_id.sequence_id.id, context=c)
|
||||
else:
|
||||
raise osv.except_osv(_('Error!'),
|
||||
_('Please define a sequence on the journal.'))
|
||||
if not voucher_brw.reference:
|
||||
if not voucher.reference:
|
||||
ref = name.replace('/','')
|
||||
else:
|
||||
ref = voucher_brw.reference
|
||||
ref = voucher.reference
|
||||
|
||||
move = {
|
||||
'name': name,
|
||||
'journal_id': voucher_brw.journal_id.id,
|
||||
'narration': voucher_brw.narration,
|
||||
'date': voucher_brw.date,
|
||||
'journal_id': voucher.journal_id.id,
|
||||
'narration': voucher.narration,
|
||||
'date': voucher.date,
|
||||
'ref': ref,
|
||||
'period_id': voucher_brw.period_id.id,
|
||||
'period_id': voucher.period_id.id,
|
||||
}
|
||||
return move
|
||||
|
||||
@@ -1016,7 +1110,10 @@ 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."))
|
||||
# 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
|
||||
account_currency_id = company_currency <> current_currency and current_currency or False
|
||||
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
|
||||
move_line = {
|
||||
'journal_id': line.voucher_id.journal_id.id,
|
||||
'period_id': line.voucher_id.period_id.id,
|
||||
@@ -1059,16 +1156,11 @@ class account_voucher(osv.osv):
|
||||
:return: the amount in the currency of the voucher's company
|
||||
:rtype: float
|
||||
'''
|
||||
if context is None:
|
||||
context = {}
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
voucher = self.browse(cr, uid, voucher_id, context=context)
|
||||
res = amount
|
||||
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
|
||||
return currency_obj.compute(cr, uid, voucher.currency_id.id, voucher.company_id.currency_id.id, amount, context=context)
|
||||
|
||||
def voucher_move_line_create(self, cr, uid, voucher_id, line_total, move_id, company_currency, current_currency, context=None):
|
||||
'''
|
||||
@@ -1092,39 +1184,45 @@ class account_voucher(osv.osv):
|
||||
tot_line = line_total
|
||||
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.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')
|
||||
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
|
||||
# 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)):
|
||||
continue
|
||||
# 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
|
||||
# currency rate difference
|
||||
if line.amount == line.amount_unreconciled:
|
||||
if not line.move_line_id:
|
||||
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)
|
||||
else:
|
||||
currency_rate_difference = 0.0
|
||||
move_line = {
|
||||
'journal_id': voucher_brw.journal_id.id,
|
||||
'period_id': voucher_brw.period_id.id,
|
||||
'journal_id': voucher.journal_id.id,
|
||||
'period_id': voucher.period_id.id,
|
||||
'name': line.name or '/',
|
||||
'account_id': line.account_id.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,
|
||||
'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False,
|
||||
'quantity': 1,
|
||||
'credit': 0.0,
|
||||
'debit': 0.0,
|
||||
'date': voucher_brw.date
|
||||
'date': voucher.date
|
||||
}
|
||||
if amount < 0:
|
||||
amount = -amount
|
||||
@@ -1140,9 +1238,9 @@ class account_voucher(osv.osv):
|
||||
tot_line -= 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({
|
||||
'account_tax_id': voucher_brw.tax_id.id,
|
||||
'account_tax_id': voucher.tax_id.id,
|
||||
})
|
||||
|
||||
if move_line.get('account_tax_id', False):
|
||||
@@ -1154,7 +1252,6 @@ class account_voucher(osv.osv):
|
||||
foreign_currency_diff = 0.0
|
||||
amount_currency = False
|
||||
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
|
||||
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.
|
||||
@@ -1162,27 +1259,19 @@ class account_voucher(osv.osv):
|
||||
# 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
|
||||
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
|
||||
payment_rate = voucher_brw.payment_rate
|
||||
if voucher_currency != company_currency:
|
||||
#if the voucher currency is not the company currency, we need to consider the rate of the line's currency
|
||||
voucher_rate = currency_obj.browse(cr, uid, voucher_currency, context=ctx).rate
|
||||
payment_rate = voucher_rate * payment_rate
|
||||
amount_currency = (move_line['debit'] - move_line['credit']) * payment_rate
|
||||
|
||||
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)
|
||||
if line.amount == line.amount_unreconciled and line.move_line_id.currency_id.id == voucher_currency:
|
||||
sign = voucher_brw.type in ('payment', 'purchase') and -1 or 1
|
||||
if line.amount == line.amount_unreconciled:
|
||||
sign = voucher.type in ('payment', 'purchase') and -1 or 1
|
||||
foreign_currency_diff = sign * line.move_line_id.amount_residual_currency + amount_currency
|
||||
|
||||
move_line['amount_currency'] = amount_currency
|
||||
voucher_line = move_line_obj.create(cr, uid, move_line)
|
||||
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
|
||||
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)
|
||||
@@ -1229,32 +1318,32 @@ class account_voucher(osv.osv):
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
move_line = {}
|
||||
|
||||
voucher_brw = 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
|
||||
voucher = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
|
||||
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):
|
||||
diff = line_total
|
||||
account_id = False
|
||||
write_off_name = ''
|
||||
if voucher_brw.payment_option == 'with_writeoff':
|
||||
account_id = voucher_brw.writeoff_acc_id.id
|
||||
write_off_name = voucher_brw.comment
|
||||
elif voucher_brw.type in ('sale', 'receipt'):
|
||||
account_id = voucher_brw.partner_id.property_account_receivable.id
|
||||
if voucher.payment_option == 'with_writeoff':
|
||||
account_id = voucher.writeoff_acc_id.id
|
||||
write_off_name = voucher.comment
|
||||
elif voucher.type in ('sale', 'receipt'):
|
||||
account_id = voucher.partner_id.property_account_receivable.id
|
||||
else:
|
||||
account_id = voucher_brw.partner_id.property_account_payable.id
|
||||
sign = voucher_brw.type == 'payment' and -1 or 1
|
||||
account_id = voucher.partner_id.property_account_payable.id
|
||||
sign = voucher.type == 'payment' and -1 or 1
|
||||
move_line = {
|
||||
'name': write_off_name or name,
|
||||
'account_id': account_id,
|
||||
'move_id': move_id,
|
||||
'partner_id': voucher_brw.partner_id.id,
|
||||
'date': voucher_brw.date,
|
||||
'partner_id': voucher.partner_id.id,
|
||||
'date': voucher.date,
|
||||
'credit': 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,
|
||||
'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
|
||||
@@ -1355,13 +1444,17 @@ class account_voucher_line(osv.osv):
|
||||
_order = "move_line_id"
|
||||
|
||||
# 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):
|
||||
currency_pool = self.pool.get('res.currency')
|
||||
rs_data = {}
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
ctx = context.copy()
|
||||
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 = {}
|
||||
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
|
||||
@@ -1371,13 +1464,11 @@ class account_voucher_line(osv.osv):
|
||||
res['amount_original'] = 0.0
|
||||
res['amount_unreconciled'] = 0.0
|
||||
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_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)
|
||||
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)
|
||||
res['amount_original'] = abs(move_line.amount_currency)
|
||||
res['amount_unreconciled'] = abs(move_line.amount_residual_currency)
|
||||
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)
|
||||
|
||||
rs_data[line.id] = res
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2013-05-01 18:15+0000\n"
|
||||
"PO-Revision-Date: 2013-05-15 17:31+0000\n"
|
||||
"Last-Translator: Erwin van der Ploeg (Endian Solutions) <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-02 06:08+0000\n"
|
||||
"X-Generator: Launchpad (build 16580)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-16 05:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.bank.statement.line,voucher_id:0
|
||||
@@ -526,7 +526,7 @@ msgstr "Weet u zeker dat u het afletteren van deze regel wilt afbreken?"
|
||||
#. module: account_voucher
|
||||
#: view:account.voucher:0
|
||||
msgid "Sales Receipt"
|
||||
msgstr "Verkoopbon"
|
||||
msgstr "Betaalbewijs"
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,is_multi_currency:0
|
||||
|
||||
@@ -41,6 +41,7 @@ class invoice(osv.osv):
|
||||
'target': 'new',
|
||||
'domain': '[]',
|
||||
'context': {
|
||||
'payment_expected_currency': inv.currency_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_reference': inv.name,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
account_id: account.cash
|
||||
amount: 1000.0
|
||||
company_id: base.main_company
|
||||
journal_id: account.bank_journal
|
||||
journal_id: account.sales_journal
|
||||
name: Voucher for Axelor
|
||||
narration: Basic Pc
|
||||
line_cr_ids:
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
-
|
||||
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}: |
|
||||
import netsvc, time
|
||||
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}: |
|
||||
import netsvc
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', ref('account_voucher_1_case1_payment_rate'), 'proforma_voucher', cr)
|
||||
-
|
||||
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_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_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
|
||||
-
|
||||
|
||||
@@ -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 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
|
||||
-
|
||||
@@ -176,7 +176,8 @@
|
||||
elif move_line.amount_currency == -298.78:
|
||||
assert move_line.credit == 149.39, "Debtor account has wrong entry."
|
||||
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:
|
||||
assert move_line.amount_currency == -13.26, "Writeoff amount is wrong."
|
||||
else:
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
currency: base.USD
|
||||
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}:
|
||||
account_id: account.a_recv
|
||||
@@ -79,7 +79,7 @@
|
||||
!context
|
||||
'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}:
|
||||
account_id: account.cash
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
</search>
|
||||
</field>
|
||||
</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">
|
||||
<field name="name">account.voucher.payment.low.priority.form</field>
|
||||
<field name="model">account.voucher</field>
|
||||
@@ -107,7 +110,7 @@
|
||||
</group>
|
||||
<group string="Other Information" col="4">
|
||||
<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="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
||||
<field name="number" colspan="4"/>
|
||||
@@ -119,6 +122,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Supplier Payment -->
|
||||
<record model="ir.ui.view" id="view_vendor_payment_form">
|
||||
<field name="name">account.voucher.payment.form</field>
|
||||
<field name="model">account.voucher</field>
|
||||
@@ -193,12 +197,16 @@
|
||||
<field name="narration" colspan="2" nolabel="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<group col="4" attrs="{'invisible':[('is_multi_currency','=',False)]}">
|
||||
<separator string="Currency Options" colspan="4"/>
|
||||
<group col="2" attrs="{'invisible':[('is_multi_currency','=',False)]}">
|
||||
<separator string="Currency Options" colspan="2"/>
|
||||
<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_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"/>
|
||||
<label for="payment_rate" colspan="1"/>
|
||||
<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="2" invisible="1"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<separator string="Payment Options" colspan="2"/>
|
||||
@@ -282,6 +290,7 @@
|
||||
<menuitem action="action_vendor_payment" icon="STOCK_JUSTIFY_FILL" sequence="12"
|
||||
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">
|
||||
<field name="name">account.voucher.receipt.dialog.form</field>
|
||||
<field name="model">account.voucher</field>
|
||||
@@ -376,7 +385,7 @@
|
||||
</group>
|
||||
<group col="4" attrs="{'invisible':[('is_multi_currency','=',False)]}">
|
||||
<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="paid_amount_in_company_currency" colspan="4" invisible="1"/>
|
||||
</group>
|
||||
@@ -392,6 +401,7 @@
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Customer Payment -->
|
||||
<record model="ir.ui.view" id="view_vendor_receipt_form">
|
||||
<field name="name">account.voucher.receipt.form</field>
|
||||
<field name="model">account.voucher</field>
|
||||
@@ -474,8 +484,12 @@
|
||||
</group>
|
||||
<group col="4" attrs="{'invisible':[('is_multi_currency','=',False)]}">
|
||||
<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_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"/>
|
||||
<label for="payment_rate" colspan="1"/>
|
||||
<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"/>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -147,8 +147,9 @@
|
||||
</notebook>
|
||||
<group col="4" 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" invisible="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" 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>
|
||||
@@ -243,6 +244,7 @@
|
||||
on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"
|
||||
groups="account.group_account_user"/>
|
||||
<field name="paid_amount_in_company_currency" invisible="1"/>
|
||||
<field name="currency_help_label" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
||||
@@ -543,6 +543,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||
fixes = group(fixes, ('model_name', 'field_name'))
|
||||
|
||||
for line in data:
|
||||
queries = []
|
||||
table_name = self.pool.get(line['model_id'])._table if self.pool.get(line['model_id']) else None
|
||||
|
||||
# check if custom sql exists:
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2013-05-02 10:18+0000\n"
|
||||
"Last-Translator: Ediz Duman <neps1192@gmail.com>\n"
|
||||
"PO-Revision-Date: 2013-05-17 11:53+0000\n"
|
||||
"Last-Translator: Ayhan KIZILTAN <Unknown>\n"
|
||||
"Language-Team: Turkish <tr@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-03 06:29+0000\n"
|
||||
"X-Generator: Launchpad (build 16598)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-19 06:12+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.log:0
|
||||
@@ -295,6 +295,8 @@ msgid ""
|
||||
"There is already a rule defined on this object\n"
|
||||
" You cannot define another: please edit the existing one."
|
||||
msgstr ""
|
||||
"Bu objeye zaten bir kural tanımlanmış\n"
|
||||
" Başka bir tane tanımlayamazsınız: lütfen varolanı düzenleyin."
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_unlink:0
|
||||
|
||||
Executable → Regular
Executable → Regular
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Executable → Regular
Executable → Regular
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
|
||||
@@ -7,7 +7,7 @@ openerp.auth_signup = function(instance) {
|
||||
var self = this;
|
||||
this.signup_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]
|
||||
self.on('change:login_mode', self, function() {
|
||||
|
||||
@@ -62,6 +62,7 @@ class base_action_rule(osv.osv):
|
||||
'sequence': fields.integer('Sequence',
|
||||
help="Gives the sequence order when displaying a list of rules."),
|
||||
'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'))]"),
|
||||
'trg_date_range': fields.integer('Delay after trigger date',
|
||||
help="Delay after the trigger date." \
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2013-02-06 10:44+0000\n"
|
||||
"Last-Translator: Ahmet Altınışık <Unknown>\n"
|
||||
"PO-Revision-Date: 2013-05-31 11:30+0000\n"
|
||||
"Last-Translator: Ercan SORMAZ <ercansormaz@gmail.com>\n"
|
||||
"Language-Team: Turkish <tr@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-03-28 05:33+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-06-01 05:59+0000\n"
|
||||
"X-Generator: Launchpad (build 16660)\n"
|
||||
|
||||
#. module: base_gengo
|
||||
#: view:res.company:0
|
||||
@@ -96,7 +96,7 @@ msgstr ""
|
||||
#. module: base_gengo
|
||||
#: selection:ir.translation,gengo_translation:0
|
||||
msgid "Translation By Machine"
|
||||
msgstr ""
|
||||
msgstr "Makine Tarafından Çeviri"
|
||||
|
||||
#. module: base_gengo
|
||||
#: view:res.company:0
|
||||
@@ -116,12 +116,12 @@ msgstr ""
|
||||
#. module: base_gengo
|
||||
#: field:ir.translation,gengo_translation:0
|
||||
msgid "Gengo Translation Service Level"
|
||||
msgstr ""
|
||||
msgstr "Genge Çeviri Hizmet Düzeyi"
|
||||
|
||||
#. module: base_gengo
|
||||
#: view:res.company:0
|
||||
msgid "Add your comments here for translator...."
|
||||
msgstr ""
|
||||
msgstr "Çevirmen için buraya yorum ekleyin...."
|
||||
|
||||
#. module: base_gengo
|
||||
#: selection:ir.translation,gengo_translation:0
|
||||
@@ -134,6 +134,8 @@ msgid ""
|
||||
"You can select here the service level you want for an automatic translation "
|
||||
"using Gengo."
|
||||
msgstr ""
|
||||
"Genge otomatik çeviri servisi için istediğiniz hizmet düzeyini buradan "
|
||||
"seçebilirsiniz"
|
||||
|
||||
#. module: base_gengo
|
||||
#: field:base.gengo.translations,restart_send_job:0
|
||||
@@ -213,7 +215,7 @@ msgstr ""
|
||||
#. module: base_gengo
|
||||
#: view:res.company:0
|
||||
msgid "Gengo Parameters"
|
||||
msgstr ""
|
||||
msgstr "Gengo Parametreleri"
|
||||
|
||||
#. module: base_gengo
|
||||
#: view:base.gengo.translations:0
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:37+0000\n"
|
||||
"PO-Revision-Date: 2013-03-16 17:27+0000\n"
|
||||
"PO-Revision-Date: 2013-05-25 13:13+0000\n"
|
||||
"Last-Translator: Erwin van der Ploeg (Endian Solutions) <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2013-03-28 05:33+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-26 05:39+0000\n"
|
||||
"X-Generator: Launchpad (build 16640)\n"
|
||||
|
||||
#. module: base_import
|
||||
#. openerp-web
|
||||
@@ -84,7 +84,7 @@ msgid ""
|
||||
" record, defined by the ID postgresql column"
|
||||
msgstr ""
|
||||
"Land/Database ID: de unieke OpenERP ID voor een \n"
|
||||
" record, gedefinieerd door de postgresql kolom id"
|
||||
" record, gedefinieerd door de PostgreSQL kolom id"
|
||||
|
||||
#. module: base_import
|
||||
#. openerp-web
|
||||
@@ -246,7 +246,7 @@ msgstr "Kan ik meerdere maken hetzelfde record importeren."
|
||||
#: code:addons/base_import/static/src/xml/import.xml:15
|
||||
#, python-format
|
||||
msgid "Validate"
|
||||
msgstr "Bevestigen"
|
||||
msgstr "Valideren"
|
||||
|
||||
#. module: base_import
|
||||
#. openerp-web
|
||||
@@ -358,9 +358,9 @@ msgid ""
|
||||
msgstr ""
|
||||
"Zoals u in dit bestand kunt zien, werken Fabien en Laurence\n"
|
||||
" voor grote bedrijven (company_1) en Eric werkt\n"
|
||||
" voor het nedrijf Organi. De relatie tussen de "
|
||||
" voor het bedrijf Organi. De relatie tussen de "
|
||||
"personen \n"
|
||||
" en de bedrijven wordt egmaakt door gebruik te maken "
|
||||
" en de bedrijven wordt gemaakt door gebruik te maken "
|
||||
"van de \n"
|
||||
" External ID van de bedrijven. We hebben een prefix "
|
||||
"gemaakt voor de \n"
|
||||
@@ -455,7 +455,7 @@ msgstr ""
|
||||
"\"Verkoopbaar\" (bijv. \"Div.\n"
|
||||
" Producten / Verkoopbaar\" & \"Overige producten / "
|
||||
"Verkoopbaar\"),\n"
|
||||
" zal de import validate stoppen, maar u kunt nog "
|
||||
" zal de import validatie stoppen, maar u kunt nog "
|
||||
"steeds uw data importeren.\n"
|
||||
" Toch raden wij u niet aan de data te importeren "
|
||||
"omdat deze allemaal worden\n"
|
||||
@@ -1010,7 +1010,7 @@ msgid ""
|
||||
"command:"
|
||||
msgstr ""
|
||||
"We zullen eerst alle bedrijven met de \n"
|
||||
" \"External ID\" exproteren. In PSQL, schrijf het "
|
||||
" \"External ID\" exporteren. In PSQL, schrijf het "
|
||||
"volgende commando:"
|
||||
|
||||
#. module: base_import
|
||||
@@ -1211,8 +1211,8 @@ msgid ""
|
||||
" import an other record that links to the first\n"
|
||||
" one, use"
|
||||
msgstr ""
|
||||
"kolom in OpenERP. Waneer u\n"
|
||||
" een ander record importeerd, welke verwijst naar de "
|
||||
"kolom in OpenERP. Wanneer u\n"
|
||||
" een ander record importeert, welke verwijst naar de "
|
||||
"eerste\n"
|
||||
" gebruik,"
|
||||
|
||||
|
||||
Executable → Regular
Executable → Regular
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Regular → Executable
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; 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
|
||||
#
|
||||
# See: http://www.gnu.org/licenses/lgpl.html
|
||||
#
|
||||
|
||||
@@ -83,6 +83,8 @@ class res_partner(osv.osv):
|
||||
Check the VAT number depending of the country.
|
||||
http://sima-pc.com/nif.php
|
||||
'''
|
||||
if not ustr(country_code).encode('utf-8').isalpha():
|
||||
return False
|
||||
check_func_name = 'check_vat_' + country_code
|
||||
check_func = getattr(self, check_func_name, None) or \
|
||||
getattr(vatnumber, check_func_name, None)
|
||||
|
||||
@@ -8,32 +8,32 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:38+0000\n"
|
||||
"PO-Revision-Date: 2012-12-21 23:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-12 11:04+0000\n"
|
||||
"Last-Translator: AhnJD <zion64@msn.com>\n"
|
||||
"Language-Team: Korean <ko@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-03-28 05:34+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-13 06:46+0000\n"
|
||||
"X-Generator: Launchpad (build 16614)\n"
|
||||
|
||||
#. module: board
|
||||
#: model:ir.actions.act_window,name:board.action_board_create
|
||||
#: model:ir.ui.menu,name:board.menu_board_create
|
||||
msgid "Create Board"
|
||||
msgstr ""
|
||||
msgstr "게시판 생성"
|
||||
|
||||
#. module: board
|
||||
#: view:board.create:0
|
||||
msgid "Create"
|
||||
msgstr ""
|
||||
msgstr "생성"
|
||||
|
||||
#. module: board
|
||||
#. openerp-web
|
||||
#: code:addons/board/static/src/xml/board.xml:4
|
||||
#, python-format
|
||||
msgid "Reset Layout.."
|
||||
msgstr ""
|
||||
msgstr "레이아웃 재설정"
|
||||
|
||||
#. module: board
|
||||
#: view:board.create:0
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# 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: 2013-03-07 08:38+0000\n"
|
||||
"PO-Revision-Date: 2013-05-15 07:10+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:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: contacts
|
||||
#: model:ir.actions.act_window,help:contacts.action_contacts
|
||||
msgid ""
|
||||
"<p class=\"oe_view_nocontent_create\">\n"
|
||||
" Click to add a contact in your address book.\n"
|
||||
" </p><p>\n"
|
||||
" OpenERP helps you easily track all activities related to\n"
|
||||
" a customer; discussions, history of business opportunities,\n"
|
||||
" documents, etc.\n"
|
||||
" </p>\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: contacts
|
||||
#: model:ir.actions.act_window,name:contacts.action_contacts
|
||||
#: model:ir.ui.menu,name:contacts.menu_contacts
|
||||
msgid "Contacts"
|
||||
msgstr ""
|
||||
@@ -77,12 +77,12 @@ class crm_lead(base_stage, format_address, osv.osv):
|
||||
|
||||
_track = {
|
||||
'state': {
|
||||
'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'new',
|
||||
'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['new', 'draft'],
|
||||
'crm.mt_lead_won': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done',
|
||||
'crm.mt_lead_lost': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'cancel',
|
||||
},
|
||||
'stage_id': {
|
||||
'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'cancel', 'done'],
|
||||
'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'draft', 'cancel', 'done'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -96,7 +96,9 @@ class crm_lead(base_stage, format_address, osv.osv):
|
||||
if vals.get('type'):
|
||||
ctx['default_type'] = vals['type']
|
||||
vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx)
|
||||
return super(crm_lead, self).create(cr, uid, vals, context=context)
|
||||
# context: no_log, because subtype already handle this
|
||||
create_context = dict(context, mail_create_nolog=True)
|
||||
return super(crm_lead, self).create(cr, uid, vals, context=create_context)
|
||||
|
||||
def _get_default_section_id(self, cr, uid, context=None):
|
||||
""" Gives default section by checking if present in the context """
|
||||
@@ -671,8 +673,9 @@ class crm_lead(base_stage, format_address, osv.osv):
|
||||
merged_data['stage_id'] = section_stage_ids and section_stage_ids[0] or False
|
||||
# Write merged data into first opportunity
|
||||
self.write(cr, uid, [highest.id], merged_data, context=context)
|
||||
# Delete tail opportunities
|
||||
self.unlink(cr, uid, [x.id for x in tail_opportunities], context=context)
|
||||
# Delete tail opportunities
|
||||
# We use the SUPERUSER to avoid access rights issues because as the user had the rights to see the records it should be safe to do so
|
||||
self.unlink(cr, SUPERUSER_ID, [x.id for x in tail_opportunities], context=context)
|
||||
|
||||
return highest.id
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:38+0000\n"
|
||||
"PO-Revision-Date: 2013-03-21 01:53+0000\n"
|
||||
"Last-Translator: WANTELLET Sylvain <Swantellet@tetra-info.com>\n"
|
||||
"PO-Revision-Date: 2013-05-21 16:09+0000\n"
|
||||
"Last-Translator: Florian Hatat <Unknown>\n"
|
||||
"Language-Team: French <fr@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-03-28 05:37+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-22 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 16626)\n"
|
||||
|
||||
#. module: delivery
|
||||
#: report:sale.shipping:0
|
||||
@@ -458,6 +458,20 @@ msgid ""
|
||||
" </p>\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"<p class=\"oe_view_nocontent_create\">\n"
|
||||
"Cliquez pour ajouter un nouveau mode de livraison.\n"
|
||||
" </p><p>\n"
|
||||
"Chaque transporteur (ex. UPS) peut avoir plusieurs modes de livraison (ex.\n"
|
||||
"UPS Express, UPS Standard), chacun avec un jeu de règles de facturation "
|
||||
"propre.\n"
|
||||
" </p><p>\n"
|
||||
"Ajouter un mode de livraison permet de calculer automatiquement\n"
|
||||
"les frais de livraison selon les critères que vous entrez, et ce en "
|
||||
"fonction\n"
|
||||
"du bon de commande (obtenu à partir du devis) ou de la facture (obtenue à\n"
|
||||
"partir des bons de livraison).\n"
|
||||
" </p>\n"
|
||||
" "
|
||||
|
||||
#. module: delivery
|
||||
#: field:delivery.grid.line,max_value:0
|
||||
|
||||
Regular → Executable
@@ -26,6 +26,7 @@
|
||||
<tree string="Document Page">
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="create_uid" invisible="1"/>
|
||||
<field name="write_uid"/>
|
||||
<field name="write_date"/>
|
||||
</tree>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- encoding: utf-8 -*-
|
||||
#
|
||||
# Copyright P. Christeas <p_christ@hol.gr> 2008,2009
|
||||
@@ -24,7 +23,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
###############################################################################
|
||||
|
||||
""" A trivial HTTP/WebDAV client, used for testing the server
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
###############################################################################
|
||||
|
||||
|
||||
|
||||
+13
-10
@@ -8,35 +8,35 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2013-03-07 08:38+0000\n"
|
||||
"PO-Revision-Date: 2012-12-21 23:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2013-05-24 05:55+0000\n"
|
||||
"Last-Translator: Samuli Kivistö <samuli.kivisto@harppaus.fi>\n"
|
||||
"Language-Team: Finnish <fi@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-03-28 05:38+0000\n"
|
||||
"X-Generator: Launchpad (build 16546)\n"
|
||||
"X-Launchpad-Export-Date: 2013-05-25 06:27+0000\n"
|
||||
"X-Generator: Launchpad (build 16640)\n"
|
||||
|
||||
#. module: edi
|
||||
#. openerp-web
|
||||
#: code:addons/edi/static/src/js/edi.js:67
|
||||
#, python-format
|
||||
msgid "Reason:"
|
||||
msgstr ""
|
||||
msgstr "Syy:"
|
||||
|
||||
#. module: edi
|
||||
#. openerp-web
|
||||
#: code:addons/edi/static/src/js/edi.js:60
|
||||
#, python-format
|
||||
msgid "The document has been successfully imported!"
|
||||
msgstr ""
|
||||
msgstr "Dokumentin tuonti onnistui!"
|
||||
|
||||
#. module: edi
|
||||
#. openerp-web
|
||||
#: code:addons/edi/static/src/js/edi.js:65
|
||||
#, python-format
|
||||
msgid "Sorry, the document could not be imported."
|
||||
msgstr ""
|
||||
msgstr "Dokumenttia ei voida tuoda."
|
||||
|
||||
#. module: edi
|
||||
#: model:ir.model,name:edi.model_res_company
|
||||
@@ -53,13 +53,13 @@ msgstr "Valuutta"
|
||||
#: code:addons/edi/static/src/js/edi.js:71
|
||||
#, python-format
|
||||
msgid "Document Import Notification"
|
||||
msgstr ""
|
||||
msgstr "Dokumentin tuonti-ilmoitus"
|
||||
|
||||
#. module: edi
|
||||
#: code:addons/edi/models/edi.py:130
|
||||
#, python-format
|
||||
msgid "Missing application."
|
||||
msgstr ""
|
||||
msgstr "Sovellus puuttuu."
|
||||
|
||||
#. module: edi
|
||||
#: code:addons/edi/models/edi.py:131
|
||||
@@ -69,6 +69,9 @@ msgid ""
|
||||
"You can install it by connecting as the administrator and opening the "
|
||||
"configuration assistant."
|
||||
msgstr ""
|
||||
"Dokumentti, jota yrität tuoda, vaatii OpenERP `%s` sovelluksen. Voit asentaa "
|
||||
"puuttuvan sovelluksen, jos olet kirjautunut administraattorina, käyttämällä "
|
||||
"konfigurointi assistenttia."
|
||||
|
||||
#. module: edi
|
||||
#: code:addons/edi/models/edi.py:47
|
||||
@@ -84,4 +87,4 @@ msgstr "Kumppani"
|
||||
#. module: edi
|
||||
#: model:ir.model,name:edi.model_edi_edi
|
||||
msgid "EDI Subsystem"
|
||||
msgstr ""
|
||||
msgstr "EDI Alijärjestelmä"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user