diff --git a/addons/account/__init__.py b/addons/account/__init__.py
index 36cc1c85b5a..a243b94c2da 100644
--- a/addons/account/__init__.py
+++ b/addons/account/__init__.py
@@ -35,5 +35,5 @@ import product
import ir_sequence
import company
import res_currency
-
+import edi
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index 9445688ec6d..ec61248e147 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -53,7 +53,7 @@ module named account_voucher.
'website': 'http://www.openerp.com',
'images' : ['images/accounts.jpeg','images/bank_statement.jpeg','images/cash_register.jpeg','images/chart_of_accounts.jpeg','images/customer_invoice.jpeg','images/journal_entries.jpeg'],
'init_xml': [],
- "depends" : ["base_setup", "product", "analytic", "process","board"],
+ "depends" : ["base_setup", "product", "analytic", "process", "board", "edi"],
'update_xml': [
'security/account_security.xml',
'security/ir.model.access.csv',
@@ -123,7 +123,9 @@ module named account_voucher.
'board_account_view.xml',
"wizard/account_report_profit_loss_view.xml",
"wizard/account_report_balance_sheet_view.xml",
- "account_bank_view.xml"
+ "edi/invoice_action_data.xml",
+ "account_bank_view.xml",
+ "account_pre_install.yml"
],
'demo_xml': [
'demo/account_demo.xml',
@@ -145,10 +147,9 @@ module named account_voucher.
'test/account_fiscalyear_close.yml',
'test/account_bank_statement.yml',
'test/account_cash_statement.yml',
+ 'test/test_edi_invoice.yml',
'test/account_report.yml',
-
-
- ],
+ ],
'installable': True,
'active': False,
'certificate': '0080331923549',
diff --git a/addons/account/account.py b/addons/account/account.py
index d4712c656a4..8aa1569520e 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -404,7 +404,7 @@ class account_account(osv.osv):
return True
_columns = {
- 'name': fields.char('Name', size=128, required=True, select=True),
+ 'name': fields.char('Name', size=256, required=True, select=True),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
'code': fields.char('Code', size=64, required=True, select=1),
'type': fields.selection([
@@ -431,9 +431,9 @@ class account_account(osv.osv):
'debit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'),
'foreign_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Foreign Balance', multi='balance',
help="Total amount (in Secondary currency) for transactions held in secondary currency for this account."),
- 'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Adjusted Balance', multi='balance',
+ 'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Adjusted Balance', multi='balance',
help="Total amount (in Company currency) for transactions held in secondary currency for this account."),
- 'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Unrealized Gain or Loss', multi='balance',
+ 'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Unrealized Gain or Loss', multi='balance',
help="Value of Loss or Gain due to changes in exchange rate when doing multi-currency transactions."),
'reconcile': fields.boolean('Allow Reconciliation', help="Check this box if this account allows reconciliation of journal items."),
'exchange_rate': fields.related('currency_id', 'rate', type='float', string='Exchange Rate', digits=(12,6)),
@@ -461,7 +461,7 @@ class account_account(osv.osv):
}
_defaults = {
- 'type': 'view',
+ 'type': 'other',
'reconcile': False,
'active': True,
'currency_mode': 'current',
@@ -716,6 +716,19 @@ class account_journal(osv.osv):
_order = 'code'
+ def _check_currency(self, cr, uid, ids, context=None):
+ for journal in self.browse(cr, uid, ids, context=context):
+ if journal.currency:
+ if journal.default_credit_account_id and not journal.default_credit_account_id.currency_id.id == journal.currency.id:
+ return False
+ if journal.default_debit_account_id and not journal.default_debit_account_id.currency_id.id == journal.currency.id:
+ return False
+ return True
+
+ _constraints = [
+ (_check_currency, 'Configuration error! The currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']),
+ ]
+
def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False):
journal = self.browse(cr, uid, id, context=context)
if not default:
@@ -848,19 +861,6 @@ class account_fiscalyear(osv.osv):
}
_order = "date_start"
- def _check_fiscal_year(self, cr, uid, ids, context=None):
- current_fiscal_yr = self.browse(cr, uid, ids, context=context)[0]
- obj_fiscal_ids = self.search(cr, uid, [('company_id', '=', current_fiscal_yr.company_id.id)], context=context)
- obj_fiscal_ids.remove(ids[0])
- data_fiscal_yr = self.browse(cr, uid, obj_fiscal_ids, context=context)
-
- for old_fy in data_fiscal_yr:
- if old_fy.company_id.id == current_fiscal_yr['company_id'].id:
- # Condition to check if the current fiscal year falls in between any previously defined fiscal year
- if old_fy.date_start <= current_fiscal_yr['date_start'] <= old_fy.date_stop or \
- old_fy.date_start <= current_fiscal_yr['date_stop'] <= old_fy.date_stop:
- return False
- return True
def _check_duration(self, cr, uid, ids, context=None):
obj_fy = self.browse(cr, uid, ids[0], context=context)
@@ -869,8 +869,7 @@ class account_fiscalyear(osv.osv):
return True
_constraints = [
- (_check_duration, 'Error! The start date of the fiscal year must be before his end date.', ['date_start','date_stop']),
- (_check_fiscal_year, 'Error! You can not define overlapping fiscal years for the same company.',['date_start', 'date_stop'])
+ (_check_duration, 'Error! The start date of the fiscal year must be before his end date.', ['date_start','date_stop'])
]
def create_period3(self, cr, uid, ids, context=None):
@@ -2001,8 +2000,11 @@ class account_tax(osv.osv):
cur_price_unit+=amount2
return res
- def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
+ def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None, force_excluded=False):
"""
+ :param force_excluded: boolean used to say that we don't want to consider the value of field price_include of
+ tax. It's used in encoding by line where you don't matter if you encoded a tax with that boolean to True or
+ False
RETURN: {
'total': 0.0, # Total without taxes
'total_included: 0.0, # Total with taxes
@@ -2014,10 +2016,10 @@ class account_tax(osv.osv):
tin = []
tex = []
for tax in taxes:
- if tax.price_include:
- tin.append(tax)
- else:
+ if not tax.price_include or force_excluded:
tex.append(tax)
+ else:
+ tin.append(tax)
tin = self.compute_inv(cr, uid, tin, price_unit, quantity, address_id=address_id, product=product, partner=partner)
for r in tin:
totalex -= r.get('amount', 0.0)
@@ -2183,6 +2185,7 @@ class account_model(osv.osv):
account_move_obj = self.pool.get('account.move')
account_move_line_obj = self.pool.get('account.move.line')
pt_obj = self.pool.get('account.payment.term')
+ period_obj = self.pool.get('account.period')
if context is None:
context = {}
@@ -2190,14 +2193,14 @@ class account_model(osv.osv):
if datas.get('date', False):
context.update({'date': datas['date']})
- period_id = self.pool.get('account.period').find(cr, uid, dt=context.get('date', False))
- if not period_id:
- raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !'))
- period_id = period_id[0]
-
move_date = context.get('date', time.strftime('%Y-%m-%d'))
move_date = datetime.strptime(move_date,"%Y-%m-%d")
for model in self.browse(cr, uid, ids, context=context):
+ ctx = context.copy()
+ ctx.update({'company_id': model.company_id.id})
+ period_ids = period_obj.find(cr, uid, dt=context.get('date', False), context=ctx)
+ period_id = period_ids and period_ids[0] or False
+ ctx.update({'journal_id': model.journal_id.id,'period_id': period_id})
try:
entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')}
except:
@@ -2246,9 +2249,7 @@ class account_model(osv.osv):
'date': context.get('date',time.strftime('%Y-%m-%d')),
'date_maturity': date_maturity
})
- c = context.copy()
- c.update({'journal_id': model.journal_id.id,'period_id': period_id})
- account_move_line_obj.create(cr, uid, val, context=c)
+ account_move_line_obj.create(cr, uid, val, context=ctx)
return move_ids
@@ -2395,7 +2396,7 @@ class account_account_template(osv.osv):
_description ='Templates for Accounts'
_columns = {
- 'name': fields.char('Name', size=128, required=True, select=True),
+ 'name': fields.char('Name', size=256, required=True, select=True),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
'code': fields.char('Code', size=64, select=1),
'type': fields.selection([
diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py
index 2a9e432894f..01eab2fbb01 100644
--- a/addons/account/account_bank.py
+++ b/addons/account/account_bank.py
@@ -42,8 +42,12 @@ class bank(osv.osv):
return (bank.bank_name or '') + ' ' + bank.acc_number
def post_write(self, cr, uid, ids, context={}):
+ if isinstance(ids, (int, long)):
+ ids = [ids]
+
obj_acc = self.pool.get('account.account')
obj_data = self.pool.get('ir.model.data')
+
for bank in self.browse(cr, uid, ids, context):
if bank.company_id and not bank.journal_id:
# Find the code and parent of the bank account to create
@@ -104,3 +108,5 @@ class bank(osv.osv):
self.write(cr, uid, [bank.id], {'journal_id': journal_id}, context=context)
return True
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml
index 230078c4e33..e249f8fa872 100644
--- a/addons/account/account_installer.xml
+++ b/addons/account/account_installer.xml
@@ -57,7 +57,7 @@
Accounting5
-
+
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index e445e3f7bc8..27881bf1280 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -251,7 +251,7 @@ class account_invoice(osv.osv):
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'check_total': fields.float('Total', digits_compute=dp.get_precision('Account'), states={'open':[('readonly',True)],'close':[('readonly',True)]}),
+ 'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Account'), states={'open':[('readonly',True)],'close':[('readonly',True)]}),
'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ?
@@ -286,6 +286,9 @@ class account_invoice(osv.osv):
'internal_number': False,
'user_id': lambda s, cr, u, c: u,
}
+ _sql_constraints = [
+ ('number_uniq', 'unique(number, company_id)', 'Invoice Number must be unique per Company!'),
+ ]
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
journal_obj = self.pool.get('account.journal')
@@ -795,6 +798,7 @@ class account_invoice(osv.osv):
"""Creates invoice related analytics and financial move lines"""
ait_obj = self.pool.get('account.invoice.tax')
cur_obj = self.pool.get('res.currency')
+ period_obj = self.pool.get('account.period')
context = {}
for inv in self.browse(cr, uid, ids):
if not inv.journal_id.sequence_id:
@@ -923,10 +927,10 @@ class account_invoice(osv.osv):
'narration':inv.comment
}
period_id = inv.period_id and inv.period_id.id or False
+ ctx.update({'company_id': inv.company_id.id})
if not period_id:
- period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d')), ('company_id', '=', inv.company_id.id)])
- if period_ids:
- period_id = period_ids[0]
+ period_ids = period_obj.find(cr, uid, inv.date_invoice, context=ctx)
+ period_id = period_ids and period_ids[0] or False
if period_id:
move['period_id'] = period_id
for i in line:
@@ -1323,9 +1327,9 @@ class account_invoice_line(osv.osv):
raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
if not product:
if type in ('in_invoice', 'in_refund'):
- return {'value': {'categ_id': False}, 'domain':{'product_uom':[]}}
+ return {'value': {}, 'domain':{'product_uom':[]}}
else:
- return {'value': {'price_unit': 0.0, 'categ_id': False}, 'domain':{'product_uom':[]}}
+ return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}}
part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
fpos_obj = self.pool.get('account.fiscal.position')
fpos = fposition_id and fpos_obj.browse(cr, uid, fposition_id, context=context) or False
@@ -1378,7 +1382,6 @@ class account_invoice_line(osv.osv):
if res2:
domain = {'uos_id':[('category_id','=',res2 )]}
- result['categ_id'] = res.categ_id.id
res_final = {'value':result, 'domain':domain}
if not company_id or not currency_id:
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index efc7a24031c..54a60ee1b57 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -153,7 +153,7 @@
-
+
@@ -264,7 +264,7 @@
-
+
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index dd749ba9820..55e154eed6d 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -1084,8 +1084,6 @@ class account_move_line(osv.osv):
f.set("invisible", "context.get('journal_id', False)")
elif field in ('period_id',):
f.set("invisible", "context.get('period_id', False)")
- else:
- f.set('invisible', "context.get('visible_id') not in %s" % (fields.get(field)))
orm.setup_modifiers(f, fields_get[field], context=context,
in_tree_view=True)
@@ -1245,6 +1243,12 @@ class account_move_line(osv.osv):
m = move_obj.browse(cr, uid, vals['move_id'])
context['journal_id'] = m.journal_id.id
context['period_id'] = m.period_id.id
+ #we need to treat the case where a value is given in the context for period_id as a string
+ if 'period_id' not in context or not isinstance(context.get('period_id', ''), (int, long)):
+ period_candidate_ids = self.pool.get('account.period').name_search(cr, uid, name=context.get('period_id',''))
+ if len(period_candidate_ids) != 1:
+ raise osv.except_osv(_('Encoding error'), _('No period found or period given is ambigous.'))
+ context['period_id'] = period_candidate_ids[0][0]
self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context)
move_id = vals.get('move_id', False)
journal = journal_obj.browse(cr, uid, context['journal_id'], context=context)
@@ -1326,7 +1330,7 @@ class account_move_line(osv.osv):
base_sign = 'base_sign'
tax_sign = 'tax_sign'
tmp_cnt = 0
- for tax in tax_obj.compute_all(cr, uid, [tax_id], total, 1.00).get('taxes'):
+ for tax in tax_obj.compute_all(cr, uid, [tax_id], total, 1.00, force_excluded=True).get('taxes'):
#create the base movement
if tmp_cnt == 0:
if tax[base_code]:
@@ -1338,8 +1342,6 @@ class account_move_line(osv.osv):
else:
data = {
'move_id': vals['move_id'],
- 'journal_id': vals['journal_id'],
- 'period_id': vals['period_id'],
'name': tools.ustr(vals['name'] or '') + ' ' + tools.ustr(tax['name'] or ''),
'date': vals['date'],
'partner_id': vals.get('partner_id',False),
@@ -1356,8 +1358,6 @@ class account_move_line(osv.osv):
#create the VAT movement
data = {
'move_id': vals['move_id'],
- 'journal_id': vals['journal_id'],
- 'period_id': vals['period_id'],
'name': tools.ustr(vals['name'] or '') + ' ' + tools.ustr(tax['name'] or ''),
'date': vals['date'],
'partner_id': vals.get('partner_id',False),
diff --git a/addons/account/account_pre_install.yml b/addons/account/account_pre_install.yml
new file mode 100644
index 00000000000..13adbe8108f
--- /dev/null
+++ b/addons/account/account_pre_install.yml
@@ -0,0 +1,22 @@
+-
+ I configure automatically if the country is set on the company, mainly for online offers.
+-
+ !python {model: account.installer}: |
+ modules = self.pool.get('ir.module.module')
+ wizards = self.pool.get('ir.actions.todo')
+ wiz = wizards.browse(cr, uid, ref('account.account_configuration_installer_todo'))
+ part = self.pool.get('res.partner').browse(cr, uid, ref('base.main_partner'))
+ # if we know the country and the wizard has not yet been executed, we do it
+ if (part.country.id) and (wiz.state=='open'):
+ mod = 'l10n_'+part.country.code.lower()
+ ids = modules.search(cr, uid, [ ('name','=',mod) ], context=context)
+ if ids:
+ wizards.write(cr, uid, [ref('account.account_configuration_installer_todo')], {
+ 'state': 'done'
+ })
+ wiz_id = self.create(cr, uid, {
+ 'charts': mod
+ })
+ self.execute_simple(cr, uid, [wiz_id])
+ modules.state_update(cr, uid, ids,
+ 'to install', ['uninstalled'], context=context)
diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml
index 32d10ba0153..9bb40a7a503 100644
--- a/addons/account/account_report.xml
+++ b/addons/account/account_report.xml
@@ -19,6 +19,7 @@
rml="account/report/account_print_invoice.rml"
string="Invoices"
attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/',''))"
+ usage="default"
multi="True"/>
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 5dd8406b126..1d336dda460 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1235,8 +1235,8 @@
-
-
+
+
@@ -1306,7 +1306,6 @@
account.accountOpen Journal Items
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/company.py b/addons/account/company.py
index c903b6d4a71..4ad4d1226d7 100644
--- a/addons/account/company.py
+++ b/addons/account/company.py
@@ -24,6 +24,7 @@ from osv import fields, osv
class res_company(osv.osv):
_inherit = "res.company"
_columns = {
+ 'paypal_account': fields.char("Paypal Account", size=128, help="Paypal username (usually email) for receiving online payments."),
'overdue_msg': fields.text('Overdue Payments Message', translate=True),
'property_reserve_and_surplus_account': fields.property(
'account.account',
diff --git a/addons/account/company_view.xml b/addons/account/company_view.xml
index 0664fadd761..0cc67f23cfe 100644
--- a/addons/account/company_view.xml
+++ b/addons/account/company_view.xml
@@ -24,6 +24,7 @@
+
diff --git a/addons/account/demo/account_demo.xml b/addons/account/demo/account_demo.xml
index 566185c70c3..0bbfa71af62 100644
--- a/addons/account/demo/account_demo.xml
+++ b/addons/account/demo/account_demo.xml
@@ -7,7 +7,7 @@
-->
-
+
@@ -20,7 +20,7 @@
-
+
@@ -29,7 +29,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
@@ -47,7 +47,7 @@
-
+
@@ -56,7 +56,7 @@
-
+
@@ -65,7 +65,7 @@
-
+
@@ -74,7 +74,7 @@
-
+
@@ -83,7 +83,7 @@
-
+
@@ -92,7 +92,7 @@
-
+
@@ -101,7 +101,7 @@
-
+
@@ -110,7 +110,7 @@
-
+
@@ -119,7 +119,7 @@
-
+
@@ -129,6 +129,6 @@
-
+
diff --git a/addons/account/edi/__init__.py b/addons/account/edi/__init__.py
new file mode 100644
index 00000000000..a5bf0bbfa2d
--- /dev/null
+++ b/addons/account/edi/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import invoice
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/edi/invoice.py b/addons/account/edi/invoice.py
new file mode 100644
index 00000000000..d36e9163ba9
--- /dev/null
+++ b/addons/account/edi/invoice.py
@@ -0,0 +1,275 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import fields, osv, orm
+from edi import EDIMixin
+
+INVOICE_LINE_EDI_STRUCT = {
+ 'name': True,
+ 'origin': True,
+ 'uos_id': True,
+ 'product_id': True,
+ 'price_unit': True,
+ 'quantity': True,
+ 'discount': True,
+ 'note': True,
+
+ # fields used for web preview only - discarded on import
+ 'price_subtotal': True,
+}
+
+INVOICE_TAX_LINE_EDI_STRUCT = {
+ 'name': True,
+ 'base': True,
+ 'amount': True,
+ 'manual': True,
+ 'sequence': True,
+ 'base_amount': True,
+ 'tax_amount': True,
+}
+
+INVOICE_EDI_STRUCT = {
+ 'name': True,
+ 'origin': True,
+ 'company_id': True, # -> to be changed into partner
+ 'type': True, # -> reversed at import
+ 'internal_number': True, # -> reference at import
+ 'comment': True,
+ 'date_invoice': True,
+ 'date_due': True,
+ 'partner_id': True,
+ 'payment_term': True,
+ #custom: currency_id
+ 'invoice_line': INVOICE_LINE_EDI_STRUCT,
+ 'tax_line': INVOICE_TAX_LINE_EDI_STRUCT,
+
+ # fields used for web preview only - discarded on import
+ #custom: 'partner_ref'
+ 'amount_total': True,
+ 'amount_untaxed': True,
+ 'amount_tax': True,
+}
+
+class account_invoice(osv.osv, EDIMixin):
+ _inherit = 'account.invoice'
+
+ def edi_export(self, cr, uid, records, edi_struct=None, context=None):
+ """Exports a supplier or customer invoice"""
+ edi_struct = dict(edi_struct or INVOICE_EDI_STRUCT)
+ res_company = self.pool.get('res.company')
+ res_partner_address = self.pool.get('res.partner.address')
+ edi_doc_list = []
+ for invoice in records:
+ # generate the main report
+ self._edi_generate_report_attachment(cr, uid, invoice, context=context)
+ edi_doc = super(account_invoice,self).edi_export(cr, uid, [invoice], edi_struct, context)[0]
+ edi_doc.update({
+ 'company_address': res_company.edi_export_address(cr, uid, invoice.company_id, context=context),
+ 'company_paypal_account': invoice.company_id.paypal_account,
+ 'partner_address': res_partner_address.edi_export(cr, uid, [invoice.address_invoice_id], context=context)[0],
+
+ 'currency': self.pool.get('res.currency').edi_export(cr, uid, [invoice.currency_id], context=context)[0],
+ 'partner_ref': invoice.reference or False,
+ })
+ edi_doc_list.append(edi_doc)
+ return edi_doc_list
+
+ def _edi_tax_account(self, cr, uid, invoice_type='out_invoice', context=None):
+ #TODO/FIXME: should select proper Tax Account
+ account_pool = self.pool.get('account.account')
+ account_ids = account_pool.search(cr, uid, [('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')])
+ tax_account = False
+ if account_ids:
+ tax_account = account_pool.browse(cr, uid, account_ids[0])
+ return tax_account
+
+ def _edi_invoice_account(self, cr, uid, partner_id, invoice_type, context=None):
+ partner_pool = self.pool.get('res.partner')
+ partner = partner_pool.browse(cr, uid, partner_id, context=context)
+ if invoice_type in ('out_invoice', 'out_refund'):
+ invoice_account = partner.property_account_receivable
+ else:
+ invoice_account = partner.property_account_payable
+ return invoice_account
+
+ def _edi_product_account(self, cr, uid, product_id, invoice_type, context=None):
+ product_pool = self.pool.get('product.product')
+ product = product_pool.browse(cr, uid, product_id, context=context)
+ if invoice_type in ('out_invoice','out_refund'):
+ account = product.property_account_income or product.categ_id.property_account_income_categ
+ else:
+ account = product.property_account_expense or product.categ_id.property_account_expense_categ
+ return account
+
+ def _edi_import_company(self, cr, uid, edi_document, context=None):
+ # TODO: for multi-company setups, we currently import the document in the
+ # user's current company, but we should perhaps foresee a way to select
+ # the desired company among the user's allowed companies
+
+ self._edi_requires_attributes(('company_id','company_address','type'), edi_document)
+ res_partner_address = self.pool.get('res.partner.address')
+ res_partner = self.pool.get('res.partner')
+
+ # imported company = new partner
+ src_company_id, src_company_name = edi_document.pop('company_id')
+ partner_id = self.edi_import_relation(cr, uid, 'res.partner', src_company_name,
+ src_company_id, context=context)
+ invoice_type = edi_document['type']
+ partner_value = {}
+ if invoice_type in ('out_invoice', 'out_refund'):
+ partner_value.update({'customer': True})
+ if invoice_type in ('in_invoice', 'in_refund'):
+ partner_value.update({'supplier': True})
+ res_partner.write(cr, uid, [partner_id], partner_value, context=context)
+
+ # imported company_address = new partner address
+ address_info = edi_document.pop('company_address')
+ address_info['partner_id'] = (src_company_id, src_company_name)
+ address_info['type'] = 'invoice'
+ address_id = res_partner_address.edi_import(cr, uid, address_info, context=context)
+
+ # modify edi_document to refer to new partner
+ partner_address = res_partner_address.browse(cr, uid, address_id, context=context)
+ edi_document['partner_id'] = (src_company_id, src_company_name)
+ edi_document.pop('partner_address', False) # ignored
+ edi_document['address_invoice_id'] = self.edi_m2o(cr, uid, partner_address, context=context)
+
+ return partner_id
+
+
+ def edi_import(self, cr, uid, edi_document, context=None):
+ """ During import, invoices will import the company that is provided in the invoice as
+ a new partner (e.g. supplier company for a customer invoice will be come a supplier
+ record for the new invoice.
+ Summary of tasks that need to be done:
+ - import company as a new partner, if type==in then supplier=1, else customer=1
+ - partner_id field is modified to point to the new partner
+ - company_address data used to add address to new partner
+ - change type: out_invoice'<->'in_invoice','out_refund'<->'in_refund'
+ - reference: should contain the value of the 'internal_number'
+ - reference_type: 'none'
+ - internal number: reset to False, auto-generated
+ - journal_id: should be selected based on type: simply put the 'type'
+ in the context when calling create(), will be selected correctly
+ - payment_term: if set, create a default one based on name...
+ - for invoice lines, the account_id value should be taken from the
+ product's default, i.e. from the default category, as it will not
+ be provided.
+ - for tax lines, we disconnect from the invoice.line, so all tax lines
+ will be of type 'manual', and default accounts should be picked based
+ on the tax config of the DB where it is imported.
+ """
+ if context is None:
+ context = {}
+ self._edi_requires_attributes(('company_id','company_address','type','invoice_line','currency'), edi_document)
+
+ # extract currency info
+ res_currency = self.pool.get('res.currency')
+ currency_info = edi_document.pop('currency')
+ currency_id = res_currency.edi_import(cr, uid, currency_info, context=context)
+ currency = res_currency.browse(cr, uid, currency_id)
+ edi_document['currency_id'] = self.edi_m2o(cr, uid, currency, context=context)
+
+ # change type: out_invoice'<->'in_invoice','out_refund'<->'in_refund'
+ invoice_type = edi_document['type']
+ invoice_type = invoice_type.startswith('in_') and invoice_type.replace('in_','out_') or invoice_type.replace('out_','in_')
+ edi_document['type'] = invoice_type
+
+ #import company as a new partner
+ partner_id = self._edi_import_company(cr, uid, edi_document, context=context)
+
+ # Set Account
+ invoice_account = self._edi_invoice_account(cr, uid, partner_id, invoice_type, context=context)
+ edi_document['account_id'] = invoice_account and self.edi_m2o(cr, uid, invoice_account, context=context) or False
+
+ # reference: should contain the value of the 'internal_number'
+ edi_document['reference'] = edi_document.get('internal_number', False)
+ # reference_type: 'none'
+ edi_document['reference_type'] = 'none'
+
+ # internal number: reset to False, auto-generated
+ edi_document['internal_number'] = False
+
+ # discard web preview fields, if present
+ edi_document.pop('partner_ref', None)
+
+ # journal_id: should be selected based on type: simply put the 'type' in the context when calling create(), will be selected correctly
+ context.update(type=invoice_type)
+
+ # for invoice lines, the account_id value should be taken from the product's default, i.e. from the default category, as it will not be provided.
+ for edi_invoice_line in edi_document['invoice_line']:
+ product_info = edi_invoice_line['product_id']
+ product_id = self.edi_import_relation(cr, uid, 'product.product', product_info[1],
+ product_info[0], context=context)
+ account = self._edi_product_account(cr, uid, product_id, invoice_type, context=context)
+ # TODO: could be improved with fiscal positions perhaps
+ # account = fpos_obj.map_account(cr, uid, fiscal_position_id, account.id)
+ edi_invoice_line['account_id'] = self.edi_m2o(cr, uid, account, context=context) if account else False
+
+ # discard web preview fields, if present
+ edi_invoice_line.pop('price_subtotal', None)
+
+ # for tax lines, we disconnect from the invoice.line, so all tax lines will be of type 'manual', and default accounts should be picked based
+ # on the tax config of the DB where it is imported.
+ tax_account = self._edi_tax_account(cr, uid, context=context)
+ tax_account_info = self.edi_m2o(cr, uid, tax_account, context=context)
+ for edi_tax_line in edi_document.get('tax_line', []):
+ edi_tax_line['account_id'] = tax_account_info
+ edi_tax_line['manual'] = True
+
+ return super(account_invoice,self).edi_import(cr, uid, edi_document, context=context)
+
+
+ def _edi_record_display_action(self, cr, uid, id, context=None):
+ """Returns an appropriate action definition dict for displaying
+ the record with ID ``rec_id``.
+
+ :param int id: database ID of record to display
+ :return: action definition dict
+ """
+ action = super(account_invoice,self)._edi_record_display_action(cr, uid, id, context=context)
+ try:
+ invoice = self.browse(cr, uid, id, context=context)
+ if 'out_' in invoice.type:
+ view_ext_id = 'invoice_form'
+ journal_type = 'sale'
+ else:
+ view_ext_id = 'invoice_supplier_form'
+ journal_type = 'purchase'
+ ctx = "{'type': '%s', 'journal_type': '%s'}" % (invoice.type, journal_type)
+ action.update(context=ctx)
+ view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', view_ext_id)[1]
+ action.update(views=[(view_id,'form'), (False, 'tree')])
+ except ValueError:
+ # ignore if views are missing
+ pass
+ return action
+
+
+class account_invoice_line(osv.osv, EDIMixin):
+ _inherit='account.invoice.line'
+
+class account_invoice_tax(osv.osv, EDIMixin):
+ _inherit = "account.invoice.tax"
+
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml
new file mode 100644
index 00000000000..0904ec6fd54
--- /dev/null
+++ b/addons/account/edi/invoice_action_data.xml
@@ -0,0 +1,186 @@
+
+
+
+
+
+ if (object.type in ('out_invoice', 'out_refund')) and not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='account.email_template_edi_invoice', context=context)
+
+ code
+ ir.actions.server
+
+ True
+ Auto-email confirmed invoices
+
+
+
+
+ Email Templates
+ email.template
+ form
+ form,tree
+
+
+ {'search_default_model_id':'account.invoice'}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Automated Invoice Notification Mail
+ ${object.user_id.user_email or object.company_id.email or 'noreply@localhost'}
+ ${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })
+ ${object.address_invoice_id.email or ''}
+
+
+
+
+
Hello${object.address_invoice_id.name and ' ' or ''}${object.address_invoice_id.name or ''},
+
+
A new invoice is available for ${object.partner_id.name}:
- [[ o.name or '' ]]
+ [[ o.partner_id.name or '' ]][[ a['street'] or '']][[ a['street2'] or removeParentNode('para') ]][[ a['zip'] or '' ]] [[ a['city'] or '' ]]
@@ -141,7 +141,7 @@
- VAT: [[ o.vat or removeParentNode('para') ]]
+ VAT: [[ o.partner_id.vat or removeParentNode('para') ]]
@@ -150,7 +150,7 @@
Document : Customer account statementDate : [[ formatLang(data['form']['date'],date=True) ]]
- Customer Ref : [[ o.ref or '' ]]
+ Customer Ref : [[ o.partner_id.ref or '' ]]
diff --git a/addons/account_followup/report/account_followup_report.py b/addons/account_followup/report/account_followup_report.py
index 25fc37691f4..c2a842cfd4c 100644
--- a/addons/account_followup/report/account_followup_report.py
+++ b/addons/account_followup/report/account_followup_report.py
@@ -68,7 +68,7 @@ class account_followup_stat(osv.osv):
cr.execute("""
create or replace view account_followup_stat as (
SELECT
- l.partner_id as id,
+ l.id as id,
l.partner_id AS partner_id,
min(l.date) AS date_move,
max(l.date) AS date_move_last,
diff --git a/addons/account_followup/test/account_followup.yml b/addons/account_followup/test/account_followup.yml
index b43ca32d200..2650a40a7ad 100644
--- a/addons/account_followup/test/account_followup.yml
+++ b/addons/account_followup/test/account_followup.yml
@@ -105,4 +105,5 @@
self.do_print(cr, uid, [ref("account_followup_print_all_0")], {"lang": 'en_US',
"active_model": "ir.ui.menu", "active_ids": [ref("account_followup.account_followup_print_menu")],
"tz": False, "date": time.strftime('%Y-%m-%d'), "followup_id": ref("account_followup_followup_testfollowups0"), "active_id": ref("account_followup.account_followup_print_menu"),
+ "company_id": ref('base.main_company'),
})
diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py
index 3fe404134ae..ea1083f26ff 100644
--- a/addons/account_followup/wizard/account_followup_print.py
+++ b/addons/account_followup/wizard/account_followup_print.py
@@ -31,7 +31,7 @@ class account_followup_print(osv.osv_memory):
_description = 'Print Followup & Send Mail to Customers'
_columns = {
'date': fields.date('Follow-up Sending Date', required=True, help="This field allow you to select a forecast date to plan your follow-ups"),
- 'followup_id': fields.many2one('account_followup.followup', 'Follow-up', required=True)
+ 'followup_id': fields.many2one('account_followup.followup', 'Follow-up', required=True),
}
def _get_followup(self, cr, uid, context=None):
@@ -51,7 +51,7 @@ class account_followup_print(osv.osv_memory):
data = self.browse(cr, uid, ids, context=context)[0]
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
- context.update({'followup_id': data.followup_id.id, 'date':data.date})
+ context.update({'followup_id': data.followup_id.id, 'date': data.date, 'company_id': data.followup_id.company_id.id})
return {
'name': _('Select Partners'),
'view_type': 'form',
@@ -87,10 +87,13 @@ class account_followup_stat_by_partner(osv.osv):
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_followup_stat_by_partner')
+ # Here we don't have other choice but to create a virtual ID based on the concatenation
+ # of the partner_id and the company_id. An assumption that the number of companies will
+ # not reach 10 000 records is made, what should be enough for a time.
cr.execute("""
create or replace view account_followup_stat_by_partner as (
SELECT
- l.partner_id AS id,
+ l.partner_id * 10000 + l.company_id as id,
l.partner_id AS partner_id,
min(l.date) AS date_move,
max(l.date) AS date_move_last,
@@ -148,6 +151,8 @@ class account_followup_print_all(osv.osv_memory):
context = {}
if ids:
data = self.browse(cr, uid, ids, context=context)[0]
+ company_id = 'company_id' in context and context['company_id'] or data.company_id.id
+
cr.execute(
"SELECT l.partner_id, l.followup_line_id,l.date_maturity, l.date, l.id "\
"FROM account_move_line AS l "\
@@ -159,7 +164,8 @@ class account_followup_print_all(osv.osv_memory):
"AND (l.partner_id is NOT NULL) "\
"AND (a.active) "\
"AND (l.debit > 0) "\
- "ORDER BY l.date")
+ "AND (l.company_id = %s) "\
+ "ORDER BY l.date", (company_id,))
move_lines = cr.fetchall()
old = None
fups = {}
@@ -189,16 +195,16 @@ class account_followup_print_all(osv.osv_memory):
continue
if followup_line_id not in fups:
continue
+ stat_line_id = partner_id * 10000 + company_id
if date_maturity:
if date_maturity <= fups[followup_line_id][0].strftime('%Y-%m-%d'):
if partner_id not in partner_list:
- partner_list.append(partner_id)
+ partner_list.append(stat_line_id)
to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': partner_id}
elif date and date <= fups[followup_line_id][0].strftime('%Y-%m-%d'):
if partner_id not in partner_list:
- partner_list.append(partner_id)
- to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': partner_id}
-
+ partner_list.append(stat_line_id)
+ to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id}
return {'partner_ids': partner_list, 'to_update': to_update}
def do_mail(self ,cr, uid, ids, context=None):
@@ -225,7 +231,7 @@ class account_followup_print_all(osv.osv_memory):
partners.append(line.partner_id)
dict_lines[line.partner_id.id] =line
for partner in partners:
- ids_lines = move_obj.search(cr,uid,[('partner_id','=',partner.id),('reconcile_id','=',False),('account_id.type','in',['receivable'])])
+ ids_lines = move_obj.search(cr,uid,[('partner_id','=',partner.id),('reconcile_id','=',False),('account_id.type','in',['receivable']),('company_id','=',context.get('company_id', False))])
data_lines = move_obj.browse(cr, uid, ids_lines, context=context)
followup_data = dict_lines[partner.id]
dest = False
diff --git a/addons/account_followup/wizard/account_followup_print_view.xml b/addons/account_followup/wizard/account_followup_print_view.xml
index 9d74060b19a..ce178d9fa24 100644
--- a/addons/account_followup/wizard/account_followup_print_view.xml
+++ b/addons/account_followup/wizard/account_followup_print_view.xml
@@ -13,7 +13,6 @@
-
@@ -81,7 +80,7 @@
-
+
@@ -137,7 +136,5 @@
formnew
-
-
diff --git a/addons/account_invoice_layout/i18n/pt.po b/addons/account_invoice_layout/i18n/pt.po
index c458afe704a..480140f8fef 100644
--- a/addons/account_invoice_layout/i18n/pt.po
+++ b/addons/account_invoice_layout/i18n/pt.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
-"PO-Revision-Date: 2010-12-09 11:41+0000\n"
-"Last-Translator: OpenERP Administrators \n"
+"PO-Revision-Date: 2011-11-23 12:19+0000\n"
+"Last-Translator: Paulino Ascenção \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:22+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-24 05:00+0000\n"
+"X-Generator: Launchpad (build 14336)\n"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
@@ -92,6 +92,20 @@ msgid ""
"\n"
" "
msgstr ""
+"\n"
+" Este módulo disponibiliza algumas melhorias na apresentação das faturas\n"
+"\n"
+" Dá a possibilidade de\n"
+" * pedir todas as linhas de uma fatura\n"
+" * adicionar títulos, linhas de comentário, linhas de sub-total\n"
+" * desenhar linhas horizontais e colocar quebras de página\n"
+"\n"
+" Além do mais, existe uma opção que permite imprimir todas as facturas "
+"seleccionadas com uma mensagem especial em baixo. Esta capacidade pode ser "
+"muito útil para imprimir facturas com desejos feliz ano novo, condições "
+"pontuais especiais, etc...\n"
+"\n"
+" "
#. module: account_invoice_layout
#: report:account.invoice.layout:0
diff --git a/addons/account_invoice_layout/i18n/sr@latin.po b/addons/account_invoice_layout/i18n/sr@latin.po
index 014ebe5fc60..bc921ebf179 100644
--- a/addons/account_invoice_layout/i18n/sr@latin.po
+++ b/addons/account_invoice_layout/i18n/sr@latin.po
@@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
-"PO-Revision-Date: 2010-12-23 15:39+0000\n"
-"Last-Translator: Olivier Dony (OpenERP) \n"
+"PO-Revision-Date: 2011-11-24 20:33+0000\n"
+"Last-Translator: Milan Milosevic \n"
"Language-Team: Serbian latin \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:22+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Sub Total"
-msgstr "Subtotal"
+msgstr "Podtotal"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -32,7 +32,7 @@ msgstr "Napomena:"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Cancelled Invoice"
-msgstr "Otkazane Fakture"
+msgstr "Otkazana faktura"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
@@ -44,7 +44,7 @@ msgstr "Naslov"
#: model:ir.actions.act_window,name:account_invoice_layout.action_account_invoice_special_msg
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_layout_message
msgid "Invoices with Layout and Message"
-msgstr "Formatirana Faktura sa Porukom"
+msgstr "Formatirana faktura sa porukom"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -60,19 +60,19 @@ msgstr "Napomena"
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_notify_message
msgid "Notify By Messages"
-msgstr "Napomena po porukama"
+msgstr "Obaveštenje putem poruke"
#. module: account_invoice_layout
#: help:notify.message,msg:0
msgid ""
"This notification will appear at the bottom of the Invoices when printed."
-msgstr "Ova napomena ce se pojaviti na dnu fakture pri stampi"
+msgstr "Ova napomena će se pojaviti na dnu faktura kad se odštampa"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Unit Price"
-msgstr "Jedinična cijena"
+msgstr "Pojedinačna cena"
#. module: account_invoice_layout
#: model:ir.module.module,description:account_invoice_layout.module_meta_information
@@ -93,6 +93,20 @@ msgid ""
"\n"
" "
msgstr ""
+"\n"
+" Ovaj modul dodaje funkcije za poboljšanje prikaza faktura.\n"
+"\n"
+" Daje Vam mogućnost da\n"
+" *poređate sve linije jedne fakture\n"
+" *dodajete naslove, linije komentara, linije podtotala\n"
+" *dodajete vodoravne linije i odvajate stranice\n"
+"\n"
+" Povrh toga, postoji opcija koja Vam omogućava štampu svih faktura sa "
+"datom specijalnom porukom\n"
+"na dnu. Ova funkcija je veoma korisna za štampu faktura sa čestitkama za "
+"Novu godinu, specijalnim uslovima...\n"
+"\n"
+" "
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -115,7 +129,7 @@ msgstr "Predračun"
#. module: account_invoice_layout
#: field:account.invoice,abstract_line_ids:0
msgid "Invoice Lines"
-msgstr "Stavke računa"
+msgstr "Linije računa"
#. module: account_invoice_layout
#: view:account.invoice.line:0
@@ -125,7 +139,7 @@ msgstr "Sekv."
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_finan_config_notify_message
msgid "Notification Message"
-msgstr "Poruka Napomene"
+msgstr "Poruka obaveštenja"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
@@ -136,12 +150,12 @@ msgstr "Proizvod"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Description"
-msgstr ""
+msgstr "Opis"
#. module: account_invoice_layout
#: help:account.invoice.line,sequence:0
msgid "Gives the sequence order when displaying a list of invoice lines."
-msgstr "poredja sekvence pri prikazu liste faktura."
+msgstr "Daje redosled sekvenci pri prikazu spiska linija fakture"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -153,7 +167,7 @@ msgstr "Cena"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Invoice Date"
-msgstr "Datum Fakture"
+msgstr "Datum fakture"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -163,12 +177,12 @@ msgstr "Porezi:"
#. module: account_invoice_layout
#: field:account.invoice.line,functional_field:0
msgid "Source Account"
-msgstr "Изворни налог"
+msgstr "Izvorni nalog"
#. module: account_invoice_layout
#: model:ir.actions.act_window,name:account_invoice_layout.notify_mesage_tree_form
msgid "Write Messages"
-msgstr "Napisi Poruke"
+msgstr "Napiši poruke"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -179,18 +193,18 @@ msgstr "Osnova"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Page Break"
-msgstr "Прелом стране"
+msgstr "Kraj stranice"
#. module: account_invoice_layout
#: view:notify.message:0
#: field:notify.message,msg:0
msgid "Special Message"
-msgstr "Specijalna Poruka"
+msgstr "Specijalna poruka"
#. module: account_invoice_layout
#: help:account.invoice.special.msg,message:0
msgid "Message to Print at the bottom of report"
-msgstr "Poruka koja se stampa pri dnu izvestaja"
+msgstr "Poruka za štampu pri dnu izveštaja"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -202,7 +216,7 @@ msgstr "Količina"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Refund"
-msgstr "Refundiraj"
+msgstr "Refundiranje"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -228,7 +242,7 @@ msgstr "Poruke"
#. module: account_invoice_layout
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_1
msgid "Invoices with Layout"
-msgstr "Formatirana Faktura"
+msgstr "Formatirane Fakture"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -240,33 +254,33 @@ msgstr "Opis / Porezi"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Amount"
-msgstr "Iznos"
+msgstr "Količina"
#. module: account_invoice_layout
#: model:notify.message,msg:account_invoice_layout.demo_message1
msgid "ERP & CRM Solutions..."
-msgstr ""
+msgstr "ERP & CRM Rešenja..."
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Net Total :"
-msgstr ""
+msgstr "Ukupno neto :"
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Total :"
-msgstr ""
+msgstr "Ukupno :"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Draft Invoice"
-msgstr "Neodobreni računi"
+msgstr "Fakture u pripremi"
#. module: account_invoice_layout
#: field:account.invoice.line,sequence:0
msgid "Sequence Number"
-msgstr "Broj Sekvence"
+msgstr "Broj sekvence"
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_account_invoice_special_msg
@@ -277,7 +291,7 @@ msgstr "Specijalna poruka naloga fakture"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Origin"
-msgstr ""
+msgstr "Poreklo"
#. module: account_invoice_layout
#: field:account.invoice.line,state:0
@@ -293,18 +307,18 @@ msgstr "Linija za odvajanje"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Your Reference"
-msgstr ""
+msgstr "Vaš poziv na broj"
#. module: account_invoice_layout
#: model:ir.module.module,shortdesc:account_invoice_layout.module_meta_information
msgid "Invoices Layout Improvement"
-msgstr "Unapredjenje izgleda fakture"
+msgstr "Unapređenje izgleda fakture"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Supplier Invoice"
-msgstr "Račun dobavljača"
+msgstr "Faktura dobavljača"
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
@@ -320,7 +334,7 @@ msgstr "Porez"
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_account_invoice_line
msgid "Invoice Line"
-msgstr "Redak računa"
+msgstr "Red fakture"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
@@ -330,14 +344,14 @@ msgstr "Neto Ukupno"
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Write a notification or a wishful message."
-msgstr "Napisi napomenu ili celu poruku"
+msgstr "Napiši obaveštenje ili neku lepu želju"
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: model:ir.model,name:account_invoice_layout.model_account_invoice
#: report:notify_account.invoice:0
msgid "Invoice"
-msgstr "Račun"
+msgstr "Faktura"
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
@@ -348,7 +362,7 @@ msgstr "Otkaži"
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Supplier Refund"
-msgstr "Povrat Dobavljaču"
+msgstr "Povraćaj dobavljača"
#. module: account_invoice_layout
#: field:account.invoice.special.msg,message:0
@@ -358,12 +372,12 @@ msgstr "Poruka"
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Taxes :"
-msgstr ""
+msgstr "Porezi :"
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_notify_mesage_tree_form
msgid "All Notification Messages"
-msgstr "Sve Napomene"
+msgstr "Sve poruke obaveštenja"
#~ msgid ""
#~ "The Object name must start with x_ and not contain any special character !"
diff --git a/addons/account_invoice_layout/wizard/account_invoice_special_message.xml b/addons/account_invoice_layout/wizard/account_invoice_special_message.xml
index d849595bfca..5bf1e480d1e 100644
--- a/addons/account_invoice_layout/wizard/account_invoice_special_message.xml
+++ b/addons/account_invoice_layout/wizard/account_invoice_special_message.xml
@@ -32,7 +32,6 @@
- Account Invioce Special Messageclient_print_multi
diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py
index 9858d536d17..ba98c71fc3e 100644
--- a/addons/account_payment/account_payment.py
+++ b/addons/account_payment/account_payment.py
@@ -374,7 +374,7 @@ class payment_line(osv.osv):
data = {}
move_line_obj = self.pool.get('account.move.line')
- data['amount_currency'] = data['communication'] = data['partner_id'] = data['reference'] = data['date_created'] = data['bank_id'] = data['amount'] = False
+ data['amount_currency'] = data['communication'] = data['partner_id'] = data['bank_id'] = data['amount'] = False
if move_line_id:
line = move_line_obj.browse(cr, uid, move_line_id, context=context)
@@ -396,8 +396,6 @@ class payment_line(osv.osv):
temp_dict = self.onchange_partner(cr, uid, ids, line.partner_id.id, payment_type)
data.update(temp_dict['value'])
- data['reference'] = line.ref
- data['date_created'] = line.date_created
data['communication'] = line.ref
if date_prefered == 'now':
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index d0a543bf749..4881adc4ad1 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -251,7 +251,7 @@
-
+
diff --git a/addons/account_sequence/i18n/sr@latin.po b/addons/account_sequence/i18n/sr@latin.po
new file mode 100644
index 00000000000..5bd9511ee9f
--- /dev/null
+++ b/addons/account_sequence/i18n/sr@latin.po
@@ -0,0 +1,233 @@
+# Serbian Latin translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:14+0000\n"
+"PO-Revision-Date: 2011-11-24 21:01+0000\n"
+"Last-Translator: Milan Milosevic \n"
+"Language-Team: Serbian Latin \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
+
+#. module: account_sequence
+#: view:account.sequence.installer:0
+#: model:ir.actions.act_window,name:account_sequence.action_account_seq_installer
+msgid "Account Sequence Application Configuration"
+msgstr "Podešavanje aplikacije nizova naloga"
+
+#. module: account_sequence
+#: constraint:account.move:0
+msgid ""
+"You cannot create entries on different periods/journals in the same move"
+msgstr ""
+"Ne možete napraviti ulaze za različite periode/dnevnike u jednom potezu"
+
+#. module: account_sequence
+#: help:account.move,internal_sequence_number:0
+#: help:account.move.line,internal_sequence_number:0
+msgid "Internal Sequence Number"
+msgstr "Broj unutrašnjeg niza"
+
+#. module: account_sequence
+#: help:account.sequence.installer,number_next:0
+msgid "Next number of this sequence"
+msgstr "Sledeći broj ovog niza"
+
+#. module: account_sequence
+#: field:account.sequence.installer,number_next:0
+msgid "Next Number"
+msgstr "Sledeći broj"
+
+#. module: account_sequence
+#: field:account.sequence.installer,number_increment:0
+msgid "Increment Number"
+msgstr "Inkrementalni broj"
+
+#. module: account_sequence
+#: model:ir.module.module,description:account_sequence.module_meta_information
+msgid ""
+"\n"
+" This module maintains internal sequence number for accounting entries.\n"
+" "
+msgstr ""
+"\n"
+" Ovaj modul održava unutrašnji niz brojeva za odgovarajuće naloge.\n"
+" "
+
+#. module: account_sequence
+#: model:ir.module.module,shortdesc:account_sequence.module_meta_information
+msgid "Entries Sequence Numbering"
+msgstr "Dodeljivanje brojeva nizovima ulaza"
+
+#. module: account_sequence
+#: help:account.sequence.installer,number_increment:0
+msgid "The next number of the sequence will be incremented by this number"
+msgstr "Sledeći broj ovog niza biće povećan ovim brojem"
+
+#. module: account_sequence
+#: view:account.sequence.installer:0
+msgid "Configure Your Account Sequence Application"
+msgstr "Podesi svoju aplikaciju za niz brojeva"
+
+#. module: account_sequence
+#: field:account.sequence.installer,progress:0
+msgid "Configuration Progress"
+msgstr "Napredak podešavanja"
+
+#. module: account_sequence
+#: help:account.sequence.installer,suffix:0
+msgid "Suffix value of the record for the sequence"
+msgstr "Sufiksalna vrednost zapisa za niz"
+
+#. module: account_sequence
+#: field:account.sequence.installer,company_id:0
+msgid "Company"
+msgstr "Preduzeće"
+
+#. module: account_sequence
+#: help:account.journal,internal_sequence_id:0
+msgid ""
+"This sequence will be used to maintain the internal number for the journal "
+"entries related to this journal."
+msgstr ""
+"Ovaj niz će biti iskorišćen za održavanje unutrašnjeg broja za ulaze "
+"dnevnika vezane za dnevnik."
+
+#. module: account_sequence
+#: field:account.sequence.installer,padding:0
+msgid "Number padding"
+msgstr "Ispunjavanje brojeva"
+
+#. module: account_sequence
+#: model:ir.model,name:account_sequence.model_account_move_line
+msgid "Journal Items"
+msgstr "Stavke dnevnika"
+
+#. module: account_sequence
+#: field:account.move,internal_sequence_number:0
+#: field:account.move.line,internal_sequence_number:0
+msgid "Internal Number"
+msgstr "Unutrašnji broj"
+
+#. module: account_sequence
+#: constraint:account.move.line:0
+msgid "Company must be same for its related account and period."
+msgstr "Preduzeće mora biti isto za sve vezane račune i periode."
+
+#. module: account_sequence
+#: help:account.sequence.installer,padding:0
+msgid ""
+"OpenERP will automatically adds some '0' on the left of the 'Next Number' to "
+"get the required padding size."
+msgstr ""
+"OpenERP će automatski dodati nekoliko '0' levo od 'Sledećeg broja' za "
+"dobijanje tražene veličine ispunjavanja."
+
+#. module: account_sequence
+#: field:account.sequence.installer,name:0
+msgid "Name"
+msgstr "Naziv"
+
+#. module: account_sequence
+#: constraint:account.move.line:0
+msgid "You can not create move line on closed account."
+msgstr "Ne možete da napravite poteznu liniju na zatvorenim računima."
+
+#. module: account_sequence
+#: constraint:account.move:0
+msgid ""
+"You cannot create more than one move per period on centralized journal"
+msgstr ""
+"Ne možete napraviti više od jednog pomeranja po periodu u centralizovanom "
+"dnevniku"
+
+#. module: account_sequence
+#: sql_constraint:account.move.line:0
+msgid "Wrong credit or debit value in accounting entry !"
+msgstr "Pogrešna vrednost kredita ili debita u ulazu računa !"
+
+#. module: account_sequence
+#: field:account.journal,internal_sequence_id:0
+msgid "Internal Sequence"
+msgstr "Unutrašnji niz"
+
+#. module: account_sequence
+#: model:ir.model,name:account_sequence.model_account_sequence_installer
+msgid "account.sequence.installer"
+msgstr "account.sequence.installer"
+
+#. module: account_sequence
+#: view:account.sequence.installer:0
+msgid "Configure"
+msgstr "Podešavanje"
+
+#. module: account_sequence
+#: help:account.sequence.installer,prefix:0
+msgid "Prefix value of the record for the sequence"
+msgstr "Prefiksalna vrednost zapisa za niz"
+
+#. module: account_sequence
+#: model:ir.model,name:account_sequence.model_account_move
+msgid "Account Entry"
+msgstr "Ulaz naloga"
+
+#. module: account_sequence
+#: field:account.sequence.installer,suffix:0
+msgid "Suffix"
+msgstr "Sufiks"
+
+#. module: account_sequence
+#: field:account.sequence.installer,config_logo:0
+msgid "Image"
+msgstr "Slika"
+
+#. module: account_sequence
+#: view:account.sequence.installer:0
+msgid "title"
+msgstr "naslov"
+
+#. module: account_sequence
+#: sql_constraint:account.journal:0
+msgid "The name of the journal must be unique per company !"
+msgstr "Naziv dnevnika mora biti jedinstven po preduzeću"
+
+#. module: account_sequence
+#: field:account.sequence.installer,prefix:0
+msgid "Prefix"
+msgstr "Prefiks"
+
+#. module: account_sequence
+#: sql_constraint:account.journal:0
+msgid "The code of the journal must be unique per company !"
+msgstr "Kod dnevnika mora biti jedinstven po preduzeću !"
+
+#. module: account_sequence
+#: constraint:account.move.line:0
+msgid ""
+"You can not create move line on receivable/payable account without partner"
+msgstr ""
+"Ne možete napraviti poteznu liniju na primaćem/platežnom računu bez partnera"
+
+#. module: account_sequence
+#: model:ir.model,name:account_sequence.model_account_journal
+msgid "Journal"
+msgstr "Dnevnik"
+
+#. module: account_sequence
+#: view:account.sequence.installer:0
+msgid "You can enhance the Account Sequence Application by installing ."
+msgstr ""
+"Ne možete poboljšati Aplikaciju za nizanje naloga instaliranjem iste."
+
+#. module: account_sequence
+#: constraint:account.move.line:0
+msgid "You can not create move line on view account."
+msgstr "Ne možete napraviti poteznu liniju na računu po viđenju"
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 03b3a75144c..fd6dac9f90d 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -235,7 +235,7 @@ class account_voucher(osv.osv):
('pay_now','Pay Directly'),
('pay_later','Pay Later or Group Funds'),
],'Payment', select=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'tax_id':fields.many2one('account.tax', 'Tax', readonly=True, states={'draft':[('readonly',False)]}),
+ 'tax_id': fields.many2one('account.tax', 'Tax', readonly=True, states={'draft':[('readonly',False)]}, domain=[('price_include','=', False)], help="Only for tax excluded from price"),
'pre_line':fields.boolean('Previous Payments ?', required=False),
'date_due': fields.date('Due Date', readonly=True, select=True, states={'draft':[('readonly',False)]}),
'payment_option':fields.selection([
@@ -518,7 +518,7 @@ class account_voucher(osv.osv):
elif currency_id == company_currency:
#otherwise treatments is the same but with other field names
if line.amount_residual == price:
- #if the amount residual is equal the amount voucher, we assign it to that voucher
+ #if the amount residual is equal the amount voucher, we assign it to that voucher
#line, whatever the other voucher lines
move_line_found = line.id
break
@@ -696,8 +696,8 @@ class account_voucher(osv.osv):
Select the context to use accordingly if it needs to be multicurrency or not.
:param voucher_id: Id of the actual voucher
- :return: The returned context will be the same as given in parameter if the voucher currency is the same
- than the company currency, otherwise it's a copy of the parameter with an extra key 'date' containing
+ :return: The returned context will be the same as given in parameter if the voucher currency is the same
+ than the company currency, otherwise it's a copy of the parameter with an extra key 'date' containing
the date of the voucher.
:rtype: dict
"""
@@ -726,7 +726,7 @@ class account_voucher(osv.osv):
voucher_brw = 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".
+ # 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'):
@@ -769,7 +769,7 @@ class account_voucher(osv.osv):
elif voucher_brw.journal_id.sequence_id:
name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id)
else:
- raise osv.except_osv(_('Error !'),
+ raise osv.except_osv(_('Error !'),
_('Please define a sequence on the journal !'))
if not voucher_brw.reference:
ref = name.replace('/','')
@@ -834,7 +834,7 @@ class account_voucher(osv.osv):
def voucher_move_line_create(self, cr, uid, voucher_id, line_total, move_id, company_currency, current_currency, context=None):
'''
Create one account move line, on the given account move, per voucher line where amount is not 0.0.
- It returns Tuple with tot_line what is total of difference between debit and credit and
+ It returns Tuple with tot_line what is total of difference between debit and credit and
a list of lists with ids to be reconciled with this format (total_deb_cred,list_of_lists).
:param voucher_id: Voucher id what we are working with
@@ -905,7 +905,7 @@ class account_voucher(osv.osv):
voucher_line = move_line_obj.create(cr, uid, move_line)
rec_ids = [voucher_line, line.move_line_id.id]
- if amount_residual:
+ if amount_residual:
# Change difference entry
exch_lines = self._get_exchange_lines(cr, uid, line, move_id, amount_residual, company_currency, current_currency, context=context)
new_id = move_line_obj.create(cr, uid, exch_lines[0],context)
diff --git a/addons/account_voucher/test/account_voucher.yml b/addons/account_voucher/test/account_voucher.yml
index ce34733dda7..33ae609e3f3 100644
--- a/addons/account_voucher/test/account_voucher.yml
+++ b/addons/account_voucher/test/account_voucher.yml
@@ -48,7 +48,7 @@
-
Now I create a Vendor Voucher
-
- !record {model: account.voucher, id: account_voucher_voucheraxelor0}:
+ !record {model: account.voucher, id: account_voucher_voucheraxelor0, view: False}:
account_id: account.cash
amount: 1000.0
company_id: base.main_company
diff --git a/addons/account_voucher/test/account_voucher_report.yml b/addons/account_voucher/test/account_voucher_report.yml
index 39e9c2144a2..b41c33e4470 100644
--- a/addons/account_voucher/test/account_voucher_report.yml
+++ b/addons/account_voucher/test/account_voucher_report.yml
@@ -4,7 +4,6 @@
!record {model: account.voucher, id: account_voucher_voucheraxelor0}:
account_id: account.cash
company_id: base.main_company
- currency_id: base.EUR
journal_id: account.bank_journal
name: Voucher Axelor
narration: Basic PC
diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml
index 6685e64f298..e19e7e3ee46 100644
--- a/addons/account_voucher/test/case1_usd_usd.yml
+++ b/addons/account_voucher/test/case1_usd_usd.yml
@@ -34,6 +34,16 @@
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.account_type_cash_moves"
+
-
I create a bank journal with USD as currency
-
@@ -43,24 +53,12 @@
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
- default_debit_account_id: account.cash
- default_credit_account_id: account.cash
+ default_debit_account_id: account_cash_usd_id
+ default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
--
- I create new partner Mark Strauss.
--
- !record {model: res.partner, id: res_partner_strauss0}:
- address:
- - city: paris
- country_id: base.fr
- name: Mark Strauss
- street: 1 rue Rockfeller
- type: invoice
- zip: '75016'
- name: Mr. Mark Strauss
-
I create the first invoice on 1st January for 200 USD
-
@@ -80,7 +78,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_strauss0
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -115,7 +113,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_strauss0
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -139,21 +137,21 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 240.00, 2, ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_USD'), 240.00, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 240.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
- 'partner_id': ref('res_partner_strauss0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-%m-%d"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
- 'name': 'First payment',
+ 'name': 'First payment: Case 1 USD/USD',
}
vals.update(self.onchange_date(cr, uid, [], time.strftime('%Y-03-01'), ref('base.USD'), 240)['value'])
if not res['value']['line_cr_ids']:
@@ -171,7 +169,7 @@
I check that writeoff amount computed is 10.0
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 10.0), "Writeoff amount is not 10.0"
-
@@ -179,14 +177,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my first voucher is valid
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -200,7 +198,7 @@
I check that my write-off is correct. 9 debit and 10 amount_currency
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -237,7 +235,7 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 45.00, 2, ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_USD'), 45.00, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 45.00,
@@ -245,14 +243,14 @@
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
- 'partner_id': ref('res_partner_strauss0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-%m-%d"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
- 'name': 'Second payment',
+ 'name': 'Second payment: Case 1',
}
vals.update(self.onchange_date(cr, uid, [], time.strftime('%Y-04-01'), ref('base.USD'), 45.0)['value'])
if not res['value']['line_cr_ids']:
@@ -270,7 +268,7 @@
I check that writeoff amount computed is 5.0
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 5.0), "Writeoff amount is not 5.0"
-
@@ -278,14 +276,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my second voucher is valid
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -303,7 +301,7 @@
I check that my writeoff is correct. 4.75 debit and 5 amount_currency
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
diff --git a/addons/account_voucher/test/case2_suppl_usd_eur.yml b/addons/account_voucher/test/case2_suppl_usd_eur.yml
index 424783d8a7b..23f11d28803 100644
--- a/addons/account_voucher/test/case2_suppl_usd_eur.yml
+++ b/addons/account_voucher/test/case2_suppl_usd_eur.yml
@@ -29,18 +29,6 @@
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
--
- I create a new partner Robert Clements
--
- !record {model: res.partner, id: res_partner_clements0}:
- address:
- - city: marseille
- country_id: base.fr
- name: Robert
- street: 1 rue Rockfeller
- type: invoice
- zip: '13016'
- name: Mr.Robert Clements
-
I create the first invoice on 1st January for 200 USD
-
@@ -61,7 +49,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_clements0
+ partner_id: base.res_partner_seagate
reference_type: none
check_total : 200
-
@@ -98,7 +86,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_clements0
+ partner_id: base.res_partner_seagate
reference_type: none
check_total : 100.0
-
@@ -122,21 +110,21 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_clements0"), ref('bank_journal_EUR'), 240.0, 2, ttype='payment', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_EUR'), 240.0, 2, ttype='payment', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 240.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('bank_journal_EUR'),
- 'partner_id': ref('res_partner_clements0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'payment',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
- 'name': 'First payment',
+ 'name': 'First payment: Case 2 SUPPL USD/EUR',
}
if not res['value']['line_dr_ids']:
res['value']['line_dr_ids'] = [{'type': 'dr', 'account_id': ref('account.a_pay'),}]
@@ -153,14 +141,14 @@
I check that writeoff amount computed is -15.0
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == -15.0), "Writeoff amount is not -15.0"
-
I check that currency rate difference is 34.0
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == 34.0), "Currency rate difference is not 34.0"
-
@@ -168,14 +156,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my voucher is valid
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -191,7 +179,7 @@
I check that my writeoff is correct. -15 in credit with no amount_currency
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -229,21 +217,21 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_clements0"), ref('bank_journal_EUR'), 45.0, 2, ttype='payment', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_EUR'), 45.0, 2, ttype='payment', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 45.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
- 'partner_id': ref('res_partner_clements0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'payment',
'date': time.strftime("%Y-%m-%d"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
- 'name': 'Second payment',
+ 'name': 'Second payment: Case 2 SUPPL USD/EUR',
}
vals.update(self.onchange_date(cr, uid, [], time.strftime('%Y-04-01'), ref('base.USD'), 45.0)['value'])
if not res['value']['line_dr_ids']:
@@ -261,14 +249,14 @@
I check that writeoff amount computed is -5.0
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 5.0), "Writeoff amount is not 5.0"
-
I check that currency rate difference is 8.50
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == 8.50), "Currency rate difference is not 8.50"
-
@@ -276,14 +264,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that my voucher state is posted
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert voucher_id.state == 'posted', "Voucher state is not posted"
-
@@ -296,7 +284,7 @@
I check that my writeoff is correct. 4.75 in credit and 5 in amount_currency
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml
index e1cc87f427e..67287591778 100644
--- a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml
+++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml
@@ -49,7 +49,6 @@
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
- currency: base.EUR
company_id: base.main_company
view_id: account.account_journal_bank_view
-
@@ -61,23 +60,11 @@
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
- default_debit_account_id: account.cash
- default_credit_account_id: account.cash
+ default_debit_account_id: account_cash_usd_id
+ default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
--
- I create a new partner Michael Geller
--
- !record {model: res.partner, id: res_partner_michael0}:
- address:
- - city: paris
- country_id: base.fr
- name: Michael
- street: 1 rue Rockfeller
- type: invoice
- zip: '75016'
- name: Mr.Michael Geller
-
I create the first invoice on 1st January for 200 USD
-
@@ -97,7 +84,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_michael0
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -132,7 +119,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_michael0
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -150,26 +137,26 @@
assert (move_line.debit - move_line.credit == 80), "Invoice move is incorrect for debtors account"
-
I create the first voucher of payment
-
+
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_michael0"), ref('bank_journal_EUR'), 240.0, False, ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_EUR'), 240.0, False, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 200.0,
'company_id': ref('base.main_company'),
'currency_id': False,
'journal_id': ref('bank_journal_EUR'),
- 'partner_id': ref('res_partner_michael0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
- 'name': 'First payment',
+ 'name': 'First payment: Case 2 USD/EUR DR EUR',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
@@ -187,14 +174,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my voucher is valid
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -206,7 +193,7 @@
I check that the debtor account has 2 new lines with 0 in amount_currency columns and their credit columns are 130 and 70
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -220,7 +207,6 @@
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])
- print move_line.amount_residual, move_line.amount_residual_currency
assert (move_line.amount_residual_currency == 55.56 and move_line.amount_residual == 20) , "Residual amount is not correct for first Invoice"
-
I check the residual amuont of Invoice2, should be 22.22 in residual currency and 10 in amount_residual
@@ -238,14 +224,14 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_michael0"), ref('bank_journal_USD'), 80.0, 2, ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_USD'), 80.0, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 80.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
- 'partner_id': ref('res_partner_michael0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-%m-%d"),
@@ -253,7 +239,7 @@
'writeoff_acc_id': ref('account.a_expense'),
'exchange_acc_id': ref('account.o_expense'),
'comment': 'Write Off',
- 'name': 'Second payment',
+ 'name': 'Second payment: Case 2 SUPPL USD/EUR DR EUR',
}
vals.update(self.onchange_date(cr, uid, [], time.strftime('%Y-04-01'), ref('base.USD'), 80.0)['value'])
if not res['value']['line_cr_ids']:
@@ -271,7 +257,7 @@
I check that writeoff amount computed is 2.22
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (round(voucher_id.writeoff_amount, 2) == 2.22), "Writeoff amount is not 2.22$"
-
@@ -279,14 +265,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that my voucher state is posted
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert voucher_id.state == 'posted', "Voucher state is not posted"
-
@@ -299,7 +285,7 @@
I check that my writeoff is correct. 2.11 in credit and 2.22 in amount_currency
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml
index 355098dc7d6..ec4d653c8ab 100644
--- a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml
+++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml
@@ -49,7 +49,6 @@
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
- currency: base.EUR
company_id: base.main_company
view_id: account.account_journal_bank_view
-
@@ -61,23 +60,11 @@
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
- default_debit_account_id: account.cash
- default_credit_account_id: account.cash
+ default_debit_account_id: account_cash_usd_id
+ default_credit_account_id: account_cash_usd_id
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
--
- I create a new partner Michal Gallette
--
- !record {model: res.partner, id: res_partner_michal1}:
- address:
- - city: paris
- country_id: base.fr
- name: Michal
- street: 1 rue Rockfeller
- type: invoice
- zip: '75016'
- name: Mr.Michal Gallette
-
I create the first invoice on 1st January for 200 USD
-
@@ -97,7 +84,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_michal1
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -132,7 +119,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_michal1
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -155,21 +142,21 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_michal1"), ref('bank_journal_EUR'), 200.0, False, ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_EUR'), 200.0, False, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 200.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('bank_journal_EUR'),
- 'partner_id': ref('res_partner_michal1'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
- 'name': 'First payment',
+ 'name': 'First payment: Case 2 USD/EUR DR USD',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
@@ -187,14 +174,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michal1'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my voucher is valid
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michal1'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -206,7 +193,7 @@
I check that the debtor account has 2 new lines with 144.44 and 77.78 in amount_currency columns and their credit columns are 130 and 70
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michal1'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -240,14 +227,14 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_michal1"), ref('bank_journal_USD'), 80.0, ref('base.USD'), ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_USD'), 80.0, ref('base.USD'), ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 80.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
- 'partner_id': ref('res_partner_michal1'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-%m-%d"),
@@ -255,7 +242,7 @@
'writeoff_acc_id': ref('account.a_expense'),
'exchange_acc_id': ref('account.o_expense'),
'comment': 'Write Off',
- 'name': 'Second payment',
+ 'name': 'Second payment: Case 2 SUPPL USD/EUR DR USD',
}
vals.update(self.onchange_date(cr, uid, [], time.strftime('%Y-04-01'), ref('base.USD'), 80.0)['value'])
if not res['value']['line_cr_ids']:
@@ -273,7 +260,7 @@
I check that writeoff amount computed is 2.22
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michal1'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (round(voucher_id.writeoff_amount, 2) == 2.22), "Writeoff amount is not 2.22$"
-
@@ -281,14 +268,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michal1'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that my voucher state is posted
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michal1'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert voucher_id.state == 'posted', "Voucher state is not posted"
-
@@ -301,7 +288,7 @@
I check that my writeoff is correct. 2.11 in credit and 2.22 in amount_currency
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michal1'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml
index 9ed498442fb..09034fadf51 100644
--- a/addons/account_voucher/test/case3_eur_eur.yml
+++ b/addons/account_voucher/test/case3_eur_eur.yml
@@ -26,21 +26,8 @@
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
- currency: base.EUR
company_id: base.main_company
view_id: account.account_journal_bank_view
--
- I create a new partner Peter Lawson.
--
- !record {model: res.partner, id: res_partner_peter0}:
- address:
- - city: paris
- country_id: base.fr
- name: Peter
- street: 1 rue Rockfeller
- type: invoice
- zip: '75016'
- name: Mr.Peter Lawson
-
I create the first invoice on 1st January for 150 EUR
-
@@ -60,7 +47,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_peter0
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -95,7 +82,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_peter0
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -118,21 +105,21 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.00, False, ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_EUR'), 120.00, False, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 120.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('bank_journal_EUR'),
- 'partner_id': ref('res_partner_peter0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
- 'name': 'First payment',
+ 'name': 'First payment: Case 3',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
@@ -149,7 +136,7 @@
I check that writeoff amount computed is 0.00
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 0.00), "Writeoff amount is not 0.00"
-
@@ -157,14 +144,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my first voucher is valid
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -176,7 +163,7 @@
I check that the debtor account has 2 new lines with 0.00 and 0.00 in amount_currency columns and their credit are 20 and 100 respectively
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -210,21 +197,21 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.00, False, ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_EUR'), 120.00, False, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 120.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('bank_journal_EUR'),
- 'partner_id': ref('res_partner_peter0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-04-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
- 'name': 'Second payment',
+ 'name': 'Second payment: Case 3',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
@@ -241,7 +228,7 @@
I check that writeoff amount computed is 0.00
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'),('partner_id', '=', ref('res_partner_peter0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 0.00), "Writeoff amount is not 0"
-
@@ -249,14 +236,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my second voucher is valid
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -268,7 +255,7 @@
I check that the debtor account has 2 new lines with 0.00 and 0.00 in amount_currency columns and their credit are 70 and 50
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml
index 557e20dec1a..b3abbb25e01 100644
--- a/addons/account_voucher/test/case4_cad_chf.yml
+++ b/addons/account_voucher/test/case4_cad_chf.yml
@@ -29,6 +29,16 @@
currency_id: base.CHF
name: !eval "'%s-03-01' %(datetime.now().year)"
rate: 1.25000
+-
+ I create a cash account with currency CHF
+-
+ !record {model: account.account, id: account_cash_chf_id}:
+ currency_id: base.CHF
+ name: "cash account in chf"
+ code: "Xcash chf"
+ type: 'liquidity'
+ user_type: "account.account_type_cash_moves"
+
-
I create a bank journal with CHF as currency
-
@@ -38,23 +48,11 @@
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
- default_debit_account_id: account.cash
- default_credit_account_id: account.cash
+ default_debit_account_id: account_cash_chf_id
+ default_credit_account_id: account_cash_chf_id
currency: base.CHF
company_id: base.main_company
view_id: account.account_journal_bank_view
--
- I create a new partner John Armani.
--
- !record {model: res.partner, id: res_partner_john0}:
- address:
- - city: paris
- country_id: base.fr
- name: John
- street: 1 rue Rockfeller
- type: invoice
- zip: '75016'
- name: Mr.John Armani
-
I create the first invoice on 1st January for 200 CAD
-
@@ -74,7 +72,7 @@
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
- partner_id: res_partner_john0
+ partner_id: base.res_partner_seagate
reference_type: none
-
I Validate invoice by clicking on Validate button
@@ -97,14 +95,14 @@
!python {model: account.voucher}: |
import netsvc, time
vals = {}
- res = self.onchange_partner_id(cr, uid, [], ref("res_partner_john0"), ref('bank_journal_CHF'), 200.00, ref('base.CHF'), ttype='receipt', date=False)
+ res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), ref('bank_journal_CHF'), 200.00, ref('base.CHF'), ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 200.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.CHF'),
'journal_id': ref('bank_journal_CHF'),
- 'partner_id': ref('res_partner_john0'),
+ 'partner_id': ref('base.res_partner_seagate'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-%m-%d"),
@@ -112,7 +110,7 @@
'writeoff_acc_id': ref('account.a_expense'),
'exchange_acc_id': ref('account.o_expense'),
'comment': 'Write Off',
- 'name': 'First payment',
+ 'name': 'First payment: Case 4',
}
vals.update(self.onchange_date(cr, uid, [], time.strftime('%Y-03-01'), ref('base.CHF'), 200.0)['value'])
if not res['value']['line_cr_ids']:
@@ -128,7 +126,7 @@
I check that writeoff amount computed is 13.26
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (round(voucher_id.writeoff_amount,2) == 13.26), "Writeoff amount is not 13.26 CHF"
-
@@ -136,14 +134,14 @@
-
!python {model: account.voucher}: |
import netsvc
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_seagate'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my voucher is valid
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
@@ -160,7 +158,7 @@
I check that my writeoff is correct. 11.05 credit and 13.26 amount_currency
-
!python {model: account.voucher}: |
- voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
+ voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml
index 2c9b2edee6e..46720b2732c 100644
--- a/addons/account_voucher/voucher_payment_receipt_view.xml
+++ b/addons/account_voucher/voucher_payment_receipt_view.xml
@@ -93,7 +93,7 @@
-
+
-
+
@@ -160,7 +160,7 @@
-
+
-
+
@@ -309,7 +309,7 @@
-
+
-
+
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index b087a95149e..114653d473e 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -150,7 +150,7 @@ class account_analytic_account(osv.osv):
_columns = {
'name': fields.char('Account Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, type='char', string='Full Account Name'),
- 'code': fields.char('Account Code', size=24, select=True),
+ 'code': fields.char('Code/Reference', size=24, select=True),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type', help='If you select the View Type, it means you won\'t allow to create journal entries using that account.'),
'description': fields.text('Description'),
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
@@ -168,7 +168,7 @@ class account_analytic_account(osv.osv):
'date_start': fields.date('Date Start'),
'date': fields.date('Date End', select=True),
'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
- 'state': fields.selection([('draft','New'),('open','Started'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
+ 'state': fields.selection([('template', 'Template'),('draft','New'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed')], 'State', required=True,
help='* When an account is created its in \'Draft\' state.\
\n* If any associated partner is there, it can be in \'Open\' state.\
\n* If any pending balance is there it can be in \'Pending\'. \
@@ -217,6 +217,12 @@ class account_analytic_account(osv.osv):
default['line_ids'] = []
return super(account_analytic_account, self).copy(cr, uid, id, default, context=context)
+ def on_change_partner_id(self, cr, uid, id, partner_id, context={}):
+ if not partner_id:
+ return {'value': {'contact_id': False}}
+ addr = self.pool.get('res.partner').address_get(cr, uid, [partner_id], ['invoice'])
+ return {'value': {'contact_id': addr.get('invoice', False)}}
+
def on_change_company(self, cr, uid, id, company_id):
if not company_id:
return {}
diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py
index 030a45db393..cfb1aba10d1 100644
--- a/addons/analytic_user_function/analytic_user_function.py
+++ b/addons/analytic_user_function/analytic_user_function.py
@@ -143,3 +143,5 @@ class hr_analytic_timesheet(osv.osv):
hr_analytic_timesheet()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/anonymization/__init__.py b/addons/anonymization/__init__.py
index 7be1a934c5a..4ddf3009947 100644
--- a/addons/anonymization/__init__.py
+++ b/addons/anonymization/__init__.py
@@ -22,3 +22,5 @@
import anonymization
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/anonymization/__openerp__.py b/addons/anonymization/__openerp__.py
index 41e906c078a..ed22530c6bc 100644
--- a/addons/anonymization/__openerp__.py
+++ b/addons/anonymization/__openerp__.py
@@ -57,3 +57,5 @@ anonymization process to recover your previous data.
'images': ['images/anonymization1.jpeg','images/anonymization2.jpeg','images/anonymization3.jpeg'],
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py
index 4af387a5c02..39fb415e9e1 100644
--- a/addons/anonymization/anonymization.py
+++ b/addons/anonymization/anonymization.py
@@ -578,3 +578,5 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
ir_model_fields_anonymize_wizard()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/board_auction_manager_view.xml b/addons/auction/board_auction_manager_view.xml
index 67ad8334967..099909694f3 100644
--- a/addons/auction/board_auction_manager_view.xml
+++ b/addons/auction/board_auction_manager_view.xml
@@ -7,26 +7,20 @@
form
diff --git a/addons/auction/board_auction_view.xml b/addons/auction/board_auction_view.xml
index cc784c93be2..668c5d4352b 100644
--- a/addons/auction/board_auction_view.xml
+++ b/addons/auction/board_auction_view.xml
@@ -58,36 +58,28 @@
form
diff --git a/addons/auction/report/photo_shadow.py b/addons/auction/report/photo_shadow.py
index 4aea8e31ba6..919fa701e23 100644
--- a/addons/auction/report/photo_shadow.py
+++ b/addons/auction/report/photo_shadow.py
@@ -27,7 +27,7 @@ def convert(from_file, to_file):
__convert(from_file, to_file, size=95)
def __convert(from_file, to_file, size=95):
- import Image, ImageDraw, ImageFilter
+ from PIL import Image, ImageDraw, ImageFilter
im = Image.open(from_file)
if float(im.size[1]/im.size[0])>2:
im = im.resize((im.size[0]*size/im.size[1], size))
diff --git a/addons/auction/report/report_auction.py b/addons/auction/report/report_auction.py
index 012ea3c891e..af5d76b6076 100644
--- a/addons/auction/report/report_auction.py
+++ b/addons/auction/report/report_auction.py
@@ -209,3 +209,5 @@ class report_object_encoded(osv.osv):
report_object_encoded()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/test/auction.yml b/addons/auction/test/auction.yml
index 72014f985ef..f970ffe86dd 100644
--- a/addons/auction/test/auction.yml
+++ b/addons/auction/test/auction.yml
@@ -34,21 +34,8 @@
-
!record {model: account.journal, id: account.sales_journal}:
analytic_journal_id: account.cose_journal_sale
--
- I'm creating new Seller "Mr. Pinakin" with him email "info@mycustomer.com".
--
- !record {model: res.partner, id: res_partner_mrpinakin0}:
- address:
- - city: Namur
- country_id: base.be
- phone: (+32).10.45.18.77
- street: 23, street ways
- type: default
- zip: '2324324'
- email: 'info@mycustomer.com'
- name: Mr. Pinakin
--
+-
I'm creating new Buyer "Mr. Patel" with his email "info@myinfobid.com".
-
!record {model: res.partner, id: res_partner_mrpatel0}:
@@ -61,21 +48,7 @@
email: 'info@myinfobid.com'
name: Mr. Patel
--
- I'm creating new Buyer "Mr. Johnson" with his email "info@mrkjohnson.com".
--
- !record {model: res.partner, id: res_partner_mrkjohnson0}:
- address:
- - city: paris
- country_id: base.fr
- name: Mark Johnson
- street: 1 rue Rockfeller
- type: invoice
- zip: '75016'
- email: 'info@mrkjohnson.com'
- name: Mr. Mark Johnson
-
--
+-
I'm creating new Buyer "Mr. Rahi" with his email "info@poalrahi.com".
-
!record {model: res.partner, id: res_partner_poalrahi0}:
@@ -140,7 +113,7 @@
date_dep: !eval "'%s-08-01' %(datetime.now().year)"
method: keep
name: AD/006
- partner_id: res_partner_mrpinakin0
+ partner_id: base.res_partner_maxtor
specific_cost_ids:
- account: auction.auction_expense
amount: 200.0
@@ -149,7 +122,7 @@
I create a new object wooden-chair which is to be auctioned.
-
!record {model: auction.lots, id: auction_lots_woodenchair0}:
- ach_uid: res_partner_mrkjohnson0
+ ach_uid: base.res_partner_seagate
artist_id: auction_artists_vincentvangogh0
auction_id: auction_dates_antiquefurnitureexhibition0
bord_vnd_id: auction_deposit_ad0
@@ -199,12 +172,12 @@
price: 3200.0
-
- I create another bid for an object "wooden-chair" bid by a Mr.Johnson
+ I create another bid for an object "wooden-chair" bid by a Mr.Seagate
-
!record {model: auction.bid, id: auction_bid_bid2}:
auction_id: auction_dates_antiquefurnitureexhibition0
name: bid/003
- partner_id: res_partner_mrkjohnson0
+ partner_id: base.res_partner_seagate
-
I create a bid line.
-
@@ -215,7 +188,7 @@
lot_id: auction.auction_lots_woodenchair0
price: 4000.0
-
- Mr. MarkJohnson bid are selected as the Finalist Bid with 4000 Euro
+ Mr. Seagate bids are selected as the Finalist Bid with 4000 Euro
-
I check that buyer price and seller price gets bound with the value
-
@@ -250,7 +223,7 @@
-
!record {model: auction.lots.make.invoice.buyer, id: auction_lots_make_invoice_buyer_0}:
amount: 3090.0
- buyer_id: res_partner_mrkjohnson0
+ buyer_id: base.res_partner_seagate
number: !eval "'%s/003' %(datetime.now().year)"
objects: 1
-
diff --git a/addons/auction/wizard/auction_lots_able.py b/addons/auction/wizard/auction_lots_able.py
index 8604d691456..37d8374aad4 100644
--- a/addons/auction/wizard/auction_lots_able.py
+++ b/addons/auction/wizard/auction_lots_able.py
@@ -44,3 +44,5 @@ class auction_lots_able(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
auction_lots_able()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/wizard/auction_lots_cancel.py b/addons/auction/wizard/auction_lots_cancel.py
index 3974241a071..7157ac8abea 100644
--- a/addons/auction/wizard/auction_lots_cancel.py
+++ b/addons/auction/wizard/auction_lots_cancel.py
@@ -53,4 +53,5 @@ class auction_lots_cancel(osv.osv):
_columns = {
}
-auction_lots_cancel()
\ No newline at end of file
+auction_lots_cancel()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/wizard/auction_lots_enable.py b/addons/auction/wizard/auction_lots_enable.py
index 290664ba697..c4c8792f76a 100644
--- a/addons/auction/wizard/auction_lots_enable.py
+++ b/addons/auction/wizard/auction_lots_enable.py
@@ -41,3 +41,5 @@ class auction_lots_enable(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
auction_lots_enable()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/wizard/auction_lots_make_invoice.py b/addons/auction/wizard/auction_lots_make_invoice.py
index 3a87a202b74..19c39dc2c04 100644
--- a/addons/auction/wizard/auction_lots_make_invoice.py
+++ b/addons/auction/wizard/auction_lots_make_invoice.py
@@ -89,3 +89,5 @@ class auction_lots_make_invoice(osv.osv_memory):
}
auction_lots_make_invoice()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/wizard/auction_lots_make_invoice_buyer.py b/addons/auction/wizard/auction_lots_make_invoice_buyer.py
index dc39ccbb717..253a5b317ff 100644
--- a/addons/auction/wizard/auction_lots_make_invoice_buyer.py
+++ b/addons/auction/wizard/auction_lots_make_invoice_buyer.py
@@ -89,3 +89,5 @@ class auction_lots_make_invoice_buyer(osv.osv_memory):
}
auction_lots_make_invoice_buyer()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/wizard/auction_pay_sel.py b/addons/auction/wizard/auction_pay_sel.py
index 77484bbe988..42ea08e8094 100644
--- a/addons/auction/wizard/auction_pay_sel.py
+++ b/addons/auction/wizard/auction_pay_sel.py
@@ -55,3 +55,5 @@ class auction_pay_sel(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
auction_pay_sel()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/wizard/auction_taken.py b/addons/auction/wizard/auction_taken.py
index 8ada436ae5d..38ac6dca2fe 100644
--- a/addons/auction/wizard/auction_taken.py
+++ b/addons/auction/wizard/auction_taken.py
@@ -51,3 +51,5 @@ class auction_taken(osv.osv_memory):
return {'lot_ids': []}
auction_taken()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auction/wizard/auction_transfer_unsold_object.py b/addons/auction/wizard/auction_transfer_unsold_object.py
index f593a36de2e..0e52199e566 100644
--- a/addons/auction/wizard/auction_transfer_unsold_object.py
+++ b/addons/auction/wizard/auction_transfer_unsold_object.py
@@ -84,4 +84,5 @@ class auction_transfer_unsold_object(osv.osv):
'state':'draft'})
return {'type': 'ir.actions.act_window_close'}
-auction_transfer_unsold_object()
\ No newline at end of file
+auction_transfer_unsold_object()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py
index 80af2e7ea3a..302d6e146bd 100644
--- a/addons/audittrail/audittrail.py
+++ b/addons/audittrail/audittrail.py
@@ -43,22 +43,17 @@ class audittrail_rule(osv.osv):
"log_create": fields.boolean("Log Creates",help="Select this if you want to keep track of creation on any record of the object of this rule"),
"log_action": fields.boolean("Log Action",help="Select this if you want to keep track of actions on the object of this rule"),
"log_workflow": fields.boolean("Log Workflow",help="Select this if you want to keep track of workflow on any record of the object of this rule"),
- "state": fields.selection((("draft", "Draft"),
- ("subscribed", "Subscribed")),
- "State", required=True),
+ "state": fields.selection((("draft", "Draft"), ("subscribed", "Subscribed")), "State", required=True),
"action_id": fields.many2one('ir.actions.act_window', "Action ID"),
-
}
-
_defaults = {
- 'state': lambda *a: 'draft',
- 'log_create': lambda *a: 1,
- 'log_unlink': lambda *a: 1,
- 'log_write': lambda *a: 1,
+ 'state': 'draft',
+ 'log_create': 1,
+ 'log_unlink': 1,
+ 'log_write': 1,
}
-
_sql_constraints = [
- ('model_uniq', 'unique (object_id)', """There is a rule defined on this object\n You cannot define another one the same object!""")
+ ('model_uniq', 'unique (object_id)', """There is already a rule defined on this object\n You cannot define another: please edit the existing one.""")
]
__functions = {}
@@ -178,54 +173,33 @@ class audittrail_log_line(osv.osv):
class audittrail_objects_proxy(object_proxy):
""" Uses Object proxy for auditing changes on object of subscribed Rules"""
- def get_value_text(self, cr, uid, field_name, values, model, context=None):
+ def get_value_text(self, cr, uid, pool, resource_pool, method, field, value):
+ """
+ Gets textual values for the fields.
+ If the field is a many2one, it returns the name.
+ If it's a one2many or a many2many, it returns a list of name.
+ In other cases, it just returns the value.
+ :param cr: the current row, from the database cursor,
+ :param uid: the current user’s ID for security checks,
+ :param pool: current db's pooler object.
+ :param resource_pool: pooler object of the model which values are being changed.
+ :param field: for which the text value is to be returned.
+ :param value: value of the field.
+ :param recursive: True or False, True will repeat the process recursively
+ :return: string value or a list of values(for O2M/M2M)
"""
- Gets textual values for the fields
- e.g.: For field of type many2one it gives its name value instead of id
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param field_name: List of fields for text values
- @param values: Values for field to be converted into textual values
- @return: values: List of textual values for given fields
- """
- if not context:
- context = {}
- if field_name in('__last_update','id'):
- return values
- pool = pooler.get_pool(cr.dbname)
- field_pool = pool.get('ir.model.fields')
- model_pool = pool.get('ir.model')
- obj_pool = pool.get(model.model)
- if obj_pool._inherits:
- inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])])
- field_ids = field_pool.search(cr, uid, [('name', '=', field_name), ('model_id', 'in', (model.id, inherits_ids[0]))])
+ field_obj = (resource_pool._all_columns.get(field)).column
+ if field_obj._type in ('one2many','many2many'):
+ data = pool.get(field_obj._obj).name_get(cr, uid, value)
+ #return the modifications on x2many fields as a list of names
+ res = map(lambda x:x[1], data)
+ elif field_obj._type == 'many2one':
+ #return the modifications on a many2one field as its value returned by name_get()
+ res = value and value[1] or value
else:
- field_ids = field_pool.search(cr, uid, [('name', '=', field_name), ('model_id', '=', model.id)])
- field_id = field_ids and field_ids[0] or False
- assert field_id, _("'%s' field does not exist in '%s' model" %(field_name, model.model))
-
- field = field_pool.read(cr, uid, field_id)
- relation_model = field['relation']
- relation_model_pool = relation_model and pool.get(relation_model) or False
-
- if field['ttype'] == 'many2one':
- res = False
- relation_id = False
- if values and type(values) == tuple:
- relation_id = values[0]
- if relation_id and relation_model_pool:
- relation_model_object = relation_model_pool.read(cr, uid, relation_id, [relation_model_pool._rec_name])
- res = relation_model_object[relation_model_pool._rec_name]
- return res
-
- elif field['ttype'] in ('many2many','one2many'):
- res = []
- for relation_model_object in relation_model_pool.read(cr, uid, values, [relation_model_pool._rec_name]):
- res.append(relation_model_object[relation_model_pool._rec_name])
- return res
-
- return values
+ res = value
+ return res
def create_log_line(self, cr, uid, log_id, model, lines=[]):
"""
@@ -233,7 +207,7 @@ class audittrail_objects_proxy(object_proxy):
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
- @param model: Object who's values are being changed
+ @param model: Object which values are being changed
@param lines: List of values for line is to be created
"""
pool = pooler.get_pool(cr.dbname)
@@ -241,216 +215,273 @@ class audittrail_objects_proxy(object_proxy):
model_pool = pool.get('ir.model')
field_pool = pool.get('ir.model.fields')
log_line_pool = pool.get('audittrail.log.line')
- #start Loop
for line in lines:
- if line['name'] in('__last_update','id'):
- continue
+ field_obj = obj_pool._all_columns.get(line['name'])
+ assert field_obj, _("'%s' field does not exist in '%s' model" %(line['name'], model.model))
+ field_obj = field_obj.column
+ old_value = line.get('old_value', '')
+ new_value = line.get('new_value', '')
+ search_models = [model.id]
if obj_pool._inherits:
- inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])])
- field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (model.id, inherits_ids[0]))])
- else:
- field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', '=', model.id)])
- field_id = field_ids and field_ids[0] or False
- assert field_id, _("'%s' field does not exist in '%s' model" %(line['name'], model.model))
-
- field = field_pool.read(cr, uid, field_id)
- old_value = 'old_value' in line and line['old_value'] or ''
- new_value = 'new_value' in line and line['new_value'] or ''
- old_value_text = 'old_value_text' in line and line['old_value_text'] or ''
- new_value_text = 'new_value_text' in line and line['new_value_text'] or ''
-
- if old_value_text == new_value_text:
- continue
- if field['ttype'] == 'many2one':
- if type(old_value) == tuple:
- old_value = old_value[0]
- if type(new_value) == tuple:
- new_value = new_value[0]
+ search_models += model_pool.search(cr, uid, [('model', 'in', obj_pool._inherits.keys())])
+ field_id = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', search_models)])
+ if field_obj._type == 'many2one':
+ old_value = old_value and old_value[0] or old_value
+ new_value = new_value and new_value[0] or new_value
vals = {
"log_id": log_id,
- "field_id": field_id,
+ "field_id": field_id and field_id[0] or False,
"old_value": old_value,
"new_value": new_value,
- "old_value_text": old_value_text,
- "new_value_text": new_value_text,
- "field_description": field['field_description']
+ "old_value_text": line.get('old_value_text', ''),
+ "new_value_text": line.get('new_value_text', ''),
+ "field_description": field_obj.string
}
line_id = log_line_pool.create(cr, uid, vals)
- cr.commit()
- #End Loop
return True
- def log_fct(self, cr, uid, model, method, fct_src, *args):
+ def log_fct(self, cr, uid_orig, model, method, fct_src, *args):
"""
- Logging function: This function is performs logging oprations according to method
- @param db: the current database
- @param uid: the current user’s ID for security checks,
- @param object: Object who's values are being changed
- @param method: method to log: create, read, write, unlink
+ Logging function: This function is performing the logging operation
+ @param model: Object whose values are being changed
+ @param method: method to log: create, read, write, unlink, action or workflow action
@param fct_src: execute method of Object proxy
@return: Returns result as per method of Object proxy
"""
- uid_orig = uid
- uid = 1
- res2 = args
pool = pooler.get_pool(cr.dbname)
resource_pool = pool.get(model)
- log_pool = pool.get('audittrail.log')
model_pool = pool.get('ir.model')
-
- model_ids = model_pool.search(cr, uid, [('model', '=', model)])
+ model_ids = model_pool.search(cr, 1, [('model', '=', model)])
model_id = model_ids and model_ids[0] or False
assert model_id, _("'%s' Model does not exist..." %(model))
- model = model_pool.browse(cr, uid, model_id)
+ model = model_pool.browse(cr, 1, model_id)
- if method in ('create'):
- res_id = fct_src(cr, uid_orig, model.model, method, *args)
- resource = resource_pool.read(cr, uid, res_id, args[0].keys())
- vals = {
- "method": method,
- "object_id": model.id,
- "user_id": uid_orig,
- "res_id": resource['id'],
- }
- if 'id' in resource:
- del resource['id']
- log_id = log_pool.create(cr, uid, vals)
- lines = []
- for field in resource:
- line = {
- 'name': field,
- 'new_value': resource[field],
- 'new_value_text': self.get_value_text(cr, uid, field, resource[field], model)
- }
- lines.append(line)
- self.create_log_line(cr, uid, log_id, model, lines)
+ # fields to log. currently only used by log on read()
+ field_list = []
+ old_values = new_values = {}
- return res_id
-
- elif method in ('read'):
- res_ids = args[0]
- old_values = {}
+ if method == 'create':
res = fct_src(cr, uid_orig, model.model, method, *args)
- if type(res) == list:
- for v in res:
- old_values[v['id']] = v
- else:
- old_values[res['id']] = res
- for res_id in old_values:
- vals = {
- "method": method,
- "object_id": model.id,
- "user_id": uid_orig,
- "res_id": res_id,
-
- }
- log_id = log_pool.create(cr, uid, vals)
- lines = []
- for field in old_values[res_id]:
- line = {
- 'name': field,
- 'old_value': old_values[res_id][field],
- 'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model)
- }
- lines.append(line)
-
- self.create_log_line(cr, uid, log_id, model, lines)
- return res
-
- elif method in ('unlink'):
- res_ids = args[0]
- old_values = {}
- for res_id in res_ids:
- old_values[res_id] = resource_pool.read(cr, uid, res_id)
-
- for res_id in res_ids:
- vals = {
- "method": method,
- "object_id": model.id,
- "user_id": uid_orig,
- "res_id": res_id,
-
- }
- log_id = log_pool.create(cr, uid, vals)
- lines = []
- for field in old_values[res_id]:
- if field in ('id'):
- continue
- line = {
- 'name': field,
- 'old_value': old_values[res_id][field],
- 'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model)
- }
- lines.append(line)
-
- self.create_log_line(cr, uid, log_id, model, lines)
+ if res:
+ res_ids = [res]
+ new_values = self.get_data(cr, uid_orig, pool, res_ids, model, method)
+ elif method == 'read':
res = fct_src(cr, uid_orig, model.model, method, *args)
- return res
- else:
+ # build the res_ids and the old_values dict. Here we don't use get_data() to
+ # avoid performing an additional read()
+ res_ids = []
+ for record in res:
+ res_ids.append(record['id'])
+ old_values[(model.id, record['id'])] = {'value': record, 'text': record}
+ # log only the fields read
+ field_list = args[1]
+ elif method == 'unlink':
+ res_ids = args[0]
+ old_values = self.get_data(cr, uid_orig, pool, res_ids, model, method)
+ res = fct_src(cr, uid_orig, model.model, method, *args)
+ else: # method is write, action or workflow action
res_ids = []
- res = True
if args:
res_ids = args[0]
- old_values = {}
- fields = []
- if len(args)>1 and type(args[1]) == dict:
- fields = args[1].keys()
- if type(res_ids) in (long, int):
+ if isinstance(res_ids, (long, int)):
res_ids = [res_ids]
if res_ids:
- for resource in resource_pool.read(cr, uid, res_ids):
- resource_id = resource['id']
- if 'id' in resource:
- del resource['id']
- old_values_text = {}
- old_value = {}
- for field in resource.keys():
- old_value[field] = resource[field]
- old_values_text[field] = self.get_value_text(cr, uid, field, resource[field], model)
- old_values[resource_id] = {'text':old_values_text, 'value': old_value}
-
+ # store the old values into a dictionary
+ old_values = self.get_data(cr, uid_orig, pool, res_ids, model, method)
+ # process the original function, workflow trigger...
res = fct_src(cr, uid_orig, model.model, method, *args)
-
+ if method == 'copy':
+ res_ids = [res]
if res_ids:
- for resource in resource_pool.read(cr, uid, res_ids):
- resource_id = resource['id']
- if 'id' in resource:
- del resource['id']
- vals = {
- "method": method,
- "object_id": model.id,
- "user_id": uid_orig,
- "res_id": resource_id,
- }
+ # check the new values and store them into a dictionary
+ new_values = self.get_data(cr, uid_orig, pool, res_ids, model, method)
+ # compare the old and new values and create audittrail log if needed
+ self.process_data(cr, uid_orig, pool, res_ids, model, method, old_values, new_values, field_list)
+ return res
+ def get_data(self, cr, uid, pool, res_ids, model, method):
+ """
+ This function simply read all the fields of the given res_ids, and also recurisvely on
+ all records of a x2m fields read that need to be logged. Then it returns the result in
+ convenient structure that will be used as comparison basis.
- log_id = log_pool.create(cr, uid, vals)
- lines = []
- for field in resource.keys():
- line = {
- 'name': field,
- 'new_value': resource[field],
- 'old_value': old_values[resource_id]['value'][field],
- 'new_value_text': self.get_value_text(cr, uid, field, resource[field], model),
- 'old_value_text': old_values[resource_id]['text'][field]
- }
- lines.append(line)
+ :param cr: the current row, from the database cursor,
+ :param uid: the current user’s ID. This parameter is currently not used as every
+ operation to get data is made as super admin. Though, it could be usefull later.
+ :param pool: current db's pooler object.
+ :param res_ids: Id's of resource to be logged/compared.
+ :param model: Object whose values are being changed
+ :param method: method to log: create, read, unlink, write, actions, workflow actions
+ :return: dict mapping a tuple (model_id, resource_id) with its value and textual value
+ { (model_id, resource_id): { 'value': ...
+ 'textual_value': ...
+ },
+ }
+ """
+ data = {}
+ resource_pool = pool.get(model.model)
+ # read all the fields of the given resources in super admin mode
+ for resource in resource_pool.read(cr, 1, res_ids):
+ values = {}
+ values_text = {}
+ resource_id = resource['id']
+ # loop on each field on the res_ids we just have read
+ for field in resource:
+ if field in ('__last_update', 'id'):
+ continue
+ values[field] = resource[field]
+ # get the textual value of that field for this record
+ values_text[field] = self.get_value_text(cr, 1, pool, resource_pool, method, field, resource[field])
- self.create_log_line(cr, uid, log_id, model, lines)
- return res
+ field_obj = resource_pool._all_columns.get(field).column
+ if field_obj._type in ('one2many','many2many'):
+ # check if an audittrail rule apply in super admin mode
+ if self.check_rules(cr, 1, field_obj._obj, method):
+ # check if the model associated to a *2m field exists, in super admin mode
+ x2m_model_ids = pool.get('ir.model').search(cr, 1, [('model', '=', field_obj._obj)])
+ x2m_model_id = x2m_model_ids and x2m_model_ids[0] or False
+ assert x2m_model_id, _("'%s' Model does not exist..." %(field_obj._obj))
+ x2m_model = pool.get('ir.model').browse(cr, 1, x2m_model_id)
+ #recursive call on x2m fields that need to be checked too
+ data.update(self.get_data(cr, 1, pool, resource[field], x2m_model, method))
+ data[(model.id, resource_id)] = {'text':values_text, 'value': values}
+ return data
+
+ def prepare_audittrail_log_line(self, cr, uid, pool, model, resource_id, method, old_values, new_values, field_list=[]):
+ """
+ This function compares the old data (i.e before the method was executed) and the new data
+ (after the method was executed) and returns a structure with all the needed information to
+ log those differences.
+
+ :param cr: the current row, from the database cursor,
+ :param uid: the current user’s ID. This parameter is currently not used as every
+ operation to get data is made as super admin. Though, it could be usefull later.
+ :param pool: current db's pooler object.
+ :param model: model object which values are being changed
+ :param resource_id: ID of record to which values are being changed
+ :param method: method to log: create, read, unlink, write, actions, workflow actions
+ :param old_values: dict of values read before execution of the method
+ :param new_values: dict of values read after execution of the method
+ :param field_list: optional argument containing the list of fields to log. Currently only
+ used when performing a read, it could be usefull later on if we want to log the write
+ on specific fields only.
+
+ :return: dictionary with
+ * keys: tuples build as ID of model object to log and ID of resource to log
+ * values: list of all the changes in field values for this couple (model, resource)
+ return {
+ (model.id, resource_id): []
+ }
+
+ The reason why the structure returned is build as above is because when modifying an existing
+ record (res.partner, for example), we may have to log a change done in a x2many field (on
+ res.partner.address, for example)
+ """
+ key = (model.id, resource_id)
+ lines = {
+ key: []
+ }
+ # loop on all the fields
+ for field_name, field_definition in pool.get(model.model)._all_columns.items():
+ #if the field_list param is given, skip all the fields not in that list
+ if field_list and field_name not in field_list:
+ continue
+ field_obj = field_definition.column
+ if field_obj._type in ('one2many','many2many'):
+ # checking if an audittrail rule apply in super admin mode
+ if self.check_rules(cr, 1, field_obj._obj, method):
+ # checking if the model associated to a *2m field exists, in super admin mode
+ x2m_model_ids = pool.get('ir.model').search(cr, 1, [('model', '=', field_obj._obj)])
+ x2m_model_id = x2m_model_ids and x2m_model_ids[0] or False
+ assert x2m_model_id, _("'%s' Model does not exist..." %(field_obj._obj))
+ x2m_model = pool.get('ir.model').browse(cr, 1, x2m_model_id)
+ # the resource_ids that need to be checked are the sum of both old and previous values (because we
+ # need to log also creation or deletion in those lists).
+ x2m_old_values_ids = old_values.get(key, {'value': {}})['value'].get(field_name, [])
+ x2m_new_values_ids = new_values.get(key, {'value': {}})['value'].get(field_name, [])
+ # We use list(set(...)) to remove duplicates.
+ res_ids = list(set(x2m_old_values_ids + x2m_new_values_ids))
+ for res_id in res_ids:
+ lines.update(self.prepare_audittrail_log_line(cr, 1, pool, x2m_model, res_id, method, old_values, new_values, field_list))
+ # if the value value is different than the old value: record the change
+ if key not in old_values or key not in new_values or old_values[key]['value'][field_name] != new_values[key]['value'][field_name]:
+ data = {
+ 'name': field_name,
+ 'new_value': key in new_values and new_values[key]['value'].get(field_name),
+ 'old_value': key in old_values and old_values[key]['value'].get(field_name),
+ 'new_value_text': key in new_values and new_values[key]['text'].get(field_name),
+ 'old_value_text': key in old_values and old_values[key]['text'].get(field_name)
+ }
+ lines[key].append(data)
+ return lines
+
+ def process_data(self, cr, uid, pool, res_ids, model, method, old_values={}, new_values={}, field_list=[]):
+ """
+ This function processes and iterates recursively to log the difference between the old
+ data (i.e before the method was executed) and the new data and creates audittrail log
+ accordingly.
+
+ :param cr: the current row, from the database cursor,
+ :param uid: the current user’s ID,
+ :param pool: current db's pooler object.
+ :param res_ids: Id's of resource to be logged/compared.
+ :param model: model object which values are being changed
+ :param method: method to log: create, read, unlink, write, actions, workflow actions
+ :param old_values: dict of values read before execution of the method
+ :param new_values: dict of values read after execution of the method
+ :param field_list: optional argument containing the list of fields to log. Currently only
+ used when performing a read, it could be usefull later on if we want to log the write
+ on specific fields only.
+ :return: True
+ """
+ # loop on all the given ids
+ for res_id in res_ids:
+ # compare old and new values and get audittrail log lines accordingly
+ lines = self.prepare_audittrail_log_line(cr, uid, pool, model, res_id, method, old_values, new_values, field_list)
+
+ # if at least one modification has been found
+ for model_id, resource_id in lines:
+ vals = {
+ 'method': method,
+ 'object_id': model_id,
+ 'user_id': uid,
+ 'res_id': resource_id,
+ }
+ if (model_id, resource_id) not in old_values and method not in ('copy', 'read'):
+ # the resource was not existing so we are forcing the method to 'create'
+ # (because it could also come with the value 'write' if we are creating
+ # new record through a one2many field)
+ vals.update({'method': 'create'})
+ if (model_id, resource_id) not in new_values and method not in ('copy', 'read'):
+ # the resource is not existing anymore so we are forcing the method to 'unlink'
+ # (because it could also come with the value 'write' if we are deleting the
+ # record through a one2many field)
+ vals.update({'method': 'unlink'})
+ # create the audittrail log in super admin mode, only if a change has been detected
+ if lines[(model_id, resource_id)]:
+ log_id = pool.get('audittrail.log').create(cr, 1, vals)
+ model = pool.get('ir.model').browse(cr, uid, model_id)
+ self.create_log_line(cr, 1, log_id, model, lines[(model_id, resource_id)])
return True
def check_rules(self, cr, uid, model, method):
+ """
+ Checks if auditrails is installed for that db and then if one rule match
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID,
+ @param model: value of _name of the object which values are being changed
+ @param method: method to log: create, read, unlink,write,actions,workflow actions
+ @return: True or False
+ """
pool = pooler.get_pool(cr.dbname)
- # Check if auditrails is installed for that db and then if one rule match
if 'audittrail.rule' in pool.models:
model_ids = pool.get('ir.model').search(cr, 1, [('model', '=', model)])
model_id = model_ids and model_ids[0] or False
if model_id:
rule_ids = pool.get('audittrail.rule').search(cr, 1, [('object_id', '=', model_id), ('state', '=', 'subscribed')])
for rule in pool.get('audittrail.rule').read(cr, 1, rule_ids, ['user_id','log_read','log_write','log_create','log_unlink','log_action','log_workflow']):
- if len(rule['user_id'])==0 or uid in rule['user_id']:
+ if len(rule['user_id']) == 0 or uid in rule['user_id']:
if rule.get('log_'+method,0):
return True
elif method not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink', 'write', 'create'):
@@ -460,18 +491,14 @@ class audittrail_objects_proxy(object_proxy):
def execute_cr(self, cr, uid, model, method, *args, **kw):
fct_src = super(audittrail_objects_proxy, self).execute_cr
if self.check_rules(cr,uid,model,method):
- res = self.log_fct(cr, uid, model, method, fct_src, *args)
- else:
- res = fct_src(cr, uid, model, method, *args)
- return res
+ return self.log_fct(cr, uid, model, method, fct_src, *args)
+ return fct_src(cr, uid, model, method, *args)
def exec_workflow_cr(self, cr, uid, model, method, *args, **argv):
fct_src = super(audittrail_objects_proxy, self).exec_workflow_cr
if self.check_rules(cr,uid,model,'workflow'):
- res = self.log_fct(cr, uid, model, method, fct_src, *args)
- else:
- res = fct_src(cr, uid, model, method, *args)
- return res
+ return self.log_fct(cr, uid, model, method, fct_src, *args)
+ return fct_src(cr, uid, model, method, *args)
audittrail_objects_proxy()
diff --git a/addons/audittrail/wizard/audittrail_view_log.py b/addons/audittrail/wizard/audittrail_view_log.py
index 65165c1d2d8..76284e75511 100644
--- a/addons/audittrail/wizard/audittrail_view_log.py
+++ b/addons/audittrail/wizard/audittrail_view_log.py
@@ -62,3 +62,5 @@ class audittrail_view_log(osv.osv_memory):
return result
audittrail_view_log()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auth_openid/controllers/__init__.py b/addons/auth_openid/controllers/__init__.py
index 2d3be24431f..c5f359681b9 100644
--- a/addons/auth_openid/controllers/__init__.py
+++ b/addons/auth_openid/controllers/__init__.py
@@ -18,3 +18,5 @@
#
##############################################################################
import main
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auth_openid/controllers/main.py b/addons/auth_openid/controllers/main.py
index 78b8609e765..0c1274ba05a 100644
--- a/addons/auth_openid/controllers/main.py
+++ b/addons/auth_openid/controllers/main.py
@@ -223,3 +223,5 @@ class OpenIDController(openerpweb.Controller):
session = getattr(req.session, 'openid_session', {})
return {'status': session.get('status'), 'message': session.get('message')}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auth_openid/res_users.py b/addons/auth_openid/res_users.py
index 3278184474c..c9b5bfc7b26 100644
--- a/addons/auth_openid/res_users.py
+++ b/addons/auth_openid/res_users.py
@@ -92,3 +92,5 @@ class res_users(osv.osv):
res_users()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auth_openid/utils.py b/addons/auth_openid/utils.py
index 2761f3d0e1d..444b5eeaa05 100644
--- a/addons/auth_openid/utils.py
+++ b/addons/auth_openid/utils.py
@@ -44,3 +44,5 @@ def cursor(db):
finally:
cr.close()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 4b3fe0a167d..2d239adada2 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -147,7 +147,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
res['value'] = {'filter_id':False}
return res
- def pre_action(self, cr, uid, ids, model, context=None):
+ def post_action(self, cr, uid, ids, model, context=None):
# Searching for action rules
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule \
LEFT JOIN ir_model model on (model.id = rule.model_id) \
@@ -156,7 +156,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
# Check if any rule matching with current object
for obj_name, rule_id in res:
if not (model == obj_name):
- continue
+ continue # TODO add this condition in the WHERE clause above.
else:
obj = self.pool.get(obj_name)
# If the rule doesn't involve a time condition, run it immediately
@@ -166,31 +166,36 @@ the rule to mark CC(mail to any other person defined in actions)."),
return True
def _create(self, old_create, model, context=None):
- if context is None:
- context = {}
- def make_call_old(cr, uid, vals, context=context):
+ """
+ Return a wrapper around `old_create` calling both `old_create` and
+ `post_action`, in that order.
+ """
+ def wrapper(cr, uid, vals, context=context):
new_id = old_create(cr, uid, vals, context=context)
if not context.get('action'):
- self.pre_action(cr, uid, [new_id], model, context=context)
+ self.post_action(cr, uid, [new_id], model, context=context)
return new_id
- return make_call_old
-
+ return wrapper
+
def _write(self, old_write, model, context=None):
- if context is None:
- context = {}
- def make_call_old(cr, uid, ids, vals, context=context):
- if context is None:
- context = {}
+ """
+ Return a wrapper around `old_write` calling both `old_write` and
+ `post_action`, in that order.
+ """
+ def wrapper(cr, uid, ids, vals, context=context):
if isinstance(ids, (str, int, long)):
ids = [ids]
+ old_write(cr, uid, ids, vals, context=context)
if not context.get('action'):
- self.pre_action(cr, uid, ids, model, context=context)
- return old_write(cr, uid, ids, vals, context=context)
- return make_call_old
+ self.post_action(cr, uid, ids, model, context=context)
+ return True
+ return wrapper
def _register_hook(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
+ """
+ Wrap every `create` and `write` methods of the models specified by
+ the rules (given by `ids`).
+ """
for action_rule in self.browse(cr, uid, ids, context=context):
model = action_rule.model_id.model
obj_pool = self.pool.get(model)
@@ -200,15 +205,16 @@ the rule to mark CC(mail to any other person defined in actions)."),
obj_pool.base_action_ruled = True
return True
+
def create(self, cr, uid, vals, context=None):
res_id = super(base_action_rule, self).create(cr, uid, vals, context=context)
self._register_hook(cr, uid, [res_id], context=context)
return res_id
def write(self, cr, uid, ids, vals, context=None):
- res = super(base_action_rule, self).write(cr, uid, ids, vals, context=context)
+ super(base_action_rule, self).write(cr, uid, ids, vals, context=context)
self._register_hook(cr, uid, ids, context=context)
- return res
+ return True
def _check(self, cr, uid, automatic=False, use_new_cursor=False, \
context=None):
diff --git a/addons/base_action_rule/i18n/pt.po b/addons/base_action_rule/i18n/pt.po
index 106ba16af9d..d894a6b799b 100644
--- a/addons/base_action_rule/i18n/pt.po
+++ b/addons/base_action_rule/i18n/pt.po
@@ -8,25 +8,26 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
-"PO-Revision-Date: 2010-12-15 20:31+0000\n"
-"Last-Translator: OpenERP Administrators \n"
+"PO-Revision-Date: 2011-11-23 12:16+0000\n"
+"Last-Translator: Paulino Ascenção \n"
"Language-Team: Portuguese \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:51+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-24 05:00+0000\n"
+"X-Generator: Launchpad (build 14336)\n"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_user:0
msgid ""
"Check this if you want the rule to send an email to the responsible person."
msgstr ""
+"Assinale aqui se pretender que a regra envie um e-mail à pessoa responsável."
#. module: base_action_rule
#: field:base.action.rule,act_remind_partner:0
msgid "Remind Partner"
-msgstr "Alertar parceiro"
+msgstr "Relembrar parceiro"
#. module: base_action_rule
#: field:base.action.rule,trg_partner_categ_id:0
@@ -259,7 +260,7 @@ msgstr "Chamar o método do objeto"
#. module: base_action_rule
#: field:base.action.rule,act_email_to:0
msgid "Email To"
-msgstr ""
+msgstr "E-mail para"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_watchers:0
@@ -369,12 +370,12 @@ msgstr "Erro: A mensagem não está bem formatada"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Actions"
-msgstr ""
+msgstr "Ações do e-mail"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Information"
-msgstr ""
+msgstr "Informação sobre o e-mail"
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_base_action_rule
@@ -432,7 +433,7 @@ msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_email_cc:0
msgid "Add Watchers (Cc)"
-msgstr ""
+msgstr "Acdicionar observadores (CC)"
#. module: base_action_rule
#: view:base.action.rule:0
diff --git a/addons/base_calendar/i18n/bn.po b/addons/base_calendar/i18n/bn.po
new file mode 100644
index 00000000000..e0d0b9c7cca
--- /dev/null
+++ b/addons/base_calendar/i18n/bn.po
@@ -0,0 +1,1658 @@
+# Bengali translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:14+0000\n"
+"PO-Revision-Date: 2011-11-21 12:57+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Bengali \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-22 05:00+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: base_calendar
+#: selection:calendar.alarm,trigger_related:0
+#: selection:res.alarm,trigger_related:0
+msgid "The event starts"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,freq:0
+msgid "Hourly"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Required to Join"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,exdate:0
+#: help:calendar.todo,exdate:0
+msgid ""
+"This property defines the list of date/time exceptions for a recurring "
+"calendar component."
+msgstr ""
+
+#. module: base_calendar
+#: constraint:res.users:0
+msgid "The chosen company is not in the allowed companies for this user"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event.edit.all,name:0
+msgid "Title"
+msgstr "শিরোনাম"
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,freq:0
+#: selection:calendar.event,rrule_type:0
+#: selection:calendar.todo,rrule_type:0
+msgid "Monthly"
+msgstr "মাসভিত্তিক"
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Invited User"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Invitation"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,recurrency:0
+#: help:calendar.todo,recurrency:0
+msgid "Recurrent Meeting"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.actions.act_window,name:base_calendar.action_res_alarm_view
+#: model:ir.ui.menu,name:base_calendar.menu_crm_meeting_avail_alarm
+msgid "Alarms"
+msgstr "অ্যালার্ম"
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,week_list:0
+#: selection:calendar.event,week_list:0
+#: selection:calendar.todo,week_list:0
+msgid "Sunday"
+msgstr "রবিবার"
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: field:calendar.attendee,role:0
+msgid "Role"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: view:calendar.event:0
+msgid "Invitation details"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,byday:0
+#: selection:calendar.event,byday:0
+#: selection:calendar.todo,byday:0
+msgid "Fourth"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,show_as:0
+#: field:calendar.todo,show_as:0
+msgid "Show as"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,day:0
+#: selection:base.calendar.set.exrule,select1:0
+#: field:calendar.event,day:0
+#: selection:calendar.event,select1:0
+#: field:calendar.todo,day:0
+#: selection:calendar.todo,select1:0
+msgid "Date of month"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.event,class:0
+#: selection:calendar.todo,class:0
+msgid "Public"
+msgstr "পাবলিক"
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid " "
+msgstr " "
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "March"
+msgstr "মার্চ"
+
+#. module: base_calendar
+#: code:addons/base_calendar/base_calendar.py:414
+#: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:90
+#, python-format
+msgid "Warning !"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,week_list:0
+#: selection:calendar.event,week_list:0
+#: selection:calendar.todo,week_list:0
+msgid "Friday"
+msgstr "শুক্রবার"
+
+#. module: base_calendar
+#: field:calendar.event,allday:0
+#: field:calendar.todo,allday:0
+msgid "All Day"
+msgstr "সারাদিন"
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,select1:0
+#: field:calendar.event,select1:0
+#: field:calendar.todo,select1:0
+msgid "Option"
+msgstr "বিকল্প"
+
+#. module: base_calendar
+#: selection:calendar.attendee,availability:0
+#: selection:calendar.event,show_as:0
+#: selection:calendar.todo,show_as:0
+#: selection:res.users,availability:0
+msgid "Free"
+msgstr "ফ্রী"
+
+#. module: base_calendar
+#: help:calendar.attendee,rsvp:0
+msgid "Indicats whether the favor of a reply is requested"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_ir_attachment
+msgid "ir.attachment"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,delegated_to:0
+msgid "The users that the original request was delegated to"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,ref:0
+msgid "Event Ref"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,we:0
+#: field:calendar.event,we:0
+#: field:calendar.todo,we:0
+msgid "Wed"
+msgstr "বুধ"
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Show time as"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,tu:0
+#: field:calendar.event,tu:0
+#: field:calendar.todo,tu:0
+msgid "Tue"
+msgstr "মঙ্গল"
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,freq:0
+#: selection:calendar.event,rrule_type:0
+#: selection:calendar.todo,rrule_type:0
+msgid "Yearly"
+msgstr "বাৎসরিক"
+
+#. module: base_calendar
+#: selection:calendar.alarm,trigger_related:0
+#: selection:res.alarm,trigger_related:0
+msgid "The event ends"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,byday:0
+#: selection:calendar.event,byday:0
+#: selection:calendar.todo,byday:0
+msgid "Last"
+msgstr "শেষ"
+
+#. module: base_calendar
+#: help:calendar.attendee,state:0
+msgid "Status of the attendee's participation"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.attendee,cutype:0
+msgid "Room"
+msgstr "রুম"
+
+#. module: base_calendar
+#: selection:calendar.alarm,trigger_interval:0
+#: selection:calendar.event,freq:0
+#: selection:calendar.todo,freq:0
+#: selection:res.alarm,trigger_interval:0
+msgid "Days"
+msgstr "দিন"
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: view:calendar.event:0
+msgid "Invitation Detail"
+msgstr ""
+
+#. module: base_calendar
+#: code:addons/base_calendar/base_calendar.py:1355
+#: code:addons/base_calendar/wizard/base_calendar_invite_attendee.py:96
+#: code:addons/base_calendar/wizard/base_calendar_invite_attendee.py:143
+#: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:128
+#: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:136
+#, python-format
+msgid "Error!"
+msgstr "ভুল"
+
+#. module: base_calendar
+#: selection:calendar.attendee,role:0
+msgid "Chair Person"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,action:0
+msgid "Procedure"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.event,state:0
+#: selection:calendar.todo,state:0
+msgid "Cancelled"
+msgstr "বাতিল করা হয়েছে"
+
+#. module: base_calendar
+#: selection:calendar.alarm,trigger_interval:0
+#: selection:res.alarm,trigger_interval:0
+msgid "Minutes"
+msgstr "মিনিট"
+
+#. module: base_calendar
+#: selection:calendar.alarm,action:0
+msgid "Display"
+msgstr "প্রদর্শন"
+
+#. module: base_calendar
+#: view:calendar.event.edit.all:0
+msgid "Edit all Occurrences"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Invitation type"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,freq:0
+msgid "Secondly"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,event_date:0
+#: field:calendar.attendee,event_date:0
+#: view:calendar.event:0
+msgid "Event Date"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: view:calendar.event:0
+msgid "Group By..."
+msgstr "...দিয়ে গ্রুপ করুন"
+
+#. module: base_calendar
+#: help:base_calendar.invite.attendee,email:0
+msgid "Provide external email address who will receive this invitation."
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.module.module,description:base_calendar.module_meta_information
+msgid ""
+"Full featured calendar system that supports:\n"
+" - Calendar of events\n"
+" - Alerts (create requests)\n"
+" - Recurring events\n"
+" - Invitations to people"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,cutype:0
+msgid "Specify the type of Invitation"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.event,freq:0
+#: selection:calendar.todo,freq:0
+msgid "Years"
+msgstr "বছর"
+
+#. module: base_calendar
+#: field:calendar.alarm,event_end_date:0
+#: field:calendar.attendee,event_end_date:0
+msgid "Event End Date"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.attendee,role:0
+msgid "Optional Participation"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,date_deadline:0
+#: field:calendar.todo,date_deadline:0
+msgid "Deadline"
+msgstr "ডেডলাইন"
+
+#. module: base_calendar
+#: code:addons/base_calendar/base_calendar.py:385
+#: code:addons/base_calendar/base_calendar.py:1088
+#: code:addons/base_calendar/base_calendar.py:1090
+#, python-format
+msgid "Warning!"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,active:0
+#: help:calendar.todo,active:0
+msgid ""
+"If the active field is set to true, it will allow you to hide the "
+"event alarm information without removing it."
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.module.module,shortdesc:base_calendar.module_meta_information
+msgid "Basic Calendar Functionality"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,organizer:0
+#: field:calendar.event,organizer_id:0
+#: field:calendar.todo,organizer:0
+#: field:calendar.todo,organizer_id:0
+msgid "Organizer"
+msgstr "আয়োজক"
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: view:calendar.event:0
+#: field:calendar.event,user_id:0
+#: field:calendar.todo,user_id:0
+msgid "Responsible"
+msgstr "দায়িত্বপ্রাপ্ত"
+
+#. module: base_calendar
+#: view:calendar.event:0
+#: model:res.request.link,name:base_calendar.request_link_meeting
+msgid "Event"
+msgstr "ইভেন্ট"
+
+#. module: base_calendar
+#: help:calendar.event,edit_all:0
+#: help:calendar.todo,edit_all:0
+msgid "Edit all Occurrences of recurrent Meeting."
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,trigger_occurs:0
+#: selection:res.alarm,trigger_occurs:0
+msgid "Before"
+msgstr "আগে"
+
+#. module: base_calendar
+#: view:calendar.event:0
+#: selection:calendar.event,state:0
+#: selection:calendar.todo,state:0
+msgid "Confirmed"
+msgstr "নিশ্চিত"
+
+#. module: base_calendar
+#: model:ir.actions.act_window,name:base_calendar.action_calendar_event_edit_all
+msgid "Edit all events"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,attendee_ids:0
+#: field:calendar.event,attendee_ids:0
+#: field:calendar.todo,attendee_ids:0
+msgid "Attendees"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Confirm"
+msgstr "নিশ্চিত"
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_calendar_todo
+msgid "Calendar Task"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,su:0
+#: field:calendar.event,su:0
+#: field:calendar.todo,su:0
+msgid "Sun"
+msgstr "রবি"
+
+#. module: base_calendar
+#: field:calendar.attendee,cutype:0
+msgid "Invite Type"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,partner_id:0
+msgid "Partner related to contact"
+msgstr ""
+
+#. module: base_calendar
+#: view:res.alarm:0
+msgid "Reminder details"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,parent_ids:0
+msgid "Delegrated From"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,select1:0
+#: selection:calendar.event,select1:0
+#: selection:calendar.todo,select1:0
+msgid "Day of month"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+#: field:calendar.event,location:0
+#: field:calendar.event.edit.all,location:0
+#: field:calendar.todo,location:0
+msgid "Location"
+msgstr "স্থান"
+
+#. module: base_calendar
+#: field:base_calendar.invite.attendee,send_mail:0
+msgid "Send mail?"
+msgstr ""
+
+#. module: base_calendar
+#: field:base_calendar.invite.attendee,email:0
+#: selection:calendar.alarm,action:0
+#: field:calendar.attendee,email:0
+msgid "Email"
+msgstr "ই-মেইল"
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Event Detail"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,state:0
+msgid "Run"
+msgstr "চালাও"
+
+#. module: base_calendar
+#: field:calendar.event,exdate:0
+#: field:calendar.todo,exdate:0
+msgid "Exception Date/Times"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.event,class:0
+#: selection:calendar.todo,class:0
+msgid "Confidential"
+msgstr "গুপ্ত"
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,end_date:0
+#: field:calendar.event,end_date:0
+#: field:calendar.todo,end_date:0
+msgid "Repeat Until"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.actions.act_window,help:base_calendar.action_res_alarm_view
+msgid ""
+"Create specific calendar alarms that may be assigned to calendar events or "
+"meetings."
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Visibility"
+msgstr "দৃশ্যমানতা"
+
+#. module: base_calendar
+#: field:calendar.attendee,rsvp:0
+msgid "Required Reply?"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,base_calendar_url:0
+#: field:calendar.todo,base_calendar_url:0
+msgid "Caldav URL"
+msgstr ""
+
+#. module: base_calendar
+#: view:base.calendar.set.exrule:0
+msgid "Select range to Exclude"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,recurrent_uid:0
+#: field:calendar.todo,recurrent_uid:0
+msgid "Recurrent ID"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "July"
+msgstr "জুলাই"
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: selection:calendar.attendee,state:0
+msgid "Accepted"
+msgstr "গৃহীত"
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,th:0
+#: field:calendar.event,th:0
+#: field:calendar.todo,th:0
+msgid "Thu"
+msgstr "বৃহঃ"
+
+#. module: base_calendar
+#: field:calendar.attendee,child_ids:0
+msgid "Delegrated To"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Required Reply"
+msgstr "উত্তর প্রয়োজন"
+
+#. module: base_calendar
+#: selection:calendar.event,end_type:0
+#: selection:calendar.todo,end_type:0
+msgid "Forever"
+msgstr "চিরকাল"
+
+#. module: base_calendar
+#: selection:calendar.attendee,role:0
+msgid "Participation required"
+msgstr "অংশগ্রহণ প্রয়োজন"
+
+#. module: base_calendar
+#: view:base.calendar.set.exrule:0
+msgid "_Cancel"
+msgstr "বাতিল (_C)"
+
+#. module: base_calendar
+#: field:calendar.event,create_date:0
+#: field:calendar.todo,create_date:0
+msgid "Created"
+msgstr "তৈরী হয়েছে"
+
+#. module: base_calendar
+#: selection:calendar.event,class:0
+#: selection:calendar.todo,class:0
+msgid "Private"
+msgstr "ব্যক্তিগত"
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,freq:0
+#: selection:calendar.event,rrule_type:0
+#: selection:calendar.todo,rrule_type:0
+msgid "Daily"
+msgstr "দৈনিক"
+
+#. module: base_calendar
+#: code:addons/base_calendar/base_calendar.py:385
+#, python-format
+msgid "Can not Duplicate"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,class:0
+#: field:calendar.todo,class:0
+msgid "Mark as"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: field:calendar.attendee,partner_address_id:0
+msgid "Contact"
+msgstr "যোগাযোগ"
+
+#. module: base_calendar
+#: help:calendar.event,rrule_type:0
+#: help:calendar.todo,rrule_type:0
+msgid "Let the event automatically repeat at that interval"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: view:calendar.event:0
+msgid "Delegate"
+msgstr ""
+
+#. module: base_calendar
+#: field:base_calendar.invite.attendee,partner_id:0
+#: view:calendar.attendee:0
+#: field:calendar.attendee,partner_id:0
+msgid "Partner"
+msgstr ""
+
+#. module: base_calendar
+#: view:base_calendar.invite.attendee:0
+#: selection:base_calendar.invite.attendee,type:0
+msgid "Partner Contacts"
+msgstr ""
+
+#. module: base_calendar
+#: view:base.calendar.set.exrule:0
+msgid "_Ok"
+msgstr "ঠিক আছে(_O)"
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,byday:0
+#: selection:calendar.event,byday:0
+#: selection:calendar.todo,byday:0
+msgid "First"
+msgstr "প্রথম"
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Privacy"
+msgstr "প্রাইভেসি"
+
+#. module: base_calendar
+#: field:calendar.event,vtimezone:0
+#: field:calendar.todo,vtimezone:0
+msgid "Timezone"
+msgstr "টাইমজোন"
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Subject"
+msgstr "বিষয়"
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "September"
+msgstr "সেপ্টেম্বর"
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "December"
+msgstr ""
+
+#. module: base_calendar
+#: help:base_calendar.invite.attendee,send_mail:0
+msgid "Check this if you want to send an Email to Invited Person"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Availability"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event.edit.all:0
+msgid "_Save"
+msgstr "সংরক্ষণ (_S)"
+
+#. module: base_calendar
+#: selection:calendar.attendee,cutype:0
+msgid "Individual"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,count:0
+#: help:calendar.todo,count:0
+msgid "Repeat x times"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,user_id:0
+msgid "Owner"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Delegation Info"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+#: field:calendar.event.edit.all,date:0
+msgid "Start Date"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,cn:0
+msgid "Common name"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: selection:calendar.attendee,state:0
+msgid "Declined"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "My Role"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "My Events"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: view:calendar.event:0
+msgid "Decline"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.event,freq:0
+#: selection:calendar.todo,freq:0
+msgid "Weeks"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.attendee,cutype:0
+msgid "Group"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,edit_all:0
+#: field:calendar.todo,edit_all:0
+msgid "Edit All"
+msgstr ""
+
+#. module: base_calendar
+#: field:base_calendar.invite.attendee,contact_ids:0
+msgid "Contacts"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_res_alarm
+msgid "Basic Alarm Information"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,fr:0
+#: field:calendar.event,fr:0
+#: field:calendar.todo,fr:0
+msgid "Fri"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,trigger_interval:0
+#: selection:calendar.event,freq:0
+#: selection:calendar.todo,freq:0
+#: selection:res.alarm,trigger_interval:0
+msgid "Hours"
+msgstr ""
+
+#. module: base_calendar
+#: code:addons/base_calendar/base_calendar.py:1090
+#, python-format
+msgid "Count can not be Negative"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,member:0
+msgid "Member"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,location:0
+#: help:calendar.todo,location:0
+msgid "Location of Event"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,rrule:0
+#: field:calendar.todo,rrule:0
+msgid "Recurrent Rule"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,attach:0
+msgid "Attachment"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Invitation From"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "End of recurrency"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+#: field:calendar.event.edit.all,alarm_id:0
+msgid "Reminder"
+msgstr ""
+
+#. module: base_calendar
+#: view:base.calendar.set.exrule:0
+#: model:ir.model,name:base_calendar.model_base_calendar_set_exrule
+msgid "Set Exrule"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+#: model:ir.actions.act_window,name:base_calendar.action_view_event
+#: model:ir.ui.menu,name:base_calendar.menu_events
+msgid "Events"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.actions.act_window,name:base_calendar.action_view_calendar_invite_attendee_wizard
+#: model:ir.model,name:base_calendar.model_base_calendar_invite_attendee
+msgid "Invite Attendees"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,email:0
+msgid "Email of Invited Person"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,repeat:0
+#: field:calendar.event,count:0
+#: field:calendar.todo,count:0
+#: field:res.alarm,repeat:0
+msgid "Repeat"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,dir:0
+msgid ""
+"Reference to the URIthat points to the directory information corresponding "
+"to the attendee."
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "August"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,week_list:0
+#: selection:calendar.event,week_list:0
+#: selection:calendar.todo,week_list:0
+msgid "Monday"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,byday:0
+#: selection:calendar.event,byday:0
+#: selection:calendar.todo,byday:0
+msgid "Third"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "June"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,alarm_id:0
+msgid "Basic Alarm"
+msgstr ""
+
+#. module: base_calendar
+#: view:base.calendar.set.exrule:0
+#: view:calendar.event:0
+msgid "The"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: field:calendar.attendee,delegated_from:0
+msgid "Delegated From"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+#: field:calendar.event,date:0
+msgid "Date"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "November"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,member:0
+msgid "Indicate the groups that the attendee belongs to"
+msgstr ""
+
+#. module: base_calendar
+#: view:base_calendar.invite.attendee:0
+msgid "Data"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,mo:0
+#: field:calendar.event,mo:0
+#: field:calendar.todo,mo:0
+msgid "Mon"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,count:0
+msgid "Count"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,freq:0
+#: selection:calendar.event,freq:0
+#: selection:calendar.todo,freq:0
+msgid "No Repeat"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "October"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: view:calendar.event:0
+msgid "Uncertain"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,language:0
+msgid "Language"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,trigger_occurs:0
+#: field:res.alarm,trigger_occurs:0
+msgid "Triggers"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "January"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,trigger_related:0
+#: field:res.alarm,trigger_related:0
+msgid "Related to"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,interval:0
+#: field:calendar.alarm,trigger_interval:0
+#: field:res.alarm,trigger_interval:0
+msgid "Interval"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,week_list:0
+#: selection:calendar.event,week_list:0
+#: selection:calendar.todo,week_list:0
+msgid "Wednesday"
+msgstr ""
+
+#. module: base_calendar
+#: code:addons/base_calendar/base_calendar.py:1088
+#, python-format
+msgid "Interval can not be Negative"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,name:0
+#: view:calendar.event:0
+msgid "Summary"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,active:0
+#: field:calendar.event,active:0
+#: field:calendar.todo,active:0
+#: field:res.alarm,active:0
+msgid "Active"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Choose day in the month where repeat the meeting"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,action:0
+msgid "Action"
+msgstr ""
+
+#. module: base_calendar
+#: help:base_calendar.invite.attendee,type:0
+msgid "Select whom you want to Invite"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.alarm,duration:0
+#: help:res.alarm,duration:0
+msgid ""
+"Duration' and 'Repeat' are both optional, but if one occurs, so MUST the "
+"other"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_calendar_event_edit_all
+msgid "Calendar Edit all event"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,role:0
+msgid "Participation role for the calendar user"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: field:calendar.attendee,delegated_to:0
+msgid "Delegated To"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.alarm,action:0
+msgid "Defines the action to be invoked when an alarm is triggered"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.event,end_type:0
+#: selection:calendar.todo,end_type:0
+msgid "End date"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Search Events"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Recurrency Option"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,freq:0
+#: selection:calendar.event,rrule_type:0
+#: selection:calendar.todo,rrule_type:0
+msgid "Weekly"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.alarm,active:0
+#: help:res.alarm,active:0
+msgid ""
+"If the active field is set to true, it will allow you to hide the event "
+"alarm information without removing it."
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,recurrent_id:0
+#: field:calendar.todo,recurrent_id:0
+msgid "Recurrent ID date"
+msgstr ""
+
+#. module: base_calendar
+#: sql_constraint:res.users:0
+msgid "You can not have two users with the same login !"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,state:0
+#: view:calendar.attendee:0
+#: field:calendar.attendee,state:0
+#: view:calendar.event:0
+#: field:calendar.event,state:0
+#: field:calendar.todo,state:0
+msgid "State"
+msgstr ""
+
+#. module: base_calendar
+#: view:res.alarm:0
+msgid "Reminder Details"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "To Review"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,freq:0
+#: field:calendar.event,freq:0
+#: field:calendar.todo,freq:0
+msgid "Frequency"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,state:0
+msgid "Done"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,interval:0
+#: help:calendar.todo,interval:0
+msgid "Repeat every (Days/Week/Month/Year)"
+msgstr ""
+
+#. module: base_calendar
+#: view:base_calendar.invite.attendee:0
+#: field:base_calendar.invite.attendee,user_ids:0
+msgid "Users"
+msgstr ""
+
+#. module: base_calendar
+#: view:base.calendar.set.exrule:0
+msgid "of"
+msgstr ""
+
+#. module: base_calendar
+#: view:base_calendar.invite.attendee:0
+#: view:calendar.event:0
+#: view:calendar.event.edit.all:0
+msgid "Cancel"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_res_users
+msgid "res.users"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,week_list:0
+#: selection:calendar.event,week_list:0
+#: selection:calendar.todo,week_list:0
+msgid "Tuesday"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.alarm,description:0
+msgid ""
+"Provides a more complete description of the "
+"calendar component, than that provided by the "
+"\"SUMMARY\" property"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Responsible User"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.attendee,availability:0
+#: selection:calendar.event,show_as:0
+#: selection:calendar.todo,show_as:0
+#: selection:res.users,availability:0
+msgid "Busy"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_calendar_event
+msgid "Calendar Event"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.attendee,state:0
+#: selection:calendar.event,state:0
+#: selection:calendar.todo,state:0
+msgid "Tentative"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,interval:0
+#: field:calendar.todo,interval:0
+msgid "Repeat every"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.event,end_type:0
+#: selection:calendar.todo,end_type:0
+msgid "Fix amout of times"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,recurrency:0
+#: field:calendar.todo,recurrency:0
+msgid "Recurrent"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,rrule_type:0
+#: field:calendar.todo,rrule_type:0
+msgid "Recurrency"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.actions.act_window,name:base_calendar.action_view_attendee_form
+#: model:ir.ui.menu,name:base_calendar.menu_attendee_invitations
+msgid "Event Invitations"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,week_list:0
+#: selection:calendar.event,week_list:0
+#: selection:calendar.todo,week_list:0
+msgid "Thursday"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,exrule:0
+#: field:calendar.todo,exrule:0
+msgid "Exception Rule"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,language:0
+msgid ""
+"To specify the language for text values in aproperty or property parameter."
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Details"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,exrule:0
+#: help:calendar.todo,exrule:0
+msgid ""
+"Defines a rule or repeating pattern of time to exclude from the recurring "
+"rule."
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,month_list:0
+#: field:calendar.event,month_list:0
+#: field:calendar.todo,month_list:0
+msgid "Month"
+msgstr ""
+
+#. module: base_calendar
+#: view:base_calendar.invite.attendee:0
+#: view:calendar.event:0
+msgid "Invite People"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,rrule:0
+#: help:calendar.todo,rrule:0
+msgid ""
+"Defines a rule or repeating pattern for recurring events\n"
+"e.g.: Every other month on the last Sunday of the month for 10 occurrences: "
+" FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,dir:0
+msgid "URI Reference"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,description:0
+#: view:calendar.event:0
+#: field:calendar.event,description:0
+#: field:calendar.event,name:0
+#: field:calendar.todo,description:0
+#: field:calendar.todo,name:0
+msgid "Description"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "May"
+msgstr ""
+
+#. module: base_calendar
+#: field:base_calendar.invite.attendee,type:0
+#: view:calendar.attendee:0
+msgid "Type"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Search Invitations"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,trigger_occurs:0
+#: selection:res.alarm,trigger_occurs:0
+msgid "After"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,state:0
+msgid "Stop"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_ir_values
+msgid "ir.values"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_ir_model
+msgid "Objects"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: selection:calendar.attendee,state:0
+msgid "Delegated"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,sa:0
+#: field:calendar.event,sa:0
+#: field:calendar.todo,sa:0
+msgid "Sat"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Choose day where repeat the meeting"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,freq:0
+msgid "Minutely"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.attendee,sent_by:0
+msgid "Specify the user that is acting on behalf of the calendar user"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+#: field:calendar.event.edit.all,date_deadline:0
+msgid "End Date"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "February"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.event,freq:0
+#: selection:calendar.todo,freq:0
+msgid "Months"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.attendee,cutype:0
+msgid "Resource"
+msgstr ""
+
+#. module: base_calendar
+#: field:res.alarm,name:0
+msgid "Name"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_calendar_alarm
+msgid "Event alarm information"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.alarm,name:0
+msgid ""
+"Contains the text to be used as the message subject for "
+"email or contains the text to be used for display"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,alarm_id:0
+#: field:calendar.event,base_calendar_alarm_id:0
+#: field:calendar.todo,alarm_id:0
+#: field:calendar.todo,base_calendar_alarm_id:0
+msgid "Alarm"
+msgstr ""
+
+#. module: base_calendar
+#: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:90
+#, python-format
+msgid "Please Apply Recurrency before applying Exception Rule."
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,sent_by_uid:0
+msgid "Sent By User"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,month_list:0
+#: selection:calendar.event,month_list:0
+#: selection:calendar.todo,month_list:0
+msgid "April"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.event:0
+msgid "Recurrency period"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,week_list:0
+#: field:calendar.event,week_list:0
+#: field:calendar.todo,week_list:0
+msgid "Weekday"
+msgstr ""
+
+#. module: base_calendar
+#: field:base.calendar.set.exrule,byday:0
+#: field:calendar.event,byday:0
+#: field:calendar.todo,byday:0
+msgid "By day"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,model_id:0
+msgid "Model"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.alarm,action:0
+msgid "Audio"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,id:0
+#: field:calendar.todo,id:0
+msgid "ID"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.attendee,role:0
+msgid "For information Purpose"
+msgstr ""
+
+#. module: base_calendar
+#: view:base_calendar.invite.attendee:0
+msgid "Invite"
+msgstr ""
+
+#. module: base_calendar
+#: model:ir.model,name:base_calendar.model_calendar_attendee
+msgid "Attendee information"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,res_id:0
+msgid "Resource ID"
+msgstr ""
+
+#. module: base_calendar
+#: selection:calendar.attendee,state:0
+msgid "Needs Action"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,sent_by:0
+msgid "Sent By"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,sequence:0
+#: field:calendar.todo,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.event,alarm_id:0
+#: help:calendar.todo,alarm_id:0
+msgid "Set an alarm at this time, before the event occurs"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base_calendar.invite.attendee,type:0
+msgid "Internal User"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+#: view:calendar.event:0
+msgid "Accept"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,week_list:0
+#: selection:calendar.event,week_list:0
+#: selection:calendar.todo,week_list:0
+msgid "Saturday"
+msgstr ""
+
+#. module: base_calendar
+#: view:calendar.attendee:0
+msgid "Invitation To"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,byday:0
+#: selection:calendar.event,byday:0
+#: selection:calendar.todo,byday:0
+msgid "Second"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.attendee,availability:0
+#: field:res.users,availability:0
+msgid "Free/Busy"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.event,end_type:0
+#: field:calendar.todo,end_type:0
+msgid "Way to end reccurency"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,duration:0
+#: field:calendar.alarm,trigger_duration:0
+#: field:calendar.event,duration:0
+#: field:calendar.todo,date:0
+#: field:calendar.todo,duration:0
+#: field:res.alarm,duration:0
+#: field:res.alarm,trigger_duration:0
+msgid "Duration"
+msgstr ""
+
+#. module: base_calendar
+#: selection:base_calendar.invite.attendee,type:0
+msgid "External Email"
+msgstr ""
+
+#. module: base_calendar
+#: field:calendar.alarm,trigger_date:0
+msgid "Trigger Date"
+msgstr ""
+
+#. module: base_calendar
+#: help:calendar.alarm,attach:0
+msgid ""
+"* Points to a sound resource, which is rendered when the "
+"alarm is triggered for audio,\n"
+" * File which is intended to be sent as message "
+"attachments for email,\n"
+" * Points to a procedure resource, which is invoked when "
+" the alarm is triggered for procedure."
+msgstr ""
+
+#. module: base_calendar
+#: selection:base.calendar.set.exrule,byday:0
+#: selection:calendar.event,byday:0
+#: selection:calendar.todo,byday:0
+msgid "Fifth"
+msgstr ""
diff --git a/addons/base_crypt/__init__.py b/addons/base_crypt/__init__.py
index a8b9a6b0740..921c536b575 100644
--- a/addons/base_crypt/__init__.py
+++ b/addons/base_crypt/__init__.py
@@ -21,3 +21,5 @@
from service import security
import crypt
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_crypt/__openerp__.py b/addons/base_crypt/__openerp__.py
index 025f7db0704..23e29420036 100644
--- a/addons/base_crypt/__openerp__.py
+++ b/addons/base_crypt/__openerp__.py
@@ -62,3 +62,5 @@ will disable LDAP authentication completely if installed at the same time.
"installable": True,
"certificate" : "00721290471310299725",
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_crypt/i18n/oc.po b/addons/base_crypt/i18n/oc.po
new file mode 100644
index 00000000000..ef234e97cb7
--- /dev/null
+++ b/addons/base_crypt/i18n/oc.po
@@ -0,0 +1,73 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:14+0000\n"
+"PO-Revision-Date: 2011-11-20 09:17+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: base_crypt
+#: sql_constraint:res.users:0
+msgid "You can not have two users with the same login !"
+msgstr "Podètz pas aver dos utilizaires amb lo meteis identificant !"
+
+#. module: base_crypt
+#: model:ir.model,name:base_crypt.model_res_users
+msgid "res.users"
+msgstr "res.users"
+
+#. module: base_crypt
+#: constraint:res.users:0
+msgid "The chosen company is not in the allowed companies for this user"
+msgstr ""
+"La societat causida fa pas partida de las societats autorizadas per aqueste "
+"utilizaire"
+
+#. module: base_crypt
+#: code:addons/base_crypt/crypt.py:132
+#, python-format
+msgid "Please specify the password !"
+msgstr "Entratz un senhal"
+
+#. module: base_crypt
+#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
+msgid "Base - Password Encryption"
+msgstr "Basa - Chifratge del senhal"
+
+#. module: base_crypt
+#: code:addons/base_crypt/crypt.py:132
+#, python-format
+msgid "Error"
+msgstr "Error"
+
+#. module: base_crypt
+#: model:ir.module.module,description:base_crypt.module_meta_information
+msgid ""
+"This module replaces the cleartext password in the database with a password "
+"hash,\n"
+"preventing anyone from reading the original password.\n"
+"For your existing user base, the removal of the cleartext passwords occurs "
+"the first time\n"
+"a user logs into the database, after installing base_crypt.\n"
+"After installing this module it won't be possible to recover a forgotten "
+"password for your\n"
+"users, the only solution is for an admin to set a new password.\n"
+"\n"
+"Note: installing this module does not mean you can ignore basic security "
+"measures,\n"
+"as the password is still transmitted unencrypted on the network (by the "
+"client),\n"
+"unless you are using a secure protocol such as XML-RPCS.\n"
+" "
+msgstr ""
diff --git a/addons/base_module_doc_rst/__init__.py b/addons/base_module_doc_rst/__init__.py
index f306de84dba..87582ff4c7c 100644
--- a/addons/base_module_doc_rst/__init__.py
+++ b/addons/base_module_doc_rst/__init__.py
@@ -21,3 +21,5 @@
import base_module_doc_rst
import wizard
import report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_module_doc_rst/__openerp__.py b/addons/base_module_doc_rst/__openerp__.py
index 41425f77749..22a3b39028b 100644
--- a/addons/base_module_doc_rst/__openerp__.py
+++ b/addons/base_module_doc_rst/__openerp__.py
@@ -42,3 +42,5 @@ This module generates the Technical Guides of selected modules in Restructured T
'images': ['images/base_module_doc_rst1.jpeg'],
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_module_doc_rst/report/report_proximity_graph.py b/addons/base_module_doc_rst/report/report_proximity_graph.py
index d14d709f501..b17d4bb517f 100644
--- a/addons/base_module_doc_rst/report/report_proximity_graph.py
+++ b/addons/base_module_doc_rst/report/report_proximity_graph.py
@@ -78,4 +78,5 @@ class report_graph(report.interface.report_int):
pdf_string = self.get_proximity_graph(cr, uid, data['id'])
return (pdf_string, 'pdf')
-report_graph('report.proximity.graph', 'ir.module.module')
\ No newline at end of file
+report_graph('report.proximity.graph', 'ir.module.module')
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_module_doc_rst/wizard/__init__.py b/addons/base_module_doc_rst/wizard/__init__.py
index 6f6e62e8767..c6614aacbc1 100644
--- a/addons/base_module_doc_rst/wizard/__init__.py
+++ b/addons/base_module_doc_rst/wizard/__init__.py
@@ -22,3 +22,5 @@
import wizard_tech_guide_rst
import generate_relation_graph
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_module_doc_rst/wizard/wizard_tech_guide_rst.py b/addons/base_module_doc_rst/wizard/wizard_tech_guide_rst.py
index b7a5d6da397..bb02d7c33d2 100644
--- a/addons/base_module_doc_rst/wizard/wizard_tech_guide_rst.py
+++ b/addons/base_module_doc_rst/wizard/wizard_tech_guide_rst.py
@@ -507,3 +507,5 @@ class wizard_tech_guide_rst(wizard.interface):
wizard_tech_guide_rst('tech.guide.rst')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py
index b31065ce37e..401cf88b418 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py
@@ -109,3 +109,5 @@ if __name__<>"package" and __name__=="__main__":
elif __name__=="package":
g_ImplementationHelper.addImplementation( About, "org.openoffice.openerp.report.about", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
index 4dbb28a30c0..c65ba32e6bf 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/AddAttachment.py
@@ -275,3 +275,5 @@ if __name__<>"package" and __name__=="__main__":
AddAttachment(None)
elif __name__=="package":
g_ImplementationHelper.addImplementation( AddAttachment, "org.openoffice.openerp.report.addattachment", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
index 0b68ab10b01..cdc5c7553b1 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Change.py
@@ -137,3 +137,5 @@ if __name__<>"package" and __name__=="__main__":
elif __name__=="package":
g_ImplementationHelper.addImplementation( Change, "org.openoffice.openerp.report.change", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py
index 59b7d32b529..bb80c3ecd61 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertBracesToField.py
@@ -283,3 +283,5 @@ if __name__<>"package":
else:
g_ImplementationHelper.addImplementation( ConvertBracesToField, "org.openoffice.openerp.report.convertBF", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py
index d804405c990..892061c56b4 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py
@@ -83,3 +83,5 @@ if __name__<>"package":
else:
g_ImplementationHelper.addImplementation( ConvertFieldsToBraces, "org.openoffice.openerp.report.convertFB", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
index e2720c1e803..dd00f1719e1 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
@@ -130,3 +130,5 @@ if __name__<>"package" and __name__=="__main__":
ExportToRML(None)
elif __name__=="package":
g_ImplementationHelper.addImplementation( ExportToRML, "org.openoffice.openerp.report.exporttorml", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
index 074a3bd020e..ecdf13454dc 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
@@ -113,3 +113,5 @@ if __name__<>"package" and __name__=="__main__":
elif __name__=="package":
g_ImplementationHelper.addImplementation( Expression, "org.openoffice.openerp.report.expression", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
index cfe65d61022..92044f78fe1 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
@@ -289,3 +289,5 @@ if __name__<>"package" and __name__=="__main__":
elif __name__=="package":
g_ImplementationHelper.addImplementation( Fields, "org.openoffice.openerp.report.fields", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
index 012c6f896a2..85059d7712c 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
@@ -53,3 +53,5 @@ class LoginTest:
if not loginstatus:
Change(None)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
index 138513475bb..2ccd8358c97 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ModifyExistingReport.py
@@ -211,3 +211,5 @@ if __name__<>"package" and __name__=="__main__":
elif __name__=="package":
g_ImplementationHelper.addImplementation( ModifyExistingReport, "org.openoffice.openerp.report.modifyreport", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py
index 0e4a18c3b10..6022e44df7a 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py
@@ -117,3 +117,5 @@ elif __name__=="package":
NewReport,
"org.openoffice.openerp.report.opennewreport",
("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
index d8458be027d..0eab6d1710c 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py
@@ -298,3 +298,5 @@ if __name__<>"package" and __name__=="__main__":
elif __name__=="package":
g_ImplementationHelper = unohelper.ImplementationHelper()
g_ImplementationHelper.addImplementation( RepeatIn, "org.openoffice.openerp.report.repeatln", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
index 896f3cfcac2..3a6d799f8a5 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/SendToServer.py
@@ -239,3 +239,5 @@ if __name__<>"package" and __name__=="__main__":
SendtoServer(None)
elif __name__=="package":
g_ImplementationHelper.addImplementation( SendtoServer, "org.openoffice.openerp.report.sendtoserver", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
index 245cd1dc7ce..9b69e4a5c15 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ServerParameter.py
@@ -172,3 +172,5 @@ if __name__<>"package" and __name__=="__main__":
elif __name__=="package":
g_ImplementationHelper.addImplementation( ServerParameter, "org.openoffice.openerp.report.serverparam", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
index 54343d02d7f..73146f1b68a 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/Translation.py
@@ -272,3 +272,5 @@ if __name__<>"package" and __name__=="__main__":
elif __name__=="package":
g_ImplementationHelper.addImplementation( AddLang, "org.openoffice.openerp.report.langtag", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py
index d2192cd5ddd..0ccd1c9d011 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py
@@ -59,3 +59,5 @@ import ConvertBracesToField
import ConvertFieldsToBraces
import ExportToRML
import SendtoServer
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py
index acafd5f549e..4740c61b178 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/compile_all.py
@@ -47,3 +47,5 @@
import compileall
compileall.compile_dir('package')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/__init__.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/__init__.py
index 2a732da8226..a60ae586303 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/__init__.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/__init__.py
@@ -26,3 +26,5 @@ import gui
import logreport
import rpc
import tiny_socket
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py
index 56a83159e4a..8511bb8343d 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/actions.py
@@ -109,3 +109,5 @@ class TextListenerProcAdapter( unohelper.Base, XTextListener ):
apply( self.oProcToCall, (oTextEvent,) + self.tParams )
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py
index a6cfe9215a3..c0a3e5b5d63 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/error.py
@@ -58,3 +58,5 @@ class ErrorDialog:
def btnOkOrCancel_clicked( self, oActionEvent ):
self.win.endExecute()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py
index db1f15b1fc5..29f1cd87e46 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py
@@ -262,3 +262,5 @@ def GetAFileName():
return sPath
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py
index 79f2ae370de..975aa387193 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py
@@ -820,3 +820,5 @@ class DBModalDialog:
"""
self.oDialogControl.endExecute()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py
index dfcc78374c9..2aab8596862 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py
@@ -46,3 +46,5 @@ class Logger(object):
def shutdown(self):
logging.shutdown()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py
index f211c6309f4..f7c7f636485 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py
@@ -202,3 +202,5 @@ class NETRPCGateway(RPCGateway):
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
index 415e4b3c91e..30a2079433a 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
@@ -91,3 +91,5 @@ class mysocket:
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py
index 8c9a8c9a1a8..ef22a3a0d51 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py
@@ -38,3 +38,5 @@ def write_data_to_file( filename, data ):
fp.write( data )
fp.close()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
index fa7874cff45..fc3d6672b79 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py
@@ -136,3 +136,5 @@ if __name__<>"package":
else:
g_ImplementationHelper.addImplementation( modify, "org.openoffice.openerp.report.modify", ("com.sun.star.task.Job",),)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/test/test_fields.py b/addons/base_report_designer/plugin/openerp_report_designer/test/test_fields.py
index 8afd773b3fb..8954aa8d7a8 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/test/test_fields.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/test/test_fields.py
@@ -30,3 +30,5 @@ print
print 'Field selection for a repeatIn', '='*40
get('account.invoice', level=0, ending=['one2many','many2many'], recur=['many2one'])
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_report_designer/wizard/base_report_designer_modify.py b/addons/base_report_designer/wizard/base_report_designer_modify.py
index d0790cdc0ad..03d1ac19d7e 100644
--- a/addons/base_report_designer/wizard/base_report_designer_modify.py
+++ b/addons/base_report_designer/wizard/base_report_designer_modify.py
@@ -148,3 +148,5 @@ class base_report_rml_save(osv.osv_memory):
}
base_report_rml_save()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_setup/base_setup.py b/addons/base_setup/base_setup.py
index d2155e5b01e..ecb9b5bf3c4 100644
--- a/addons/base_setup/base_setup.py
+++ b/addons/base_setup/base_setup.py
@@ -310,10 +310,7 @@ class base_setup_installer(osv.osv_memory):
cr.commit()
self.pool = pooler.restart_pool(cr.dbname, update_module=True)[1]
- if 'html' in context:
- return {'type' : 'ir.actions.reload'}
- else:
- return {'type' : 'ir.actions.act_window_close'}
+ return self.pool.get('res.config').next(cr, uid, [], context=context)
#Migrate data from another application Conf wiz
diff --git a/addons/base_setup/base_setup_views.xml b/addons/base_setup/base_setup_views.xml
index 165e1c6d12a..35d0c647892 100644
--- a/addons/base_setup/base_setup_views.xml
+++ b/addons/base_setup/base_setup_views.xml
@@ -139,7 +139,7 @@
- Specify Your Terminology for Customers
+ Use another word to say "Customer"ir.actions.act_windowbase.setup.terminologyform
diff --git a/addons/base_setup/i18n/ar.po b/addons/base_setup/i18n/ar.po
index 0e658ca1d41..5dc55269b8b 100644
--- a/addons/base_setup/i18n/ar.po
+++ b/addons/base_setup/i18n/ar.po
@@ -7,24 +7,24 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
-"PO-Revision-Date: 2011-11-07 12:48+0000\n"
-"Last-Translator: OpenERP Administrators \n"
+"PO-Revision-Date: 2011-11-14 11:20+0000\n"
+"Last-Translator: kifcaliph \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-08 05:40+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-15 05:06+0000\n"
+"X-Generator: Launchpad (build 14291)\n"
#. module: base_setup
#: field:base.setup.company,city:0
msgid "City"
-msgstr ""
+msgstr "المدينة"
#. module: base_setup
#: view:base.setup.installer:0
msgid "Install"
-msgstr ""
+msgstr "تثبيت"
#. module: base_setup
#: field:base.setup.installer,account_voucher:0
@@ -34,12 +34,12 @@ msgstr "الفواتير"
#. module: base_setup
#: field:base.setup.installer,hr:0
msgid "Human Resources"
-msgstr ""
+msgstr "الموارد البشرية"
#. module: base_setup
#: field:base.setup.company,email:0
msgid "E-mail"
-msgstr ""
+msgstr "البريد الإلكتروني"
#. module: base_setup
#: field:base.setup.company,account_no:0
@@ -54,19 +54,19 @@ msgstr "أدوات إضافية"
#. module: base_setup
#: field:base.setup.company,rml_footer1:0
msgid "Report Footer 1"
-msgstr ""
+msgstr "تذييل تقرير 1"
#. module: base_setup
#: help:base.setup.installer,mrp:0
msgid ""
"Helps you manage your manufacturing processes and generate reports on those "
"processes."
-msgstr ""
+msgstr "يساعدك على إدارة عمليات التصنيع وإصدار تقارير عن هذه العمليات."
#. module: base_setup
#: help:base.setup.installer,marketing:0
msgid "Helps you manage your marketing campaigns step by step."
-msgstr ""
+msgstr "يساعدك على إدارة حملاتك التسويقية خطوة بخطوة."
#. module: base_setup
#: view:base.setup.config:0
@@ -81,7 +81,7 @@ msgstr "نقاط البيع"
#. module: base_setup
#: field:base.setup.installer,association:0
msgid "Associations"
-msgstr ""
+msgstr "الجمعيات"
#. module: base_setup
#: help:base.setup.installer,account_accountant:0
@@ -89,6 +89,8 @@ msgid ""
"Helps you handle your accounting needs, if you are not an accountant, we "
"suggest you to install only the Invoicing "
msgstr ""
+"يساعدك على التعامل مع احتياجاتك المحاسبية. إذا لم تكن محاسباً، نقترح تثبيت "
+"\"الفواتير\" فقط "
#. module: base_setup
#: code:addons/base_setup/__init__.py:50
@@ -100,33 +102,33 @@ msgstr "تمت إضافة المستخدمين التالين: \n"
#: field:base.setup.company,progress:0
#: field:base.setup.installer,progress:0
msgid "Configuration Progress"
-msgstr ""
+msgstr "تقدم الإعدادات"
#. module: base_setup
#: field:base.setup.company,rml_footer2:0
msgid "Report Footer 2"
-msgstr ""
+msgstr "تذييل تقرير 2"
#. module: base_setup
#: field:base.setup.company,currency:0
#: model:ir.model,name:base_setup.model_res_currency
msgid "Currency"
-msgstr ""
+msgstr "العملة"
#. module: base_setup
#: field:base.setup.company,state_id:0
msgid "Fed. State"
-msgstr ""
+msgstr "المحافظة / الولاية"
#. module: base_setup
#: field:base.setup.installer,marketing:0
msgid "Marketing"
-msgstr ""
+msgstr "التسويق"
#. module: base_setup
#: field:base.setup.company,company_id:0
msgid "Company"
-msgstr ""
+msgstr "الشركة"
#. module: base_setup
#: field:base.setup.installer,sale:0
@@ -139,13 +141,15 @@ msgid ""
"Lets you install various interesting but non-essential tools like Survey, "
"Lunch and Ideas box."
msgstr ""
+"يمكّنك من تثبيت عدد من الأدوات المفيدة ولكن غير الضرورية، مثل الاستبانات "
+"والوجبات وصندوق الأفكار."
#. module: base_setup
#: view:base.setup.config:0
msgid ""
"You can start configuring the system or connect directly to the database as "
"an administrator."
-msgstr ""
+msgstr "يمكنك الشروع في إعداد النظام أو استخدام النظام مباشرة كمدير."
#. module: base_setup
#: field:base.setup.installer,report_designer:0
@@ -155,12 +159,12 @@ msgstr "تقارير متقدمة"
#. module: base_setup
#: field:base.setup.company,phone:0
msgid "Phone"
-msgstr ""
+msgstr "هاتف"
#. module: base_setup
#: view:base.setup.company:0
msgid "res_config_contents"
-msgstr ""
+msgstr "res_config_contents"
#. module: base_setup
#: view:base.setup.company:0
@@ -168,16 +172,18 @@ msgid ""
"Your company information will be used to personalize documents issued with "
"OpenERP such as invoices, sales orders and much more."
msgstr ""
+"سيتمّ استخدام معلومات شركتك لتخصيص المستندات التي يصدرها OpenERP مثل "
+"الفواتير وأوامر المبيعات وغير ذلك الكثير."
#. module: base_setup
#: view:base.setup.installer:0
msgid "title"
-msgstr ""
+msgstr "العنوان"
#. module: base_setup
#: field:base.setup.installer,knowledge:0
msgid "Knowledge Management"
-msgstr ""
+msgstr "إدارة المعارف"
#. module: base_setup
#: model:ir.module.module,description:base_setup.module_meta_information
@@ -197,6 +203,19 @@ msgid ""
" footer, the account chart to install and the language.\n"
" "
msgstr ""
+"\n"
+" هذا البرنامج يشمل إعدادات النظام ليساعد المستخدم\n"
+" لإعداد النظام أثناء إنشاءه قاعدة بيانات جديدة.\n"
+"\n"
+" سيسمح لك بإختيار من قائمة معرفة لتنصيب:\n"
+" * الحد الأدني للنظام\n"
+" * برامج المحاسبة فقط\n"
+" * برامج القطاع الخدمي\n"
+" * برامج القطاع التصنيعي\n"
+"\n"
+" بالإضافة إلي مساعدتك علي تحديد نوع شركتك، اسمها\n"
+" و تعريف نوع الدليل المحاسبي و اللغة.\n"
+" "
#. module: base_setup
#: help:base.setup.installer,product_expiry:0
@@ -204,6 +223,8 @@ msgid ""
"Installs a preselected set of OpenERP applications which will help you "
"manage your industry."
msgstr ""
+"يقوم بتثبيت مجموعة من تطبيقات OpenERP مختارة مسبقاً تساعدك على إدارة نوع "
+"الصناعة الخاص بك."
#. module: base_setup
#: help:base.setup.installer,project:0
@@ -211,16 +232,17 @@ msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
+"يساعدك على إدارة مشاريعك ومهامك عن طريق متابعتهم وإصدار الخطط وما إلى ذلك."
#. module: base_setup
#: field:base.setup.company,name:0
msgid "Company Name"
-msgstr ""
+msgstr "اسم الشركة"
#. module: base_setup
#: view:base.setup.config:0
msgid "Skip Configuration Wizards"
-msgstr ""
+msgstr "تجاوز معالجات الإعدادات"
#. module: base_setup
#: help:base.setup.installer,hr:0
@@ -228,6 +250,8 @@ msgid ""
"Helps you manage your human resources by encoding your employees structure, "
"generating work sheets, tracking attendance and more."
msgstr ""
+"يساعدك على إدارة مواردك البشرية عن طريق فهم هيكل الموظفين وإصدار أوراق العمل "
+"ومتابعة الحضور وغير ذلك."
#. module: base_setup
#: help:base.setup.installer,account_voucher:0
@@ -235,11 +259,13 @@ msgid ""
"Allows you to create your invoices and track the payments. It is an easier "
"version of the accounting module for managers who are not accountants."
msgstr ""
+"يمكّنك من إصدار الفواتير و متابعة المدفوعات. يعدّ نسخة مبسطة من "
+"\"المحاسبة\" مناسبة للمدراء غير المحاسِبين."
#. module: base_setup
#: model:ir.model,name:base_setup.model_base_setup_company
msgid "base.setup.company"
-msgstr ""
+msgstr "base.setup.company"
#. module: base_setup
#: help:base.setup.installer,purchase:0
@@ -247,6 +273,8 @@ msgid ""
"Helps you manage your purchase-related processes such as requests for "
"quotations, supplier invoices, etc..."
msgstr ""
+"يساعدك على إدارة العمليات المتعلقة بالشراء مثل طلبات التسعير وفواتير "
+"الموردين وما إلى ذلك."
#. module: base_setup
#: help:base.setup.company,rml_footer2:0
@@ -255,26 +283,29 @@ msgid ""
"We suggest you to put bank information here:\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
msgstr ""
+"ستظهر هذه الجملة أسفل التقارير.\n"
+"نقترح عليك وضع معلوماتك المصرفية هنا:\n"
+"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
#. module: base_setup
#: field:base.setup.company,street2:0
msgid "Street 2"
-msgstr ""
+msgstr "العنوان 2"
#. module: base_setup
#: model:ir.model,name:base_setup.model_base_setup_installer
msgid "base.setup.installer"
-msgstr ""
+msgstr "base.setup.installer"
#. module: base_setup
#: field:base.setup.company,country_id:0
msgid "Country"
-msgstr ""
+msgstr "الدولة"
#. module: base_setup
#: model:ir.actions.act_window,name:base_setup.action_base_setup
msgid "Setup"
-msgstr ""
+msgstr "إعداد"
#. module: base_setup
#: field:base.setup.installer,account_accountant:0
@@ -289,7 +320,7 @@ msgstr ""
#. module: base_setup
#: field:base.setup.company,zip:0
msgid "Zip Code"
-msgstr ""
+msgstr "الرمز البريدي"
#. module: base_setup
#: view:base.setup.config:0
@@ -301,7 +332,7 @@ msgstr "بدء الإعداد"
msgid ""
"Lets you install addons geared towards sharing knowledge with and between "
"your employees."
-msgstr ""
+msgstr "يمكّنك من تثبيت إضافات غرضها نشر ومشاركة المعارف بين موظفيك."
#. module: base_setup
#: view:base.setup.installer:0
@@ -309,6 +340,8 @@ msgid ""
"Select the Applications you want your system to cover. If you are not sure "
"about your exact needs at this stage, you can easily install them later."
msgstr ""
+"اختر التطبيقات الي تريد أن يتضمنها النظام. إذا لم تكن متأكداً من احتياجاتك "
+"بدقة في هذه المرحلة، يمكنك تثبيت أي من التطبيقات بسهولة لاحقاً."
#. module: base_setup
#: view:base.setup.company:0
@@ -319,7 +352,7 @@ msgstr "إعدادات الشركة"
#. module: base_setup
#: field:base.setup.company,logo:0
msgid "Logo"
-msgstr ""
+msgstr "الشعار"
#. module: base_setup
#: help:base.setup.installer,point_of_sale:0
@@ -328,6 +361,8 @@ msgid ""
"simplified payment mode encoding, automatic picking lists generation and "
"more."
msgstr ""
+"يساعدك على تشغيل نقاط البيع بكفاءة عن طريق تسجيل عمليات البيع بسرعة وتوفير "
+"وضع مبسط للدفع وإصدار تلقائي لقوائم الالتقاط وغير ذلك."
#. module: base_setup
#: field:base.setup.installer,purchase:0
@@ -337,7 +372,7 @@ msgstr "إدارة المشتريات"
#. module: base_setup
#: help:base.setup.installer,sale:0
msgid "Helps you handle your quotations, sale orders and invoicing."
-msgstr ""
+msgstr "يساعدك على التعامل مع التسعيرات وأوامر المبيعات والفواتير."
#. module: base_setup
#: field:base.setup.installer,stock:0
@@ -347,7 +382,7 @@ msgstr "إدارة المخازن و المستودعات"
#. module: base_setup
#: field:base.setup.installer,project:0
msgid "Project Management"
-msgstr "إدارة المشروعات"
+msgstr "إدارة المشاريع"
#. module: base_setup
#: field:base.setup.config,installed_users:0
@@ -357,7 +392,7 @@ msgstr "المستخدمون المعرّفون"
#. module: base_setup
#: view:base.setup.config:0
msgid "New Database"
-msgstr ""
+msgstr "قاعدة بيانات جديدة"
#. module: base_setup
#: field:base.setup.installer,crm:0
@@ -370,6 +405,8 @@ msgid ""
"Installs a preselected set of OpenERP applications selected to help you "
"manage your auctions as well as the business processes around them."
msgstr ""
+"يقوم بتثبيت مجموعة من تطبيقات OpenERP مختارة مسبقاً لتساعدك على إدارة "
+"المزادات والعمليات المتعلقة بها."
#. module: base_setup
#: help:base.setup.company,rml_header1:0
@@ -378,18 +415,21 @@ msgid ""
"We suggest you to put a slogan here:\n"
"\"Open Source Business Solutions\"."
msgstr ""
+"ستظهر هذه الجملة في الزاوية اليمنى في رأس كل تقرير.\n"
+"نقترح عليك وضع شعار هنا:\n"
+"\"حلول أعمال مفتوحة المصدر\"."
#. module: base_setup
#: help:base.setup.installer,report_designer:0
msgid ""
"Lets you install various tools to simplify and enhance OpenERP's report "
"creation."
-msgstr ""
+msgstr "يمكّنك من تثبيت عدة أدوات تسهل وتحسن إنشاء التقارير."
#. module: base_setup
#: field:base.setup.company,rml_header1:0
msgid "Report Header"
-msgstr ""
+msgstr "رأس التقرير"
#. module: base_setup
#: view:base.setup.config:0
@@ -401,7 +441,7 @@ msgstr "معلومات عن قاعدة البيانات الجديدة"
#: field:base.setup.config,config_logo:0
#: field:base.setup.installer,config_logo:0
msgid "Image"
-msgstr ""
+msgstr "صورة"
#. module: base_setup
#: field:base.setup.installer,product_expiry:0
@@ -411,7 +451,7 @@ msgstr "الصناعات الغذائية"
#. module: base_setup
#: field:base.setup.installer,mrp:0
msgid "Manufacturing"
-msgstr ""
+msgstr "التصنيع"
#. module: base_setup
#: view:base.setup.company:0
@@ -425,6 +465,9 @@ msgid ""
"We suggest you to write legal sentences here:\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
msgstr ""
+"ستظهر هذه الجملة في أسفل التقارير.\n"
+"نقترح عليك كتابة معلومات قانونية هنا:\n"
+"موقع: http://openerp.com - فاكس: +32.81.73.35.01 - بنك فوتيس: 126-2013269-07"
#. module: base_setup
#: field:base.setup.company,website:0
@@ -434,12 +477,12 @@ msgstr "الموقع الإلكتروني للشركة"
#. module: base_setup
#: view:base.setup.installer:0
msgid "Install Specific Industry Applications"
-msgstr "نصّب تطبيقات صناعات معينة"
+msgstr "ثبّت تطبيقات صناعات معينة"
#. module: base_setup
#: field:base.setup.company,street:0
msgid "Street"
-msgstr ""
+msgstr "العنوان"
#. module: base_setup
#: view:base.setup.company:0
@@ -455,7 +498,7 @@ msgstr "مثال: http://openerp.com"
#: view:base.setup.installer:0
#: model:ir.actions.act_window,name:base_setup.action_base_setup_installer
msgid "Install Applications"
-msgstr "تنصيب التطبيقات"
+msgstr "تثبيت تطبيقات"
#. module: base_setup
#: help:base.setup.installer,crm:0
@@ -464,6 +507,9 @@ msgid ""
"or issues. Can automatically send reminders, escalate requests or trigger "
"business-specific actions based on standard events."
msgstr ""
+"يساعدك على متابعة وإدارة علاقات العملاء مثل الفرص والطلبات والشكاوى. يوفر "
+"إمكانيات تلقائية لإرسال رسائل تذكير، وتصعيد طلبات، وابتداء إجراءات مخصصة "
+"بناء على أحداث قياسية."
#. module: base_setup
#: help:base.setup.installer,stock:0
@@ -471,6 +517,8 @@ msgid ""
"Helps you manage your inventory and main stock operations: delivery orders, "
"receptions, etc."
msgstr ""
+"يساعدك على إدارة العمليات المتعلقة بكميات المخزون مثل أوامر التسليم "
+"والاستلام وما إلى ذلك."
#. module: base_setup
#: model:ir.module.module,shortdesc:base_setup.module_meta_information
@@ -483,11 +531,13 @@ msgid ""
"Installs a preselected set of OpenERP applications which will help you "
"manage your association more efficiently."
msgstr ""
+"يقوم بتثبيت مجموعة من تطبيقات OpenERP مختارة مسبقاً لتساعدك على إدارة جمعيتك "
+"بكفاءة أعلى."
#. module: base_setup
#: model:ir.model,name:base_setup.model_base_setup_config
msgid "base.setup.config"
-msgstr ""
+msgstr "base.setup.config"
#~ msgid "Point of Sales"
#~ msgstr "نقاط البيع"
diff --git a/addons/base_tools/__init__.py b/addons/base_tools/__init__.py
index 50a14119520..4c241b72be9 100644
--- a/addons/base_tools/__init__.py
+++ b/addons/base_tools/__init__.py
@@ -1 +1,3 @@
# Debian packaging removes blank files, so this comment is added.
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_tools/__openerp__.py b/addons/base_tools/__openerp__.py
index ec32805533e..6fff6c3c207 100644
--- a/addons/base_tools/__openerp__.py
+++ b/addons/base_tools/__openerp__.py
@@ -19,3 +19,5 @@ Creates menu link for Tools from where tools like survey, lunch, idea, etc. are
"installable": True,
"certificate" : "00571588675379342237"
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_tools/i18n/oc.po b/addons/base_tools/i18n/oc.po
new file mode 100644
index 00000000000..47c934ff404
--- /dev/null
+++ b/addons/base_tools/i18n/oc.po
@@ -0,0 +1,32 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:14+0000\n"
+"PO-Revision-Date: 2011-11-20 09:19+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: base_tools
+#: model:ir.module.module,shortdesc:base_tools.module_meta_information
+msgid "Common base for tools modules"
+msgstr "Basa comuna pels moduls utilitaris"
+
+#. module: base_tools
+#: model:ir.module.module,description:base_tools.module_meta_information
+msgid ""
+"\n"
+" "
+msgstr ""
+"\n"
+" "
diff --git a/addons/board/board.py b/addons/board/board.py
index 6a87d5b190b..dd3d75e1dca 100644
--- a/addons/board/board.py
+++ b/addons/board/board.py
@@ -56,14 +56,14 @@ class board_board(osv.osv):
#End Loop
arch = """
""" % ('\n'.join(left), '\n'.join(right))
return arch
@@ -134,10 +134,10 @@ class board_board(osv.osv):
res['arch'] = self._arch_preprocessing(cr, user, res['arch'], context=context)
res['toolbar'] = {'print': [], 'action': [], 'relate': []}
return res
-
-
- def _arch_preprocessing(self, cr, user, arch, context=None):
- from lxml import etree
+
+
+ def _arch_preprocessing(self, cr, user, arch, context=None):
+ from lxml import etree
def remove_unauthorized_children(node):
for child in node.iterchildren():
if child.tag=='action' and child.get('invisible'):
@@ -145,17 +145,17 @@ class board_board(osv.osv):
else:
child=remove_unauthorized_children(child)
return node
-
+
def encode(s):
if isinstance(s, unicode):
return s.encode('utf8')
return s
-
- archnode = etree.fromstring(encode(arch))
+
+ archnode = etree.fromstring(encode(arch))
return etree.tostring(remove_unauthorized_children(archnode),pretty_print=True)
-
-
-
+
+
+
_columns = {
'name': fields.char('Dashboard', size=64, required=True),
diff --git a/addons/board/board_data_admin.xml b/addons/board/board_data_admin.xml
index 0a65d816d8f..c43b2cd9602 100644
--- a/addons/board/board_data_admin.xml
+++ b/addons/board/board_data_admin.xml
@@ -158,7 +158,7 @@
-
+
diff --git a/addons/board/board_data_home.xml b/addons/board/board_data_home.xml
index accb112673b..8a0f150d5be 100644
--- a/addons/board/board_data_home.xml
+++ b/addons/board/board_data_home.xml
@@ -44,14 +44,10 @@
form
diff --git a/addons/board/security/ir.model.access.csv b/addons/board/security/ir.model.access.csv
index 8661750bfb8..34bc2169016 100644
--- a/addons/board/security/ir.model.access.csv
+++ b/addons/board/security/ir.model.access.csv
@@ -1,6 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_board_board","board.board","model_board_board","base.group_user",1,1,1,1
-"access_board_board_line","board.board.line","model_board_board_line","base.group_user",1,1,1,1
-"access_res_log_report","res.log.report","model_res_log_report","base.group_user",1,1,1,1
-"access_res_log_report_system","res.log.report system","model_res_log_report",base.group_system,1,0,0,0
-"access_res_log_report_erp_manager","res.log.report erp_manager","model_res_log_report",base.group_erp_manager,1,0,0,0
+"access_board_board all","board.board","model_board_board",,1,0,0,0
+"access_board_board_line all","board.board.line","model_board_board_line",,1,0,0,0
+"access_board_board system","board.board system","model_board_board",base.group_system,1,1,1,1
+"access_board_board_line system","board.board.line system","model_board_board_line",base.group_system,1,1,1,1
+"access_res_log_report all","res.log.report","model_res_log_report",,1,0,0,0
diff --git a/addons/caldav/caldav.py b/addons/caldav/caldav.py
index 2517f88f789..0f0f5ddd762 100644
--- a/addons/caldav/caldav.py
+++ b/addons/caldav/caldav.py
@@ -25,3 +25,5 @@ urlparse.uses_netloc.append('caldav')
urlparse.uses_netloc.append('caldavs')
#EOF
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/caldav/calendar_collection.py b/addons/caldav/calendar_collection.py
index 1258ba5bf18..1abbf573ef0 100644
--- a/addons/caldav/calendar_collection.py
+++ b/addons/caldav/calendar_collection.py
@@ -86,3 +86,5 @@ class calendar_collection(osv.osv):
return self.get_schedule_inbox_URL(cr, uid, ids, context=context)
calendar_collection()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/caldav/orm_utils.py b/addons/caldav/orm_utils.py
index 00521831e0f..b154d54d1aa 100644
--- a/addons/caldav/orm_utils.py
+++ b/addons/caldav/orm_utils.py
@@ -46,3 +46,5 @@ if True: # we need this indentation level ;)
return res[0][0]
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/caldav/wizard/caldav_browse.py b/addons/caldav/wizard/caldav_browse.py
index 5b78c480d07..f4bb8aeaabc 100644
--- a/addons/caldav/wizard/caldav_browse.py
+++ b/addons/caldav/wizard/caldav_browse.py
@@ -275,3 +275,5 @@ class user_preference(osv.osv_memory):
}
user_preference()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/claim_from_delivery/i18n/oc.po b/addons/claim_from_delivery/i18n/oc.po
new file mode 100644
index 00000000000..e7670a75613
--- /dev/null
+++ b/addons/claim_from_delivery/i18n/oc.po
@@ -0,0 +1,33 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:14+0000\n"
+"PO-Revision-Date: 2011-11-20 09:19+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: claim_from_delivery
+#: model:ir.actions.act_window,name:claim_from_delivery.action_claim_from_delivery
+msgid "Claim"
+msgstr "Reclamacion"
+
+#. module: claim_from_delivery
+#: model:ir.module.module,description:claim_from_delivery.module_meta_information
+msgid "Create Claim from delivery order:\n"
+msgstr "Crear una reclamacion sus un bon de liurason :\n"
+
+#. module: claim_from_delivery
+#: model:ir.module.module,shortdesc:claim_from_delivery.module_meta_information
+msgid "Claim from delivery"
+msgstr "Reclamacion sus la liurason"
diff --git a/addons/crm/board_crm_statistical_view.xml b/addons/crm/board_crm_statistical_view.xml
index 607d4497c37..5ea3844e896 100644
--- a/addons/crm/board_crm_statistical_view.xml
+++ b/addons/crm/board_crm_statistical_view.xml
@@ -78,31 +78,22 @@
form
diff --git a/addons/crm/board_crm_view.xml b/addons/crm/board_crm_view.xml
index 069e3025b13..12d24d452cc 100644
--- a/addons/crm/board_crm_view.xml
+++ b/addons/crm/board_crm_view.xml
@@ -116,34 +116,21 @@
form
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 675174d8f10..03cdb31832d 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -155,7 +155,7 @@ class crm_case_categ(osv.osv):
"""Finds id for case object"""
object_id = context and context.get('object_id', False) or False
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
- return ids and ids[0]
+ return ids and ids[0] or False
_defaults = {
'object_id' : _find_object_id
@@ -241,6 +241,8 @@ class crm_base(object):
address = self.pool.get('res.partner.address').browse(cr, uid, add)
data['value'] = {'email_from': address and address.email or False ,
'phone': address and address.phone or False}
+ if 'phone' not in self._columns:
+ del data['value']['phone']
return data
def onchange_partner_id(self, cr, uid, ids, part, email=False):
@@ -576,3 +578,5 @@ class users(osv.osv):
return res
users()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 91c8a453cd6..e74ce00d728 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -42,11 +42,19 @@ class crm_lead(crm_case, osv.osv):
_order = "priority,date_action,id desc"
_inherit = ['mail.thread','res.partner.address']
- def _read_group_stage_ids(self, cr, uid, ids, domain, context=None):
- context = context or {}
+ def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
+ access_rights_uid = access_rights_uid or uid
stage_obj = self.pool.get('crm.case.stage')
- stage_ids = stage_obj.search(cr, uid, ['|', ('id','in',ids), ('case_default','=',1)], context=context)
- return stage_obj.name_get(cr, uid, stage_ids, context=context)
+ order = stage_obj._order
+ if read_group_order == 'stage_id desc':
+ # lame hack to allow reverting search, should just work in the trivial case
+ order = "%s desc" % order
+ stage_ids = stage_obj._search(cr, uid, ['|', ('id','in',ids),('case_default','=',1)], order=order,
+ access_rights_uid=access_rights_uid, context=context)
+ result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
+ # restore order of the search
+ result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
+ return result
_group_by_full = {
'stage_id': _read_group_stage_ids
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 16a90e4e44d..114b7f4410e 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -348,9 +348,9 @@
-
-
-
+
+
+
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 3817e269241..32fbe65c337 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -72,6 +72,17 @@
+
+
+
+
+
-
-
-
-
-
- Leads Analysiscrm.lead.reportform
- {'search_default_lead': 1, "search_default_user":1, "search_default_this_month":1, 'group_by_no_leaf':1, 'group_by':[]}
+ {'search_default_year': 1,'search_default_lead': 1, "search_default_user":1, "search_default_this_month":1, 'group_by_no_leaf':1, 'group_by':[]}tree,graph[]Leads Analysis allows you to check different CRM related information. Check for treatment delays, number of responses given and emails sent. You can sort out your leads analysis by different groups to get accurate grained analysis.
@@ -243,7 +242,7 @@
Opportunities Analysiscrm.lead.reportform
- {"search_default_opportunity":1,"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}
+ {"search_default_year":1,"search_default_opportunity":1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}tree,graphOpportunities Analysis gives you an instant access to your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to do the periodic review with the teams of the sales pipeline.
diff --git a/addons/crm/report/crm_phonecall_report.py b/addons/crm/report/crm_phonecall_report.py
index f68bea03880..ef3bcccdc9a 100644
--- a/addons/crm/report/crm_phonecall_report.py
+++ b/addons/crm/report/crm_phonecall_report.py
@@ -99,3 +99,5 @@ class crm_phonecall_report(osv.osv):
crm_phonecall c
)""")
crm_phonecall_report()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index 2f40ba371b9..e171388d08f 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -52,15 +52,14 @@
-
-
-
+
-
-
@@ -135,7 +134,7 @@
crm.phonecall.reportformtree,graph
- {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
+ {"search_default_year":1,"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}From this report, you can analyse the performance of your sales team, based on their phone calls. You can group or filter the information according to several criteria and drill down the information, by adding more groups in the report.
diff --git a/addons/crm/wizard/crm_add_note.py b/addons/crm/wizard/crm_add_note.py
index 478f051fe58..6bd84bda21d 100644
--- a/addons/crm/wizard/crm_add_note.py
+++ b/addons/crm/wizard/crm_add_note.py
@@ -49,3 +49,5 @@ class crm_add_note(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
crm_add_note()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_phonecall_to_opportunity.py b/addons/crm/wizard/crm_phonecall_to_opportunity.py
index 549afa0559b..ffab1867ebb 100644
--- a/addons/crm/wizard/crm_phonecall_to_opportunity.py
+++ b/addons/crm/wizard/crm_phonecall_to_opportunity.py
@@ -127,3 +127,5 @@ class crm_phonecall2opportunity(osv.osv_memory):
return res
crm_phonecall2opportunity()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_caldav/i18n/oc.po b/addons/crm_caldav/i18n/oc.po
new file mode 100644
index 00000000000..58d92403c46
--- /dev/null
+++ b/addons/crm_caldav/i18n/oc.po
@@ -0,0 +1,50 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:15+0000\n"
+"PO-Revision-Date: 2011-11-20 09:20+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: crm_caldav
+#: model:ir.actions.act_window,name:crm_caldav.action_caldav_browse
+msgid "Caldav Browse"
+msgstr "Navigar dins CalDav"
+
+#. module: crm_caldav
+#: model:ir.model,name:crm_caldav.model_crm_meeting
+msgid "Meeting"
+msgstr "Rendètz-vos"
+
+#. module: crm_caldav
+#: model:ir.module.module,shortdesc:crm_caldav.module_meta_information
+msgid "Extended Module to Add CalDav feature on Meeting"
+msgstr "Modul espandit per apondre la foncionalitat CalDav a las acampadas"
+
+#. module: crm_caldav
+#: model:ir.module.module,description:crm_caldav.module_meta_information
+msgid ""
+"\n"
+" New Features in Meeting:\n"
+" * Share meeting with other calendar clients like sunbird\n"
+msgstr ""
+"\n"
+" Foncionalitats novèlas per las acampadas :\n"
+" * Partiment d'acampadas amb d'autres clients de calendièrs coma "
+"sunbird\n"
+
+#. module: crm_caldav
+#: model:ir.ui.menu,name:crm_caldav.menu_caldav_browse
+msgid "Synchronyze this calendar"
+msgstr "Sincronizar aqueste calendièr"
diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py
index 9700a5a24b2..b5cd2009698 100644
--- a/addons/crm_claim/crm_claim.py
+++ b/addons/crm_claim/crm_claim.py
@@ -105,8 +105,7 @@ class crm_claim(crm.crm_case, osv.osv):
if not part:
return {'value': {'partner_address_id': False,
'email_from': False,
- 'partner_phone': False,
- 'partner_mobile': False
+ 'partner_phone': False
}}
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
data = {'partner_address_id': addr['contact']}
@@ -121,7 +120,7 @@ class crm_claim(crm.crm_case, osv.osv):
if not add:
return {'value': {'email_from': False}}
address = self.pool.get('res.partner.address').browse(cr, uid, add)
- return {'value': {'email_from': address.email, 'partner_phone': address.phone, 'partner_mobile': address.mobile}}
+ return {'value': {'email_from': address.email, 'partner_phone': address.phone}}
def case_open(self, cr, uid, ids, *args):
"""Opens Claim"""
diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py
index 07ba7460dec..37c5bb8ccee 100644
--- a/addons/crm_fundraising/crm_fundraising.py
+++ b/addons/crm_fundraising/crm_fundraising.py
@@ -112,3 +112,5 @@ class crm_fundraising(crm.crm_case, osv.osv):
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/__init__.py b/addons/crm_partner_assign/__init__.py
index 3bb196d3193..8d4bf993aff 100644
--- a/addons/crm_partner_assign/__init__.py
+++ b/addons/crm_partner_assign/__init__.py
@@ -22,3 +22,5 @@
import partner_geo_assign
import wizard
import report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/__openerp__.py b/addons/crm_partner_assign/__openerp__.py
index 9e72204e31d..a38da8a665a 100644
--- a/addons/crm_partner_assign/__openerp__.py
+++ b/addons/crm_partner_assign/__openerp__.py
@@ -52,3 +52,5 @@ You can also use the geolocalization without using the GPS coordinates.
'certificate': '00503409558942442061',
'images': ['images/partner_geo_localization.jpeg','images/partner_grade.jpeg'],
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/partner_geo_assign.py b/addons/crm_partner_assign/partner_geo_assign.py
index 2b67f80c066..401d09146ae 100644
--- a/addons/crm_partner_assign/partner_geo_assign.py
+++ b/addons/crm_partner_assign/partner_geo_assign.py
@@ -181,3 +181,5 @@ class crm_lead(osv.osv):
return ok
crm_lead()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/report/__init__.py b/addons/crm_partner_assign/report/__init__.py
index a211aeede1e..45065314b25 100644
--- a/addons/crm_partner_assign/report/__init__.py
+++ b/addons/crm_partner_assign/report/__init__.py
@@ -22,3 +22,5 @@
import crm_lead_report
import crm_partner_report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/report/crm_partner_report.py b/addons/crm_partner_assign/report/crm_partner_report.py
index 10e74a34b76..c5afe9b5b82 100644
--- a/addons/crm_partner_assign/report/crm_partner_report.py
+++ b/addons/crm_partner_assign/report/crm_partner_report.py
@@ -61,3 +61,5 @@ class crm_partner_report_assign(osv.osv):
)""")
crm_partner_report_assign()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/wizard/__init__.py b/addons/crm_partner_assign/wizard/__init__.py
index be6c1533722..b6bda71deaf 100644
--- a/addons/crm_partner_assign/wizard/__init__.py
+++ b/addons/crm_partner_assign/wizard/__init__.py
@@ -21,3 +21,5 @@
import crm_forward_to_partner
import crm_merge_opportunity
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/wizard/crm_merge_opportunity.py b/addons/crm_partner_assign/wizard/crm_merge_opportunity.py
index 3993a5df066..3c56fada5a1 100644
--- a/addons/crm_partner_assign/wizard/crm_merge_opportunity.py
+++ b/addons/crm_partner_assign/wizard/crm_merge_opportunity.py
@@ -40,3 +40,5 @@ class crm_merge_opportunity_assign_partner(osv.osv_memory):
return data
crm_merge_opportunity_assign_partner()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_todo/__init__.py b/addons/crm_todo/__init__.py
index 891c71db7ff..528f4b2d439 100644
--- a/addons/crm_todo/__init__.py
+++ b/addons/crm_todo/__init__.py
@@ -20,3 +20,5 @@
##############################################################################
import crm_todo
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_todo/__openerp__.py b/addons/crm_todo/__openerp__.py
index f56e95281fd..3b870153347 100644
--- a/addons/crm_todo/__openerp__.py
+++ b/addons/crm_todo/__openerp__.py
@@ -21,9 +21,10 @@
{
- 'name': 'To Do List for CRM',
+ 'name': 'To Do List',
'version': '1.0',
- 'category': 'Sales',
+ 'category': 'Customer Relationship Management',
+ 'complexity': "easy",
'description': """
Todo list for CRM leads and opportunities.
""",
@@ -35,4 +36,8 @@ Todo list for CRM leads and opportunities.
'demo': [
'crm_todo_demo.xml',
],
+ 'installable': True,
+ 'active': False,
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_todo/crm_todo.py b/addons/crm_todo/crm_todo.py
index ba7445ecef1..b1f6aa05af0 100644
--- a/addons/crm_todo/crm_todo.py
+++ b/addons/crm_todo/crm_todo.py
@@ -35,3 +35,5 @@ class crm_todo(osv.osv):
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_todo/crm_todo_view.xml b/addons/crm_todo/crm_todo_view.xml
index 94d5b1a0cbe..c098f908b8a 100644
--- a/addons/crm_todo/crm_todo_view.xml
+++ b/addons/crm_todo/crm_todo_view.xml
@@ -46,13 +46,15 @@
- Todo List
+ My Tasksproject.task
- {'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, 'search_default_user_id':uid, "search_default_current": 1, "search_default_open": 1, "lead_id": 1}
+ {'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1, "lead_id": 1}
+
+ [('user_id','=',uid)]formtree,form,calendar,gantt,graph,kanban
-
diff --git a/addons/decimal_precision/__init__.py b/addons/decimal_precision/__init__.py
index 708ad26bbe1..ea6c1b4d1ca 100644
--- a/addons/decimal_precision/__init__.py
+++ b/addons/decimal_precision/__init__.py
@@ -22,3 +22,5 @@
#import decimal_precision
from decimal_precision import get_precision
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/decimal_precision/__openerp__.py b/addons/decimal_precision/__openerp__.py
index b8ac25eb379..91e7ce57029 100644
--- a/addons/decimal_precision/__openerp__.py
+++ b/addons/decimal_precision/__openerp__.py
@@ -44,3 +44,5 @@ The decimal precision is configured per company.
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/board_document_view.xml b/addons/document/board_document_view.xml
index 8d80b4a1497..471b2966be5 100644
--- a/addons/document/board_document_view.xml
+++ b/addons/document/board_document_view.xml
@@ -7,30 +7,25 @@
form
@@ -70,26 +65,23 @@
form
diff --git a/addons/document/dict_tools.py b/addons/document/dict_tools.py
index 10d2fdc69f3..e117b429f83 100644
--- a/addons/document/dict_tools.py
+++ b/addons/document/dict_tools.py
@@ -55,3 +55,5 @@ def dict_filter(srcdic, keys, res=None):
return res
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/directory_content.py b/addons/document/directory_content.py
index e690e50d4b4..5b8ec3ddd93 100644
--- a/addons/document/directory_content.py
+++ b/addons/document/directory_content.py
@@ -120,4 +120,5 @@ class document_directory_content(osv.osv):
return pdf
document_directory_content()
-#eof
\ No newline at end of file
+#eof
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/directory_report.py b/addons/document/directory_report.py
index 2726fcd5462..202725a1d3f 100644
--- a/addons/document/directory_report.py
+++ b/addons/document/directory_report.py
@@ -60,3 +60,5 @@ class ir_action_report_xml(osv.osv):
}
ir_action_report_xml()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/document.py b/addons/document/document.py
index 774c4e53a80..1bf177f50e6 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -349,3 +349,5 @@ class document_file(osv.osv):
document_file()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/document_directory.py b/addons/document/document_directory.py
index 2a3f54f53ba..d09d2cc86d5 100644
--- a/addons/document/document_directory.py
+++ b/addons/document/document_directory.py
@@ -307,3 +307,5 @@ class document_directory_node(osv.osv):
'directory_id': fields.many2one('document.directory', 'Document directory', ondelete="set null"),
}
document_directory_node()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py
index b61b7fd65fc..fe757e7876d 100644
--- a/addons/document/document_storage.py
+++ b/addons/document/document_storage.py
@@ -786,3 +786,5 @@ document_storage()
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml
index 7564dfc938e..0e00531f5b5 100644
--- a/addons/document/document_view.xml
+++ b/addons/document/document_view.xml
@@ -372,7 +372,6 @@
Browse Files
-
diff --git a/addons/document/nodes.py b/addons/document/nodes.py
index 0c4194847c1..ee89f3d4c6c 100644
--- a/addons/document/nodes.py
+++ b/addons/document/nodes.py
@@ -1557,4 +1557,5 @@ class nodefd_static(StringIO, node_descriptor):
cr.close()
StringIO.close(self)
-#eof
\ No newline at end of file
+#eof
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/report/__init__.py b/addons/document/report/__init__.py
index bfdeacdaae8..f5b827f04b0 100644
--- a/addons/document/report/__init__.py
+++ b/addons/document/report/__init__.py
@@ -18,4 +18,6 @@
# along with this program. If not, see .
#
##############################################################################
-import document_report
\ No newline at end of file
+import document_report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/std_index.py b/addons/document/std_index.py
index 4f939aab4df..fe42cfb1795 100644
--- a/addons/document/std_index.py
+++ b/addons/document/std_index.py
@@ -209,3 +209,5 @@ cntIndex.register(OpenDoc())
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/test_cindex.py b/addons/document/test_cindex.py
index 05101a7a491..a257c2c43a5 100755
--- a/addons/document/test_cindex.py
+++ b/addons/document/test_cindex.py
@@ -51,3 +51,5 @@ for fname in args:
print "Keyboard interrupt"
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/wizard/__init__.py b/addons/document/wizard/__init__.py
index b143b583426..c4decc58fba 100644
--- a/addons/document/wizard/__init__.py
+++ b/addons/document/wizard/__init__.py
@@ -19,3 +19,5 @@
#
##############################################################################
import document_configuration
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document/wizard/document_configuration.py b/addons/document/wizard/document_configuration.py
index 97eda4e2d62..6a69e638b4e 100644
--- a/addons/document/wizard/document_configuration.py
+++ b/addons/document/wizard/document_configuration.py
@@ -110,3 +110,5 @@ class document_configuration(osv.osv_memory):
'ressource_tree': 1
})
document_configuration()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_ftp/i18n/ar.po b/addons/document_ftp/i18n/ar.po
new file mode 100644
index 00000000000..d0483dce57c
--- /dev/null
+++ b/addons/document_ftp/i18n/ar.po
@@ -0,0 +1,135 @@
+# Arabic translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:15+0000\n"
+"PO-Revision-Date: 2011-11-18 07:10+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Arabic \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-19 05:13+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: document_ftp
+#: model:ir.model,name:document_ftp.model_document_ftp_configuration
+msgid "Auto Directory Configuration"
+msgstr ""
+
+#. module: document_ftp
+#: view:document.ftp.configuration:0
+msgid ""
+"Indicate the network address on which your OpenERP server should be "
+"reachable for end-users. This depends on your network topology and "
+"configuration, and will only affect the links displayed to the users. The "
+"format is HOST:PORT and the default host (localhost) is only suitable for "
+"access from the server machine itself.."
+msgstr ""
+
+#. module: document_ftp
+#: field:document.ftp.configuration,progress:0
+msgid "Configuration Progress"
+msgstr ""
+
+#. module: document_ftp
+#: model:ir.actions.url,name:document_ftp.action_document_browse
+msgid "Browse Files"
+msgstr ""
+
+#. module: document_ftp
+#: field:document.ftp.configuration,config_logo:0
+msgid "Image"
+msgstr "الصورة"
+
+#. module: document_ftp
+#: field:document.ftp.configuration,host:0
+msgid "Address"
+msgstr "العنوان"
+
+#. module: document_ftp
+#: field:document.ftp.browse,url:0
+msgid "FTP Server"
+msgstr ""
+
+#. module: document_ftp
+#: model:ir.actions.act_window,name:document_ftp.action_config_auto_directory
+msgid "FTP Server Configuration"
+msgstr ""
+
+#. module: document_ftp
+#: model:ir.module.module,description:document_ftp.module_meta_information
+msgid ""
+"This is a support FTP Interface with document management system.\n"
+" With this module you would not only be able to access documents through "
+"OpenERP\n"
+" but you would also be able to connect with them through the file system "
+"using the\n"
+" FTP client.\n"
+msgstr ""
+
+#. module: document_ftp
+#: view:document.ftp.browse:0
+msgid "_Browse"
+msgstr ""
+
+#. module: document_ftp
+#: help:document.ftp.configuration,host:0
+msgid ""
+"Server address or IP and port to which users should connect to for DMS access"
+msgstr ""
+
+#. module: document_ftp
+#: model:ir.ui.menu,name:document_ftp.menu_document_browse
+msgid "Shared Repository (FTP)"
+msgstr ""
+
+#. module: document_ftp
+#: view:document.ftp.browse:0
+msgid "_Cancel"
+msgstr ""
+
+#. module: document_ftp
+#: view:document.ftp.configuration:0
+msgid "Configure FTP Server"
+msgstr ""
+
+#. module: document_ftp
+#: model:ir.module.module,shortdesc:document_ftp.module_meta_information
+msgid "Integrated FTP Server with Document Management System"
+msgstr ""
+
+#. module: document_ftp
+#: view:document.ftp.configuration:0
+msgid "title"
+msgstr ""
+
+#. module: document_ftp
+#: model:ir.model,name:document_ftp.model_document_ftp_browse
+msgid "Document FTP Browse"
+msgstr ""
+
+#. module: document_ftp
+#: view:document.ftp.configuration:0
+msgid "Knowledge Application Configuration"
+msgstr ""
+
+#. module: document_ftp
+#: model:ir.actions.act_window,name:document_ftp.action_ftp_browse
+msgid "Document Browse"
+msgstr ""
+
+#. module: document_ftp
+#: view:document.ftp.browse:0
+msgid "Browse Document"
+msgstr ""
+
+#. module: document_ftp
+#: view:document.ftp.configuration:0
+msgid "res_config_contents"
+msgstr ""
diff --git a/addons/document_ftp/test_easyftp.py b/addons/document_ftp/test_easyftp.py
index 74890b1a333..16bace4b167 100644
--- a/addons/document_ftp/test_easyftp.py
+++ b/addons/document_ftp/test_easyftp.py
@@ -68,3 +68,5 @@ def get_ftp_fulldata(ftp, fname, limit=8192):
return ''.join(data)
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_ftp/wizard/ftp_browse.py b/addons/document_ftp/wizard/ftp_browse.py
index 6e182082aeb..e8f127c3c3b 100644
--- a/addons/document_ftp/wizard/ftp_browse.py
+++ b/addons/document_ftp/wizard/ftp_browse.py
@@ -61,3 +61,5 @@ class document_ftp_browse(osv.osv_memory):
}
document_ftp_browse()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_ftp/wizard/ftp_configuration.py b/addons/document_ftp/wizard/ftp_configuration.py
index 0ae133bb92a..5da2ddf11e8 100644
--- a/addons/document_ftp/wizard/ftp_configuration.py
+++ b/addons/document_ftp/wizard/ftp_configuration.py
@@ -48,3 +48,5 @@ class document_ftp_configuration(osv.osv_memory):
{'url': 'ftp://'+(conf.host or 'localhost:8021')+'/' + cr.dbname+'/'})
document_ftp_configuration()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/__init__.py b/addons/document_webdav/__init__.py
index ac417e18087..7cd1a38fc80 100644
--- a/addons/document_webdav/__init__.py
+++ b/addons/document_webdav/__init__.py
@@ -24,4 +24,5 @@ import webdav_server
import document_webdav
-#eof
\ No newline at end of file
+#eof
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/__openerp__.py b/addons/document_webdav/__openerp__.py
index 5576c17ba64..303f5c70e2c 100644
--- a/addons/document_webdav/__openerp__.py
+++ b/addons/document_webdav/__openerp__.py
@@ -72,3 +72,5 @@ which needs explicit configuration in openerp-server.conf, too.
"certificate" : "001236490750845657973",
'images': ['images/dav_properties.jpeg','images/directories_structure_principals.jpeg'],
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/cache.py b/addons/document_webdav/cache.py
index 7f03aa6da13..95ff9d31f62 100644
--- a/addons/document_webdav/cache.py
+++ b/addons/document_webdav/cache.py
@@ -37,3 +37,5 @@ def memoize(maxsize):
return wrapper
return decorating_function
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py
index c167d90ba42..772b7600f20 100644
--- a/addons/document_webdav/dav_fs.py
+++ b/addons/document_webdav/dav_fs.py
@@ -1023,3 +1023,5 @@ class openerp_dav_handler(dav_interface):
if cr: cr.close()
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/document_webdav.py b/addons/document_webdav/document_webdav.py
index f5fa7b591d8..da463c9eb1b 100644
--- a/addons/document_webdav/document_webdav.py
+++ b/addons/document_webdav/document_webdav.py
@@ -127,4 +127,5 @@ class dav_file_property(osv.osv):
dav_file_property()
-#eof
\ No newline at end of file
+#eof
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/nodes.py b/addons/document_webdav/nodes.py
index 5927eade899..d6ceca458cd 100644
--- a/addons/document_webdav/nodes.py
+++ b/addons/document_webdav/nodes.py
@@ -400,3 +400,5 @@ node_descriptor = nodes.node_descriptor
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/redirect.py b/addons/document_webdav/redirect.py
index 71af3271ab7..7bc0883f9e8 100644
--- a/addons/document_webdav/redirect.py
+++ b/addons/document_webdav/redirect.py
@@ -106,3 +106,5 @@ class RedirectHTTPHandler(HttpLogHandler, FixSendError, HttpOptions, HTTPHandler
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py
index b4317282c6a..3c20cfed5b8 100755
--- a/addons/document_webdav/test_davclient.py
+++ b/addons/document_webdav/test_davclient.py
@@ -704,4 +704,5 @@ class DAVClient(object):
etag = m.getheader('ETag')
return etag or True
-#eof
\ No newline at end of file
+#eof
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/webdav.py b/addons/document_webdav/webdav.py
index 3a68fb04fed..baa394e94a1 100644
--- a/addons/document_webdav/webdav.py
+++ b/addons/document_webdav/webdav.py
@@ -341,3 +341,5 @@ def create_prop(self):
REPORT.create_prop = create_prop
#eof
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/document_webdav/webdav_server.py b/addons/document_webdav/webdav_server.py
index aeff0a23f25..81435a72137 100644
--- a/addons/document_webdav/webdav_server.py
+++ b/addons/document_webdav/webdav_server.py
@@ -649,3 +649,5 @@ init_principals_redirect()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/__init__.py b/addons/edi/__init__.py
new file mode 100644
index 00000000000..b4a80c0f1dd
--- /dev/null
+++ b/addons/edi/__init__.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+import logging
+
+import models
+import edi_service
+from models.edi import EDIMixin, edi_document
+
+# web
+try:
+ import controllers
+except ImportError:
+ logging.getLogger('init.load').warn(
+ """Could not load openerp-web section of EDI, EDI will not behave correctly
+
+To fix, launch openerp-web in embedded mode""")
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/__openerp__.py b/addons/edi/__openerp__.py
new file mode 100644
index 00000000000..4d96780b10c
--- /dev/null
+++ b/addons/edi/__openerp__.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+{
+ 'name': 'Electronic Data Interchange (EDI)',
+ 'version': '1.0',
+ 'category': 'Tools',
+ 'complexity': "easy",
+ 'description': """
+Provides a common EDI platform that other Applications can use
+==============================================================
+
+OpenERP specifies a generic EDI format for exchanging business
+documents between different systems, and provides generic
+mechanisms to import and export them.
+
+More details about OpenERP's EDI format may be found in the
+technical OpenERP documentation at http://doc.openerp.com
+ """,
+ 'author': 'OpenERP SA',
+ 'website': 'http://www.openerp.com',
+ 'depends': ['base', 'email_template'],
+ 'data': [
+ 'security/ir.model.access.csv',
+ ],
+ 'test': [
+ 'test/edi_partner_test.yml',
+ ],
+ 'js': [
+ 'static/src/js/edi.js',
+ ],
+ "css": [
+ "static/src/css/edi.css"
+ ],
+ 'installable': True,
+ 'active': False,
+ 'certificate': '002046536359186',
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/controllers/__init__.py b/addons/edi/controllers/__init__.py
new file mode 100644
index 00000000000..9f828025b8e
--- /dev/null
+++ b/addons/edi/controllers/__init__.py
@@ -0,0 +1,3 @@
+import main
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/controllers/main.py b/addons/edi/controllers/main.py
new file mode 100644
index 00000000000..83c3a1608e9
--- /dev/null
+++ b/addons/edi/controllers/main.py
@@ -0,0 +1,86 @@
+import json
+import textwrap
+
+import simplejson
+import werkzeug.wrappers
+
+import web.common.http as openerpweb
+import web.controllers.main
+
+class EDI(openerpweb.Controller):
+ # http://hostname:8069/edi/view?db=XXXX&token=XXXXXXXXXXX
+ # http://hostname:8069/edi/import_url?url=URIEncodedURL
+ _cp_path = "/edi"
+
+ def template(self, req, mods='web,edi'):
+ self.wc = openerpweb.controllers_path['/web/webclient']
+ d = {}
+ d["js"] = "\n".join(''%i for i in self.wc.manifest_list(req, mods, 'js'))
+ d["css"] = "\n".join(''%i for i in self.wc.manifest_list(req, mods, 'css'))
+ d["modules"] = simplejson.dumps(mods.split(','))
+ return d
+
+ @openerpweb.httprequest
+ def view(self, req, db, token):
+ d = self.template(req)
+ d["init"] = 'new s.edi.EdiView(null,"%s","%s").appendTo($("body"));'%(db,token)
+ r = web.controllers.main.html_template % d
+ return r
+
+ @openerpweb.httprequest
+ def import_url(self, req, url):
+ d = self.template(req)
+ d["init"] = 'new s.edi.EdiImport(null,"%s").appendTo($("body"));'%(url)
+ r = web.controllers.main.html_template % d
+ return r
+
+ @openerpweb.httprequest
+ def download(self, req, db, token):
+ result = req.session.proxy('edi').get_edi_document(db, token)
+ response = werkzeug.wrappers.Response( result, headers=[('Content-Type', 'text/html; charset=utf-8'), ('Content-Length', len(result))])
+ return response
+
+ @openerpweb.httprequest
+ def download_attachment(self, req, db, token):
+ result = req.session.proxy('edi').get_edi_document(db, token)
+ doc = json.loads(result)[0]
+ attachment = doc['__attachments'] and doc['__attachments'][0]
+ if attachment:
+ result = attachment["content"].decode('base64')
+ import email.Utils as utils
+
+ # Encode as per RFC 2231
+ filename_utf8 = attachment['file_name']
+ filename_encoded = "%s=%s" % ('filename*',
+ utils.encode_rfc2231(filename_utf8, 'utf-8'))
+ response = werkzeug.wrappers.Response(result, headers=[('Content-Type', 'application/pdf'),
+ ('Content-Disposition', 'inline; ' + filename_encoded),
+ ('Content-Length', len(result))])
+ return response
+
+ @openerpweb.httprequest
+ def binary(self, req, db, token, field_path="company_address.logo", content_type='image/png'):
+ result = req.session.proxy('edi').get_edi_document(db, token)
+ doc = json.loads(result)[0]
+ for name in field_path.split("."):
+ doc = doc[name]
+ result = doc.decode('base64')
+ response = werkzeug.wrappers.Response(result, headers=[('Content-Type', content_type),
+ ('Content-Length', len(result))])
+ return response
+
+ @openerpweb.jsonrequest
+ def get_edi_document(self, req, db, token):
+ result = req.session.proxy('edi').get_edi_document(db, token)
+ return json.loads(result)
+
+ @openerpweb.jsonrequest
+ def import_edi_url(self, req, url):
+ result = req.session.proxy('edi').import_edi_url(req.session._db, req.session._uid, req.session._password, url)
+ if len(result) == 1:
+ return {"action": web.controllers.main.clean_action(req, result[0][2])}
+ return True
+
+#
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/edi_service.py b/addons/edi/edi_service.py
new file mode 100644
index 00000000000..074720a03e9
--- /dev/null
+++ b/addons/edi/edi_service.py
@@ -0,0 +1,71 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+import logging
+
+import netsvc
+import openerp
+
+_logger = logging.getLogger('edi.service')
+
+class edi(netsvc.ExportService):
+
+ def __init__(self, name="edi"):
+ netsvc.ExportService.__init__(self, name)
+
+ def _edi_dispatch(self, db_name, method_name, *method_args):
+ try:
+ registry = openerp.modules.registry.RegistryManager.get(db_name)
+ assert registry, 'Unknown database %s' % db_name
+ edi_document = registry['edi.document']
+ cr = registry.db.cursor()
+ res = None
+ res = getattr(edi_document, method_name)(cr, *method_args)
+ cr.commit()
+ except Exception:
+ _logger.exception('Failed to execute EDI method %s with args %r', method_name, method_args)
+ raise
+ finally:
+ cr.close()
+ return res
+
+ def exp_get_edi_document(self, db_name, edi_token):
+ return self._edi_dispatch(db_name, 'get_document', 1, edi_token)
+
+ def exp_import_edi_document(self, db_name, uid, passwd, edi_document, context=None):
+ return self._edi_dispatch(db_name, 'import_edi', uid, edi_document, None)
+
+ def exp_import_edi_url(self, db_name, uid, passwd, edi_url, context=None):
+ return self._edi_dispatch(db_name, 'import_edi', uid, None, edi_url)
+
+ def dispatch(self, method, params):
+ if method in ['import_edi_document', 'import_edi_url']:
+ (db, uid, passwd ) = params[0:3]
+ openerp.service.security.check(db, uid, passwd)
+ elif method in ['get_edi_document']:
+ # No security check for these methods
+ pass
+ else:
+ raise KeyError("Method not found: %s" % method)
+ fn = getattr(self, 'exp_'+method)
+ return fn(*params)
+
+edi()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/models/__init__.py b/addons/edi/models/__init__.py
new file mode 100644
index 00000000000..a1e61299334
--- /dev/null
+++ b/addons/edi/models/__init__.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import edi
+import res_partner
+import res_company
+import res_currency
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/models/edi.py b/addons/edi/models/edi.py
new file mode 100644
index 00000000000..b8fc8699ca2
--- /dev/null
+++ b/addons/edi/models/edi.py
@@ -0,0 +1,684 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import base64
+import hashlib
+import json
+import logging
+import re
+import threading
+import time
+import urllib2
+
+import openerp
+import openerp.release as release
+import netsvc
+import pooler
+from osv import osv,fields,orm
+from tools.translate import _
+from tools.safe_eval import safe_eval as eval
+
+EXTERNAL_ID_PATTERN = re.compile(r'^([^.:]+)(?::([^.]+))?\.(\S+)$')
+EDI_VIEW_WEB_URL = '%s/edi/view?debug=1&db=%s&token=%s'
+EDI_PROTOCOL_VERSION = 1 # arbitrary ever-increasing version number
+EDI_GENERATOR = 'OpenERP ' + release.major_version
+EDI_GENERATOR_VERSION = release.version_info
+
+def split_external_id(ext_id):
+ match = EXTERNAL_ID_PATTERN.match(ext_id)
+ assert match, \
+ _("'%s' is an invalid external ID") % (ext_id)
+ return {'module': match.group(1),
+ 'db_uuid': match.group(2),
+ 'id': match.group(3),
+ 'full': match.group(0)}
+
+def safe_unique_id(database_id, model, record_id):
+ """Generate a unique string to represent a (database_uuid,model,record_id) pair
+ without being too long, and with a very low probability of collisions.
+ """
+ msg = "%s-%s-%s-%s" % (time.time(), database_id, model, record_id)
+ digest = hashlib.sha1(msg).digest()
+ # fold the sha1 20 bytes digest to 9 bytes
+ digest = ''.join(chr(ord(x) ^ ord(y)) for (x,y) in zip(digest[:9], digest[9:-2]))
+ # b64-encode the 9-bytes folded digest to a reasonable 12 chars ASCII ID
+ digest = base64.urlsafe_b64encode(digest)
+ return '%s-%s' % (model.replace('.','_'), digest)
+
+def last_update_for(record):
+ """Returns the last update timestamp for the given record,
+ if available, otherwise False
+ """
+ if record._model._log_access:
+ record_log = record.perm_read()[0]
+ return record_log.get('write_date') or record_log.get('create_date') or False
+ return False
+
+_logger = logging.getLogger('edi')
+
+class edi_document(osv.osv):
+ _name = 'edi.document'
+ _description = 'EDI Document'
+ _columns = {
+ 'name': fields.char("EDI token", size = 128, help="Unique identifier for retrieving an EDI document."),
+ 'document': fields.text("Document", help="EDI document content")
+ }
+ _sql_constraints = [
+ ('name_uniq', 'unique (name)', 'EDI Tokens must be unique!')
+ ]
+
+ def new_edi_token(self, cr, uid, record):
+ """Return a new, random unique token to identify this model record,
+ and to be used as token when exporting it as an EDI document.
+
+ :param browse_record record: model record for which a token is needed
+ """
+ db_uuid = self.pool.get('ir.config_parameter').get_param(cr, uid, 'database.uuid')
+ edi_token = hashlib.sha256('%s-%s-%s-%s' % (time.time(), db_uuid, record._name, record.id)).hexdigest()
+ return edi_token
+
+ def serialize(self, edi_documents):
+ """Serialize the given EDI document structures (Python dicts holding EDI data),
+ using JSON serialization.
+
+ :param [dict] edi_documents: list of EDI document structures to serialize
+ :return: UTF-8 encoded string containing the serialized document
+ """
+ serialized_list = json.dumps(edi_documents)
+ return serialized_list
+
+ def generate_edi(self, cr, uid, records, context=None):
+ """Generates a final EDI document containing the EDI serialization
+ of the given records, which should all be instances of a Model
+ that has the :meth:`~.edi` mixin. The document is not saved in the
+ database, this is done by :meth:`~.export_edi`.
+
+ :param list(browse_record) records: records to export as EDI
+ :return: UTF-8 encoded string containing the serialized records
+ """
+ edi_list = []
+ for record in records:
+ record_model_obj = self.pool.get(record._name)
+ edi_list += record_model_obj.edi_export(cr, uid, [record], context=context)
+ return self.serialize(edi_list)
+
+ def get_document(self, cr, uid, edi_token, context=None):
+ """Retrieve the EDI document corresponding to the given edi_token.
+
+ :return: EDI document string
+ :raise: ValueError if requested EDI token does not match any know document
+ """
+ _logger.debug("get_document(%s)", edi_token)
+ edi_ids = self.search(cr, uid, [('name','=', edi_token)], context=context)
+ if not edi_ids:
+ raise ValueError('Invalid EDI token: %s' % edi_token)
+ edi = self.browse(cr, uid, edi_ids[0], context=context)
+ return edi.document
+
+ def load_edi(self, cr, uid, edi_documents, context=None):
+ """Import the given EDI document structures into the system, using
+ :meth:`~.import_edi`.
+
+ :param edi_documents: list of Python dicts containing the deserialized
+ version of EDI documents
+ :return: list of (model, id, action) tuple containing the model and database ID
+ of all records that were imported in the system, plus a suggested
+ action definition dict for displaying each document.
+ """
+ ir_module = self.pool.get('ir.module.module')
+ res = []
+ for edi_document in edi_documents:
+ module = edi_document.get('__import_module') or edi_document.get('__module')
+ assert module, 'a `__module` or `__import_module` attribute is required in each EDI document'
+ if module != 'base' and not ir_module.search(cr, uid, [('name','=',module),('state','=','installed')]):
+ raise osv.except_osv(_('Missing Application'),
+ _("The document you are trying to import requires the OpenERP `%s` application. "
+ "You can install it by connecting as the administrator and opening the configuration assistant.")%(module,))
+ model = edi_document.get('__import_model') or edi_document.get('__model')
+ assert model, 'a `__model` or `__import_model` attribute is required in each EDI document'
+ model_obj = self.pool.get(model)
+ assert model_obj, 'model `%s` cannot be found, despite module `%s` being available - '\
+ 'this EDI document seems invalid or unsupported' % (model,module)
+ record_id = model_obj.edi_import(cr, uid, edi_document, context=context)
+ record_action = model_obj._edi_record_display_action(cr, uid, record_id, context=context)
+ res.append((model, record_id, record_action))
+ return res
+
+ def deserialize(self, edi_documents_string):
+ """Return deserialized version of the given EDI Document string.
+
+ :param str|unicode edi_documents_string: UTF-8 string (or unicode) containing
+ JSON-serialized EDI document(s)
+ :return: Python object representing the EDI document(s) (usually a list of dicts)
+ """
+ return json.loads(edi_documents_string)
+
+ def export_edi(self, cr, uid, records, context=None):
+ """Export the given database records as EDI documents, stores them
+ permanently with a new unique EDI token, for later retrieval via :meth:`~.get_document`,
+ and returns the list of the new corresponding ``ir.edi.document`` records.
+
+ :param records: list of browse_record of any model
+ :return: list of IDs of the new ``ir.edi.document`` entries, in the same
+ order as the provided ``records``.
+ """
+ exported_ids = []
+ for record in records:
+ document = self.generate_edi(cr, uid, [record], context)
+ token = self.new_edi_token(cr, uid, record)
+ self.create(cr, uid, {
+ 'name': token,
+ 'document': document
+ }, context=context)
+ exported_ids.append(token)
+ return exported_ids
+
+ def import_edi(self, cr, uid, edi_document=None, edi_url=None, context=None):
+ """Import a JSON serialized EDI Document string into the system, first retrieving it
+ from the given ``edi_url`` if provided.
+
+ :param str|unicode edi_document: UTF-8 string or unicode containing JSON-serialized
+ EDI Document to import. Must not be provided if
+ ``edi_url`` is given.
+ :param str|unicode edi_url: URL where the EDI document (same format as ``edi_document``)
+ may be retrieved, without authentication.
+ """
+ if edi_url:
+ assert not edi_document, 'edi_document must not be provided if edi_url is given'
+ edi_document = urllib2.urlopen(edi_url).read()
+ assert edi_document, 'EDI Document is empty!'
+ edi_documents = self.deserialize(edi_document)
+ return self.load_edi(cr, uid, edi_documents, context=context)
+
+
+class EDIMixin(object):
+ """Mixin class for Model objects that want be exposed as EDI documents.
+ Classes that inherit from this mixin class should override the
+ ``edi_import()`` and ``edi_export()`` methods to implement their
+ specific behavior, based on the primitives provided by this mixin."""
+
+ def _edi_requires_attributes(self, attributes, edi_document):
+ model_name = edi_document.get('__imported_model') or edi_document.get('__model') or self._name
+ for attribute in attributes:
+ assert edi_document.get(attribute),\
+ 'Attribute `%s` is required in %s EDI documents' % (attribute, model_name)
+
+ # private method, not RPC-exposed as it creates ir.model.data entries as
+ # SUPERUSER based on its parameters
+ def _edi_external_id(self, cr, uid, record, existing_id=None, existing_module=None,
+ context=None):
+ """Generate/Retrieve unique external ID for ``record``.
+ Each EDI record and each relationship attribute in it is identified by a
+ unique external ID, which includes the database's UUID, as a way to
+ refer to any record within any OpenERP instance, without conflict.
+
+ For OpenERP records that have an existing "External ID" (i.e. an entry in
+ ir.model.data), the EDI unique identifier for this record will be made of
+ "%s:%s:%s" % (module, database UUID, ir.model.data ID). The database's
+ UUID MUST NOT contain a colon characters (this is guaranteed by the
+ UUID algorithm).
+
+ For records that have no existing ir.model.data entry, a new one will be
+ created during the EDI export. It is recommended that the generated external ID
+ contains a readable reference to the record model, plus a unique value that
+ hides the database ID. If ``existing_id`` is provided (because it came from
+ an import), it will be used instead of generating a new one.
+ If ``existing_module`` is provided (because it came from
+ an import), it will be used instead of using local values.
+
+ :param browse_record record: any browse_record needing an EDI external ID
+ :param string existing_id: optional existing external ID value, usually coming
+ from a just-imported EDI record, to be used instead
+ of generating a new one
+ :param string existing_module: optional existing module name, usually in the
+ format ``module:db_uuid`` and coming from a
+ just-imported EDI record, to be used instead
+ of local values
+ :return: the full unique External ID to use for record
+ """
+ ir_model_data = self.pool.get('ir.model.data')
+ db_uuid = self.pool.get('ir.config_parameter').get_param(cr, uid, 'database.uuid')
+ ext_id = record.get_external_id()[record.id]
+ if not ext_id:
+ ext_id = existing_id or safe_unique_id(db_uuid, record._name, record.id)
+ # ID is unique cross-db thanks to db_uuid (already included in existing_module)
+ module = existing_module or "%s:%s" % (record._original_module, db_uuid)
+ _logger.debug("%s: Generating new external ID `%s.%s` for %r", self._name,
+ module, ext_id, record)
+ ir_model_data.create(cr, openerp.SUPERUSER_ID,
+ {'name': ext_id,
+ 'model': record._name,
+ 'module': module,
+ 'res_id': record.id})
+ else:
+ module, ext_id = ext_id.split('.')
+ if not ':' in module:
+ # this record was not previously EDI-imported
+ if not module == record._original_module:
+ # this could happen for data records defined in a module that depends
+ # on the module that owns the model, e.g. purchase defines
+ # product.pricelist records.
+ _logger.debug('Mismatching module: expected %s, got %s, for %s',
+ module, record._original_module, record)
+ # ID is unique cross-db thanks to db_uuid
+ module = "%s:%s" % (module, db_uuid)
+
+ return '%s.%s' % (module, ext_id)
+
+ def _edi_record_display_action(self, cr, uid, id, context=None):
+ """Returns an appropriate action definition dict for displaying
+ the record with ID ``rec_id``.
+
+ :param int id: database ID of record to display
+ :return: action definition dict
+ """
+ return {'type': 'ir.actions.act_window',
+ 'view_mode': 'form,tree',
+ 'view_type': 'form',
+ 'res_model': self._name,
+ 'res_id': id}
+
+ def edi_metadata(self, cr, uid, records, context=None):
+ """Return a list containing the boilerplate EDI structures for
+ exporting ``records`` as EDI, including
+ the metadata fields
+
+ The metadata fields always include::
+
+ {
+ '__model': 'some.model', # record model
+ '__module': 'module', # require module
+ '__id': 'module:db-uuid:model.id', # unique global external ID for the record
+ '__last_update': '2011-01-01 10:00:00', # last update date in UTC!
+ '__version': 1, # EDI spec version
+ '__generator' : 'OpenERP', # EDI generator
+ '__generator_version' : [6,1,0], # server version, to check compatibility.
+ '__attachments_':
+ }
+
+ :param list(browse_record) records: records to export
+ :return: list of dicts containing boilerplate EDI metadata for each record,
+ at the corresponding index from ``records``.
+ """
+ data_ids = []
+ ir_attachment = self.pool.get('ir.attachment')
+ results = []
+ for record in records:
+ ext_id = self._edi_external_id(cr, uid, record, context=context)
+ edi_dict = {
+ '__id': ext_id,
+ '__last_update': last_update_for(record),
+ '__model' : record._name,
+ '__module' : record._original_module,
+ '__version': EDI_PROTOCOL_VERSION,
+ '__generator': EDI_GENERATOR,
+ '__generator_version': EDI_GENERATOR_VERSION,
+ }
+ attachment_ids = ir_attachment.search(cr, uid, [('res_model','=', record._name), ('res_id', '=', record.id)])
+ if attachment_ids:
+ attachments = []
+ for attachment in ir_attachment.browse(cr, uid, attachment_ids, context=context):
+ attachments.append({
+ 'name' : attachment.name,
+ 'content': attachment.datas, # already base64 encoded!
+ 'file_name': attachment.datas_fname,
+ })
+ edi_dict.update(__attachments=attachments)
+ results.append(edi_dict)
+ return results
+
+ def edi_m2o(self, cr, uid, record, context=None):
+ """Return a m2o EDI representation for the given record.
+
+ The EDI format for a many2one is::
+
+ ['unique_external_id', 'Document Name']
+ """
+ edi_ext_id = self._edi_external_id(cr, uid, record, context=context)
+ relation_model = record._model
+ name = relation_model.name_get(cr, uid, [record.id], context=context)
+ name = name and name[0][1] or False
+ return [edi_ext_id, name]
+
+ def edi_o2m(self, cr, uid, records, edi_struct=None, context=None):
+ """Return a list representing a O2M EDI relationship containing
+ all the given records, according to the given ``edi_struct``.
+ This is basically the same as exporting all the record using
+ :meth:`~.edi_export` with the given ``edi_struct``, and wrapping
+ the results in a list.
+
+ Example::
+
+ [ # O2M fields would be a list of dicts, with their
+ { '__id': 'module:db-uuid.id', # own __id.
+ '__last_update': 'iso date', # update date
+ 'name': 'some name',
+ #...
+ },
+ # ...
+ ],
+ """
+ result = []
+ for record in records:
+ result += record._model.edi_export(cr, uid, [record], edi_struct=edi_struct, context=context)
+ return result
+
+ def edi_m2m(self, cr, uid, records, context=None):
+ """Return a list representing a M2M EDI relationship directed towards
+ all the given records.
+ This is basically the same as exporting all the record using
+ :meth:`~.edi_m2o` and wrapping the results in a list.
+
+ Example::
+
+ # M2M fields are exported as a list of pairs, like a list of M2O values
+ [
+ ['module:db-uuid.id1', 'Task 01: bla bla'],
+ ['module:db-uuid.id2', 'Task 02: bla bla']
+ ]
+ """
+ return [self.edi_m2o(cr, uid, r, context=context) for r in records]
+
+ def edi_export(self, cr, uid, records, edi_struct=None, context=None):
+ """Returns a list of dicts representing an edi.document containing the
+ records, and matching the given ``edi_struct``, if provided.
+
+ :param edi_struct: if provided, edi_struct should be a dictionary
+ with a skeleton of the fields to export.
+ Basic fields can have any key as value, but o2m
+ values should have a sample skeleton dict as value,
+ to act like a recursive export.
+ For example, for a res.partner record::
+
+ edi_struct: {
+ 'name': True,
+ 'company_id': True,
+ 'address': {
+ 'name': True,
+ 'street': True,
+ }
+ }
+
+ Any field not specified in the edi_struct will not
+ be included in the exported data. Fields with no
+ value (False) will be omitted in the EDI struct.
+ If edi_struct is omitted, no fields will be exported
+ """
+ if edi_struct is None:
+ edi_struct = {}
+ fields_to_export = edi_struct.keys()
+ results = []
+ for record in records:
+ edi_dict = self.edi_metadata(cr, uid, [record], context=context)[0]
+ for field in fields_to_export:
+ column = self._all_columns[field].column
+ value = getattr(record, field)
+ if not value and value not in ('', 0):
+ continue
+ elif column._type == 'many2one':
+ value = self.edi_m2o(cr, uid, value, context=context)
+ elif column._type == 'many2many':
+ value = self.edi_m2m(cr, uid, value, context=context)
+ elif column._type == 'one2many':
+ value = self.edi_o2m(cr, uid, value, edi_struct=edi_struct.get(field, {}), context=context)
+ edi_dict[field] = value
+ results.append(edi_dict)
+ return results
+
+ def edi_export_and_email(self, cr, uid, ids, template_ext_id, context=None):
+ """Export the given records just like :meth:`~.export_edi`, the render the
+ given email template, in order to trigger appropriate notifications.
+ This method is intended to be called as part of business documents'
+ lifecycle, so it silently ignores any error occurring during the process,
+ as this is usually non-critical. To avoid any delay, it is also asynchronous
+ and will spawn a short-lived thread to perform the action.
+
+ :param str template_ext_id: external id of the email.template to use for
+ the mail notifications
+ :return: True
+ """
+ def email_task():
+ db = pooler.get_db(cr.dbname)
+ local_cr = None
+ try:
+ time.sleep(3) # lame workaround to wait for commit of parent transaction
+ # grab a fresh browse_record on local cursor
+ local_cr = db.cursor()
+ web_root_url = self.pool.get('ir.config_parameter').get_param(local_cr, uid, 'web.base.url')
+ if not web_root_url:
+ _logger.warning('Ignoring EDI mail notification, web.base.url not defined in parameters')
+ return
+ mail_tmpl = self._edi_get_object_by_external_id(local_cr, uid, template_ext_id, 'email.template', context=context)
+ if not mail_tmpl:
+ # skip EDI export if the template was not found
+ _logger.warning('Ignoring EDI mail notification, template %s cannot be located', template_ext_id)
+ return
+ for edi_record in self.browse(local_cr, uid, ids, context=context):
+ edi_token = self.pool.get('edi.document').export_edi(local_cr, uid, [edi_record], context = context)[0]
+ edi_context = dict(context, edi_web_url_view=EDI_VIEW_WEB_URL % (web_root_url, local_cr.dbname, edi_token))
+ self.pool.get('email.template').send_mail(local_cr, uid, mail_tmpl.id, edi_record.id,
+ force_send=False, context=edi_context)
+ _logger.info('EDI export successful for %s #%s, email notification sent.', self._name, edi_record.id)
+ except Exception:
+ _logger.warning('Ignoring EDI mail notification, failed to generate it.', exc_info=True)
+ finally:
+ if local_cr:
+ local_cr.commit()
+ local_cr.close()
+
+ threading.Thread(target=email_task, name='EDI ExportAndEmail for %s %r' % (self._name, ids)).start()
+ return True
+
+ def _edi_get_object_by_name(self, cr, uid, name, model_name, context=None):
+ model = self.pool.get(model_name)
+ search_results = model.name_search(cr, uid, name, operator='=', context=context)
+ if len(search_results) == 1:
+ return model.browse(cr, uid, search_results[0][0], context=context)
+ return False
+
+ def _edi_generate_report_attachment(self, cr, uid, record, context=None):
+ """Utility method to generate the first PDF-type report declared for the
+ current model with ``usage`` attribute set to ``default``.
+ This must be called explicitly by models that need it, usually
+ at the beginning of ``edi_export``, before the call to ``super()``."""
+ ir_actions_report = self.pool.get('ir.actions.report.xml')
+ matching_reports = ir_actions_report.search(cr, uid, [('model','=',self._name),
+ ('report_type','=','pdf'),
+ ('usage','=','default')])
+ if matching_reports:
+ report = ir_actions_report.browse(cr, uid, matching_reports[0])
+ report_service = 'report.' + report.report_name
+ service = netsvc.LocalService(report_service)
+ (result, format) = service.create(cr, uid, [record.id], {'model': self._name}, context=context)
+ eval_context = {'time': time, 'object': record}
+ if not report.attachment or not eval(report.attachment, eval_context):
+ # no auto-saving of report as attachment, need to do it manually
+ result = base64.b64encode(result)
+ file_name = record.name_get()[0][1]
+ file_name = re.sub(r'[^a-zA-Z0-9_-]', '_', file_name)
+ file_name += ".pdf"
+ ir_attachment = self.pool.get('ir.attachment').create(cr, uid,
+ {'name': file_name,
+ 'datas': result,
+ 'datas_fname': file_name,
+ 'res_model': self._name,
+ 'res_id': record.id},
+ context=context)
+
+ def _edi_import_attachments(self, cr, uid, record_id, edi_document, context=None):
+ ir_attachment = self.pool.get('ir.attachment')
+ for attachment in edi_document.get('__attachments', []):
+ # check attachment data is non-empty and valid
+ file_data = None
+ try:
+ file_data = base64.b64decode(attachment.get('content'))
+ except TypeError:
+ pass
+ assert file_data, 'Incorrect/Missing attachment file content'
+ assert attachment.get('name'), 'Incorrect/Missing attachment name'
+ assert attachment.get('file_name'), 'Incorrect/Missing attachment file name'
+ assert attachment.get('file_name'), 'Incorrect/Missing attachment file name'
+ ir_attachment.create(cr, uid, {'name': attachment['name'],
+ 'datas_fname': attachment['file_name'],
+ 'res_model': self._name,
+ 'res_id': record_id,
+ # should be pure 7bit ASCII
+ 'datas': str(attachment['content']),
+ }, context=context)
+
+
+ def _edi_get_object_by_external_id(self, cr, uid, external_id, model, context=None):
+ """Returns browse_record representing object identified by the model and external_id,
+ or None if no record was found with this external id.
+
+ :param external_id: fully qualified external id, in the EDI form
+ ``module:db_uuid:identifier``.
+ :param model: model name the record belongs to.
+ """
+ ir_model_data = self.pool.get('ir.model.data')
+ # external_id is expected to have the form: ``module:db_uuid:model.random_name``
+ ext_id_members = split_external_id(external_id)
+ db_uuid = self.pool.get('ir.config_parameter').get_param(cr, uid, 'database.uuid')
+ module = ext_id_members['module']
+ ext_id = ext_id_members['id']
+ modules = []
+ ext_db_uuid = ext_id_members['db_uuid']
+ if ext_db_uuid:
+ modules.append('%s:%s' % (module, ext_id_members['db_uuid']))
+ if ext_db_uuid is None or ext_db_uuid == db_uuid:
+ # local records may also be registered without the db_uuid
+ modules.append(module)
+ data_ids = ir_model_data.search(cr, uid, [('model','=',model),
+ ('name','=',ext_id),
+ ('module','in',modules)])
+ if data_ids:
+ model = self.pool.get(model)
+ data = ir_model_data.browse(cr, uid, data_ids[0], context=context)
+ result = model.browse(cr, uid, data.res_id, context=context)
+ return result
+
+ def edi_import_relation(self, cr, uid, model, value, external_id, context=None):
+ """Imports a M2O/M2M relation EDI specification ``[external_id,value]`` for the
+ given model, returning the corresponding database ID:
+
+ * First, checks if the ``external_id`` is already known, in which case the corresponding
+ database ID is directly returned, without doing anything else;
+ * If the ``external_id`` is unknown, attempts to locate an existing record
+ with the same ``value`` via name_search(). If found, the given external_id will
+ be assigned to this local record (in addition to any existing one)
+ * If previous steps gave no result, create a new record with the given
+ value in the target model, assign it the given external_id, and return
+ the new database ID
+ """
+ _logger.debug("%s: Importing EDI relationship [%r,%r]", model, external_id, value)
+ target = self._edi_get_object_by_external_id(cr, uid, external_id, model, context=context)
+ need_new_ext_id = False
+ if not target:
+ _logger.debug("%s: Importing EDI relationship [%r,%r] - ID not found, trying name_get",
+ self._name, external_id, value)
+ target = self._edi_get_object_by_name(cr, uid, value, model, context=context)
+ need_new_ext_id = True
+ if not target:
+ _logger.debug("%s: Importing EDI relationship [%r,%r] - name not found, creating it!",
+ self._name, external_id, value)
+ # also need_new_ext_id here, but already been set above
+ model = self.pool.get(model)
+ res_id, name = model.name_create(cr, uid, value, context=context)
+ target = model.browse(cr, uid, res_id, context=context)
+ if need_new_ext_id:
+ ext_id_members = split_external_id(external_id)
+ # module name is never used bare when creating ir.model.data entries, in order
+ # to avoid being taken as part of the module's data, and cleanup up at next update
+ module = "%s:%s" % (ext_id_members['module'], ext_id_members['db_uuid'])
+ # create a new ir.model.data entry for this value
+ self._edi_external_id(cr, uid, target, existing_id=ext_id_members['id'], existing_module=module, context=context)
+ return target.id
+
+ def edi_import(self, cr, uid, edi_document, context=None):
+ """Imports a dict representing an edi.document into the system.
+
+ :param dict edi_document: EDI document to import
+ :return: the database ID of the imported record
+ """
+ assert self._name == edi_document.get('__import_model') or \
+ ('__import_model' not in edi_document and self._name == edi_document.get('__model')), \
+ "EDI Document Model and current model do not match: '%s' (EDI) vs '%s' (current)" % \
+ (edi_document['__model'], self._name)
+
+ # First check the record is now already known in the database, in which case it is ignored
+ ext_id_members = split_external_id(edi_document['__id'])
+ existing = self._edi_get_object_by_external_id(cr, uid, ext_id_members['full'], self._name, context=context)
+ if existing:
+ _logger.info("'%s' EDI Document with ID '%s' is already known, skipping import!", self._name, ext_id_members['full'])
+ return existing.id
+
+ record_values = {}
+ o2m_todo = {} # o2m values are processed after their parent already exists
+ for field_name, field_value in edi_document.iteritems():
+ # skip metadata and empty fields
+ if field_name.startswith('__') or field_value is None or field_value is False:
+ continue
+ field_info = self._all_columns.get(field_name)
+ if not field_info:
+ _logger.warning('Ignoring unknown field `%s` when importing `%s` EDI document', field_name, self._name)
+ continue
+ field = field_info.column
+ # skip function/related fields
+ if isinstance(field, fields.function):
+ _logger.warning("Unexpected function field value found in '%s' EDI document: '%s'" % (self._name, field_name))
+ continue
+ relation_model = field._obj
+ if field._type == 'many2one':
+ record_values[field_name] = self.edi_import_relation(cr, uid, relation_model,
+ field_value[1], field_value[0],
+ context=context)
+ elif field._type == 'many2many':
+ record_values[field_name] = [self.edi_import_relation(cr, uid, relation_model, m2m_value[1],
+ m2m_value[0], context=context)
+ for m2m_value in field_value]
+ elif field._type == 'one2many':
+ # must wait until parent report is imported, as the parent relationship
+ # is often required in o2m child records
+ o2m_todo[field_name] = field_value
+ else:
+ record_values[field_name] = field_value
+
+ module_ref = "%s:%s" % (ext_id_members['module'], ext_id_members['db_uuid'])
+ record_id = self.pool.get('ir.model.data')._update(cr, uid, self._name, module_ref, record_values,
+ xml_id=ext_id_members['id'], context=context)
+
+ record_display, = self.name_get(cr, uid, [record_id], context=context)
+
+ # process o2m values, connecting them to their parent on-the-fly
+ for o2m_field, o2m_value in o2m_todo.iteritems():
+ field = self._all_columns[o2m_field].column
+ dest_model = self.pool.get(field._obj)
+ for o2m_line in o2m_value:
+ # link to parent record: expects an (ext_id, name) pair
+ o2m_line[field._fields_id] = (ext_id_members['full'], record_display[1])
+ dest_model.edi_import(cr, uid, o2m_line, context=context)
+
+ # process the attachments, if any
+ self._edi_import_attachments(cr, uid, record_id, edi_document, context=context)
+
+ return record_id
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/edi/models/res_company.py b/addons/edi/models/res_company.py
new file mode 100644
index 00000000000..cf5efe997e0
--- /dev/null
+++ b/addons/edi/models/res_company.py
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import fields,osv
+
+class res_company(osv.osv):
+ """Helper subclass for res.company providing util methods for working with
+ companies in the context of EDI import/export. The res.company object
+ itself is not EDI-exportable"""
+ _inherit = "res.company"
+
+ def edi_export_address(self, cr, uid, company, edi_address_struct=None, context=None):
+ """Returns a dict representation of the address of the company record, suitable for
+ inclusion in an EDI document, and matching the given edi_address_struct if provided.
+ The first found address is returned, in order of preference: invoice, contact, default.
+
+ :param browse_record company: company to export
+ :return: dict containing the address representation for the company record, or
+ an empty dict if no address can be found
+ """
+ res_partner = self.pool.get('res.partner')
+ res_partner_address = self.pool.get('res.partner.address')
+ addresses = res_partner.address_get(cr, uid, [company.partner_id.id], ['default', 'contact', 'invoice'])
+ addr_id = addresses['invoice'] or addresses['contact'] or addresses['default']
+ result = {}
+ if addr_id:
+ address = res_partner_address.browse(cr, uid, addr_id, context=context)
+ result = res_partner_address.edi_export(cr, uid, [address], edi_struct=edi_address_struct, context=context)[0]
+ if company.logo:
+ result['logo'] = company.logo # already base64-encoded
+ if company.paypal_account:
+ result['paypal_account'] = company.paypal_account
+ # bank info: include only bank account supposed to be displayed in document footers
+ res_partner_bank = self.pool.get('res.partner.bank')
+ bank_ids = res_partner_bank.search(cr, uid, [('company_id','=',company.id),('footer','=',True)], context=context)
+ if bank_ids:
+ result['bank_ids'] = res_partner_address.edi_m2m(cr, uid,
+ res_partner_bank.browse(cr, uid, bank_ids, context=context),
+ context=context)
+ return result
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/models/res_currency.py b/addons/edi/models/res_currency.py
new file mode 100644
index 00000000000..0f56bc83f45
--- /dev/null
+++ b/addons/edi/models/res_currency.py
@@ -0,0 +1,66 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import fields,osv
+from edi import EDIMixin
+from openerp import SUPERUSER_ID
+
+RES_CURRENCY_EDI_STRUCT = {
+ #custom: 'code'
+ 'symbol': True,
+ 'rate': True,
+}
+
+class res_currency(osv.osv, EDIMixin):
+ _inherit = "res.currency"
+
+ def edi_export(self, cr, uid, records, edi_struct=None, context=None):
+ edi_struct = dict(edi_struct or RES_CURRENCY_EDI_STRUCT)
+ edi_doc_list = []
+ for currency in records:
+ # Get EDI doc based on struct. The result will also contain all metadata fields and attachments.
+ edi_doc = super(res_currency,self).edi_export(cr, uid, [currency], edi_struct, context)[0]
+ edi_doc.update(code=currency.name)
+ edi_doc_list.append(edi_doc)
+ return edi_doc_list
+
+ def edi_import(self, cr, uid, edi_document, context=None):
+ self._edi_requires_attributes(('code','symbol'), edi_document)
+ external_id = edi_document['__id']
+ existing_currency = self._edi_get_object_by_external_id(cr, uid, external_id, 'res_currency', context=context)
+ if existing_currency:
+ return existing_currency.id
+
+ # find with unique ISO code
+ existing_ids = self.search(cr, uid, [('name','=',edi_document['code'])])
+ if existing_ids:
+ return existing_ids[0]
+
+ # nothing found, create a new one
+ currency_id = self.create(cr, SUPERUSER_ID, {'name': edi_document['code'],
+ 'symbol': edi_document['symbol']}, context=context)
+ rate = edi_document.pop('rate')
+ if rate:
+ self.pool.get('res.currency.rate').create(cr, SUPERUSER_ID, {'currency_id': currency_id,
+ 'rate': rate}, context=context)
+ return currency_id
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/models/res_partner.py b/addons/edi/models/res_partner.py
new file mode 100644
index 00000000000..7c40a5c7354
--- /dev/null
+++ b/addons/edi/models/res_partner.py
@@ -0,0 +1,105 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+import logging
+
+from osv import fields,osv
+from edi import EDIMixin
+from openerp import SUPERUSER_ID
+from tools.translate import _
+
+RES_PARTNER_ADDRESS_EDI_STRUCT = {
+ 'name': True,
+ 'email': True,
+ 'street': True,
+ 'street2': True,
+ 'zip': True,
+ 'city': True,
+ 'country_id': True,
+ 'state_id': True,
+ 'phone': True,
+ 'fax': True,
+ 'mobile': True,
+}
+
+RES_PARTNER_EDI_STRUCT = {
+ 'name': True,
+ 'ref': True,
+ 'lang': True,
+ 'website': True,
+ 'address': RES_PARTNER_ADDRESS_EDI_STRUCT
+}
+
+class res_partner(osv.osv, EDIMixin):
+ _inherit = "res.partner"
+
+ def edi_export(self, cr, uid, records, edi_struct=None, context=None):
+ return super(res_partner,self).edi_export(cr, uid, records,
+ edi_struct or dict(RES_PARTNER_EDI_STRUCT),
+ context=context)
+
+class res_partner_address(osv.osv, EDIMixin):
+ _inherit = "res.partner.address"
+
+ def _get_bank_type(self, cr, uid, context=None):
+ # first option: the "normal" bank type, installed by default
+ res_partner_bank_type = self.pool.get('res.partner.bank.type')
+ try:
+ return self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'bank_normal', context=context).code
+ except ValueError:
+ pass
+
+ # second option: create a new custom type for EDI or use it if already created, as IBAN type is
+ # not always appropriate: we need a free-form bank type for max flexibility (users can correct
+ # data manually after import)
+ code, label = 'edi_generic', 'Generic Bank Type (auto-created for EDI)'
+ bank_code_ids = res_partner_bank_type.search(cr, uid, [('code','=',code)], context=context)
+ if not bank_code_ids:
+ logging.getLogger('edi.res_partner').info('Normal bank account type is missing, creating '
+ 'a generic bank account type for EDI.')
+ self.res_partner_bank_type.create(cr, SUPERUSER_ID, {'name': label,
+ 'code': label})
+ return code
+
+ def edi_export(self, cr, uid, records, edi_struct=None, context=None):
+ return super(res_partner_address,self).edi_export(cr, uid, records,
+ edi_struct or dict(RES_PARTNER_ADDRESS_EDI_STRUCT),
+ context=context)
+
+ def edi_import(self, cr, uid, edi_document, context=None):
+ # handle bank info, if any
+ edi_bank_ids = edi_document.pop('bank_ids', None)
+ address_id = super(res_partner_address,self).edi_import(cr, uid, edi_document, context=context)
+ if edi_bank_ids:
+ address = self.browse(cr, uid, address_id, context=context)
+ import_ctx = dict((context or {}),
+ default_partner_id=address.partner_id.id,
+ default_state=self._get_bank_type(cr, uid, context))
+ for ext_bank_id, bank_name in edi_bank_ids:
+ try:
+ self.edi_import_relation(cr, uid, 'res.partner.bank',
+ bank_name, ext_bank_id, context=import_ctx)
+ except osv.except_osv:
+ # failed to import it, try again with unrestricted default type
+ logging.getLogger('edi.res_partner').warning('Failed to import bank account using'
+ 'bank type: %s, ignoring', import_ctx['default_state'],
+ exc_info=True)
+ return address_id
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/edi/security/ir.model.access.csv b/addons/edi/security/ir.model.access.csv
new file mode 100644
index 00000000000..f1942397ac5
--- /dev/null
+++ b/addons/edi/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_ir_edi_all_read","access_ir_edi_all_read","model_edi_document",,1,0,0,0
+"access_ir_edi_employee_create","access_ir_edi_employee_create","model_edi_document","base.group_user",1,0,1,0
\ No newline at end of file
diff --git a/addons/edi/static/src/css/edi.css b/addons/edi/static/src/css/edi.css
new file mode 100644
index 00000000000..478985ee585
--- /dev/null
+++ b/addons/edi/static/src/css/edi.css
@@ -0,0 +1,220 @@
+/** EDI content **/
+.openerp .company_logo {
+ background-size: 180px 46px;
+}
+.oe_edi_view {
+ width: 65%;
+ vertical-align: top;
+ padding: 0px 25px;
+ border-right: 1px solid #D2CFCF;
+}
+.oe_edi_sidebar_container {
+ width: 35%;
+ padding: 0px 10px;
+ vertical-align: top;
+}
+button.oe_edi_action_print {
+ font-size: 1.5em;
+ margin-left: 35%;
+ margin-bottom: 20px;
+}
+button.oe_edi_action_print img {
+ vertical-align: bottom;
+ width: 32px;
+ height: 32px;
+}
+
+.openerp input.invalid {
+ background-color: #F66 !important;
+ border: 1px solid #D00 !important;
+ color: #000;
+}
+/* following browse-specific hacks need to be separate rules, as browsers are
+ required to ignore rules with unknown selectors. At time of writing, there
+ is no standard way to style HTML5 placeholders */
+.openerp input.invalid:-moz-placeholder {
+ color: #FFF;
+}
+.openerp input.invalid::-webkit-input-placeholder {
+ color: #FFF;
+}
+
+/** EDI Sidebar **/
+.oe_edi_sidebar_title {
+ border-bottom: 1px solid #D2CFCF;
+ font-weight: bold;
+ font-size: 1.3em;
+ min-width: 10em;
+}
+.oe_edi_nested_block, .oe_edi_nested_block_import, .oe_edi_nested_block_pay {
+ margin: 0px 40px;
+ min-width: 10em;
+ display: none; /* made visible by click on parent input/label */
+}
+.oe_edi_right_top .oe_edi_nested_block label {
+ float: left;
+ text-align: right;
+ margin-right: 0.5em;
+ line-height: 180%;
+ font-weight: bold;
+ min-width: 5em;
+}
+.oe_edi_option {
+ padding-left: 5px;
+ line-height: 2em;
+}
+.oe_edi_option:hover {
+ background: #e8e8e8;
+}
+.oe_edi_import_button {
+ margin: 2px 10px;
+ white-space: nowrap;
+}
+.oe_edi_small, .oe_edi_small input {
+ font-size: 90%;
+}
+
+/** Sidebar bottom **/
+.oe_edi_paypal_button {
+ margin: 6px;
+}
+
+
+/** Paperbox, from http://www.sitepoint.com/pure-css3-paper-curl/ **/
+body {
+ background: #EEE; /* contrast with paper */
+}
+.oe_edi_paperbox {
+ position: relative;
+ width: 700px;
+ padding: 30px;
+ padding-bottom: 50px;
+ margin: 20px auto;
+ background-color: #fff;
+ -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);
+}
+.oe_edi_paperbox:before, .oe_edi_paperbox:after {
+ position: absolute;
+ width: 40%;
+ height: 10px;
+ content: ' ';
+ left: 12px;
+ bottom: 15px;
+ background: transparent;
+ -webkit-transform: skew(-5deg) rotate(-5deg);
+ -moz-transform: skew(-5deg) rotate(-5deg);
+ -ms-transform: skew(-5deg) rotate(-5deg);
+ -o-transform: skew(-5deg) rotate(-5deg);
+ transform: skew(-5deg) rotate(-5deg);
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
+ z-index: -1;
+}
+.oe_edi_paperbox:after {
+ left: auto; right: 12px;
+ -webkit-transform: skew(5deg) rotate(5deg);
+ -moz-transform: skew(5deg) rotate(5deg);
+ -ms-transform: skew(5deg) rotate(5deg);
+ -o-transform: skew(5deg) rotate(5deg);
+ transform: skew(5deg) rotate(5deg);
+}
+
+/** Sale Order / Purchase Order Preview **/
+table.oe_edi_data, .oe_edi_doc_title {
+ border-collapse: collapse;
+ clear: both;
+}
+.oe_edi_data th {
+ white-space: nowrap;
+}
+.oe_edi_data .oe_edi_floor {
+ border-bottom: 1px solid black;
+}
+.oe_edi_data .oe_edi_ceiling {
+ border-top: 1px solid black;
+}
+.oe_edi_data .oe_edi_data_row {
+ border-bottom: 1px solid #D2CFCF;
+}
+.oe_edi_data_row td {
+ vertical-align: top;
+}
+.oe_edi_inner_note {
+ font-style: italic;
+ font-size: 95%;
+ padding-left: 10px;
+}
+.oe_edi_shade {
+ background: #e8e8e8;
+}
+.oe_edi_company_name {
+ text-transform: uppercase;
+ font-weight: bold;
+}
+.oe_edi_address_from {
+ float: left;
+}
+.oe_edi_address_to {
+ float: right;
+ margin-top: 25px;
+ margin-bottom: 30px;
+}
+.oe_edi_company_block_title {
+ width: 375px;
+ margin: 0px;
+ padding: 2px 14px;
+ background-color: #252525;
+ border-top-left-radius: 5px 5px;
+ border-top-right-radius: 5px 5px;
+ background-repeat: repeat no-repeat;
+}
+.oe_edi_company_block_title .oe_edi_company_name {
+ margin: 0px;
+ font-size: 1em;
+ color: #FFF;
+}
+.oe_edi_company_block_body {
+ width: 375px;
+ margin: 0px;
+ padding: 5px 14px;
+ line-height: 16px;
+ background-color: rgb(242, 242, 242);
+}
+.oe_edi_company_block_body p {
+ color: #222;
+ margin: 5px 0px;
+}
+.oe_edi_summary_label {
+ float: left;
+}
+.oe_edi_summary_value {
+ float: right;
+}
+
+
+/** Python code highlighting **/
+/* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
+ (http://qbnz.com/highlighter/ and http://geshi.org/) */
+.python .de1, .python .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
+.python {font-family:monospace;}
+.python .imp {font-weight: bold; color: red;}
+.python li, .python .li1 {background: #ffffff; list-style: none;}
+.python .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
+.python .li2 {background: #f8f8f8;}
+.python .kw1 {color: #ff7700;font-weight:bold;}
+.python .kw2 {color: #008000;}
+.python .kw3 {color: #dc143c;}
+.python .kw4 {color: #0000cd;}
+.python .co1 {color: #808080; font-style: italic;}
+.python .coMULTI {color: #808080; font-style: italic;}
+.python .es0 {color: #000099; font-weight: bold;}
+.python .br0 {color: black;}
+.python .sy0 {color: #66cc66;}
+.python .st0 {color: #483d8b;}
+.python .nu0 {color: #ff4500;}
+.python .me1 {color: black;}
+.python span.xtra { display:block; }
+.python ol { padding: 0px; }
\ No newline at end of file
diff --git a/addons/edi/static/src/img/pdf.png b/addons/edi/static/src/img/pdf.png
new file mode 100644
index 00000000000..d35dfd20c2d
Binary files /dev/null and b/addons/edi/static/src/img/pdf.png differ
diff --git a/addons/edi/static/src/js/edi.js b/addons/edi/static/src/js/edi.js
new file mode 100644
index 00000000000..9397c1cf280
--- /dev/null
+++ b/addons/edi/static/src/js/edi.js
@@ -0,0 +1,174 @@
+openerp.edi = function(openerp) {
+openerp.web.qweb.add_template("/edi/static/src/xml/edi.xml");
+openerp.web.qweb.add_template("/edi/static/src/xml/edi_account.xml");
+openerp.web.qweb.add_template("/edi/static/src/xml/edi_sale_purchase.xml");
+openerp.edi = {}
+
+openerp.edi.EdiView = openerp.web.Widget.extend({
+ init: function(parent, db, token) {
+ this._super();
+ this.db = db;
+ this.token = token;
+ this.session = new openerp.web.Connection();
+ this.template = "EdiEmpty";
+ this.content = "";
+ this.sidebar = "";
+ },
+ start: function() {
+ this._super();
+ var param = {"db": this.db, "token": this.token};
+ this.rpc('/edi/get_edi_document', param, this.on_document_loaded, this.on_document_failed);
+ },
+ on_document_loaded: function(docs){
+ this.doc = docs[0];
+ var template_content = "Edi." + this.doc.__model + ".content";
+ var template_sidebar = "Edi." + this.doc.__model + ".sidebar";
+ var param = {"widget":this, "doc":this.doc};
+ if (openerp.web.qweb.templates[template_sidebar]) {
+ this.sidebar = openerp.web.qweb.render(template_sidebar, param);
+ }
+ if (openerp.web.qweb.templates[template_content]) {
+ this.content = openerp.web.qweb.render(template_content, param);
+ }
+ this.$element.html(openerp.web.qweb.render("EdiView", param));
+ this.$element.find('button.oe_edi_action_print').bind('click', this.do_print);
+ this.$element.find('button#oe_edi_import_existing').bind('click', this.do_import_existing);
+ this.$element.find('button#oe_edi_import_create').bind('click', this.do_import_create);
+ this.$element.find('button#oe_edi_download').bind('click', this.do_download);
+ this.$element.find('.oe_edi_import_choice, .oe_edi_import_choice_label').bind('click', this.toggle_choice('import'));
+ this.$element.find('.oe_edi_pay_choice, .oe_edi_pay_choice_label').bind('click', this.toggle_choice('pay'));
+ this.$element.find('#oe_edi_download_show_code').bind('click', this.show_code);
+ },
+ on_document_failed: function(response) {
+ var self = this;
+ var params = {
+ error: response,
+ //TODO: should this be _t() wrapped?
+ message: "Sorry, this document cannot be located. Perhaps the link you are using has expired?"
+ }
+ $(openerp.web.qweb.render("DialogWarning", params)).dialog({
+ title: "Document not found",
+ modal: true,
+ });
+ },
+ show_code: function($event) {
+ $('#oe_edi_download_code').toggle();
+ },
+ get_download_url: function() {
+ var l = window.location;
+ var url_prefix = l.protocol + '//' + l.host;
+ return url_prefix +'/edi/download?db=' + this.db + '&token=' + this.token;
+ },
+ get_paypal_url: function(document_type, ref_field) {
+ var comp_name = encodeURIComponent(this.doc.company_id[1]);
+ var doc_ref = encodeURIComponent(this.doc[ref_field]);
+ var paypal_account = encodeURIComponent(this.doc.company_address.paypal_account);
+ var amount = encodeURIComponent(this.doc.amount_total);
+ var cur_code = encodeURIComponent(this.doc.currency.code);
+ var paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick" +
+ "&business=" + paypal_account +
+ "&item_name=" + document_type + "%20" + comp_name + "%20" + doc_ref +
+ "&invoice=" + doc_ref +
+ "&amount=" + amount +
+ "¤cy_code=" + cur_code +
+ "&button_subtype=services&no_note=1&bn=OpenERP_PayNow_" + cur_code;
+ return paypal_url;
+ },
+ toggle_choice: function(mode) {
+ return function($e) {
+ $('.oe_edi_nested_block_'+mode).hide();
+ $('.'+$e.target.id+'_nested').show();
+ return true;
+ }
+ },
+ do_print: function(e){
+ var l = window.location;
+ window.location = l.protocol + '//' + l.host + "/edi/download_attachment?db=" + this.db + "&token=" + this.token;
+ },
+ do_import_existing: function(e) {
+ var url_download = this.get_download_url();
+ var $edi_text_server_input = this.$element.find('#oe_edi_txt_server_url');
+ var server_url = $edi_text_server_input.val();
+ $edi_text_server_input.removeClass('invalid');
+ if (!server_url) {
+ $edi_text_server_input.addClass('invalid');
+ return false;
+ }
+ var protocol = "http://";
+ if (server_url.toLowerCase().lastIndexOf('http', 0) == 0 ) {
+ protocol = '';
+ }
+ window.location = protocol + server_url + '/edi/import_url?url=' + encodeURIComponent(url_download);
+ },
+ do_import_create: function(e){
+ var url_download = this.get_download_url();
+ window.location = "https://cc.my.openerp.com/odms/create_edi?url=" + encodeURIComponent(url_download);
+ },
+ do_download: function(e){
+ window.location = this.get_download_url();
+ }
+});
+
+openerp.edi.EdiImport = openerp.web.Widget.extend({
+ init: function(parent,url) {
+ this._super();
+ this.url = url;
+ var params = {};
+
+ this.template = "EdiImport";
+ this.session = new openerp.web.Connection();
+ this.login = new openerp.web.Login(this);
+ this.header = new openerp.web.Header(this);
+ this.header.on_logout.add(this.login.on_logout);
+ },
+ start: function() {
+ this.session.on_session_invalid.add_last(this.do_ask_login)
+ this.session.on_session_valid.add_last(this.do_import);
+ this.header.appendTo($("#oe_header"));
+ this.session.start();
+ this.login.appendTo($('#oe_login'));
+ },
+ do_ask_login: function() {
+ this.login.do_ask_login(this.do_import);
+ },
+ do_import: function() {
+ this.rpc('/edi/import_edi_url', {url: this.url}, this.on_imported, this.on_imported_error);
+ },
+ on_imported: function(response) {
+ if ('action' in response) {
+ this.rpc("/web/session/save_session_action", {the_action: response.action}, function(key) {
+ window.location = "/web/webclient/home?debug=1&s_action="+encodeURIComponent(key);
+ });
+ }
+ else {
+ $('
+ OpenERP's Electronic Data Interchange documents are based on a generic and language
+ independent JSON serialization of the document's attribute.
+ It is usually very quick and straightforward to create a small plug-in for your preferred
+ application that will be capable of importing any OpenERP EDI document.
+ You can find out more details about how to do this and what the content of OpenERP EDI documents
+ is like in the OpenERP documentation.
+
+ To get started immediately, see is all it takes to use this EDI document in Python.
+
+
+
importurllib2, simplejson
+
edi_document =urllib2.urlopen('').read()
+
document_data = simplejson.loads(edi_document)[0]
+
print"Amount: ", document_data['amount_total']
+
+
+ You can download the raw EDI document here:
+
+
+
+ You may directly pay this invoice online via Paypal's secure payment gateway:
+
+
+
+
+
+
+
+
+
+
+
+ Please transfer to
+ (postal address on the invoice header)
+ using one of the following bank accounts. Be sure to mention the invoice
+ reference on the transfer:
+
+ You may directly pay this order online via Paypal's secure payment gateway:
+
+
+
+
+
+
+
+
+
+
+
+ Please transfer to
+ (postal address on the order header)
+ using one of the following bank accounts. Be sure to mention the document
+ reference on the transfer:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/edi/test/edi_partner_test.yml b/addons/edi/test/edi_partner_test.yml
new file mode 100644
index 00000000000..cca39417927
--- /dev/null
+++ b/addons/edi/test/edi_partner_test.yml
@@ -0,0 +1,44 @@
+-
+ In order to test the basic EDI system, I will export a partner,
+ modify the exported EDI document to add an attachment and change
+ the data, and then re-import it and re-export it.
+
+ with an attached file, check the result, the alter the data
+ and reimport it.
+-
+ !python {model: edi.document}: |
+ import json
+ partner_obj = self.pool.get('res.partner')
+ tokens = self.export_edi(cr, uid, [partner_obj.browse(cr, uid, ref('base.res_partner_agrolait'))])
+ doc = self.get_document(cr, uid, tokens[0], context=context)
+ edi_doc, = json.loads(doc)
+
+ # check content of the document
+ assert edi_doc.get('__id').endswith('.res_partner_agrolait'), 'Incorrect external ID'
+ assert edi_doc.get('__model') == 'res.partner', 'Incorrect/Missing __model'
+ assert edi_doc.get('__module') == 'base', 'Incorrect/Missing __module'
+ assert edi_doc.get('__last_update'), 'Missing __last_update'
+
+ # try to import the document after changing the name and id, and attaching a
+ # file, and check that a new partner is returned
+ edi_doc['__id'] = 'base:xxd37f8a-xx55-11e0-xxdd-xx81124c8b50.res_partner_xxx'
+ edi_doc['name'] = 'AgroMilk'
+ attachment = {
+ 'name': 'Test file',
+ 'file_name': 'test.png',
+ # base64 standard requires blocks of 57bytes=76chars, NL-separated
+ 'content': 'iVBORw0KGgoAAAANSUhEUgAAAA4AAAAKCAYAAACE2W/HAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A\n/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oIDQ84BkjLWAYAAACNSURBVCjP\njZKxDUJBDEOf/wbUbEHDhkxAzRjUDECBhMQYjIApuPBNpK+PpUinOPYll5Nt1iCJXifbSPpJZtHg\nXLUdu0FWpMEt87a/xtsmqjjNetPFyhuWYFuj7RcgQBNwXNGdw2CqY85yXWi5z7YBnmRyEHvg0YSX\nrLE9P30nwugOHHr+s5va4x+fofAGm1+JjnJICm0AAAAASUVORK5CYII=\n',
+ }
+ edi_doc['__attachments'] = [attachment]
+ doc = json.dumps([edi_doc])
+ result, = self.import_edi(cr, uid, edi_document=doc)
+ assert result[0] == 'res.partner' and result[1] > ref('base.res_partner_agrolait'),\
+ "Expected (%r,> %r) after import 1, got %r" % ('res.partner', ref('base.res_partner_agrolait'), result)
+
+ # export the same partner we just created, and see if the output matches the input
+ tokens = self.export_edi(cr, uid, [partner_obj.browse(cr, uid, result[1])])
+ doc_output = self.get_document(cr, uid, tokens[0], context=context)
+ edi_doc_output, = json.loads(doc_output)
+ for attribute in ('__model', '__module', '__id', 'name', '__attachments'):
+ assert edi_doc_output.get(attribute) == edi_doc.get(attribute), \
+ 'Incorrect value for %s, expected %r, got %r' % (attribute, edi_doc.get(attribute), edi_doc_output.get(attribute))
\ No newline at end of file
diff --git a/addons/email_template/__init__.py b/addons/email_template/__init__.py
index 97931ea8bd5..d1cf5b28431 100644
--- a/addons/email_template/__init__.py
+++ b/addons/email_template/__init__.py
@@ -21,5 +21,6 @@
##############################################################################
import email_template
import wizard
+import res_partner
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/email_template/__openerp__.py b/addons/email_template/__openerp__.py
index 06fa969c0c2..2ab7f194d18 100644
--- a/addons/email_template/__openerp__.py
+++ b/addons/email_template/__openerp__.py
@@ -61,9 +61,13 @@ Openlabs was kept
"data": [
'wizard/email_template_preview_view.xml',
'email_template_view.xml',
+ 'res_partner_view.xml',
'wizard/email_compose_message_view.xml',
'security/ir.model.access.csv'
],
+ "demo": [
+ 'res_partner_demo.yml',
+ ],
"installable": True,
"active": False,
"certificate" : "00817073628967384349",
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index 3917b3f2ddb..237279c16aa 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -28,6 +28,7 @@ from osv import osv
from osv import fields
import tools
from tools.translate import _
+from urllib import quote as quote
try:
from mako.template import Template as MakoTemplate
@@ -66,6 +67,7 @@ class email_template(osv.osv):
user=user,
# context kw would clash with mako internals
ctx=context,
+ quote=quote,
format_exceptions=True)
if result == u'False':
result = u''
@@ -305,6 +307,7 @@ class email_template(osv.osv):
'attachment_ids': False,
'message_id': False,
'state': 'outgoing',
+ 'subtype': 'plain',
}
if not template_id:
return values
@@ -319,6 +322,9 @@ class email_template(osv.osv):
template.model, res_id, context=context) \
or False
+ if values['body_html']:
+ values.update(subtype='html')
+
if template.user_signature:
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
values['body_text'] += '\n\n' + signature
@@ -355,20 +361,24 @@ class email_template(osv.osv):
values['attachments'] = attachments
return values
- def send_mail(self, cr, uid, template_id, res_id, context=None):
+ def send_mail(self, cr, uid, template_id, res_id, force_send=False, context=None):
"""Generates a new mail message for the given template and record,
- and schedule it for delivery through the ``mail`` module's scheduler.
+ and schedules it for delivery through the ``mail`` module's scheduler.
:param int template_id: id of the template to render
:param int res_id: id of the record to render the template with
(model is taken from the template)
+ :param bool force_send: if True, the generated mail.message is
+ immediately sent after being created, as if the scheduler
+ was executed for this message only.
+ :returns: id of the mail.message that was created
"""
mail_message = self.pool.get('mail.message')
ir_attachment = self.pool.get('ir.attachment')
template = self.browse(cr, uid, template_id, context)
values = self.generate_email(cr, uid, template_id, res_id, context=context)
attachments = values.pop('attachments') or {}
- message_id = mail_message.create(cr, uid, values, context=context)
+ msg_id = mail_message.create(cr, uid, values, context=context)
# link attachments
attachment_ids = []
for fname, fcontent in attachments.iteritems():
@@ -377,10 +387,13 @@ class email_template(osv.osv):
'datas_fname': fname,
'datas': fcontent,
'res_model': mail_message._name,
- 'res_id': message_id,
+ 'res_id': msg_id,
}
if context.has_key('default_type'):
del context['default_type']
- attachment_ids.append(ir_attachment.create(cr, uid, attachment_data, context))
+ attachment_ids.append(ir_attachment.create(cr, uid, attachment_data, context=context))
+ if force_send:
+ mail_message.send(cr, uid, [msg_id], context=context)
+ return msg_id
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/email_template/email_template_view.xml b/addons/email_template/email_template_view.xml
index d6a651f0bc2..507dae3cd25 100644
--- a/addons/email_template/email_template_view.xml
+++ b/addons/email_template/email_template_view.xml
@@ -155,9 +155,8 @@
-
-
+
diff --git a/addons/email_template/html2text.py b/addons/email_template/html2text.py
index 2479843777a..745381850e3 100755
--- a/addons/email_template/html2text.py
+++ b/addons/email_template/html2text.py
@@ -453,3 +453,5 @@ if __name__ == "__main__":
data = sys.stdin.read().decode('utf8')
wrapwrite(html2text(data, baseurl))
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/email_template/res_partner.py b/addons/email_template/res_partner.py
new file mode 100644
index 00000000000..a451b171b70
--- /dev/null
+++ b/addons/email_template/res_partner.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import fields,osv
+
+class res_partner(osv.osv):
+ """Inherit res.partner to add a generic opt-out field that can be used
+ to restrict usage of automatic email templates.
+ This field is unused by default. """
+ _inherit = 'res.partner'
+
+ _columns = {
+ 'opt_out': fields.boolean('Opt-out', help="If checked, this partner will not receive any automated email " \
+ "notifications, such as the availability of invoices."),
+ }
+
+ _defaults = {
+ 'opt_out': False,
+ }
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/email_template/res_partner_demo.yml b/addons/email_template/res_partner_demo.yml
new file mode 100644
index 00000000000..8eaf48f9e87
--- /dev/null
+++ b/addons/email_template/res_partner_demo.yml
@@ -0,0 +1,9 @@
+-
+ Set opt-out to True on all demo partners
+-
+ !python {model: res.partner}: |
+ partner_ids = self.search(cr, uid, [])
+ # assume partners with an external ID come from demo data
+ ext_ids = self._get_external_ids(cr, uid, partner_ids)
+ ids_to_update = [k for (k,v) in ext_ids.iteritems() if v]
+ self.write(cr, uid, ids_to_update, {'opt_out': True})
\ No newline at end of file
diff --git a/addons/email_template/res_partner_view.xml b/addons/email_template/res_partner_view.xml
new file mode 100644
index 00000000000..0d2f919a96e
--- /dev/null
+++ b/addons/email_template/res_partner_view.xml
@@ -0,0 +1,16 @@
+
+
+
+
+ res.partner.opt_out.form
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/email_template/wizard/__init__.py b/addons/email_template/wizard/__init__.py
index b9ac29ec4c2..c979c90acd0 100644
--- a/addons/email_template/wizard/__init__.py
+++ b/addons/email_template/wizard/__init__.py
@@ -22,3 +22,5 @@
import email_template_preview
import mail_compose_message
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/email_template/wizard/email_template_preview.py b/addons/email_template/wizard/email_template_preview.py
index 650b714866d..4ef0e9fa156 100644
--- a/addons/email_template/wizard/email_template_preview.py
+++ b/addons/email_template/wizard/email_template_preview.py
@@ -87,6 +87,8 @@ class email_template_preview(osv.osv_memory):
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
description += '\n' + signature
vals['body_text'] = description
+ if template.body_html:
+ vals['body_html'] = self.render_template(cr, uid, template.body_html, model, res_id, context) or ''
vals['report_name'] = self.render_template(cr, uid, template.report_name, model, res_id, context)
return {'value': vals}
diff --git a/addons/event/board_association_view.xml b/addons/event/board_association_view.xml
index 78fc8395341..47c5e65f196 100644
--- a/addons/event/board_association_view.xml
+++ b/addons/event/board_association_view.xml
@@ -40,24 +40,20 @@
form
diff --git a/addons/event/event.py b/addons/event/event.py
index ba802ef1ffa..ab575408c63 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -296,6 +296,7 @@ class event_registration(osv.osv):
return res
_columns = {
+ 'id': fields.integer('ID'),
'name': fields.char('Summary', size=124, readonly=True, states={'draft': [('readonly', False)]}),
'email_cc': fields.text('CC', size=252, readonly=False, states={'done': [('readonly', True)]}, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'nb_register': fields.integer('Quantity', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Number of Registrations or Tickets"),
diff --git a/addons/event/report/report_event_registration_view.xml b/addons/event/report/report_event_registration_view.xml
index 3fd24c0a366..ef69c674e43 100644
--- a/addons/event/report/report_event_registration_view.xml
+++ b/addons/event/report/report_event_registration_view.xml
@@ -53,10 +53,11 @@
-
-
+ formtree,graph
- {"search_default_365day":1, "search_default_invoiced":1, "search_default_event":1, 'group_by_no_leaf':1, 'group_by':[]}
+ {"search_default_year":1,"search_default_this_month":1,"search_default_365day":1, "search_default_invoiced":1, "search_default_event":1, 'group_by_no_leaf':1, 'group_by':[]}
diff --git a/addons/fetchmail/__init__.py b/addons/fetchmail/__init__.py
index f9c384ce103..934df9846dd 100644
--- a/addons/fetchmail/__init__.py
+++ b/addons/fetchmail/__init__.py
@@ -21,3 +21,5 @@
##############################################################################
import fetchmail
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail/__openerp__.py b/addons/fetchmail/__openerp__.py
index ae082aacacd..b50c33b2394 100644
--- a/addons/fetchmail/__openerp__.py
+++ b/addons/fetchmail/__openerp__.py
@@ -74,3 +74,5 @@ mail.
'certificate' : '00692978332890137453',
'images': ['images/1_email_servers.jpeg'],
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail/i18n/sl.po b/addons/fetchmail/i18n/sl.po
new file mode 100644
index 00000000000..2cdcd56b63d
--- /dev/null
+++ b/addons/fetchmail/i18n/sl.po
@@ -0,0 +1,308 @@
+# Slovenian translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:15+0000\n"
+"PO-Revision-Date: 2011-11-22 16:44+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Slovenian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-23 05:20+0000\n"
+"X-Generator: Launchpad (build 14336)\n"
+
+#. module: fetchmail
+#: constraint:email.server:0
+msgid ""
+"Warning! Record for selected Model can not be created\n"
+"Please choose valid Model"
+msgstr ""
+
+#. module: fetchmail
+#: selection:email.server,state:0
+msgid "Confirmed"
+msgstr "Potrjeno"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Confirm"
+msgstr "Potrdi"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Group By..."
+msgstr "Združi po ..."
+
+#. module: fetchmail
+#: view:email.server:0
+#: field:email.server,state:0
+msgid "State"
+msgstr "Država"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "POP"
+msgstr "POP"
+
+#. module: fetchmail
+#: selection:email.server,state:0
+msgid "Not Confirmed"
+msgstr "Nepotrjeno"
+
+#. module: fetchmail
+#: field:email.server,user:0
+msgid "User Name"
+msgstr "Uporabniško Ime"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Type"
+msgstr "Tip"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "POP/IMAP Servers"
+msgstr "POP/IMAP Strežniki"
+
+#. module: fetchmail
+#: model:ir.module.module,shortdesc:fetchmail.module_meta_information
+msgid "Fetchmail Server"
+msgstr ""
+
+#. module: fetchmail
+#: view:email.server:0
+#: field:email.server,note:0
+msgid "Description"
+msgstr "Opis"
+
+#. module: fetchmail
+#: help:email.server,object_id:0
+msgid ""
+"OpenObject Model. Generates a record of this model.\n"
+"Select Object with message_new attrbutes."
+msgstr ""
+
+#. module: fetchmail
+#: field:email.server,attach:0
+msgid "Add Attachments ?"
+msgstr "Dodaj Priloge ?"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "# of emails"
+msgstr "# od emalov"
+
+#. module: fetchmail
+#: model:ir.actions.act_window,name:fetchmail.act_server_history
+msgid "Email History"
+msgstr ""
+
+#. module: fetchmail
+#: field:email.server,user_id:0
+msgid "User"
+msgstr "Uporabnik"
+
+#. module: fetchmail
+#: field:email.server,date:0
+msgid "Date"
+msgstr "Datum"
+
+#. module: fetchmail
+#: selection:email.server,state:0
+msgid "Waiting for Verification"
+msgstr "Čaka na Potrditev"
+
+#. module: fetchmail
+#: field:email.server,password:0
+msgid "Password"
+msgstr "Geslo"
+
+#. module: fetchmail
+#: model:ir.actions.act_window,name:fetchmail.act_server_history
+#: view:mailgate.message:0
+msgid "Emails"
+msgstr "E-pošte"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Search Email Servers"
+msgstr "Poišči Email Strežnik"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Server & Login"
+msgstr "Strežnik in Prijava"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Auto Reply?"
+msgstr "Avtomatski Odzivnik?"
+
+#. module: fetchmail
+#: field:email.server,name:0
+msgid "Name"
+msgstr "Ime"
+
+#. module: fetchmail
+#: model:ir.model,name:fetchmail.model_mailgate_message
+msgid "Mailgateway Message"
+msgstr ""
+
+#. module: fetchmail
+#: model:ir.actions.act_window,name:fetchmail.action_email_server_tree
+msgid "POP Servers"
+msgstr ""
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Set to Draft"
+msgstr ""
+
+#. module: fetchmail
+#: field:email.server,message_ids:0
+#: model:ir.actions.act_window,name:fetchmail.action_view_mail_message_emails
+msgid "Messages"
+msgstr "Sporočila"
+
+#. module: fetchmail
+#: model:ir.ui.menu,name:fetchmail.menu_action_fetchmail_server_tree
+msgid "Fetchmail Services"
+msgstr ""
+
+#. module: fetchmail
+#: field:email.server,server:0
+msgid "Server"
+msgstr "Strežnik"
+
+#. module: fetchmail
+#: field:email.server,active:0
+msgid "Active"
+msgstr "Aktiven"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Process Parameter"
+msgstr "Parametri Procesa"
+
+#. module: fetchmail
+#: field:email.server,is_ssl:0
+msgid "SSL ?"
+msgstr "SSL ?"
+
+#. module: fetchmail
+#: selection:email.server,type:0
+#: selection:mailgate.message,server_type:0
+msgid "IMAP Server"
+msgstr "IMAP Strežnik"
+
+#. module: fetchmail
+#: field:email.server,object_id:0
+msgid "Model"
+msgstr ""
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "IMAP"
+msgstr "IMAP"
+
+#. module: fetchmail
+#: view:email.server:0
+#: model:ir.model,name:fetchmail.model_email_server
+msgid "POP/IMAP Server"
+msgstr "POP/IMAP Strežnik"
+
+#. module: fetchmail
+#: constraint:email.server:0
+msgid "Warning! Can't have duplicate server configuration!"
+msgstr "Opozorilo! Ne morete podvojiti konfiguracije strežnika!"
+
+#. module: fetchmail
+#: field:email.server,type:0
+#: field:mailgate.message,server_type:0
+msgid "Server Type"
+msgstr "Tip Strežnika"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Login Information"
+msgstr "Prijavni podatki"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Server Information"
+msgstr "Podatki o strežniku"
+
+#. module: fetchmail
+#: help:email.server,attach:0
+msgid "Fetches mail with attachments if true."
+msgstr ""
+
+#. module: fetchmail
+#: selection:email.server,type:0
+#: selection:mailgate.message,server_type:0
+msgid "POP Server"
+msgstr "POP Strežnik"
+
+#. module: fetchmail
+#: field:email.server,port:0
+msgid "Port"
+msgstr "Vrata"
+
+#. module: fetchmail
+#: model:ir.module.module,description:fetchmail.module_meta_information
+msgid ""
+"Fetchmail: \n"
+" * Fetch email from Pop / IMAP server\n"
+" * Support SSL\n"
+" * Integrated with all Modules\n"
+" * Automatic Email Receive\n"
+" * Email based Records (Add, Update)\n"
+" "
+msgstr ""
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "SSL"
+msgstr "SSL"
+
+#. module: fetchmail
+#: help:email.server,action_id:0
+msgid ""
+"An Email Server Action. It will be run whenever an e-mail is fetched from "
+"server."
+msgstr ""
+
+#. module: fetchmail
+#: help:email.server,priority:0
+msgid "Priority between 0 to 10, select define the order of Processing"
+msgstr ""
+
+#. module: fetchmail
+#: field:email.server,action_id:0
+msgid "Email Server Action"
+msgstr ""
+
+#. module: fetchmail
+#: field:email.server,priority:0
+msgid "Server Priority"
+msgstr ""
+
+#. module: fetchmail
+#: view:mailgate.message:0
+#: field:mailgate.message,server_id:0
+msgid "Mail Server"
+msgstr "Poštni Strežnik"
+
+#. module: fetchmail
+#: view:email.server:0
+msgid "Fetch Emails"
+msgstr ""
+
+#~ msgid "Email Servers"
+#~ msgstr "Email Strežniki"
diff --git a/addons/fetchmail_crm/__init__.py b/addons/fetchmail_crm/__init__.py
index 5831b3284bb..b5b36afb7e9 100644
--- a/addons/fetchmail_crm/__init__.py
+++ b/addons/fetchmail_crm/__init__.py
@@ -18,3 +18,5 @@
# along with this program. If not, see .
#
##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail_crm/__openerp__.py b/addons/fetchmail_crm/__openerp__.py
index 66cff346d0a..671aad4a871 100644
--- a/addons/fetchmail_crm/__openerp__.py
+++ b/addons/fetchmail_crm/__openerp__.py
@@ -37,3 +37,5 @@
'installable': True,
'active': False,
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail_crm_claim/__init__.py b/addons/fetchmail_crm_claim/__init__.py
index 5831b3284bb..b5b36afb7e9 100644
--- a/addons/fetchmail_crm_claim/__init__.py
+++ b/addons/fetchmail_crm_claim/__init__.py
@@ -18,3 +18,5 @@
# along with this program. If not, see .
#
##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail_crm_claim/__openerp__.py b/addons/fetchmail_crm_claim/__openerp__.py
index cfe6a675d20..6b4a346ed51 100644
--- a/addons/fetchmail_crm_claim/__openerp__.py
+++ b/addons/fetchmail_crm_claim/__openerp__.py
@@ -37,3 +37,5 @@
'installable': True,
'active': False,
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail_hr_recruitment/__init__.py b/addons/fetchmail_hr_recruitment/__init__.py
index 5831b3284bb..b5b36afb7e9 100644
--- a/addons/fetchmail_hr_recruitment/__init__.py
+++ b/addons/fetchmail_hr_recruitment/__init__.py
@@ -18,3 +18,5 @@
# along with this program. If not, see .
#
##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail_hr_recruitment/__openerp__.py b/addons/fetchmail_hr_recruitment/__openerp__.py
index 75531097645..0925f2cbcc9 100644
--- a/addons/fetchmail_hr_recruitment/__openerp__.py
+++ b/addons/fetchmail_hr_recruitment/__openerp__.py
@@ -37,3 +37,5 @@
'installable': True,
'active': False,
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail_project_issue/__init__.py b/addons/fetchmail_project_issue/__init__.py
index 5831b3284bb..b5b36afb7e9 100644
--- a/addons/fetchmail_project_issue/__init__.py
+++ b/addons/fetchmail_project_issue/__init__.py
@@ -18,3 +18,5 @@
# along with this program. If not, see .
#
##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/fetchmail_project_issue/__openerp__.py b/addons/fetchmail_project_issue/__openerp__.py
index 1165949108a..ca42ed6faaf 100644
--- a/addons/fetchmail_project_issue/__openerp__.py
+++ b/addons/fetchmail_project_issue/__openerp__.py
@@ -37,3 +37,5 @@
'installable': True,
'active': False,
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr/hr_board.xml b/addons/hr/hr_board.xml
index 874b0d368d6..620f1f51c88 100644
--- a/addons/hr/hr_board.xml
+++ b/addons/hr/hr_board.xml
@@ -8,12 +8,12 @@
form
@@ -27,7 +27,7 @@
-
+
@@ -38,12 +38,12 @@
form
diff --git a/addons/hr/hr_demo.xml b/addons/hr/hr_demo.xml
index dbfead793e5..15269a88375 100644
--- a/addons/hr/hr_demo.xml
+++ b/addons/hr/hr_demo.xml
@@ -54,17 +54,40 @@
-
- Quentin Paolino
-
-
-
-
-
Antoine Philippe
+
+
+
+
+
+ Quentin Paolino
+
+
+
+
+
+
+
+ John Smith
+
+
+
+
+
+
+ Thomas McQueen
+
+
+
+
+
+
+ Vanessa Dupont
+
+
diff --git a/addons/hr/hr_department_demo.xml b/addons/hr/hr_department_demo.xml
index 433e77a6dd4..5ac57db52a3 100644
--- a/addons/hr/hr_department_demo.xml
+++ b/addons/hr/hr_department_demo.xml
@@ -26,31 +26,34 @@
IT
+ Marketing
- Sales
+ Sales Europe
+ Sales America
+
@@ -106,7 +109,19 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 8b16022ec91..bbe2d00ff6f 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -344,6 +344,7 @@
hr.employeeformtree,form
+ [('category_ids','=', active_ids)]
@@ -351,7 +352,6 @@
Employees by Categories
-
-
-
+
+
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index 5353a8497ed..07f160b8ee2 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -50,9 +50,10 @@
-
+ hr.recruitment.reportformtree,graph
- {'search_default_month':1,'search_default_department':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_year':1,'search_default_month':1,'search_default_department':1,'group_by_no_leaf':1,'group_by':[]}
diff --git a/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py b/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py
index d11a1f16775..291c16a7644 100644
--- a/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py
+++ b/addons/hr_recruitment/wizard/hr_recruitment_employee_hired.py
@@ -48,8 +48,7 @@ class hired_employee(osv.osv_memory):
"""
if context is None:
context = {}
- self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', []))
- return {}
+ return self.pool.get('hr.applicant').case_close_with_emp(cr, uid,context.get('active_ids', []))
hired_employee()
diff --git a/addons/hr_timesheet/hr_timesheet_data.xml b/addons/hr_timesheet/hr_timesheet_data.xml
index 5dc95cf9ddc..e9aa56d4646 100644
--- a/addons/hr_timesheet/hr_timesheet_data.xml
+++ b/addons/hr_timesheet/hr_timesheet_data.xml
@@ -2,9 +2,6 @@
-
-
- TS
@@ -12,5 +9,10 @@
general
+
+
+
+
+
diff --git a/addons/hr_timesheet/report/__init__.py b/addons/hr_timesheet/report/__init__.py
index 98e34ed92d4..8304c90421d 100644
--- a/addons/hr_timesheet/report/__init__.py
+++ b/addons/hr_timesheet/report/__init__.py
@@ -22,3 +22,5 @@
import user_timesheet
import users_timesheet
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_timesheet/report/user_timesheet.py b/addons/hr_timesheet/report/user_timesheet.py
index 533989210d6..7699f94f41b 100644
--- a/addons/hr_timesheet/report/user_timesheet.py
+++ b/addons/hr_timesheet/report/user_timesheet.py
@@ -118,3 +118,5 @@ class report_custom(report_rml):
report_custom('report.hr.analytical.timesheet', 'hr.employee', '', 'addons/hr_timesheet/report/user_timesheet.xsl')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml b/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml
index 96d91ef3e5c..7327ca66f63 100644
--- a/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml
+++ b/addons/hr_timesheet_invoice/board_hr_timesheet_invoice.xml
@@ -17,9 +17,9 @@
form
-
-
-
+
+
+ -->
@@ -31,8 +31,8 @@
form
-
-
+
+ -->
@@ -67,8 +67,8 @@
form
-
-
+
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index 87fb6064a04..19d08f7faf3 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -63,12 +63,12 @@ class account_analytic_account(osv.osv):
_inherit = "account.analytic.account"
_columns = {
- 'pricelist_id': fields.many2one('product.pricelist', 'Sale Pricelist',
+ 'pricelist_id': fields.many2one('product.pricelist', 'Customer Pricelist',
help="The product to invoice is defined on the employee form, the price will be deduced by this pricelist on the product."),
'amount_max': fields.float('Max. Invoice Price'),
'amount_invoiced': fields.function(_invoiced_calc, string='Invoiced Amount',
help="Total invoiced"),
- 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Reinvoice Costs',
+ 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Invoice on Timesheet & Costs',
help="Fill this field if you plan to automatically generate invoices based " \
"on the costs in this analytic account: timesheets, expenses, ..." \
"You can configure an automatic invoice rate on analytic accounts."),
@@ -76,7 +76,16 @@ class account_analytic_account(osv.osv):
_defaults = {
'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),
}
-
+ def on_change_partner_id(self, cr, uid, id, partner_id, context={}):
+ res = super(account_analytic_account, self).on_change_partner_id(cr, uid, id, partner_id, context)
+ if (not res.get('value', False)) or not partner_id:
+ return res
+ part = self.pool.get('res.partner').browse(cr, uid, partner_id)
+ pricelist = part.property_product_pricelist and part.property_product_pricelist.id or False
+ if pricelist:
+ res['value']['pricelist_id'] = pricelist
+ return res
+
def set_close(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state':'close'}, context=context)
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
index 2ce309e0df4..e0652355063 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
@@ -7,23 +7,27 @@
form
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -123,7 +127,7 @@
tree,form[]{'search_default_to_invoice': 1}
-
+ This list shows you every task you can invoice to the customer. Select the lines and click the Action button to generate the invoices automatically.
+ context="{'search_default_account_id': [active_id]}"
+ id="act_account_analytic_account_2_report_timehsheet_account"
+ name="Timesheets"
+ res_model="hr.analytic.timesheet"
+ src_model="account.analytic.account"/>
', False), ('account_id', 'in', context['active_ids'])], context=context)
+ invs = self.pool.get('account.analytic.line').invoice_cost_create(cr, uid, ids, data, context=context)
mod_obj = self.pool.get('ir.model.data')
- analytic_account_obj = self.pool.get('account.analytic.account')
- res_partner_obj = self.pool.get('res.partner')
- account_payment_term_obj = self.pool.get('account.payment.term')
- invoice_obj = self.pool.get('account.invoice')
- product_obj = self.pool.get('product.product')
- fiscal_pos_obj = self.pool.get('account.fiscal.position')
- invoice_line_obj = self.pool.get('account.invoice.line')
- invoices = []
-
- if context is None:
- context = {}
- result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
- res = mod_obj.read(cr, uid, result, ['res_id'], context=context)
-
- data = self.browse(cr, uid, ids, context=context)[0]
- balance_product = data.balance_product.id
-
- account_ids = 'active_ids' in context and context['active_ids'] or []
-
- for account in analytic_account_obj.browse(cr, uid, account_ids, context=context):
- partner = account.partner_id
- amount_total=0.0
- if (not partner) or not (account.pricelist_id):
- raise osv.except_osv(_('Analytic account incomplete'),
- _('Please fill in the partner and pricelist field '
- 'in the analytic account:\n%s') % (account.name,))
-
- date_due = False
- if partner.property_payment_term:
- pterm_list= account_payment_term_obj.compute(cr, uid,
- partner.property_payment_term.id, value=1,
- date_ref=time.strftime('%Y-%m-%d'))
- if pterm_list:
- pterm_list = [line[0] for line in pterm_list]
- pterm_list.sort()
- date_due = pterm_list[-1]
-
- curr_invoice = {
- 'name': time.strftime('%d/%m/%Y')+' - '+account.name,
- 'partner_id': account.partner_id.id,
- 'address_contact_id': res_partner_obj.address_get(cr, uid, [account.partner_id.id], adr_pref=['contact'])['contact'],
- 'address_invoice_id': res_partner_obj.address_get(cr, uid, [account.partner_id.id], adr_pref=['invoice'])['invoice'],
- 'payment_term': partner.property_payment_term.id or False,
- 'account_id': partner.property_account_receivable.id,
- 'currency_id': account.pricelist_id.currency_id.id,
- 'date_due': date_due,
- 'fiscal_position': account.partner_id.property_account_position.id
- }
- last_invoice = invoice_obj.create(cr, uid, curr_invoice, context=context)
- invoices.append(last_invoice)
-
- context2 = context.copy()
- context2['lang'] = partner.lang
-
- cr.execute("""SELECT
- line.product_id,
- sum(line.amount),
- line.general_account_id,
- line.product_uom_id,
- move_line.ref
- FROM
- account_analytic_line as line
- LEFT JOIN account_move_line as move_line on (line.move_id=move_line.id)
- LEFT JOIN account_analytic_journal as journal on (line.journal_id=journal.id)
- WHERE
- line.account_id = %s AND
- line.move_id IS NOT NULL AND
- journal.type = 'sale'
- GROUP BY
- line.product_id,
- line.general_account_id,
- line.product_uom_id,
- move_line.ref""", (account.id,))
- for product_id, amount, account_id, product_uom_id, ref in cr.fetchall():
- product = product_obj.browse(cr, uid, product_id, context2)
-
- if product:
- taxes = product.taxes_id
- else:
- taxes = []
-
- tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
- if not account_id:
- raise osv.except_osv(_("Configuration Error"), _("No income account defined for product '%s'") % product.name)
- curr_line = {
- 'price_unit': -amount,
- 'quantity': 1.0,
- 'discount': 0.0,
- 'invoice_line_tax_id': [(6,0,tax)],
- 'invoice_id': last_invoice,
- 'name': ref or '' +(product and ' - '+product.name or ''),
- 'product_id': product_id,
- 'uos_id': product_uom_id,
- 'account_id': account_id,
- 'account_analytic_id': account.id
- }
- invoice_line_obj.create(cr, uid, curr_line, context=context)
-
- if not balance_product:
- raise osv.except_osv(_('Balance product needed'), _('Please fill a Balance product in the wizard'))
- product = product_obj.browse(cr, uid, balance_product, context=context2)
- taxes = product.taxes_id
- tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
- account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id
- if not account_id:
- raise osv.except_osv(_("Configuration Error"), _("No income account defined for product '%s'") % product.name)
- curr_line = {
- 'price_unit': account.amount_max - amount_total,
- 'quantity': 1.0,
- 'discount': 0.0,
- 'invoice_line_tax_id': [(6,0,tax)],
- 'invoice_id': last_invoice,
- 'name': product.name,
- 'product_id': product.id,
- 'uos_id': product.uom_id.id,
- 'account_id': account_id,
- 'account_analytic_id': account.id
- }
- invoice_line_obj.create(cr, uid, curr_line, context=context)
- if account.amount_max < amount_total:
- invoice_obj.write(cr, uid, [last_invoice], {'type': 'out_refund',}, context=context)
- cr.execute('update account_analytic_line set invoice_id=%s where invoice_id is null and account_id=%s', (last_invoice, account.id))
-
- return {
- 'domain': "[('id','in', ["+','.join(map(str,invoices))+"])]",
- 'name': 'Invoices',
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'account.invoice',
- 'view_id': False,
- 'context': "{'type':'out_invoice'}",
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id']
- }
+ act_obj = self.pool.get('ir.actions.act_window')
+ mod_ids = mod_obj.search(cr, uid, [('name', '=', 'action_invoice_tree1')], context=context)[0]
+ res_id = mod_obj.read(cr, uid, mod_ids, ['res_id'], context=context)['res_id']
+ act_win = act_obj.read(cr, uid, res_id, [], context=context)
+ act_win['domain'] = [('id','in',invs),('type','=','out_invoice')]
+ act_win['name'] = _('Invoices')
+ return act_win
final_invoice_create()
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
index 502d35ff2d1..134bde8a872 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -27,43 +27,18 @@ from tools.translate import _
## Create an invoice based on selected timesheet lines
#
-#
-# TODO: check unit of measure !!!
-#
-class hr_timesheet_invoice_create(osv.osv_memory):
+class account_analytic_line(osv.osv):
+ _inherit = "account.analytic.line"
- _name = 'hr.timesheet.invoice.create'
- _description = 'Create invoice from timesheet'
- _columns = {
- 'date': fields.boolean('Date', help='The real date of each work will be displayed on the invoice'),
- 'time': fields.boolean('Time spent', help='The time of each work done will be displayed on the invoice'),
- 'name': fields.boolean('Description', help='The detail of each work done will be displayed on the invoice'),
- 'price': fields.boolean('Cost', help='The cost of each work done will be displayed on the invoice. You probably don\'t want to check this'),
- 'product': fields.many2one('product.product', 'Product', help='Complete this field only if you want to force to use a specific product. Keep empty to use the real product that comes from the cost.'),
- }
-
- _defaults = {
- 'date': lambda *args: 1,
- 'name': lambda *args: 1
- }
-
- def view_init(self, cr, uid, fields, context=None):
- """
- This function checks for precondition before wizard executes
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
- """
- analytic_obj = self.pool.get('account.analytic.line')
- data = context and context.get('active_ids', [])
- for analytic in analytic_obj.browse(cr, uid, data, context=context):
- if analytic.invoice_id:
- raise osv.except_osv(_('Warning !'), _("Invoice is already linked to some of the analytic line(s)!"))
-
- def do_create(self, cr, uid, ids, context=None):
- mod_obj = self.pool.get('ir.model.data')
+ #
+ # data = {
+ # 'date': boolean
+ # 'time': boolean
+ # 'name': boolean
+ # 'price': boolean
+ # 'product': many2one id
+ # }
+ def invoice_cost_create(self, cr, uid, ids, data={}, context=None):
analytic_account_obj = self.pool.get('account.analytic.account')
res_partner_obj = self.pool.get('res.partner')
account_payment_term_obj = self.pool.get('account.payment.term')
@@ -77,11 +52,9 @@ class hr_timesheet_invoice_create(osv.osv_memory):
invoices = []
if context is None:
context = {}
- result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
- data = self.read(cr, uid, ids, [], context=context)[0]
account_ids = {}
- for line in self.pool.get('account.analytic.line').browse(cr, uid, context['active_ids'], context=context):
+ for line in self.pool.get('account.analytic.line').browse(cr, uid, ids, context=context):
account_ids[line.account_id.id] = True
account_ids = account_ids.keys() #data['accounts']
@@ -127,7 +100,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
"FROM account_analytic_line as line " \
"WHERE account_id = %s " \
"AND id IN %s AND to_invoice IS NOT NULL " \
- "GROUP BY product_id,to_invoice,product_uom_id", (account.id, tuple(context['active_ids']),))
+ "GROUP BY product_id,to_invoice,product_uom_id", (account.id, tuple(ids),))
for product_id, factor_id, qty, uom in cr.fetchall():
product = product_obj.browse(cr, uid, product_id, context2)
@@ -135,7 +108,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
raise osv.except_osv(_('Error'), _('At least one line has no product !'))
factor_name = ''
factor = invoice_factor_obj.browse(cr, uid, factor_id, context2)
- if not data['product']:
+ if not data.get('product', False):
if factor.customer_name:
factor_name = product.name+' - '+factor.customer_name
else:
@@ -148,7 +121,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
ctx.update({'uom':uom})
if account.pricelist_id:
pl = account.pricelist_id.id
- price = pro_price_obj.price_get(cr,uid,[pl], data['product'] or product_id, qty or 1.0, account.partner_id.id, context=ctx)[pl]
+ price = pro_price_obj.price_get(cr,uid,[pl], data.get('product', False) or product_id, qty or 1.0, account.partner_id.id, context=ctx)[pl]
else:
price = 0.0
@@ -164,7 +137,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
'invoice_line_tax_id': [(6,0,tax )],
'invoice_id': last_invoice,
'name': factor_name,
- 'product_id': data['product'] or product_id,
+ 'product_id': data.get('product',product_id),
'invoice_line_tax_id': [(6,0,tax)],
'uos_id': uom,
'account_id': account_id,
@@ -174,37 +147,76 @@ class hr_timesheet_invoice_create(osv.osv_memory):
#
# Compute for lines
#
- cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN %s AND product_id=%s and to_invoice=%s ORDER BY account_analytic_line.date", (account.id, tuple(context['active_ids']), product_id, factor_id))
+ cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN %s AND product_id=%s and to_invoice=%s ORDER BY account_analytic_line.date", (account.id, tuple(ids), product_id, factor_id))
line_ids = cr.dictfetchall()
note = []
for line in line_ids:
# set invoice_line_note
details = []
- if data['date']:
+ if data.get('date', False):
details.append(line['date'])
- if data['time']:
+ if data.get('time', False):
if line['product_uom_id']:
details.append("%s %s" % (line['unit_amount'], product_uom_obj.browse(cr, uid, [line['product_uom_id']],context2)[0].name))
else:
details.append("%s" % (line['unit_amount'], ))
- if data['name']:
+ if data.get('name', False):
details.append(line['name'])
note.append(u' - '.join(map(lambda x: unicode(x) or '',details)))
curr_line['note'] = "\n".join(map(lambda x: unicode(x) or '',note))
invoice_line_obj.create(cr, uid, curr_line, context=context)
- cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s", (last_invoice, account.id, tuple(context['active_ids'])))
+ cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s", (last_invoice, account.id, tuple(ids)))
invoice_obj.button_reset_taxes(cr, uid, [last_invoice], context)
+ return invoices
+#
+# TODO: check unit of measure !!!
+#
+
+class hr_timesheet_invoice_create(osv.osv_memory):
+
+ _name = 'hr.timesheet.invoice.create'
+ _description = 'Create invoice from timesheet'
+ _columns = {
+ 'date': fields.boolean('Date', help='The real date of each work will be displayed on the invoice'),
+ 'time': fields.boolean('Time spent', help='The time of each work done will be displayed on the invoice'),
+ 'name': fields.boolean('Description', help='The detail of each work done will be displayed on the invoice'),
+ 'price': fields.boolean('Cost', help='The cost of each work done will be displayed on the invoice. You probably don\'t want to check this'),
+ 'product': fields.many2one('product.product', 'Product', help='Complete this field only if you want to force to use a specific product. Keep empty to use the real product that comes from the cost.'),
+ }
+
+ _defaults = {
+ 'date': lambda *args: 1,
+ 'name': lambda *args: 1
+ }
+
+ def view_init(self, cr, uid, fields, context=None):
+ """
+ This function checks for precondition before wizard executes
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+ """
+ analytic_obj = self.pool.get('account.analytic.line')
+ data = context and context.get('active_ids', [])
+ for analytic in analytic_obj.browse(cr, uid, data, context=context):
+ if analytic.invoice_id:
+ raise osv.except_osv(_('Warning !'), _("Invoice is already linked to some of the analytic line(s)!"))
+
+ def do_create(self, cr, uid, ids, context=None):
+ data = self.read(cr, uid, ids, [], context=context)[0]
+ invs = self.pool.get('account.analytic.line').invoice_cost_create(cr, uid, context['active_ids'], data, context=context)
mod_obj = self.pool.get('ir.model.data')
act_obj = self.pool.get('ir.actions.act_window')
-
mod_ids = mod_obj.search(cr, uid, [('name', '=', 'action_invoice_tree1')], context=context)[0]
res_id = mod_obj.read(cr, uid, mod_ids, ['res_id'], context=context)['res_id']
act_win = act_obj.read(cr, uid, res_id, [], context=context)
- act_win['domain'] = [('id','in',invoices),('type','=','out_invoice')]
+ act_win['domain'] = [('id','in',invs),('type','=','out_invoice')]
act_win['name'] = _('Invoices')
return act_win
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
index b45deeae8a2..d366e795c15 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
@@ -1,49 +1,50 @@
-
-
- hr.timesheet.invoice.create.final.form
- hr.timesheet.invoice.create.final
- form
-
-
-
-
-
- Final Invoice
+ Create Invoiceir.actions.act_windowhr.timesheet.invoice.create.finalformformnew
+
-
+
- Final Invoice
+ Invoiceclient_action_multiactionaccount.analytic.account
-
+
+
+ hr.timesheet.invoice.create.final.form
+ hr.timesheet.invoice.create.final
+ form
+
+
+
+
+
+
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
index 1696710b712..60b60e88550 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
@@ -43,7 +43,6 @@
- Create Invoiceclient_action_multi
diff --git a/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml b/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
index fd9b27f42aa..39ab5fe3482 100644
--- a/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
+++ b/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
@@ -40,8 +40,8 @@
form
-
-
+
+
diff --git a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py
index d20ad3a5f4c..49b18f75e4b 100644
--- a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py
+++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py
@@ -80,3 +80,5 @@ class hr_timesheet_report(osv.osv):
)
""")
hr_timesheet_report()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml
index 96151786676..11915fb64c9 100644
--- a/addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml
@@ -41,11 +41,12 @@
-
-
+
@@ -90,7 +91,7 @@
hr.timesheet.reportformtree,graph
- {'search_default_month':1,'search_default_group_user_id':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_year':1,'search_default_month':1,'search_default_group_user_id':1,'group_by_no_leaf':1,'group_by':[]}This report performs analysis on timesheets created by your human resources in the system. It allows you to have a full overview of entries done by your employees. You can group them by specific selection criteria thanks to the search tool.formtree,graph
- {'search_default_month':1,'search_default_User_id':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_year':1,'search_default_month':1,'search_default_User_id':1,'group_by_no_leaf':1,'group_by':[]}Ideas
-
diff --git a/addons/import_base/__init__.py b/addons/import_base/__init__.py
index 0a5d7fb20b7..52366e5128a 100644
--- a/addons/import_base/__init__.py
+++ b/addons/import_base/__init__.py
@@ -20,4 +20,6 @@
##############################################################################
import import_framework
-import mapper
\ No newline at end of file
+import mapper
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_base/__openerp__.py b/addons/import_base/__openerp__.py
index 6d4f4374dfe..0f65cf166b6 100644
--- a/addons/import_base/__openerp__.py
+++ b/addons/import_base/__openerp__.py
@@ -37,3 +37,5 @@
'installable': True,
'active': False,
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_base/import_framework.py b/addons/import_base/import_framework.py
index 1f627d2ad58..ecc5f54e461 100644
--- a/addons/import_base/import_framework.py
+++ b/addons/import_base/import_framework.py
@@ -498,3 +498,5 @@ class import_framework(Thread):
def intialize_test(self):
pass
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_base/mapper.py b/addons/import_base/mapper.py
index 0827509ffab..d68447ad3dd 100644
--- a/addons/import_base/mapper.py
+++ b/addons/import_base/mapper.py
@@ -167,3 +167,5 @@ class call(mapper):
else:
args.append(arg)
return self.fun(external_values, *args)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_google/wizard/google_import_message.py b/addons/import_google/wizard/google_import_message.py
index 5e2b2b6f4b1..bba58cd2250 100644
--- a/addons/import_google/wizard/google_import_message.py
+++ b/addons/import_google/wizard/google_import_message.py
@@ -40,3 +40,5 @@ class google_import_message(osv.osv):
return res
google_import_message()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_google/wizard/import_google.py b/addons/import_google/wizard/import_google.py
index 87155c806c6..936a6d17649 100644
--- a/addons/import_google/wizard/import_google.py
+++ b/addons/import_google/wizard/import_google.py
@@ -353,3 +353,5 @@ class google_import(import_framework):
}
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_sugarcrm/__init__.py b/addons/import_sugarcrm/__init__.py
index 250589105b0..8fdd9aec302 100644
--- a/addons/import_sugarcrm/__init__.py
+++ b/addons/import_sugarcrm/__init__.py
@@ -23,3 +23,5 @@ import import_sugarcrm
import sugar
import wizard
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_sugarcrm/import_sugarcrm.py b/addons/import_sugarcrm/import_sugarcrm.py
index d5f487c5377..b3908be0050 100644
--- a/addons/import_sugarcrm/import_sugarcrm.py
+++ b/addons/import_sugarcrm/import_sugarcrm.py
@@ -1147,3 +1147,5 @@ class import_sugarcrm(osv.osv):
}
import_sugarcrm()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_sugarcrm/sugar.py b/addons/import_sugarcrm/sugar.py
index 4ce5e0048ea..35103a41173 100644
--- a/addons/import_sugarcrm/sugar.py
+++ b/addons/import_sugarcrm/sugar.py
@@ -176,3 +176,5 @@ def search(portType, sessionid, module_name, offset, max_results, query=None, or
ans_list.append(ans_dir)
#end for
return ans_list
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_sugarcrm/sugarsoap_services.py b/addons/import_sugarcrm/sugarsoap_services.py
index a80102e5081..b42eb4041c1 100644
--- a/addons/import_sugarcrm/sugarsoap_services.py
+++ b/addons/import_sugarcrm/sugarsoap_services.py
@@ -1418,3 +1418,5 @@ class get_attendee_listResponse:
self._return = None
return
get_attendee_listResponse.typecode.pyclass = get_attendee_listResponse
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_sugarcrm/sugarsoap_services_types.py b/addons/import_sugarcrm/sugarsoap_services_types.py
index acd22bbb97f..182e9ce4c37 100644
--- a/addons/import_sugarcrm/sugarsoap_services_types.py
+++ b/addons/import_sugarcrm/sugarsoap_services_types.py
@@ -644,3 +644,5 @@ class ns0:
self.pyclass = Holder
# end class ns0 (tns: http://www.sugarcrm.com/sugarcrm)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_sugarcrm/wizard/__init__.py b/addons/import_sugarcrm/wizard/__init__.py
index 6910c3981bd..08b611401b1 100644
--- a/addons/import_sugarcrm/wizard/__init__.py
+++ b/addons/import_sugarcrm/wizard/__init__.py
@@ -20,3 +20,5 @@
##############################################################################
import import_message
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/import_sugarcrm/wizard/import_message.py b/addons/import_sugarcrm/wizard/import_message.py
index 7c9f1703282..1d2e765580b 100644
--- a/addons/import_sugarcrm/wizard/import_message.py
+++ b/addons/import_sugarcrm/wizard/import_message.py
@@ -27,3 +27,5 @@ class import_message(osv.osv):
_description = __doc__
import_message()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_at/__init__.py b/addons/l10n_at/__init__.py
index b3516a699d9..a295fe1bd73 100644
--- a/addons/l10n_at/__init__.py
+++ b/addons/l10n_at/__init__.py
@@ -19,4 +19,6 @@
#
##############################################################################
-import account_wizard
\ No newline at end of file
+import account_wizard
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_at/__openerp__.py b/addons/l10n_at/__openerp__.py
index d28598c1ed2..570841374d8 100644
--- a/addons/l10n_at/__openerp__.py
+++ b/addons/l10n_at/__openerp__.py
@@ -33,3 +33,5 @@
"installable": True
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_at/account_wizard.py b/addons/l10n_at/account_wizard.py
index cf63b2c5dc3..15b0735b9ca 100644
--- a/addons/l10n_at/account_wizard.py
+++ b/addons/l10n_at/account_wizard.py
@@ -32,3 +32,5 @@ class AccountWizard_cd(osv.osv_memory):
AccountWizard_cd()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_be/__openerp__.py b/addons/l10n_be/__openerp__.py
index 26c9837a8bf..d4300186660 100644
--- a/addons/l10n_be/__openerp__.py
+++ b/addons/l10n_be/__openerp__.py
@@ -42,27 +42,27 @@ Wizards provided by this module:
""",
'author': 'OpenERP SA',
'depends': [
- 'account',
- 'base_vat',
- 'base_iban',
- 'account_chart',
- 'account_coda',
- ],
+ 'account',
+ 'base_vat',
+ 'base_iban',
+ 'account_chart',
+ 'account_coda',
+ ],
'init_xml': [],
'update_xml': [
- 'account_pcmn_belgium.xml',
- 'account_tax_code_template.xml',
- 'account_chart_template.xml',
- 'account_tax_template.xml',
- 'l10n_be_wizard.xml',
- 'wizard/l10n_be_account_vat_declaration_view.xml',
- 'wizard/l10n_be_vat_intra_view.xml',
- 'wizard/l10n_be_partner_vat_listing.xml',
- 'l10n_be_sequence.xml',
- 'fiscal_templates.xml',
- 'account_fiscal_position_tax_template.xml',
- 'security/ir.model.access.csv'
- ],
+ 'account_pcmn_belgium.xml',
+ 'account_tax_code_template.xml',
+ 'account_chart_template.xml',
+ 'account_tax_template.xml',
+ 'wizard/l10n_be_account_vat_declaration_view.xml',
+ 'wizard/l10n_be_vat_intra_view.xml',
+ 'wizard/l10n_be_partner_vat_listing.xml',
+ 'l10n_be_sequence.xml',
+ 'fiscal_templates.xml',
+ 'account_fiscal_position_tax_template.xml',
+ 'security/ir.model.access.csv',
+ 'l10n_be_wizard.yml'
+ ],
'demo_xml': [],
'installable': True,
'certificate': '0031977724637',
diff --git a/addons/l10n_be/l10n_be_wizard.xml b/addons/l10n_be/l10n_be_wizard.xml
deleted file mode 100644
index 194e2881d1b..00000000000
--- a/addons/l10n_be/l10n_be_wizard.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
- automatic
-
-
-
-
diff --git a/addons/l10n_be/l10n_be_wizard.yml b/addons/l10n_be/l10n_be_wizard.yml
new file mode 100644
index 00000000000..a51d1d55244
--- /dev/null
+++ b/addons/l10n_be/l10n_be_wizard.yml
@@ -0,0 +1,16 @@
+-
+ !record {model: ir.actions.todo, id: config_call_account_template}:
+ action_id: account.action_wizard_multi_chart
+ category_id: account.category_accounting_configuration
+ type: automatic
+-
+ !python {model: ir.actions.todo}: |
+ if self.browse(cr, uid, ref('l10n_be.config_call_account_template')).state=='open':
+ wiz = self.pool.get('wizard.multi.charts.accounts')
+ wiz_id = wiz.create(cr, uid, {
+ 'chart_template_id': ref('l10n_be.l10nbe_chart_template')
+ })
+ wiz.execute(cr, uid, [wiz_id])
+ self.write(cr, uid, [ref('l10n_be.config_call_account_template')], {
+ 'state': 'done'
+ })
diff --git a/addons/l10n_be_invoice_bba/__init__.py b/addons/l10n_be_invoice_bba/__init__.py
index 176d1b9a904..48cd4bc0347 100644
--- a/addons/l10n_be_invoice_bba/__init__.py
+++ b/addons/l10n_be_invoice_bba/__init__.py
@@ -22,3 +22,5 @@
import partner
import invoice
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_be_invoice_bba/__openerp__.py b/addons/l10n_be_invoice_bba/__openerp__.py
index e4b209317d0..c18f49817b5 100644
--- a/addons/l10n_be_invoice_bba/__openerp__.py
+++ b/addons/l10n_be_invoice_bba/__openerp__.py
@@ -53,3 +53,5 @@ A 'random' Structured Communication will generated if no algorithm is specified
],
'active': False,
'installable': True,}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_be_invoice_bba/invoice.py b/addons/l10n_be_invoice_bba/invoice.py
index 947ccb6f71c..997036c0cec 100644
--- a/addons/l10n_be_invoice_bba/invoice.py
+++ b/addons/l10n_be_invoice_bba/invoice.py
@@ -215,3 +215,5 @@ class account_invoice(osv.osv):
]
account_invoice()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_be_invoice_bba/partner.py b/addons/l10n_be_invoice_bba/partner.py
index 194ae39ed86..04a51c3a6ab 100644
--- a/addons/l10n_be_invoice_bba/partner.py
+++ b/addons/l10n_be_invoice_bba/partner.py
@@ -50,3 +50,5 @@ class res_partner(osv.osv):
'out_inv_comm_type': 'none',
}
res_partner()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_br/account.py b/addons/l10n_br/account.py
index 965ff500829..92f724a7762 100644
--- a/addons/l10n_br/account.py
+++ b/addons/l10n_br/account.py
@@ -174,4 +174,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
if tax.tax_code_id:
obj_acc_tax.write(cr, uid, tax.id, {'domain': tax.tax_code_id.domain,'tax_discount': tax.tax_code_id.tax_discount})
-wizard_multi_charts_accounts()
\ No newline at end of file
+wizard_multi_charts_accounts()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_br/i18n/oc.po b/addons/l10n_br/i18n/oc.po
new file mode 100644
index 00000000000..371c4f5adeb
--- /dev/null
+++ b/addons/l10n_br/i18n/oc.po
@@ -0,0 +1,36 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-07 06:40+0000\n"
+"PO-Revision-Date: 2011-11-20 09:22+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: l10n_br
+#: model:ir.actions.todo,note:l10n_br.config_call_account_template_brazilian_localization
+msgid ""
+"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
+"the name of the company, the chart template to follow, the no. of digits to "
+"generate the code for your accounts and Bank account, currency to create "
+"Journals. Thus,the pure copy of chart Template is generated.\n"
+" This is the same wizard that runs from Financial "
+"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
+"Chart of Accounts from a Chart Template."
+msgstr ""
+
+#. module: l10n_br
+#: model:ir.module.module,description:l10n_br.module_meta_information
+#: model:ir.module.module,shortdesc:l10n_br.module_meta_information
+msgid "Brazilian Localization"
+msgstr "Localizacion brasilièra"
diff --git a/addons/l10n_ch/__openerp__.py b/addons/l10n_ch/__openerp__.py
index 1c6bb5688d7..cabd15e42de 100644
--- a/addons/l10n_ch/__openerp__.py
+++ b/addons/l10n_ch/__openerp__.py
@@ -63,7 +63,7 @@ TODO :
""",
"version" : "6.1",
"author" : "Camptocamp",
- "category" : "Finance",
+ 'category': 'Localization/Account Charts',
"website": "http://www.camptocamp.com",
"depends" : [
diff --git a/addons/l10n_ch/account_wizard.py b/addons/l10n_ch/account_wizard.py
index f9b2600adca..7b80e3697ee 100644
--- a/addons/l10n_ch/account_wizard.py
+++ b/addons/l10n_ch/account_wizard.py
@@ -42,3 +42,5 @@ class WizardMultiChartsAccounts(osv.osv_memory):
WizardMultiChartsAccounts()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_ch/bank.py b/addons/l10n_ch/bank.py
index 6b9294bea13..fd69dec625f 100644
--- a/addons/l10n_ch/bank.py
+++ b/addons/l10n_ch/bank.py
@@ -77,3 +77,5 @@ class ResPartnerBank(osv.osv):
'The BVR adherent number must be unique !')]
ResPartnerBank()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_ch/report/__init__.py b/addons/l10n_ch/report/__init__.py
index 04cc14f1d80..e8703f10d03 100644
--- a/addons/l10n_ch/report/__init__.py
+++ b/addons/l10n_ch/report/__init__.py
@@ -29,4 +29,6 @@
#
##############################################################################
-import report_webkit_html
\ No newline at end of file
+import report_webkit_html
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_ch/report/report_webkit_html.py b/addons/l10n_ch/report/report_webkit_html.py
index b551845322f..8b179e7ae58 100644
--- a/addons/l10n_ch/report/report_webkit_html.py
+++ b/addons/l10n_ch/report/report_webkit_html.py
@@ -322,3 +322,5 @@ BVRWebKitParser('report.invoice_web_bvr',
'account.invoice',
'addons/l10n_ch/report/report_webkit_html.mako',
parser=l10n_ch_report_webkit_html)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_ch/test/l10n_ch_dta.yml b/addons/l10n_ch/test/l10n_ch_dta.yml
index 3f1dbacfd86..5dc41adedd8 100644
--- a/addons/l10n_ch/test/l10n_ch_dta.yml
+++ b/addons/l10n_ch/test/l10n_ch_dta.yml
@@ -6,7 +6,7 @@
# Creating 1 invoice #
###########################
-
- !record {model: account.invoice, id: dta_account_invoice}:
+ !record {model: account.invoice, id: dta_account_invoice, view: False}:
company_id: base.main_company
journal_id: account.bank_journal
currency_id: base.EUR
@@ -25,7 +25,7 @@
-
I add an invoice line
-
- !record {model: account.invoice.line, id: dta_invoice_line}:
+ !record {model: account.invoice.line, id: dta_invoice_line, view: False}:
account_id: account.a_expense
name: '[PC1] Basic PC'
price_unit: 700.0
diff --git a/addons/l10n_ch/test/l10n_ch_report.yml b/addons/l10n_ch/test/l10n_ch_report.yml
index e5b570fe58f..f120b14f33b 100644
--- a/addons/l10n_ch/test/l10n_ch_report.yml
+++ b/addons/l10n_ch/test/l10n_ch_report.yml
@@ -35,7 +35,7 @@
-
In order to test the PDF BVR webkit reports defined on an invoice, we will create a Invoice Record
-
- !record {model: account.invoice, id: l10n_ch_invoice}:
+ !record {model: account.invoice, id: l10n_ch_invoice, view: False}:
currency_id: base.CHF
company_id: base.main_company
address_invoice_id: res_partner_address_2
@@ -49,7 +49,7 @@
-
In order to test the BVR report, I will assign a bank to the invoice
-
- !record {model: account.invoice, id: l10n_ch_invoice}:
+ !record {model: account.invoice, id: l10n_ch_invoice, view: False}:
partner_bank_id: main_partner_bank
-
In order to test the PDF reports defined on a l10n_ch, we will print BVR Report
@@ -57,4 +57,4 @@
!python {model: account.invoice}: |
from tools.test_reports import try_report
company = self.pool.get('res.users').browse(cr, uid, uid).company_id
- company.lib_path and try_report(cr, uid, 'report.invoice_web_bvr', [ref('l10n_ch_invoice')]) or 'Webkit lib not set'
\ No newline at end of file
+ company.lib_path and try_report(cr, uid, 'report.invoice_web_bvr', [ref('l10n_ch_invoice')]) or 'Webkit lib not set'
diff --git a/addons/l10n_ch/test/l10n_ch_v11.yml b/addons/l10n_ch/test/l10n_ch_v11.yml
index 35e9870fe69..e30012dd6b8 100644
--- a/addons/l10n_ch/test/l10n_ch_v11.yml
+++ b/addons/l10n_ch/test/l10n_ch_v11.yml
@@ -4,7 +4,7 @@
-
I create an invoice ref 1234567
-
- !record {model: account.invoice, id: v11_test_invoice}:
+ !record {model: account.invoice, id: v11_test_invoice, view: False}:
name: V11 YAML invoice
number: 1234567
company_id: base.main_company
@@ -26,7 +26,7 @@
-
I create an invoice line
-
- !record {model: account.invoice.line, id: v11_test_invoice_line}:
+ !record {model: account.invoice.line, id: v11_test_invoice_line, view: False}:
account_id: account.a_expense
name: '[PC1] Basic PC'
price_unit: 888.00
@@ -51,7 +51,7 @@
-
I create a bank statement
-
- !record {model: account.bank.statement, id: v11_test_bank_statement}:
+ !record {model: account.bank.statement, id: v11_test_bank_statement, view: False}:
#account_id:
#balance_end:
#balance_end_cash:
diff --git a/addons/l10n_ch/test/l10n_ch_v11_part.yml b/addons/l10n_ch/test/l10n_ch_v11_part.yml
index ea0b88eff79..af726ae97ea 100644
--- a/addons/l10n_ch/test/l10n_ch_v11_part.yml
+++ b/addons/l10n_ch/test/l10n_ch_v11_part.yml
@@ -5,7 +5,7 @@
-
I create an invoice ref 2000999 of EUR 250.00
-
- !record {model: account.invoice, id: v11_part_test_invoice}:
+ !record {model: account.invoice, id: v11_part_test_invoice, view: False}:
name: V11 YAML invoice
number: 2000999
company_id: base.main_company
@@ -27,7 +27,7 @@
-
I create an invoice line
-
- !record {model: account.invoice.line, id: v11_part_test_invoice_line}:
+ !record {model: account.invoice.line, id: v11_part_test_invoice_line, view: False}:
account_id: account.a_expense
name: '[PC1] Basic PC'
price_unit: 250.00
@@ -55,7 +55,7 @@
# Creating 1st bank statement #
#########################################
-
- !record {model: account.bank.statement, id: v11_part_test_bank_statement_1}:
+ !record {model: account.bank.statement, id: v11_part_test_bank_statement_1, view: False}:
#account_id:
#balance_end:
#balance_end_cash:
@@ -176,7 +176,7 @@
# Creating 2nd bank statement #
#########################################
-
- !record {model: account.bank.statement, id: v11_part_test_bank_statement_2}:
+ !record {model: account.bank.statement, id: v11_part_test_bank_statement_2, view: False}:
#account_id:
#balance_end:
#balance_end_cash:
diff --git a/addons/l10n_ch/wizard/create_dta_view.xml b/addons/l10n_ch/wizard/create_dta_view.xml
index 53d0cdc42d8..11cd2095e28 100644
--- a/addons/l10n_ch/wizard/create_dta_view.xml
+++ b/addons/l10n_ch/wizard/create_dta_view.xml
@@ -32,7 +32,6 @@
- Create DTAclient_action_multi
@@ -40,4 +39,4 @@
payment.order
-
\ No newline at end of file
+
diff --git a/addons/l10n_ch/wizard/unicode2ascii.py b/addons/l10n_ch/wizard/unicode2ascii.py
index 7d95a4ab714..1cec519420c 100644
--- a/addons/l10n_ch/wizard/unicode2ascii.py
+++ b/addons/l10n_ch/wizard/unicode2ascii.py
@@ -590,3 +590,5 @@ if __name__ == '__main__':
if argz: parser.error('Only stdin -> stdout conversion suported')
uc_filter(sys.stdin, sys.stdout, bs=optz.bs, in_enc=optz.src_enc, out_enc=optz.dst_enc)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_cr/__init__.py b/addons/l10n_cr/__init__.py
index c4c6ee3e380..88b86329a8d 100644
--- a/addons/l10n_cr/__init__.py
+++ b/addons/l10n_cr/__init__.py
@@ -32,3 +32,5 @@
#
##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_de/__openerp__.py b/addons/l10n_de/__openerp__.py
index 8cbdaa3b6ee..646836eba2a 100644
--- a/addons/l10n_de/__openerp__.py
+++ b/addons/l10n_de/__openerp__.py
@@ -152,3 +152,5 @@ German accounting chart and localization.
"certificate": "00517849017945584893",
'images': ['images/config_chart_l10n_de.jpeg','images/l10n_de_chart.jpeg'],
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_ec/__init__.py b/addons/l10n_ec/__init__.py
index e59e7efc423..d9537494d6e 100644
--- a/addons/l10n_ec/__init__.py
+++ b/addons/l10n_ec/__init__.py
@@ -18,3 +18,5 @@
#
##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_ec/__openerp__.py b/addons/l10n_ec/__openerp__.py
index 0e93a3ac57b..f3dbf88289b 100644
--- a/addons/l10n_ec/__openerp__.py
+++ b/addons/l10n_ec/__openerp__.py
@@ -47,3 +47,5 @@ Accounting chart and localization for Ecuador.
'certificate' : '001226484516187330589',
'images': ['images/config_chart_l10n_ec.jpeg','images/l10n_ec_chart.jpeg'],
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_es/__init__.py b/addons/l10n_es/__init__.py
index 297d923f6bb..bec854aac95 100644
--- a/addons/l10n_es/__init__.py
+++ b/addons/l10n_es/__init__.py
@@ -24,3 +24,5 @@
##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_es/__openerp__.py b/addons/l10n_es/__openerp__.py
index 3cdc521ad60..e2f5ad3402d 100644
--- a/addons/l10n_es/__openerp__.py
+++ b/addons/l10n_es/__openerp__.py
@@ -59,3 +59,5 @@ for yearly account reporting (balance, profit & losses).
"certificate" : "00408828172062583229",
'images': ['images/config_chart_l10n_es.jpeg','images/l10n_es_chart.jpeg'],
}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/l10n_es/i18n/oc.po b/addons/l10n_es/i18n/oc.po
new file mode 100644
index 00000000000..3abe8d9ae4a
--- /dev/null
+++ b/addons/l10n_es/i18n/oc.po
@@ -0,0 +1,39 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:15+0000\n"
+"PO-Revision-Date: 2011-11-20 09:22+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: l10n_es
+#: model:ir.module.module,shortdesc:l10n_es.module_meta_information
+msgid "Spanish Charts of Accounts (PGCE 2008)"
+msgstr "Plan comptable espanhòl (PGCE 2008)"
+
+#. module: l10n_es
+#: model:ir.module.module,description:l10n_es.module_meta_information
+msgid ""
+"Spanish Charts of Accounts (PGCE 2008)\n"
+"\n"
+"* Defines the following chart of account templates:\n"
+" * Spanish General Chart of Accounts 2008.\n"
+" * Spanish General Chart of Accounts 2008 for small and medium "
+"companies.\n"
+"* Defines templates for sale and purchase VAT.\n"
+"* Defines tax code templates.\n"
+"\n"
+"Note: You should install the l10n_ES_account_balance_report module\n"
+"for yearly account reporting (balance, profit & losses).\n"
+msgstr ""
diff --git a/addons/l10n_fr/wizard/fr_report_bilan_view.xml b/addons/l10n_fr/wizard/fr_report_bilan_view.xml
index e8615935b8c..eb66de9f012 100644
--- a/addons/l10n_fr/wizard/fr_report_bilan_view.xml
+++ b/addons/l10n_fr/wizard/fr_report_bilan_view.xml
@@ -31,7 +31,6 @@
- Bilan Reportclient_print_multi
@@ -40,4 +39,4 @@
-
\ No newline at end of file
+
diff --git a/addons/l10n_fr/wizard/fr_report_compute_resultant_view.xml b/addons/l10n_fr/wizard/fr_report_compute_resultant_view.xml
index f50ec1ef308..5499e2fe1cf 100644
--- a/addons/l10n_fr/wizard/fr_report_compute_resultant_view.xml
+++ b/addons/l10n_fr/wizard/fr_report_compute_resultant_view.xml
@@ -30,7 +30,6 @@
- Compte de resultat Reportclient_print_multi
@@ -39,4 +38,4 @@
-
\ No newline at end of file
+
diff --git a/addons/l10n_gt/i18n/oc.po b/addons/l10n_gt/i18n/oc.po
new file mode 100644
index 00000000000..e077ec6c3c0
--- /dev/null
+++ b/addons/l10n_gt/i18n/oc.po
@@ -0,0 +1,39 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:15+0000\n"
+"PO-Revision-Date: 2011-11-20 09:23+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: l10n_gt
+#: model:ir.module.module,shortdesc:l10n_gt.module_meta_information
+msgid "Guatemala - Plan contable general"
+msgstr "Guatemala - Plan comptable general"
+
+#. module: l10n_gt
+#: model:ir.actions.todo,note:l10n_gt.config_call_account_template_gt_minimal
+msgid ""
+"Generar la nomenclatura contable a partir de un modelo. Deberá seleccionar "
+"una compañía, el modelo a utilizar, el número de digitos a usar en la "
+"nomenclatura, la moneda para crear los diarios."
+msgstr ""
+
+#. module: l10n_gt
+#: model:ir.module.module,description:l10n_gt.module_meta_information
+msgid ""
+"Agrega una nomenclatura contable para Guatemala. También icluye impuestos y "
+"la moneda del Quetzal. -- Adds accounting chart for Guatemala. It also "
+"includes taxes and the Quetzal currency"
+msgstr ""
diff --git a/addons/l10n_in/i18n/oc.po b/addons/l10n_in/i18n/oc.po
new file mode 100644
index 00000000000..f52b722a33a
--- /dev/null
+++ b/addons/l10n_in/i18n/oc.po
@@ -0,0 +1,46 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:15+0000\n"
+"PO-Revision-Date: 2011-11-20 09:23+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: l10n_in
+#: model:ir.module.module,description:l10n_in.module_meta_information
+msgid ""
+"\n"
+" Indian Accounting : chart of Account\n"
+" "
+msgstr ""
+"\n"
+" Comptabilitat indiana : plan de comptes\n"
+" "
+
+#. module: l10n_in
+#: model:ir.module.module,shortdesc:l10n_in.module_meta_information
+msgid "Indian Chart of Account"
+msgstr "Plan comptable indian"
+
+#. module: l10n_in
+#: model:ir.actions.todo,note:l10n_in.config_call_account_template_in_minimal
+msgid ""
+"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
+"the name of the company, the chart template to follow, the no. of digits to "
+"generate the code for your accounts and Bank account, currency to create "
+"Journals. Thus,the pure copy of chart Template is generated.\n"
+"\tThis is the same wizard that runs from Financial "
+"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
+"Chart of Accounts from a Chart Template."
+msgstr ""
diff --git a/addons/l10n_it/__init__.py b/addons/l10n_it/__init__.py
index 026004bfa0f..491d2cc7b66 100644
--- a/addons/l10n_it/__init__.py
+++ b/addons/l10n_it/__init__.py
@@ -1,13 +1,15 @@
-# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010
-# Italian OpenERP Community ()
+# OpenERP Italian Community ()
# Servabit srl
# Agile Business Group sagl
# Domsense srl
-# Albatos srl
+# Albatos srl
+#
+# Copyright (C) 2011
+# Associazione OpenERP Italia ()
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -23,6 +25,3 @@
# along with this program. If not, see .
#
##############################################################################
-
-import libroIVA
-import report
diff --git a/addons/l10n_it/__openerp__.py b/addons/l10n_it/__openerp__.py
index d6138608aa2..2c5811a6915 100644
--- a/addons/l10n_it/__openerp__.py
+++ b/addons/l10n_it/__openerp__.py
@@ -3,12 +3,15 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010
-# Italian OpenERP Community ()
+# OpenERP Italian Community ()
# Servabit srl
# Agile Business Group sagl
# Domsense srl
# Albatos srl
#
+# Copyright (C) 2011
+# Associazione OpenERP Italia ()
+#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
@@ -39,9 +42,6 @@ Italian accounting chart and localization.
"category" : "Localization/Account Charts",
'website': 'http://www.openerp-italia.org/',
'init_xml': [
- 'report.xml',
- 'libroIVA_view.xml',
- 'libroIVA_menu.xml',
],
'update_xml': [
'data/account.account.type.csv',
@@ -51,7 +51,6 @@ Italian accounting chart and localization.
'data/account.tax.template.csv',
'data/account.fiscal.position.template.csv',
'l10n_chart_it_generic.xml',
- 'security/ir.model.access.csv',
],
'demo_xml': [
],
diff --git a/addons/l10n_it/data/account.account.template.csv b/addons/l10n_it/data/account.account.template.csv
index 388d037ad4e..a1db05a3da9 100644
--- a/addons/l10n_it/data/account.account.template.csv
+++ b/addons/l10n_it/data/account.account.template.csv
@@ -1,234 +1,235 @@
"id","code","name","parent_id:id","user_type:id","type","reconcile"
-0,0,"Azienda",,"account_type_view","view",FALSE
-1,1,"ATTIVO ",0,"account_type_view","view",TRUE
-11,11,"IMMOBILIZZAZIONI IMMATERIALI ",1,"account_type_view","view",TRUE
-1101,1101,"costi di impianto ",11,"account_type_view","other",TRUE
-1106,1106,"software ",11,"account_type_view","other",TRUE
-1108,1108,"avviamento ",11,"account_type_view","other",TRUE
-1111,1111,"fondo ammortamento costi di impianto ",11,"account_type_view","other",TRUE
-1116,1116,"fondo ammortamento software ",11,"account_type_view","other",TRUE
-1118,1118,"fondo ammortamento avviamento ",11,"account_type_view","other",TRUE
-12,12,"IMMOBILIZZAZIONI MATERIALI ",1,"account_type_view","view",TRUE
-1201,1201,"fabbricati ",12,"account_type_view","other",TRUE
-1202,1202,"impianti e macchinari ",12,"account_type_view","other",TRUE
-1204,1204,"attrezzature commerciali ",12,"account_type_view","other",TRUE
-1205,1205,"macchine d'ufficio ",12,"account_type_view","other",TRUE
-1206,1206,"arredamento ",12,"account_type_view","other",TRUE
-1207,1207,"automezzi ",12,"account_type_view","other",TRUE
-1208,1208,"imballaggi durevoli ",12,"account_type_view","other",TRUE
-1211,1211,"fondo ammortamento fabbricati ",12,"account_type_view","other",TRUE
-1212,1212,"fondo ammortamento impianti e macchinari ",12,"account_type_view","other",TRUE
-1214,1214,"fondo ammortamento attrezzature commerciali ",12,"account_type_view","other",TRUE
-1215,1215,"fondo ammortamento macchine d'ufficio ",12,"account_type_view","other",TRUE
-1216,1216,"fondo ammortamento arredamento ",12,"account_type_view","other",TRUE
-1217,1217,"fondo ammortamento automezzi ",12,"account_type_view","other",TRUE
-1218,1218,"fondo ammortamento imballaggi durevoli ",12,"account_type_view","other",TRUE
-1220,1220,"fornitori immobilizzazioni c/acconti ",12,"account_type_view","other",TRUE
-13,13,"IMMOBILIZZAZIONI FINANZIARIE ",1,"account_type_view","view",TRUE
-1301,1301,"mutui attivi ",13,"account_type_view","other",TRUE
-14,14,"RIMANENZE ",1,"account_type_view","view",TRUE
-1401,1401,"materie di consumo ",14,"account_type_view","other",TRUE
-1404,1404,"merci ",14,"account_type_view","other",TRUE
-1410,1410,"fornitori c/acconti ",14,"account_type_view","other",TRUE
-15,15,"CREDITI COMMERCIALI ",1,"account_type_view","view",TRUE
-1501,1501,"crediti v/clienti ",15,"account_type_receivable","receivable",TRUE
-1502,1502,"crediti commerciali diversi ",15,"account_type_receivable","other",TRUE
-1503,1503,"clienti c/spese anticipate ",15,"account_type_receivable","receivable",TRUE
-1505,1505,"cambiali attive ",15,"account_type_receivable","other",TRUE
-1506,1506,"cambiali allo sconto ",15,"account_type_receivable","other",TRUE
-1507,1507,"cambiali all'incasso ",15,"account_type_receivable","other",TRUE
-1509,1509,"fatture da emettere ",15,"account_type_receivable","other",TRUE
-1510,1510,"crediti insoluti ",15,"account_type_receivable","other",TRUE
-1511,1511,"cambiali insolute ",15,"account_type_receivable","other",TRUE
-1531,1531,"crediti da liquidare ",15,"account_type_receivable","other",TRUE
-1540,1540,"fondo svalutazione crediti ",15,"account_type_receivable","other",TRUE
-1541,1541,"fondo rischi su crediti ",15,"account_type_receivable","other",TRUE
-16,16,"CREDITI DIVERSI ",1,"account_type_view","view",TRUE
-1601,1601,"IVA n/credito ",16,"account_type_receivable","other",TRUE
-1602,1602,"IVA c/acconto ",16,"account_type_receivable","other",TRUE
-1605,1605,"crediti per IVA ",16,"account_type_receivable","other",TRUE
-1607,1607,"imposte c/acconto ",16,"account_type_receivable","other",TRUE
-1608,1608,"crediti per imposte ",16,"account_type_receivable","other",TRUE
-1609,1609,"crediti per ritenute subite ",16,"account_type_receivable","other",TRUE
-1610,1610,"crediti per cauzioni ",16,"account_type_receivable","other",TRUE
-1620,1620,"personale c/acconti ",16,"account_type_receivable","other",TRUE
-1630,1630,"crediti v/istituti previdenziali ",16,"account_type_receivable","other",TRUE
-1640,1640,"debitori diversi ",16,"account_type_receivable","receivable",TRUE
-18,18,"DISPONIBILITÀ LIQUIDE ",1,"account_type_view","view",TRUE
-1801,1801,"banche c/c ",18,"account_type_bank","liquidity",TRUE
-1810,1810,"c/c postali ",18,"account_type_cash","liquidity",TRUE
-1820,1820,"denaro in cassa ",18,"account_type_cash","liquidity",TRUE
-1821,1821,"assegni ",18,"account_type_cash","liquidity",TRUE
-1822,1822,"valori bollati ",18,"account_type_cash","liquidity",TRUE
-19,19,"RATEI E RISCONTI ATTIVI ",1,"account_type_view","view",TRUE
-1901,1901,"ratei attivi ",19,"account_type_view","other",TRUE
-1902,1902,"risconti attivi ",19,"account_type_view","other",TRUE
-2,2,"PASSIVO ",0,"account_type_view","view",TRUE
-20,20,"PATRIMONIO NETTO ",2,"account_type_view","view",TRUE
-2101,2101,"patrimonio netto ",20,"account_type_view","other",TRUE
-2102,2102,"utile d'esercizio ",20,"account_type_receivable","receivable",TRUE
-2103,2103,"perdita d'esercizio ",20,"account_type_payable","payable",TRUE
-2104,2104,"prelevamenti extra gestione ",20,"account_type_view","other",TRUE
-2105,2105,"titolare c/ritenute subite ",20,"account_type_view","other",TRUE
-22,22,"FONDI PER RISCHI E ONERI ",2,"account_type_view","view",TRUE
-2201,2201,"fondo per imposte ",22,"account_type_view","other",TRUE
-2204,2204,"fondo responsabilità civile ",22,"account_type_view","other",TRUE
-2205,2205,"fondo spese future ",22,"account_type_view","other",TRUE
-2211,2211,"fondo manutenzioni programmate ",22,"account_type_view","other",TRUE
-23,23,"TRATTAMENTO FINE RAPPORTO DI LAVORO ",2,"account_type_view","view",TRUE
-2301,2301,"debiti per TFRL ",23,"account_type_view","other",TRUE
-24,24,"DEBITI FINANZIARI ",2,"account_type_view","view",TRUE
-2410,2410,"mutui passivi ",24,"account_type_payable","other",TRUE
-2411,2411,"banche c/sovvenzioni ",24,"account_type_payable","other",TRUE
-2420,2420,"banche c/c passivi ",24,"account_type_payable","other",TRUE
-2421,2421,"banche c/RIBA all'incasso ",24,"account_type_payable","other",TRUE
-2422,2422,"banche c/cambiali all'incasso ",24,"account_type_payable","other",TRUE
-2423,2423,"banche c/anticipi su fatture ",24,"account_type_payable","other",TRUE
-2440,2440,"debiti v/altri finanziatori ",24,"account_type_payable","other",TRUE
-25,25,"DEBITI COMMERCIALI ",2,"account_type_view","view",TRUE
-2501,2501,"debiti v/fornitori ",25,"account_type_payable","payable",TRUE
-2503,2503,"cambiali passive ",25,"account_type_payable","other",TRUE
-2520,2520,"fatture da ricevere ",25,"account_type_payable","other",TRUE
-2521,2521,"debiti da liquidare ",25,"account_type_payable","other",TRUE
-2530,2530,"clienti c/acconti ",25,"account_type_payable","payable",TRUE
-26,26,"DEBITI DIVERSI ",2,"account_type_view","view",TRUE
-2601,2601,"IVA n/debito ",26,"account_type_payable","other",TRUE
-2602,2602,"debiti per ritenute da versare ",26,"account_type_payable","other",TRUE
-2605,2605,"erario c/IVA ",26,"account_type_payable","other",TRUE
-2606,2606,"debiti per imposte ",26,"account_type_payable","other",TRUE
-2619,2619,"debiti per cauzioni ",26,"account_type_payable","other",TRUE
-2620,2620,"personale c/retribuzioni ",26,"account_type_payable","other",TRUE
-2621,2621,"personale c/liquidazioni ",26,"account_type_payable","other",TRUE
-2622,2622,"clienti c/cessione ",26,"account_type_payable","other",TRUE
-2630,2630,"debiti v/istituti previdenziali ",26,"account_type_payable","other",TRUE
-2640,2640,"creditori diversi ",26,"account_type_payable","payable",TRUE
-27,27,"RATEI E RISCONTI PASSIVI ",2,"account_type_view","view",TRUE
-2701,2701,"ratei passivi ",27,"account_type_view","other",TRUE
-2702,2702,"risconti passivi ",27,"account_type_view","other",TRUE
-28,28,"CONTI TRANSITORI E DIVERSI ",2,"account_type_view","view",TRUE
-2801,2801,"bilancio di apertura ",28,"account_type_view","other",TRUE
-2802,2802,"bilancio di chiusura ",28,"account_type_view","other",TRUE
-2810,2810,"IVA c/liquidazioni ",28,"account_type_view","other",TRUE
-2811,2811,"istituti previdenziali ",28,"account_type_view","other",TRUE
-2820,2820,"banca ... c/c ",28,"account_type_view","other",TRUE
-2821,2821,"banca ... c/c ",28,"account_type_view","other",TRUE
-2822,2822,"banca ... c/c ",28,"account_type_view","other",TRUE
-29,29,"CONTI DEI SISTEMI SUPPLEMENTARI ",2,"account_type_view","view",TRUE
-2901,2901,"beni di terzi ",29,"account_type_view","other",TRUE
-2902,2902,"depositanti beni ",29,"account_type_view","other",TRUE
-2911,2911,"merci da ricevere ",29,"account_type_view","other",TRUE
-2912,2912,"fornitori c/impegni ",29,"account_type_view","other",TRUE
-2913,2913,"impegni per beni in leasing ",29,"account_type_view","other",TRUE
-2914,2914,"creditori c/leasing ",29,"account_type_view","other",TRUE
-2916,2916,"clienti c/impegni ",29,"account_type_view","other",TRUE
-2917,2917,"merci da consegnare ",29,"account_type_view","other",TRUE
-2921,2921,"rischi per effetti scontati ",29,"account_type_view","other",TRUE
-2922,2922,"banche c/effetti scontati ",29,"account_type_view","other",TRUE
-2926,2926,"rischi per fideiussioni ",29,"account_type_view","other",TRUE
-2927,2927,"creditori per fideiussioni ",29,"account_type_view","other",TRUE
-2931,2931,"rischi per avalli ",29,"account_type_view","other",TRUE
-2932,2932,"creditori per avalli ",29,"account_type_view","other",TRUE
-3,3,"VALORE DELLA PRODUZIONE ",0,"account_type_view","view",TRUE
-31,31,"VENDITE E PRESTAZIONI ",3,"account_type_view","view",TRUE
-3101,3101,"merci c/vendite ",31,"account_type_income","other",TRUE
-3103,3103,"rimborsi spese di vendita ",31,"account_type_income","other",TRUE
-3110,3110,"resi su vendite ",31,"account_type_income","other",TRUE
-3111,3111,"ribassi e abbuoni passivi ",31,"account_type_income","other",TRUE
-3112,3112,"premi su vendite ",31,"account_type_income","other",TRUE
-32,32,"RICAVI E PROVENTI DIVERSI ",3,"account_type_view","view",TRUE
-3201,3201,"fitti attivi ",32,"account_type_income","other",TRUE
-3202,3202,"proventi vari ",32,"account_type_income","other",TRUE
-3210,3210,"arrotondamenti attivi ",32,"account_type_income","other",TRUE
-3220,3220,"plusvalenze ordinarie diverse ",32,"account_type_income","other",TRUE
-3230,3230,"sopravvenienze attive ordinarie diverse ",32,"account_type_income","other",TRUE
-3240,3240,"insussistenze attive ordinarie diverse ",32,"account_type_income","other",TRUE
-4,4,"COSTI DELLA PRODUZIONE ",0,"account_type_view","view",TRUE
-41,41,"COSTO DEL VENDUTO ",4,"account_type_view","view",TRUE
-4101,4101,"merci c/acquisti ",41,"account_type_expense","other",TRUE
-4102,4102,"materie di consumo c/acquisti ",41,"account_type_expense","other",TRUE
-4105,4105,"merci c/apporti ",41,"account_type_expense","other",TRUE
-4110,4110,"resi su acquisti ",41,"account_type_expense","other",TRUE
-4111,4111,"ribassi e abbuoni attivi ",41,"account_type_expense","other",TRUE
-4112,4112,"premi su acquisti ",41,"account_type_expense","other",TRUE
-4121,4121,"merci c/esistenze iniziali ",41,"account_type_expense","other",TRUE
-4122,4122,"materie di consumo c/esistenze iniziali ",41,"account_type_expense","other",TRUE
-4131,4131,"merci c/rimanenze finali ",41,"account_type_expense","other",TRUE
-4132,4132,"materie di consumo c/rimanenze finali ",41,"account_type_expense","other",TRUE
-42,42,"COSTI PER SERVIZI ",4,"account_type_view","view",TRUE
-4201,4201,"costi di trasporto ",42,"account_type_expense","other",TRUE
-4202,4202,"costi per energia ",42,"account_type_expense","other",TRUE
-4203,4203,"costi di pubblicità ",42,"account_type_expense","other",TRUE
-4204,4204,"costi di consulenze ",42,"account_type_expense","other",TRUE
-4205,4205,"costi postali ",42,"account_type_expense","other",TRUE
-4206,4206,"costi telefonici ",42,"account_type_expense","other",TRUE
-4207,4207,"costi di assicurazione ",42,"account_type_expense","other",TRUE
-4208,4208,"costi di vigilanza ",42,"account_type_expense","other",TRUE
-4209,4209,"costi per i locali ",42,"account_type_expense","other",TRUE
-4210,4210,"costi di esercizio automezzi ",42,"account_type_expense","other",TRUE
-4211,4211,"costi di manutenzione e riparazione ",42,"account_type_expense","other",TRUE
-4212,4212,"provvigioni passive ",42,"account_type_expense","other",TRUE
-4213,4213,"spese di incasso ",42,"account_type_expense","other",TRUE
-43,43,"COSTI PER GODIMENTO BENI DI TERZI ",4,"account_type_view","view",TRUE
-4301,4301,"fitti passivi ",43,"account_type_expense","other",TRUE
-4302,4302,"canoni di leasing ",43,"account_type_expense","other",TRUE
-44,44,"COSTI PER IL PERSONALE ",4,"account_type_view","view",TRUE
-4401,4401,"salari e stipendi ",44,"account_type_expense","other",TRUE
-4402,4402,"oneri sociali ",44,"account_type_expense","other",TRUE
-4403,4403,"TFRL ",44,"account_type_expense","other",TRUE
-4404,4404,"altri costi per il personale ",44,"account_type_expense","other",TRUE
-45,45,"AMMORTAMENTI IMMOBILIZZAZIONI IMMATERIALI ",4,"account_type_view","view",TRUE
-4501,4501,"ammortamento costi di impianto ",45,"account_type_view","other",TRUE
-4506,4506,"ammortamento software ",45,"account_type_view","other",TRUE
-4508,4508,"ammortamento avviamento ",45,"account_type_view","other",TRUE
-46,46,"AMMORTAMENTI IMMOBILIZZAZIONI MATERIALI ",4,"account_type_view","view",TRUE
-4601,4601,"ammortamento fabbricati ",46,"account_type_view","other",TRUE
-4602,4602,"ammortamento impianti e macchinari ",46,"account_type_view","other",TRUE
-4604,4604,"ammortamento attrezzature commerciali ",46,"account_type_view","other",TRUE
-4605,4605,"ammortamento macchine d'ufficio ",46,"account_type_view","other",TRUE
-4606,4606,"ammortamento arredamento ",46,"account_type_view","other",TRUE
-4607,4607,"ammortamento automezzi ",46,"account_type_view","other",TRUE
-4608,4608,"ammortamento imballaggi durevoli ",46,"account_type_view","other",TRUE
-47,47,"SVALUTAZIONI ",4,"account_type_view","view",TRUE
-4701,4701,"svalutazioni immobilizzazioni immateriali ",47,"account_type_view","other",TRUE
-4702,4702,"svalutazioni immobilizzazioni materiali ",47,"account_type_view","other",TRUE
-4706,4706,"svalutazione crediti ",47,"account_type_view","other",TRUE
-48,48,"ACCANTONAMENTI ",4,"account_type_view","view",TRUE
-481,481,"ACCANTONAMENTI PER RISCHI ",48,"account_type_view","view",TRUE
-4814,4814,"accantonamento per responsabilità civile ",481,"account_type_view","other",TRUE
-482,482,"ALTRI ACCANTONAMENTI ",48,"account_type_view","view",TRUE
-4821,4821,"accantonamento per spese future ",482,"account_type_view","other",TRUE
-4823,4823,"accantonamento per manutenzioni programmate ",482,"account_type_view","other",TRUE
-49,49,"ONERI DIVERSI ",4,"account_type_view","view",TRUE
-4901,4901,"oneri fiscali diversi ",49,"account_type_view","other",TRUE
-4903,4903,"oneri vari ",49,"account_type_view","other",TRUE
-4905,4905,"perdite su crediti ",49,"account_type_view","other",TRUE
-4910,4910,"arrotondamenti passivi ",49,"account_type_view","other",TRUE
-4920,4920,"minusvalenze ordinarie diverse ",49,"account_type_view","other",TRUE
-4930,4930,"sopravvenienze passive ordinarie diverse ",49,"account_type_view","other",TRUE
-4940,4940,"insussistenze passive ordinarie diverse ",49,"account_type_view","other",TRUE
-5,5,"PROVENTI E ONERI FINANZIARI ",0,"account_type_view","view",TRUE
-51,51,"PROVENTI FINANZIARI ",5,"account_type_view","view",TRUE
-5110,5110,"interessi attivi v/clienti ",51,"account_type_view","other",TRUE
-5115,5115,"interessi attivi bancari ",51,"account_type_view","other",TRUE
-5116,5116,"interessi attivi postali ",51,"account_type_view","other",TRUE
-5140,5140,"proventi finanziari diversi ",51,"account_type_view","other",TRUE
-52,52,"ONERI FINANZIARI ",5,"account_type_view","view",TRUE
-5201,5201,"interessi passivi v/fornitori ",52,"account_type_view","other",TRUE
-5202,5202,"interessi passivi bancari ",52,"account_type_view","other",TRUE
-5203,5203,"sconti passivi bancari ",52,"account_type_view","other",TRUE
-5210,5210,"interessi passivi su mutui ",52,"account_type_view","other",TRUE
-5240,5240,"oneri finanziari diversi ",52,"account_type_view","other",TRUE
-7,7,"PROVENTI E ONERI STRAORDINARI ",0,"account_type_view","view",TRUE
-71,71,"PROVENTI STRAORDINARI ",7,"account_type_view","view",TRUE
-7101,7101,"plusvalenze straordinarie ",71,"account_type_view","other",TRUE
-7102,7102,"sopravvenienze attive straordinarie ",71,"account_type_view","other",TRUE
-7103,7103,"insussistenze attive straordinarie ",71,"account_type_view","other",TRUE
-72,72,"ONERI STRAORDINARI ",7,"account_type_view","view",TRUE
-7201,7201,"minusvalenze straordinarie ",72,"account_type_view","other",TRUE
-7202,7202,"sopravvenienze passive straordinarie ",72,"account_type_view","other",TRUE
-7203,7203,"insussistenze passive straordinarie ",72,"account_type_view","other",TRUE
-7204,7204,"imposte esercizi precedenti ",72,"account_type_view","other",TRUE
-81,81,"IMPOSTE DELL'ESERCIZIO ",7,"account_type_view","view",TRUE
-8101,8101,"imposte dell'esercizio ",81,"account_type_view","other",TRUE
-91,91,"CONTI DI RISULTATO ",7,"account_type_view","view",TRUE
-9101,9101,"conto di risultato economico ",91,"account_type_view","other",TRUE
+"0","0","Azienda",,"account_type_view","view","FALSE"
+"1","1","ATTIVO ","0","account_type_view","view","TRUE"
+"11","11","IMMOBILIZZAZIONI IMMATERIALI ","1","account_type_view","view","TRUE"
+"1101","1101","costi di impianto ","11","account_type_asset","other","TRUE"
+"1106","1106","software ","11","account_type_asset","other","TRUE"
+"1108","1108","avviamento ","11","account_type_asset","other","TRUE"
+"1111","1111","fondo ammortamento costi di impianto ","11","account_type_asset","other","TRUE"
+"1116","1116","fondo ammortamento software ","11","account_type_asset","other","TRUE"
+"1118","1118","fondo ammortamento avviamento ","11","account_type_asset","other","TRUE"
+"12","12","IMMOBILIZZAZIONI MATERIALI ","1","account_type_view","view","TRUE"
+"1201","1201","fabbricati ","12","account_type_asset","other","TRUE"
+"1202","1202","impianti e macchinari ","12","account_type_asset","other","TRUE"
+"1204","1204","attrezzature commerciali ","12","account_type_asset","other","TRUE"
+"1205","1205","macchine d'ufficio ","12","account_type_asset","other","TRUE"
+"1206","1206","arredamento ","12","account_type_asset","other","TRUE"
+"1207","1207","automezzi ","12","account_type_asset","other","TRUE"
+"1208","1208","imballaggi durevoli ","12","account_type_asset","other","TRUE"
+"1211","1211","fondo ammortamento fabbricati ","12","account_type_asset","other","TRUE"
+"1212","1212","fondo ammortamento impianti e macchinari ","12","account_type_asset","other","TRUE"
+"1214","1214","fondo ammortamento attrezzature commerciali ","12","account_type_asset","other","TRUE"
+"1215","1215","fondo ammortamento macchine d'ufficio ","12","account_type_asset","other","TRUE"
+"1216","1216","fondo ammortamento arredamento ","12","account_type_asset","other","TRUE"
+"1217","1217","fondo ammortamento automezzi ","12","account_type_asset","other","TRUE"
+"1218","1218","fondo ammortamento imballaggi durevoli ","12","account_type_asset","other","TRUE"
+"1220","1220","fornitori immobilizzazioni c/acconti ","12","account_type_asset","other","TRUE"
+"13","13","IMMOBILIZZAZIONI FINANZIARIE ","1","account_type_view","view","TRUE"
+"1301","1301","mutui attivi ","13","account_type_asset","other","TRUE"
+"14","14","RIMANENZE ","1","account_type_view","view","TRUE"
+"1401","1401","materie di consumo ","14","account_type_asset","other","TRUE"
+"1404","1404","merci ","14","account_type_asset","other","TRUE"
+"1410","1410","fornitori c/acconti ","14","account_type_asset","other","TRUE"
+"15","15","CREDITI COMMERCIALI ","1","account_type_view","view","TRUE"
+"1501","1501","crediti v/clienti ","15","account_type_receivable","receivable","TRUE"
+"1502","1502","crediti commerciali diversi ","15","account_type_receivable","other","TRUE"
+"1503","1503","clienti c/spese anticipate ","15","account_type_receivable","receivable","TRUE"
+"1505","1505","cambiali attive ","15","account_type_receivable","other","TRUE"
+"1506","1506","cambiali allo sconto ","15","account_type_receivable","other","TRUE"
+"1507","1507","cambiali all'incasso ","15","account_type_receivable","other","TRUE"
+"1509","1509","fatture da emettere ","15","account_type_receivable","other","TRUE"
+"1510","1510","crediti insoluti ","15","account_type_receivable","other","TRUE"
+"1511","1511","cambiali insolute ","15","account_type_receivable","other","TRUE"
+"1531","1531","crediti da liquidare ","15","account_type_receivable","other","TRUE"
+"1540","1540","fondo svalutazione crediti ","15","account_type_receivable","other","TRUE"
+"1541","1541","fondo rischi su crediti ","15","account_type_receivable","other","TRUE"
+"16","16","CREDITI DIVERSI ","1","account_type_view","view","TRUE"
+"1601","1601","IVA n/credito ","16","account_type_tax","other","TRUE"
+"1602","1602","IVA c/acconto ","16","account_type_tax","other","TRUE"
+"1605","1605","crediti per IVA ","16","account_type_tax","other","TRUE"
+"1607","1607","imposte c/acconto ","16","account_type_tax","other","TRUE"
+"1608","1608","crediti per imposte ","16","account_type_tax","other","TRUE"
+"1609","1609","crediti per ritenute subite ","16","account_type_asset","other","TRUE"
+"1610","1610","crediti per cauzioni ","16","account_type_asset","other","TRUE"
+"1620","1620","personale c/acconti ","16","account_type_asset","other","TRUE"
+"1630","1630","crediti v/istituti previdenziali ","16","account_type_asset","other","TRUE"
+"1640","1640","debitori diversi ","16","account_type_receivable","receivable","TRUE"
+"18","18","DISPONIBILITÀ LIQUIDE ","1","account_type_view","view","TRUE"
+"1801","1801","banche c/c ","18","account_type_bank","liquidity","TRUE"
+"1810","1810","c/c postali ","18","account_type_cash","liquidity","TRUE"
+"1820","1820","denaro in cassa ","18","account_type_cash","liquidity","TRUE"
+"1821","1821","assegni ","18","account_type_cash","liquidity","TRUE"
+"1822","1822","valori bollati ","18","account_type_cash","liquidity","TRUE"
+"19","19","RATEI E RISCONTI ATTIVI ","1","account_type_view","view","TRUE"
+"1901","1901","ratei attivi ","19","account_type_asset","other","TRUE"
+"1902","1902","risconti attivi ","19","account_type_asset","other","TRUE"
+"2","2","PASSIVO ","0","account_type_view","view","TRUE"
+"20","20","PATRIMONIO NETTO ","2","account_type_view","view","TRUE"
+"2101","2101","patrimonio netto ","20","account_type_asset","other","TRUE"
+"2102","2102","utile d'esercizio ","20","account_type_asset","other","TRUE"
+"2103","2103","perdita d'esercizio ","20","account_type_asset","other","TRUE"
+"2104","2104","prelevamenti extra gestione ","20","account_type_asset","other","TRUE"
+"2105","2105","titolare c/ritenute subite ","20","account_type_asset","other","TRUE"
+"22","22","FONDI PER RISCHI E ONERI ","2","account_type_view","view","TRUE"
+"2201","2201","fondo per imposte ","22","account_type_asset","other","TRUE"
+"2204","2204","fondo responsabilità civile ","22","account_type_asset","other","TRUE"
+"2205","2205","fondo spese future ","22","account_type_asset","other","TRUE"
+"2211","2211","fondo manutenzioni programmate ","22","account_type_asset","other","TRUE"
+"23","23","TRATTAMENTO FINE RAPPORTO DI LAVORO ","2","account_type_view","view","TRUE"
+"2301","2301","debiti per TFRL ","23","account_type_asset","other","TRUE"
+"24","24","DEBITI FINANZIARI ","2","account_type_view","view","TRUE"
+"2410","2410","mutui passivi ","24","account_type_asset","other","TRUE"
+"2411","2411","banche c/sovvenzioni ","24","account_type_asset","other","TRUE"
+"2420","2420","banche c/c passivi ","24","account_type_asset","other","TRUE"
+"2421","2421","banche c/RIBA all'incasso ","24","account_type_asset","other","TRUE"
+"2422","2422","banche c/cambiali all'incasso ","24","account_type_asset","other","TRUE"
+"2423","2423","banche c/anticipi su fatture ","24","account_type_asset","other","TRUE"
+"2440","2440","debiti v/altri finanziatori ","24","account_type_asset","other","TRUE"
+"25","25","DEBITI COMMERCIALI ","2","account_type_view","view","TRUE"
+"2501","2501","debiti v/fornitori ","25","account_type_payable","payable","TRUE"
+"2503","2503","cambiali passive ","25","account_type_asset","other","TRUE"
+"2520","2520","fatture da ricevere ","25","account_type_asset","other","TRUE"
+"2521","2521","debiti da liquidare ","25","account_type_asset","other","TRUE"
+"2530","2530","clienti c/acconti ","25","account_type_payable","payable","TRUE"
+"26","26","DEBITI DIVERSI ","2","account_type_view","view","TRUE"
+"2601","2601","IVA n/debito ","26","account_type_tax","other","TRUE"
+"2602","2602","debiti per ritenute da versare ","26","account_type_tax","other","TRUE"
+"2605","2605","erario c/IVA ","26","account_type_tax","other","TRUE"
+"2606","2606","debiti per imposte ","26","account_type_tax","other","TRUE"
+"2619","2619","debiti per cauzioni ","26","account_type_asset","other","TRUE"
+"2620","2620","personale c/retribuzioni ","26","account_type_asset","other","TRUE"
+"2621","2621","personale c/liquidazioni ","26","account_type_asset","other","TRUE"
+"2622","2622","clienti c/cessione ","26","account_type_asset","other","TRUE"
+"2630","2630","debiti v/istituti previdenziali ","26","account_type_asset","other","TRUE"
+"2640","2640","creditori diversi ","26","account_type_payable","payable","TRUE"
+"27","27","RATEI E RISCONTI PASSIVI ","2","account_type_view","view","TRUE"
+"2701","2701","ratei passivi ","27","account_type_asset","other","TRUE"
+"2702","2702","risconti passivi ","27","account_type_asset","other","TRUE"
+"28","28","CONTI TRANSITORI E DIVERSI ","2","account_type_view","view","TRUE"
+"2801","2801","bilancio di apertura ","28","account_type_asset","other","TRUE"
+"2802","2802","bilancio di chiusura ","28","account_type_asset","other","TRUE"
+"2810","2810","IVA c/liquidazioni ","28","account_type_asset","other","TRUE"
+"2811","2811","istituti previdenziali ","28","account_type_asset","other","TRUE"
+"2820","2820","banca ... c/c ","28","account_type_asset","other","TRUE"
+"2821","2821","banca ... c/c ","28","account_type_asset","other","TRUE"
+"2822","2822","banca ... c/c ","28","account_type_asset","other","TRUE"
+"29","29","CONTI DEI SISTEMI SUPPLEMENTARI ","2","account_type_view","view","TRUE"
+"2901","2901","beni di terzi ","29","account_type_asset","other","TRUE"
+"2902","2902","depositanti beni ","29","account_type_asset","other","TRUE"
+"2911","2911","merci da ricevere ","29","account_type_asset","other","TRUE"
+"2912","2912","fornitori c/impegni ","29","account_type_asset","other","TRUE"
+"2913","2913","impegni per beni in leasing ","29","account_type_asset","other","TRUE"
+"2914","2914","creditori c/leasing ","29","account_type_asset","other","TRUE"
+"2916","2916","clienti c/impegni ","29","account_type_asset","other","TRUE"
+"2917","2917","merci da consegnare ","29","account_type_asset","other","TRUE"
+"2921","2921","rischi per effetti scontati ","29","account_type_asset","other","TRUE"
+"2922","2922","banche c/effetti scontati ","29","account_type_asset","other","TRUE"
+"2926","2926","rischi per fideiussioni ","29","account_type_asset","other","TRUE"
+"2927","2927","creditori per fideiussioni ","29","account_type_asset","other","TRUE"
+"2931","2931","rischi per avalli ","29","account_type_asset","other","TRUE"
+"2932","2932","creditori per avalli ","29","account_type_asset","other","TRUE"
+"3","3","VALORE DELLA PRODUZIONE ","0","account_type_view","view","TRUE"
+"31","31","VENDITE E PRESTAZIONI ","3","account_type_view","view","TRUE"
+"3101","3101","merci c/vendite ","31","account_type_income","other","TRUE"
+"3103","3103","rimborsi spese di vendita ","31","account_type_income","other","TRUE"
+"3110","3110","resi su vendite ","31","account_type_income","other","TRUE"
+"3111","3111","ribassi e abbuoni passivi ","31","account_type_income","other","TRUE"
+"3112","3112","premi su vendite ","31","account_type_income","other","TRUE"
+"32","32","RICAVI E PROVENTI DIVERSI ","3","account_type_view","view","TRUE"
+"3201","3201","fitti attivi ","32","account_type_income","other","TRUE"
+"3202","3202","proventi vari ","32","account_type_income","other","TRUE"
+"3210","3210","arrotondamenti attivi ","32","account_type_income","other","TRUE"
+"3220","3220","plusvalenze ordinarie diverse ","32","account_type_income","other","TRUE"
+"3230","3230","sopravvenienze attive ordinarie diverse ","32","account_type_income","other","TRUE"
+"3240","3240","insussistenze attive ordinarie diverse ","32","account_type_income","other","TRUE"
+"4","4","COSTI DELLA PRODUZIONE ","0","account_type_view","view","TRUE"
+"41","41","COSTO DEL VENDUTO ","4","account_type_view","view","TRUE"
+"4101","4101","merci c/acquisti ","41","account_type_expense","other","TRUE"
+"4102","4102","materie di consumo c/acquisti ","41","account_type_expense","other","TRUE"
+"4105","4105","merci c/apporti ","41","account_type_expense","other","TRUE"
+"4110","4110","resi su acquisti ","41","account_type_expense","other","TRUE"
+"4111","4111","ribassi e abbuoni attivi ","41","account_type_expense","other","TRUE"
+"4112","4112","premi su acquisti ","41","account_type_expense","other","TRUE"
+"4121","4121","merci c/esistenze iniziali ","41","account_type_expense","other","TRUE"
+"4122","4122","materie di consumo c/esistenze iniziali ","41","account_type_expense","other","TRUE"
+"4131","4131","merci c/rimanenze finali ","41","account_type_expense","other","TRUE"
+"4132","4132","materie di consumo c/rimanenze finali ","41","account_type_expense","other","TRUE"
+"42","42","COSTI PER SERVIZI ","4","account_type_view","view","TRUE"
+"4201","4201","costi di trasporto ","42","account_type_expense","other","TRUE"
+"4202","4202","costi per energia ","42","account_type_expense","other","TRUE"
+"4203","4203","costi di pubblicità ","42","account_type_expense","other","TRUE"
+"4204","4204","costi di consulenze ","42","account_type_expense","other","TRUE"
+"4205","4205","costi postali ","42","account_type_expense","other","TRUE"
+"4206","4206","costi telefonici ","42","account_type_expense","other","TRUE"
+"4207","4207","costi di assicurazione ","42","account_type_expense","other","TRUE"
+"4208","4208","costi di vigilanza ","42","account_type_expense","other","TRUE"
+"4209","4209","costi per i locali ","42","account_type_expense","other","TRUE"
+"4210","4210","costi di esercizio automezzi ","42","account_type_expense","other","TRUE"
+"4211","4211","costi di manutenzione e riparazione ","42","account_type_expense","other","TRUE"
+"4212","4212","provvigioni passive ","42","account_type_expense","other","TRUE"
+"4213","4213","spese di incasso ","42","account_type_expense","other","TRUE"
+"43","43","COSTI PER GODIMENTO BENI DI TERZI ","4","account_type_view","view","TRUE"
+"4301","4301","fitti passivi ","43","account_type_expense","other","TRUE"
+"4302","4302","canoni di leasing ","43","account_type_expense","other","TRUE"
+"44","44","COSTI PER IL PERSONALE ","4","account_type_view","view","TRUE"
+"4401","4401","salari e stipendi ","44","account_type_expense","other","TRUE"
+"4402","4402","oneri sociali ","44","account_type_expense","other","TRUE"
+"4403","4403","TFRL ","44","account_type_expense","other","TRUE"
+"4404","4404","altri costi per il personale ","44","account_type_expense","other","TRUE"
+"45","45","AMMORTAMENTI IMMOBILIZZAZIONI IMMATERIALI ","4","account_type_view","view","TRUE"
+"4501","4501","ammortamento costi di impianto ","45","account_type_p_l","other","TRUE"
+"4506","4506","ammortamento software ","45","account_type_p_l","other","TRUE"
+"4508","4508","ammortamento avviamento ","45","account_type_p_l","other","TRUE"
+"46","46","AMMORTAMENTI IMMOBILIZZAZIONI MATERIALI ","4","account_type_view","view","TRUE"
+"4601","4601","ammortamento fabbricati ","46","account_type_p_l","other","TRUE"
+"4602","4602","ammortamento impianti e macchinari ","46","account_type_p_l","other","TRUE"
+"4604","4604","ammortamento attrezzature commerciali ","46","account_type_p_l","other","TRUE"
+"4605","4605","ammortamento macchine d'ufficio ","46","account_type_p_l","other","TRUE"
+"4606","4606","ammortamento arredamento ","46","account_type_p_l","other","TRUE"
+"4607","4607","ammortamento automezzi ","46","account_type_p_l","other","TRUE"
+"4608","4608","ammortamento imballaggi durevoli ","46","account_type_p_l","other","TRUE"
+"47","47","SVALUTAZIONI ","4","account_type_view","view","TRUE"
+"4701","4701","svalutazioni immobilizzazioni immateriali ","47","account_type_p_l","other","TRUE"
+"4702","4702","svalutazioni immobilizzazioni materiali ","47","account_type_p_l","other","TRUE"
+"4706","4706","svalutazione crediti ","47","account_type_p_l","other","TRUE"
+"48","48","ACCANTONAMENTI ","4","account_type_view","view","TRUE"
+"481","481","ACCANTONAMENTI PER RISCHI ","48","account_type_view","view","TRUE"
+"4814","4814","accantonamento per responsabilità civile ","481","account_type_p_l","other","TRUE"
+"482","482","ALTRI ACCANTONAMENTI ","48","account_type_view","view","TRUE"
+"4821","4821","accantonamento per spese future ","482","account_type_p_l","other","TRUE"
+"4823","4823","accantonamento per manutenzioni programmate ","482","account_type_p_l","other","TRUE"
+"49","49","ONERI DIVERSI ","4","account_type_view","view","TRUE"
+"4901","4901","oneri fiscali diversi ","49","account_type_p_l","other","TRUE"
+"4903","4903","oneri vari ","49","account_type_p_l","other","TRUE"
+"4905","4905","perdite su crediti ","49","account_type_p_l","other","TRUE"
+"4910","4910","arrotondamenti passivi ","49","account_type_p_l","other","TRUE"
+"4920","4920","minusvalenze ordinarie diverse ","49","account_type_p_l","other","TRUE"
+"4930","4930","sopravvenienze passive ordinarie diverse ","49","account_type_p_l","other","TRUE"
+"4940","4940","insussistenze passive ordinarie diverse ","49","account_type_p_l","other","TRUE"
+"5","5","PROVENTI E ONERI FINANZIARI ","0","account_type_view","view","TRUE"
+"51","51","PROVENTI FINANZIARI ","5","account_type_view","view","TRUE"
+"5110","5110","interessi attivi v/clienti ","51","account_type_p_l","other","TRUE"
+"5115","5115","interessi attivi bancari ","51","account_type_p_l","other","TRUE"
+"5116","5116","interessi attivi postali ","51","account_type_p_l","other","TRUE"
+"5140","5140","proventi finanziari diversi ","51","account_type_p_l","other","TRUE"
+"52","52","ONERI FINANZIARI ","5","account_type_view","view","TRUE"
+"5201","5201","interessi passivi v/fornitori ","52","account_type_p_l","other","TRUE"
+"5202","5202","interessi passivi bancari ","52","account_type_p_l","other","TRUE"
+"5203","5203","sconti passivi bancari ","52","account_type_p_l","other","TRUE"
+"5210","5210","interessi passivi su mutui ","52","account_type_p_l","other","TRUE"
+"5240","5240","oneri finanziari diversi ","52","account_type_p_l","other","TRUE"
+"7","7","PROVENTI E ONERI STRAORDINARI ","0","account_type_view","view","TRUE"
+"71","71","PROVENTI STRAORDINARI ","7","account_type_view","view","TRUE"
+"7101","7101","plusvalenze straordinarie ","71","account_type_p_l","other","TRUE"
+"7102","7102","sopravvenienze attive straordinarie ","71","account_type_p_l","other","TRUE"
+"7103","7103","insussistenze attive straordinarie ","71","account_type_p_l","other","TRUE"
+"72","72","ONERI STRAORDINARI ","7","account_type_view","view","TRUE"
+"7201","7201","minusvalenze straordinarie ","72","account_type_p_l","other","TRUE"
+"7202","7202","sopravvenienze passive straordinarie ","72","account_type_p_l","other","TRUE"
+"7203","7203","insussistenze passive straordinarie ","72","account_type_p_l","other","TRUE"
+"7204","7204","imposte esercizi precedenti ","72","account_type_p_l","other","TRUE"
+"8","8","IMPOSTE DELL'ESERCIZIO ","0","account_type_view","view","TRUE"
+"8101","8101","imposte dell'esercizio ","8","account_type_p_l","other","TRUE"
+"9","9","CONTI DI RISULTATO ","0","account_type_view","view","TRUE"
+"9101","9101","conto di risultato economico ","9","account_type_p_l","other","TRUE"
+"9102","9102","stato patrimoniale","9","account_type_p_l","other","TRUE"
diff --git a/addons/l10n_it/data/account.account.type.csv b/addons/l10n_it/data/account.account.type.csv
index 273ff71eb05..36eeebbbe89 100644
--- a/addons/l10n_it/data/account.account.type.csv
+++ b/addons/l10n_it/data/account.account.type.csv
@@ -1,11 +1,11 @@
"id","code","name","close_method","report_type"
-"account_type_receivable","receivable","Debiti","unreconciled","liability"
-"account_type_payable","payable","Crediti","unreconciled","asset"
+"account_type_receivable","receivable","Crediti","unreconciled","asset"
+"account_type_payable","payable","Debiti","unreconciled","liability"
"account_type_view","view","Gerarchia","none",
"account_type_income","income","Entrate","none","income"
"account_type_expense","expense","Uscite","none","expense"
-"account_type_tax","tax","Tasse","none",
+"account_type_tax","tax","Tasse","balance",
"account_type_cash","cash","Liquidità","balance","asset"
-"account_type_asset","asset","Beni","none","asset"
+"account_type_asset","asset","Beni","balance","asset"
"account_type_bank","bank","Banca","balance","asset"
-"account_type_equity","equity","Capitale","none","asset"
+"account_type_p_l","p_l","Conto Economico","none",
diff --git a/addons/l10n_it/data/account.tax.code.template.csv b/addons/l10n_it/data/account.tax.code.template.csv
index 288f169f4ab..40f0545aff9 100644
--- a/addons/l10n_it/data/account.tax.code.template.csv
+++ b/addons/l10n_it/data/account.tax.code.template.csv
@@ -26,6 +26,8 @@
"IVC4Idet50","template_impcode_pagata_4det50","IVA a credito 4% detraibile 50% (imponibile)","template_impcode_pagata"
"IVC20","template_ivacode_pagata_20","IVA a credito 20%","template_ivacode_pagata"
"IVC20I","template_impcode_pagata_20","IVA a credito 20% (imponibile)","template_impcode_pagata"
+"IVC21","template_ivacode_pagata_21","IVA a credito 21%","template_ivacode_pagata"
+"IVC21I","template_impcode_pagata_21","IVA a credito 21% (imponibile)","template_impcode_pagata"
"IVC4","template_ivacode_pagata_4","IVA a credito 4%","template_ivacode_pagata"
"IVC4I","template_impcode_pagata_4","IVA a credito 4% (imponibile)","template_impcode_pagata"
"IVC12","template_ivacode_pagata_12","IVA a credito 12%","template_ivacode_pagata"
@@ -40,9 +42,21 @@
"IVD10I","template_impcode_riscossa_10","IVA a debito 10% (imponibile)","template_impcode_riscossa"
"IVD20","template_ivacode_riscossa_20","IVA a debito 20%","template_ivacode_riscossa"
"IVD20I","template_impcode_riscossa_20","IVA a debito 20% (imponibile)","template_impcode_riscossa"
+"IVD21","template_ivacode_riscossa_21","IVA a debito 21%","template_ivacode_riscossa"
+"IVD21I","template_impcode_riscossa_21","IVA a debito 21% (imponibile)","template_impcode_riscossa"
"IVD4","template_ivacode_riscossa_4","IVA a debito 4%","template_ivacode_riscossa"
"IVD4I","template_impcode_riscossa_4","IVA a debito 4% (imponibile)","template_impcode_riscossa"
"IVD12","template_ivacode_riscossa_12","IVA a debito 12%","template_ivacode_riscossa"
"IVD12I","template_impcode_riscossa_12","IVA a debito 12% (imponibile)","template_impcode_riscossa"
"IVD2","template_ivacode_riscossa_2","IVA a debito 2%","template_ivacode_riscossa"
"IVD2I","template_impcode_riscossa_2","IVA a debito 2% (imponibile)","template_impcode_riscossa"
+"IVC21ind","template_ivacode_pagata_21ind","IVA a credito 21% indetraibile","template_ivacode_pagata"
+"IVC21Iind","template_impcode_pagata_21ind","IVA a credito 21% indetraibile (imponibile)","template_impcode_pagata"
+"IVC21det10","template_ivacode_pagata_21det10","IVA a credito 21% detraibile 10%","template_ivacode_pagata"
+"IVC21Idet10","template_impcode_pagata_21det10","IVA a credito 21% detraibile 10% (imponibile)","template_impcode_pagata"
+"IVC21det15","template_ivacode_pagata_21det15","IVA a credito 21% detraibile 15%","template_ivacode_pagata"
+"IVC21Idet15","template_impcode_pagata_21det15","IVA a credito 21% detraibile 15% (imponibile)","template_impcode_pagata"
+"IVC21det40","template_ivacode_pagata_21det40","IVA a credito 21% detraibile 40%","template_ivacode_pagata"
+"IVC21Idet40","template_impcode_pagata_21det40","IVA a credito 21% detraibile 40% (imponibile)","template_impcode_pagata"
+"IVC21det50","template_ivacode_pagata_21det50","IVA a credito 21% detraibile 50%","template_ivacode_pagata"
+"IVC21Idet50","template_impcode_pagata_21det50","IVA a credito 21% detraibile 50% (imponibile)","template_impcode_pagata"
diff --git a/addons/l10n_it/data/account.tax.template.csv b/addons/l10n_it/data/account.tax.template.csv
index cf9caeeb0d4..641f495dd72 100644
--- a/addons/l10n_it/data/account.tax.template.csv
+++ b/addons/l10n_it/data/account.tax.template.csv
@@ -1,40 +1,64 @@
-"id","description","chart_template_id:id","name","amount","parent_id:id","child_depend","type","account_collected_id:id","account_paid_id:id","type_tax_use","base_code_id:id","tax_code_id:id","ref_base_code_id:id","ref_tax_code_id:id"
-"20a","20a","l10n_it_chart_template_generic","Iva al 20% (debito)","0.2",,"False","percent","2601","2601","sale","template_impcode_riscossa_20","template_ivacode_riscossa_20","template_impcode_riscossa_20","template_ivacode_riscossa_20"
-"20b","20b","l10n_it_chart_template_generic","Iva al 20% (credito)","0.2",,"False","percent","1601","1601","purchase","template_impcode_pagata_20","template_ivacode_pagata_20","template_impcode_pagata_20","template_ivacode_pagata_20"
-"10a","10a","l10n_it_chart_template_generic","Iva al 10% (debito)","0.1",,"False","percent","2601","2601","sale","template_impcode_riscossa_10","template_ivacode_riscossa_10","template_impcode_riscossa_10","template_ivacode_riscossa_10"
-"10b","10b","l10n_it_chart_template_generic","Iva al 10% (credito)","0.1",,"False","percent","1601","1601","purchase","template_impcode_pagata_10","template_ivacode_pagata_10","template_impcode_pagata_10","template_ivacode_pagata_10"
-"10AO","10AO","l10n_it_chart_template_generic","Iva al 10% indetraibile","1",,"True","percent",,,"purchase",,,,
-"10AOa","10AOa","l10n_it_chart_template_generic","Iva al 10% indetraibile (1)","0","10AO","False","percent","1601","1601","purchase","template_impcode_pagata_10ind","template_ivacode_pagata_10ind","template_impcode_pagata_10ind","template_ivacode_pagata_10ind"
-"10AOb","10AOb","l10n_it_chart_template_generic","Iva al 10% indetraibile (2)","0.1","10AO","False","percent",,,"purchase",,,,
-"12a","12a","l10n_it_chart_template_generic","Iva 12% (debito)","0.12",,"False","percent","2601","2601","sale","template_impcode_riscossa_12","template_ivacode_riscossa_12","template_impcode_riscossa_12","template_ivacode_riscossa_12"
-"12b","12b","l10n_it_chart_template_generic","Iva 12% (credito)","0.12",,"False","percent","1601","1601","purchase","template_impcode_pagata_12","template_ivacode_pagata_12","template_impcode_pagata_12","template_ivacode_pagata_12"
-"2010","2010","l10n_it_chart_template_generic","Iva al 20% detraibile 10%","1",,"True","percent",,,"purchase",,,,
-"2010a","2010a","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (1)","0.02","2010","False","percent","1601","1601","purchase","template_impcode_pagata_20det10","template_ivacode_pagata_20det10","template_impcode_pagata_20det10","template_ivacode_pagata_20det10"
-"2010b","2010b","l10n_it_chart_template_generic","Iva al 20% detraibile 10% (2)","0.18","2010","False","percent",,,"purchase",,,,
-"2015","2015","l10n_it_chart_template_generic","Iva al 20% detraibile 15%","1",,"True","percent",,,"purchase",,,,
-"2015a","2015a","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (1)","0.03","2015","False","percent","1601","1601","purchase","template_impcode_pagata_20det15","template_ivacode_pagata_20det15","template_impcode_pagata_20det15","template_ivacode_pagata_20det15"
-"2015b","2015b","l10n_it_chart_template_generic","Iva al 20% detraibile 15% (2)","0.17","2015","False","percent",,,"purchase",,,,
-"2040","2040","l10n_it_chart_template_generic","Iva al 20% detraibile 40%","1",,"True","percent",,,"purchase",,,,
-"2040a","2040a","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (1)","0.08","2040","False","percent","1601","1601","purchase","template_impcode_pagata_20det40","template_ivacode_pagata_20det40","template_impcode_pagata_20det40","template_ivacode_pagata_20det40"
-"2040b","2040b","l10n_it_chart_template_generic","Iva al 20% detraibile 40% (2)","0.12","2040","False","percent",,,"purchase",,,,
-"20AO","20AO","l10n_it_chart_template_generic","Iva al 20% indetraibile","1",,"True","percent",,,"purchase",,,,
-"20AOa","20AOa","l10n_it_chart_template_generic","Iva al 20% indetraibile (1)","0","20AO","False","percent","1601","1601","purchase","template_impcode_pagata_20ind","template_ivacode_pagata_20ind","template_impcode_pagata_20ind","template_ivacode_pagata_20ind"
-"20AOb","20AOb","l10n_it_chart_template_generic","Iva al 20% indetraibile (2)","0.2","20AO","False","percent",,,"purchase",,,,
-"20I5","20I5","l10n_it_chart_template_generic","IVA al 20% detraibile al 50%","1",,"True","percent",,,"purchase",,,,
-"20I5a","20I5a","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (1)","0.1","20I5","False","percent","1601","1601","purchase","template_impcode_pagata_20det50","template_ivacode_pagata_20det50","template_impcode_pagata_20det50","template_ivacode_pagata_20det50"
-"20I5b","20I5b","l10n_it_chart_template_generic","IVA al 20% detraibile al 50% (2)","0.1","20I5","False","percent",,,"purchase",,,,
-"22a","22a","l10n_it_chart_template_generic","Iva 2% (debito)","0.02",,"False","percent","2601","2601","sale","template_impcode_riscossa_2","template_ivacode_riscossa_2","template_impcode_riscossa_2","template_ivacode_riscossa_2"
-"22b","22b","l10n_it_chart_template_generic","Iva 2% (credito)","0.02",,"False","percent","1601","1601","purchase","template_impcode_pagata_2","template_ivacode_pagata_2","template_impcode_pagata_2","template_ivacode_pagata_2"
-"4a","4a","l10n_it_chart_template_generic","Iva 4% (debito)","0.04",,"False","percent","2601","2601","sale","template_impcode_riscossa_4","template_ivacode_riscossa_4","template_impcode_riscossa_4","template_ivacode_riscossa_4"
-"4b","4b","l10n_it_chart_template_generic","Iva 4% (credito)","0.04",,"False","percent","1601","1601","purchase","template_impcode_pagata_4","template_ivacode_pagata_4","template_impcode_pagata_4","template_ivacode_pagata_4"
-"4AO","4AO","l10n_it_chart_template_generic","Iva al 4% indetraibile","1",,"True","percent",,,"purchase",,,,
-"4AOa","4AOa","l10n_it_chart_template_generic","Iva al 4% indetraibile (1)","0","4AO","False","percent","1601","1601","purchase","template_impcode_pagata_4ind","template_ivacode_pagata_4ind","template_impcode_pagata_4ind","template_ivacode_pagata_4ind"
-"4AOb","4AOb","l10n_it_chart_template_generic","Iva al 4% indetraibile (2)","0.04","4AO","False","percent",,,"purchase",,,,
-"10I5","10I5","l10n_it_chart_template_generic","IVA al 10% detraibile al 50%","1",,"True","percent",,,"purchase",,,,
-"10I5a","10I5a","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (1)","0.05","10I5","False","percent","1601","1601","purchase","template_impcode_pagata_10det50","template_ivacode_pagata_10det50","template_impcode_pagata_10det50","template_ivacode_pagata_10det50"
-"10I5b","10I5b","l10n_it_chart_template_generic","IVA al 10% detraibile al 50% (2)","0.05","10I5","False","percent",,,"purchase",,,,
-"4I5","4I5","l10n_it_chart_template_generic","IVA al 4% detraibile al 50%","1",,"True","percent",,,"purchase",,,,
-"4I5a","4I5a","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (1)","0.02","4I5","False","percent","1601","1601","purchase","template_impcode_pagata_4det50","template_ivacode_pagata_4det50","template_impcode_pagata_4det50","template_ivacode_pagata_4det50"
-"4I5b","4I5b","l10n_it_chart_template_generic","IVA al 4% detraibile al 50% (2)","0.02","4I5","False","percent",,,"purchase",,,,
-"00a","00a","l10n_it_chart_template_generic","Esente IVA (debito)","0",,"False","percent","2601","2601","sale","template_impcode_riscossa_0","template_ivacode_riscossa_0","template_impcode_riscossa_0","template_ivacode_riscossa_0"
-"00b","00b","l10n_it_chart_template_generic","Esente IVA (credito)","0",,"False","percent","1601","1601","purchase","template_impcode_pagata_0","template_ivacode_pagata_0","template_impcode_pagata_0","template_ivacode_pagata_0"
+id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depend,type,account_collected_id:id,account_paid_id:id,type_tax_use,base_code_id:id,tax_code_id:id,ref_base_code_id:id,ref_tax_code_id:id,ref_base_sign,ref_tax_sign,price_include,base_sign,tax_sign
+21a,21a,l10n_it_chart_template_generic,Iva al 21% (debito),,0.21,,False,percent,2601,2601,sale,template_impcode_riscossa_21,template_ivacode_riscossa_21,template_impcode_riscossa_21,template_ivacode_riscossa_21,-1,-1,False,,
+21b,21b,l10n_it_chart_template_generic,Iva al 21% (credito),,0.21,,False,percent,1601,1601,purchase,template_impcode_pagata_21,template_ivacode_pagata_21,template_impcode_pagata_21,template_ivacode_pagata_21,,,False,-1,-1
+20a,20a,l10n_it_chart_template_generic,Iva al 20% (debito),,0.2,,False,percent,2601,2601,sale,template_impcode_riscossa_20,template_ivacode_riscossa_20,template_impcode_riscossa_20,template_ivacode_riscossa_20,-1,-1,False,,
+20b,20b,l10n_it_chart_template_generic,Iva al 20% (credito),,0.2,,False,percent,1601,1601,purchase,template_impcode_pagata_20,template_ivacode_pagata_20,template_impcode_pagata_20,template_ivacode_pagata_20,,,False,-1,-1
+10a,10a,l10n_it_chart_template_generic,Iva al 10% (debito),,0.1,,False,percent,2601,2601,sale,template_impcode_riscossa_10,template_ivacode_riscossa_10,template_impcode_riscossa_10,template_ivacode_riscossa_10,-1,-1,False,,
+10b,10b,l10n_it_chart_template_generic,Iva al 10% (credito),,0.1,,False,percent,1601,1601,purchase,template_impcode_pagata_10,template_ivacode_pagata_10,template_impcode_pagata_10,template_ivacode_pagata_10,,,False,-1,-1
+10AO,10AO,l10n_it_chart_template_generic,Iva al 10% indetraibile,,0.1,,True,percent,,,purchase,template_impcode_pagata_10ind,,template_impcode_pagata_10ind,,,,False,-1,-1
+10AOa,10AOa,l10n_it_chart_template_generic,Iva al 10% indetraibile (D),2,0,10AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_10ind,,template_ivacode_pagata_10ind,,,False,,
+10AOb,10AOb,l10n_it_chart_template_generic,Iva al 10% indetraibile (I),1,1,10AO,False,percent,,,purchase,,,,,,,False,,
+12a,12a,l10n_it_chart_template_generic,Iva 12% (debito),,0.12,,False,percent,2601,2601,sale,template_impcode_riscossa_12,template_ivacode_riscossa_12,template_impcode_riscossa_12,template_ivacode_riscossa_12,-1,-1,False,,
+12b,12b,l10n_it_chart_template_generic,Iva 12% (credito),,0.12,,False,percent,1601,1601,purchase,template_impcode_pagata_12,template_ivacode_pagata_12,template_impcode_pagata_12,template_ivacode_pagata_12,,,False,-1,-1
+2010,2010,l10n_it_chart_template_generic,Iva al 20% detraibile 10%,,0.2,,True,percent,,,purchase,template_impcode_pagata_20det10,,template_impcode_pagata_20det10,,,,False,-1,-1
+2010a,2010a,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (D),2,0,2010,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det10,,template_ivacode_pagata_20det10,,,False,,
+2010b,2010b,l10n_it_chart_template_generic,Iva al 20% detraibile 10% (I),1,0.9,2010,False,percent,,,purchase,,,,,,,False,,
+2015,2015,l10n_it_chart_template_generic,Iva al 20% detraibile 15%,,0.2,,True,percent,,,purchase,template_impcode_pagata_20det15,,template_impcode_pagata_20det15,,,,False,-1,-1
+2015a,2015a,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (D),2,0,2015,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det15,,template_ivacode_pagata_20det15,,,False,,
+2015b,2015b,l10n_it_chart_template_generic,Iva al 20% detraibile 15% (I),1,0.85,2015,False,percent,,,purchase,,,,,,,False,,
+2040,2040,l10n_it_chart_template_generic,Iva al 20% detraibile 40%,,0.2,,True,percent,,,purchase,template_impcode_pagata_20det40,,template_impcode_pagata_20det40,,,,False,-1,-1
+2040a,2040a,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (D),2,0,2040,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det40,,template_ivacode_pagata_20det40,,,False,,
+2040b,2040b,l10n_it_chart_template_generic,Iva al 20% detraibile 40% (I),1,0.6,2040,False,percent,,,purchase,,,,,,,False,,
+20AO,20AO,l10n_it_chart_template_generic,Iva al 20% indetraibile,,0.2,,True,percent,,,purchase,template_impcode_pagata_20ind,,template_impcode_pagata_20ind,,,,False,-1,-1
+20AOa,20AOa,l10n_it_chart_template_generic,Iva al 20% indetraibile (D),2,0,20AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_20ind,,template_ivacode_pagata_20ind,,,False,,
+20AOb,20AOb,l10n_it_chart_template_generic,Iva al 20% indetraibile (I),1,1,20AO,False,percent,,,purchase,,,,,,,False,,
+20I5,20I5,l10n_it_chart_template_generic,IVA al 20% detraibile al 50%,,0.2,,True,percent,,,purchase,template_impcode_pagata_20det50,,template_impcode_pagata_20det50,,,,False,-1,-1
+20I5b,20I5b,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (I),1,0.5,20I5,False,percent,,,purchase,,,,,,,False,,
+20I5a,20I5a,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (D),2,0,20I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det50,,template_ivacode_pagata_20det50,,,False,,
+22a,22a,l10n_it_chart_template_generic,Iva 2% (debito),,0.02,,False,percent,2601,2601,sale,template_impcode_riscossa_2,template_ivacode_riscossa_2,template_impcode_riscossa_2,template_ivacode_riscossa_2,-1,-1,False,,
+22b,22b,l10n_it_chart_template_generic,Iva 2% (credito),,0.02,,False,percent,1601,1601,purchase,template_impcode_pagata_2,template_ivacode_pagata_2,template_impcode_pagata_2,template_ivacode_pagata_2,,,False,-1,-1
+4a,4a,l10n_it_chart_template_generic,Iva 4% (debito),,0.04,,False,percent,2601,2601,sale,template_impcode_riscossa_4,template_ivacode_riscossa_4,template_impcode_riscossa_4,template_ivacode_riscossa_4,-1,-1,False,,
+4b,4b,l10n_it_chart_template_generic,Iva 4% (credito),,0.04,,False,percent,1601,1601,purchase,template_impcode_pagata_4,template_ivacode_pagata_4,template_impcode_pagata_4,template_ivacode_pagata_4,,,False,-1,-1
+4AO,4AO,l10n_it_chart_template_generic,Iva al 4% indetraibile,,0.04,,True,percent,,,purchase,template_impcode_pagata_4ind,,template_impcode_pagata_4ind,,,,False,-1,-1
+4AOa,4AOa,l10n_it_chart_template_generic,Iva al 4% indetraibile (D),2,0,4AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_4ind,,template_ivacode_pagata_4ind,,,False,,
+4AOb,4AOb,l10n_it_chart_template_generic,Iva al 4% indetraibile (I),1,1,4AO,False,percent,,,purchase,,,,,,,False,,
+10I5,10I5,l10n_it_chart_template_generic,IVA al 10% detraibile al 50%,,0.1,,True,percent,,,purchase,template_impcode_pagata_10det50,,template_impcode_pagata_10det50,,,,False,-1,-1
+10I5a,10I5a,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (D),2,0,10I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_10det50,,template_ivacode_pagata_10det50,,,False,,
+10I5b,10I5b,l10n_it_chart_template_generic,IVA al 10% detraibile al 50% (I),1,0.5,10I5,False,percent,,,purchase,,,,,,,False,,
+4I5,4I5,l10n_it_chart_template_generic,IVA al 4% detraibile al 50%,,0.04,,True,percent,,,purchase,template_impcode_pagata_4det50,,template_impcode_pagata_4det50,,,,False,-1,-1
+4I5a,4I5a,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (D),2,0,4I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_4det50,,template_ivacode_pagata_4det50,,,False,,
+4I5b,4I5b,l10n_it_chart_template_generic,IVA al 4% detraibile al 50% (I),1,0.5,4I5,False,percent,,,purchase,,,,,,,False,,
+00a,00a,l10n_it_chart_template_generic,Esente IVA (debito),,0,,False,percent,2601,2601,sale,template_impcode_riscossa_0,template_ivacode_riscossa_0,template_impcode_riscossa_0,template_ivacode_riscossa_0,-1,-1,False,,
+00b,00b,l10n_it_chart_template_generic,Esente IVA (credito),,0,,False,percent,1601,1601,purchase,template_impcode_pagata_0,template_ivacode_pagata_0,template_impcode_pagata_0,template_ivacode_pagata_0,,,False,-1,-1
+21a INC,21a INC,l10n_it_chart_template_generic,Iva al 21% (debito) INC,,0.21,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,-1,-1,True,,
+20a INC,20a INC,l10n_it_chart_template_generic,Iva al 20% (debito) INC,,0.2,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_20,l10n_it.template_ivacode_riscossa_20,l10n_it.template_impcode_riscossa_20,l10n_it.template_ivacode_riscossa_20,-1,-1,True,,
+10a INC,10a INC,l10n_it_chart_template_generic,Iva al 10% (debito) INC,,0.1,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_10,l10n_it.template_ivacode_riscossa_10,l10n_it.template_impcode_riscossa_10,l10n_it.template_ivacode_riscossa_10,-1,-1,True,,
+12a INC,12a INC,l10n_it_chart_template_generic,Iva 12% (debito) INC,,0.12,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_12,l10n_it.template_ivacode_riscossa_12,l10n_it.template_impcode_riscossa_12,l10n_it.template_ivacode_riscossa_12,-1,-1,True,,
+22a INC,22a INC,l10n_it_chart_template_generic,Iva 2% (debito) INC,,0.02,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,-1,-1,True,,
+4a INC,4a INC,l10n_it_chart_template_generic,Iva 4% (debito) INC,,0.04,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,-1,-1,True,,
+00a INC,00a INC,l10n_it_chart_template_generic,Esente IVA (debito) INC,,0,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,-1,-1,True,,
+2110,2110,l10n_it_chart_template_generic,Iva al 21% detraibile 10%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det10,,template_impcode_pagata_21det10,,,,False,-1,-1
+2110a,2110a,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (D),2,0,2110,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det10,,template_ivacode_pagata_21det10,,,False,,
+2110b,2110b,l10n_it_chart_template_generic,Iva al 21% detraibile 10% (I),1,0.9,2110,False,percent,,,purchase,,,,,,,False,,
+2115,2115,l10n_it_chart_template_generic,Iva al 21% detraibile 15%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det15,,template_impcode_pagata_21det15,,,,False,-1,-1
+2115a,2115a,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (D),2,0,2115,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det15,,template_ivacode_pagata_21det15,,,False,,
+2115b,2115b,l10n_it_chart_template_generic,Iva al 21% detraibile 15% (I),1,0.85,2115,False,percent,,,purchase,,,,,,,False,,
+2140,2140,l10n_it_chart_template_generic,Iva al 21% detraibile 40%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det40,,template_impcode_pagata_21det40,,,,False,-1,-1
+2140a,2140a,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (D),2,0,2140,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det40,,template_ivacode_pagata_21det40,,,False,,
+2140b,2140b,l10n_it_chart_template_generic,Iva al 21% detraibile 40% (I),1,0.6,2140,False,percent,,,purchase,,,,,,,False,,
+21AO,21AO,l10n_it_chart_template_generic,Iva al 21% indetraibile,,0.21,,True,percent,,,purchase,template_impcode_pagata_21ind,,template_impcode_pagata_21ind,,,,False,-1,-1
+21AOa,21AOa,l10n_it_chart_template_generic,Iva al 21% indetraibile (D),2,0,21AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_21ind,,template_ivacode_pagata_21ind,,,False,,
+21AOb,21AOb,l10n_it_chart_template_generic,Iva al 21% indetraibile (I),1,1,21AO,False,percent,,,purchase,,,,,,,False,,
+21I5,21I5,l10n_it_chart_template_generic,IVA al 21% detraibile al 50%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det50,,template_impcode_pagata_21det50,,,,False,-1,-1
+21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),1,0.5,21I5,False,percent,,,purchase,,,,,,,False,,
+21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),2,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,,,False,,
diff --git a/addons/l10n_it/i18n/ca.po b/addons/l10n_it/i18n/ca.po
index 67dff86ef1b..13ba50a2b99 100644
--- a/addons/l10n_it/i18n/ca.po
+++ b/addons/l10n_it/i18n/ca.po
@@ -7,20 +7,31 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
-"POT-Creation-Date: 2011-01-07 06:04+0000\n"
+"POT-Creation-Date: 2011-08-11 20:06+0000\n"
"PO-Revision-Date: 2011-02-15 15:37+0000\n"
"Last-Translator: FULL NAME \n"
"Language-Team: Catalan \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:57+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
-msgid "Registro acquisti"
-msgstr "Resgistre de compres"
+#: model:ir.module.module,description:l10n_it.module_meta_information
+msgid ""
+"\n"
+" Piano dei conti italiano di un'impresa generica\n"
+" "
+msgstr ""
+"\n"
+" Pla comptable italià d'una empresa genèrica\n"
+" "
+
+#. module: l10n_it
+#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
+msgid "Italy - Generic Chart of Accounts"
+msgstr "Itàlia - Pla general comptable"
#. module: l10n_it
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
@@ -43,132 +54,63 @@ msgstr ""
"pla comptable des d'una plantilla de pla comptable."
#. module: l10n_it
-#: view:account.report_libroiva:0
-msgid "Anno Fiscale"
-msgstr "Exercici fiscal"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.it
-msgid "Italia"
-msgstr "Itàlia"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "REGISTRO IVA"
-msgstr "REGISTRE D'IVA"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Protocollo"
-msgstr "Protocol"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.extra
-msgid "Regime Extra comunitario"
-msgstr "Règim extra comunitari"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "VENDITE"
-msgstr "VENDES"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Aliquota"
-msgstr "Taxa"
-
-#. module: l10n_it
-#: field:account.report_libroiva,company_id:0
-msgid "Company"
-msgstr "Companyia"
-
-#. module: l10n_it
-#: field:account.report_libroiva,name:0
-msgid "Fiscal year"
-msgstr "Exercici fiscal"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Numero"
-msgstr "Número"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Fornitore"
-msgstr "Proveïdor"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "ACQUISTI"
-msgstr "COMPRA"
-
-#. module: l10n_it
-#: model:ir.module.module,description:l10n_it.module_meta_information
-msgid ""
-"\n"
-" Piano dei conti italiano di un'impresa generica\n"
-" "
+#: model:ir.model,name:l10n_it.model_account_tax
+msgid "account.tax"
msgstr ""
-"\n"
-" Pla comptable italià d'una empresa genèrica\n"
-" "
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "Cliente"
-msgstr "Client"
+#~ msgid "VENDITE"
+#~ msgstr "VENDES"
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
-msgid "Registro vendite"
-msgstr "Registre de vendes"
+#~ msgid "Aliquota"
+#~ msgstr "Taxa"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Periodo"
-msgstr "Període"
+#~ msgid "Registro acquisti"
+#~ msgstr "Resgistre de compres"
-#. module: l10n_it
-#: view:account.report_libroiva:0
-#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
-#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
-msgid "Registri IVA"
-msgstr "Registre d'IVA"
+#~ msgid "Protocollo"
+#~ msgstr "Protocol"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imposta"
-msgstr "Impost"
+#~ msgid "REGISTRO IVA"
+#~ msgstr "REGISTRE D'IVA"
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.intra
-msgid "Regime Intra comunitario"
-msgstr "Règim intra comunitari"
+#~ msgid "Fornitore"
+#~ msgstr "Proveïdor"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Data fattura"
-msgstr "Data de la factura"
+#~ msgid "Numero"
+#~ msgstr "Número"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imponibile"
-msgstr "Imponible"
+#~ msgid "Cliente"
+#~ msgstr "Client"
-#. module: l10n_it
-#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
-msgid "Italy - Generic Chart of Accounts"
-msgstr "Itàlia - Pla general comptable"
+#~ msgid "Periodo"
+#~ msgstr "Període"
-#. module: l10n_it
-#: model:ir.model,name:l10n_it.model_account_report_libroiva
-msgid "SQL view for libro IVA"
-msgstr "Vista SQL pel llibre d'IVA"
+#~ msgid "Registro vendite"
+#~ msgstr "Registre de vendes"
+
+#~ msgid "Imposta"
+#~ msgstr "Impost"
+
+#~ msgid "Data fattura"
+#~ msgstr "Data de la factura"
+
+#~ msgid "Imponibile"
+#~ msgstr "Imponible"
+
+#~ msgid "SQL view for libro IVA"
+#~ msgstr "Vista SQL pel llibre d'IVA"
+
+#~ msgid "Company"
+#~ msgstr "Companyia"
+
+#~ msgid "Anno Fiscale"
+#~ msgstr "Exercici fiscal"
+
+#~ msgid "ACQUISTI"
+#~ msgstr "COMPRA"
+
+#~ msgid "Fiscal year"
+#~ msgstr "Exercici fiscal"
+
+#~ msgid "Registri IVA"
+#~ msgstr "Registre d'IVA"
diff --git a/addons/l10n_it/i18n/es.po b/addons/l10n_it/i18n/es.po
index aac5be72b68..ec8abd28572 100644
--- a/addons/l10n_it/i18n/es.po
+++ b/addons/l10n_it/i18n/es.po
@@ -7,20 +7,31 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
-"POT-Creation-Date: 2011-01-07 06:04+0000\n"
+"POT-Creation-Date: 2011-08-11 20:06+0000\n"
"PO-Revision-Date: 2011-02-15 15:37+0000\n"
"Last-Translator: FULL NAME \n"
"Language-Team: Spanish \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:57+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
-msgid "Registro acquisti"
-msgstr "Registro de compras"
+#: model:ir.module.module,description:l10n_it.module_meta_information
+msgid ""
+"\n"
+" Piano dei conti italiano di un'impresa generica\n"
+" "
+msgstr ""
+"\n"
+" Plan contable italiano de una empresa genérica\n"
+" "
+
+#. module: l10n_it
+#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
+msgid "Italy - Generic Chart of Accounts"
+msgstr "Italia - Plan General Contable"
#. module: l10n_it
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
@@ -43,132 +54,63 @@ msgstr ""
"Financiera/Generar Plan Contable a partir de una Plantilla de Plan."
#. module: l10n_it
-#: view:account.report_libroiva:0
-msgid "Anno Fiscale"
-msgstr "Año Fiscal"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.it
-msgid "Italia"
-msgstr "Italia"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "REGISTRO IVA"
-msgstr "REGISTRO IVA"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Protocollo"
-msgstr "Protocolo"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.extra
-msgid "Regime Extra comunitario"
-msgstr "Régimen Extra comunitario"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "VENDITE"
-msgstr "VENTAS"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Aliquota"
-msgstr "Tasa"
-
-#. module: l10n_it
-#: field:account.report_libroiva,company_id:0
-msgid "Company"
-msgstr "Compañía"
-
-#. module: l10n_it
-#: field:account.report_libroiva,name:0
-msgid "Fiscal year"
-msgstr "Ejercicio fiscal"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Numero"
-msgstr "Número"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Fornitore"
-msgstr "Proveedor"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "ACQUISTI"
-msgstr "COMPRA"
-
-#. module: l10n_it
-#: model:ir.module.module,description:l10n_it.module_meta_information
-msgid ""
-"\n"
-" Piano dei conti italiano di un'impresa generica\n"
-" "
+#: model:ir.model,name:l10n_it.model_account_tax
+msgid "account.tax"
msgstr ""
-"\n"
-" Plan contable italiano de una empresa genérica\n"
-" "
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "Cliente"
-msgstr "Cliente"
+#~ msgid "Company"
+#~ msgstr "Compañía"
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
-msgid "Registro vendite"
-msgstr "Registro de ventas"
+#~ msgid "Aliquota"
+#~ msgstr "Tasa"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Periodo"
-msgstr "Período"
+#~ msgid "VENDITE"
+#~ msgstr "VENTAS"
-#. module: l10n_it
-#: view:account.report_libroiva:0
-#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
-#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
-msgid "Registri IVA"
-msgstr "Registro del IVA"
+#~ msgid "Anno Fiscale"
+#~ msgstr "Año Fiscal"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imposta"
-msgstr "Impuesto"
+#~ msgid "Protocollo"
+#~ msgstr "Protocolo"
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.intra
-msgid "Regime Intra comunitario"
-msgstr "Régimen Intra Comunitario"
+#~ msgid "REGISTRO IVA"
+#~ msgstr "REGISTRO IVA"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Data fattura"
-msgstr "Fecha de la factura"
+#~ msgid "Fornitore"
+#~ msgstr "Proveedor"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imponibile"
-msgstr "Imponible"
+#~ msgid "Numero"
+#~ msgstr "Número"
-#. module: l10n_it
-#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
-msgid "Italy - Generic Chart of Accounts"
-msgstr "Italia - Plan General Contable"
+#~ msgid "Cliente"
+#~ msgstr "Cliente"
-#. module: l10n_it
-#: model:ir.model,name:l10n_it.model_account_report_libroiva
-msgid "SQL view for libro IVA"
-msgstr "Vista SQL para el libro del IVA"
+#~ msgid "Periodo"
+#~ msgstr "Período"
+
+#~ msgid "Registro vendite"
+#~ msgstr "Registro de ventas"
+
+#~ msgid "Imposta"
+#~ msgstr "Impuesto"
+
+#~ msgid "Registri IVA"
+#~ msgstr "Registro del IVA"
+
+#~ msgid "Data fattura"
+#~ msgstr "Fecha de la factura"
+
+#~ msgid "Imponibile"
+#~ msgstr "Imponible"
+
+#~ msgid "SQL view for libro IVA"
+#~ msgstr "Vista SQL para el libro del IVA"
+
+#~ msgid "Registro acquisti"
+#~ msgstr "Registro de compras"
+
+#~ msgid "ACQUISTI"
+#~ msgstr "COMPRA"
+
+#~ msgid "Fiscal year"
+#~ msgstr "Ejercicio fiscal"
diff --git a/addons/l10n_it/i18n/es_PY.po b/addons/l10n_it/i18n/es_PY.po
index ad857a18836..d05f707c30c 100644
--- a/addons/l10n_it/i18n/es_PY.po
+++ b/addons/l10n_it/i18n/es_PY.po
@@ -7,20 +7,31 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
-"POT-Creation-Date: 2011-01-07 06:04+0000\n"
+"POT-Creation-Date: 2011-08-11 20:06+0000\n"
"PO-Revision-Date: 2011-03-21 16:24+0000\n"
"Last-Translator: FULL NAME \n"
"Language-Team: Spanish (Paraguay) \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:57+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
-msgid "Registro acquisti"
-msgstr "Registro de compras"
+#: model:ir.module.module,description:l10n_it.module_meta_information
+msgid ""
+"\n"
+" Piano dei conti italiano di un'impresa generica\n"
+" "
+msgstr ""
+"\n"
+" Plan contable italiano de una empresa genérica\n"
+" "
+
+#. module: l10n_it
+#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
+msgid "Italy - Generic Chart of Accounts"
+msgstr "Italia - Plan General Contable"
#. module: l10n_it
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
@@ -43,132 +54,63 @@ msgstr ""
"plan contable a partir de una plantilla de plan contable."
#. module: l10n_it
-#: view:account.report_libroiva:0
-msgid "Anno Fiscale"
-msgstr "Año Fiscal"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.it
-msgid "Italia"
-msgstr "Italia"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "REGISTRO IVA"
-msgstr "REGISTRO IVA"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Protocollo"
-msgstr "Protocolo"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.extra
-msgid "Regime Extra comunitario"
-msgstr "Régimen Extra comunitario"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "VENDITE"
-msgstr "VENTAS"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Aliquota"
-msgstr "Tasa"
-
-#. module: l10n_it
-#: field:account.report_libroiva,company_id:0
-msgid "Company"
-msgstr "Compañía"
-
-#. module: l10n_it
-#: field:account.report_libroiva,name:0
-msgid "Fiscal year"
-msgstr "Ejercicio fiscal"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Numero"
-msgstr "Número"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Fornitore"
-msgstr "Proveedor"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "ACQUISTI"
-msgstr "COMPRA"
-
-#. module: l10n_it
-#: model:ir.module.module,description:l10n_it.module_meta_information
-msgid ""
-"\n"
-" Piano dei conti italiano di un'impresa generica\n"
-" "
+#: model:ir.model,name:l10n_it.model_account_tax
+msgid "account.tax"
msgstr ""
-"\n"
-" Plan contable italiano de una empresa genérica\n"
-" "
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "Cliente"
-msgstr "Cliente"
+#~ msgid "Aliquota"
+#~ msgstr "Tasa"
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
-msgid "Registro vendite"
-msgstr "Registro de ventas"
+#~ msgid "Company"
+#~ msgstr "Compañía"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Periodo"
-msgstr "Período"
+#~ msgid "VENDITE"
+#~ msgstr "VENTAS"
-#. module: l10n_it
-#: view:account.report_libroiva:0
-#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
-#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
-msgid "Registri IVA"
-msgstr "Registro del IVA"
+#~ msgid "Anno Fiscale"
+#~ msgstr "Año Fiscal"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imposta"
-msgstr "Impuesto"
+#~ msgid "Registro acquisti"
+#~ msgstr "Registro de compras"
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.intra
-msgid "Regime Intra comunitario"
-msgstr "Régimen Intra Comunitario"
+#~ msgid "Protocollo"
+#~ msgstr "Protocolo"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Data fattura"
-msgstr "Fecha de la factura"
+#~ msgid "REGISTRO IVA"
+#~ msgstr "REGISTRO IVA"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imponibile"
-msgstr "Imponible"
+#~ msgid "Fornitore"
+#~ msgstr "Proveedor"
-#. module: l10n_it
-#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
-msgid "Italy - Generic Chart of Accounts"
-msgstr "Italia - Plan General Contable"
+#~ msgid "ACQUISTI"
+#~ msgstr "COMPRA"
-#. module: l10n_it
-#: model:ir.model,name:l10n_it.model_account_report_libroiva
-msgid "SQL view for libro IVA"
-msgstr "Vista SQL para el libro del IVA"
+#~ msgid "Fiscal year"
+#~ msgstr "Ejercicio fiscal"
+
+#~ msgid "Numero"
+#~ msgstr "Número"
+
+#~ msgid "Cliente"
+#~ msgstr "Cliente"
+
+#~ msgid "Periodo"
+#~ msgstr "Período"
+
+#~ msgid "Registro vendite"
+#~ msgstr "Registro de ventas"
+
+#~ msgid "Imposta"
+#~ msgstr "Impuesto"
+
+#~ msgid "Registri IVA"
+#~ msgstr "Registro del IVA"
+
+#~ msgid "Data fattura"
+#~ msgstr "Fecha de la factura"
+
+#~ msgid "SQL view for libro IVA"
+#~ msgstr "Vista SQL para el libro del IVA"
+
+#~ msgid "Imponibile"
+#~ msgstr "Imponible"
diff --git a/addons/l10n_it/i18n/fr.po b/addons/l10n_it/i18n/fr.po
index 251c958420f..1582f87c77c 100644
--- a/addons/l10n_it/i18n/fr.po
+++ b/addons/l10n_it/i18n/fr.po
@@ -7,19 +7,27 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
-"POT-Creation-Date: 2011-01-07 06:04+0000\n"
+"POT-Creation-Date: 2011-08-11 20:06+0000\n"
"PO-Revision-Date: 2011-05-22 17:04+0000\n"
"Last-Translator: lholivier \n"
"Language-Team: French \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:57+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
-msgid "Registro acquisti"
+#: model:ir.module.module,description:l10n_it.module_meta_information
+msgid ""
+"\n"
+" Piano dei conti italiano di un'impresa generica\n"
+" "
+msgstr ""
+
+#. module: l10n_it
+#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
+msgid "Italy - Generic Chart of Accounts"
msgstr ""
#. module: l10n_it
@@ -35,129 +43,12 @@ msgid ""
msgstr ""
#. module: l10n_it
-#: view:account.report_libroiva:0
-msgid "Anno Fiscale"
+#: model:ir.model,name:l10n_it.model_account_tax
+msgid "account.tax"
msgstr ""
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.it
-msgid "Italia"
-msgstr ""
+#~ msgid "Company"
+#~ msgstr "Société"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "REGISTRO IVA"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Protocollo"
-msgstr ""
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.extra
-msgid "Regime Extra comunitario"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "VENDITE"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Aliquota"
-msgstr ""
-
-#. module: l10n_it
-#: field:account.report_libroiva,company_id:0
-msgid "Company"
-msgstr "Société"
-
-#. module: l10n_it
-#: field:account.report_libroiva,name:0
-msgid "Fiscal year"
-msgstr "Exercice fiscal"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Numero"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Fornitore"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "ACQUISTI"
-msgstr ""
-
-#. module: l10n_it
-#: model:ir.module.module,description:l10n_it.module_meta_information
-msgid ""
-"\n"
-" Piano dei conti italiano di un'impresa generica\n"
-" "
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "Cliente"
-msgstr ""
-
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
-msgid "Registro vendite"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Periodo"
-msgstr ""
-
-#. module: l10n_it
-#: view:account.report_libroiva:0
-#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
-#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
-msgid "Registri IVA"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imposta"
-msgstr ""
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.intra
-msgid "Regime Intra comunitario"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Data fattura"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imponibile"
-msgstr ""
-
-#. module: l10n_it
-#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
-msgid "Italy - Generic Chart of Accounts"
-msgstr ""
-
-#. module: l10n_it
-#: model:ir.model,name:l10n_it.model_account_report_libroiva
-msgid "SQL view for libro IVA"
-msgstr ""
+#~ msgid "Fiscal year"
+#~ msgstr "Exercice fiscal"
diff --git a/addons/l10n_it/i18n/gl.po b/addons/l10n_it/i18n/gl.po
index eede14878ce..a8cf6c6609e 100644
--- a/addons/l10n_it/i18n/gl.po
+++ b/addons/l10n_it/i18n/gl.po
@@ -7,20 +7,31 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
-"POT-Creation-Date: 2011-01-07 06:04+0000\n"
+"POT-Creation-Date: 2011-08-11 20:06+0000\n"
"PO-Revision-Date: 2011-02-25 11:41+0000\n"
"Last-Translator: FULL NAME \n"
"Language-Team: Galician \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:57+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
-msgid "Registro acquisti"
-msgstr "Rexistro de compras"
+#: model:ir.module.module,description:l10n_it.module_meta_information
+msgid ""
+"\n"
+" Piano dei conti italiano di un'impresa generica\n"
+" "
+msgstr ""
+"\n"
+" Plan contable Italiano\n"
+" "
+
+#. module: l10n_it
+#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
+msgid "Italy - Generic Chart of Accounts"
+msgstr "Italia - Plan Xeral Contable"
#. module: l10n_it
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
@@ -42,132 +53,63 @@ msgstr ""
"financeira/Xerar Plan Contable a partir dun modelo de plan."
#. module: l10n_it
-#: view:account.report_libroiva:0
-msgid "Anno Fiscale"
-msgstr "Exercicio fiscal"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.it
-msgid "Italia"
-msgstr "Italia"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "REGISTRO IVA"
-msgstr "REXISTRO IVE"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Protocollo"
-msgstr "Protocolo"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.extra
-msgid "Regime Extra comunitario"
-msgstr "Rexime Extra comunitario"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "VENDITE"
-msgstr "VENDAS"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Aliquota"
-msgstr "Taxa"
-
-#. module: l10n_it
-#: field:account.report_libroiva,company_id:0
-msgid "Company"
-msgstr "Compañía"
-
-#. module: l10n_it
-#: field:account.report_libroiva,name:0
-msgid "Fiscal year"
-msgstr "Exercicio fiscal"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Numero"
-msgstr "Número"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Fornitore"
-msgstr "Provedor"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "ACQUISTI"
-msgstr "Mercar"
-
-#. module: l10n_it
-#: model:ir.module.module,description:l10n_it.module_meta_information
-msgid ""
-"\n"
-" Piano dei conti italiano di un'impresa generica\n"
-" "
+#: model:ir.model,name:l10n_it.model_account_tax
+msgid "account.tax"
msgstr ""
-"\n"
-" Plan contable Italiano\n"
-" "
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "Cliente"
-msgstr "Cliente"
+#~ msgid "REGISTRO IVA"
+#~ msgstr "REXISTRO IVE"
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
-msgid "Registro vendite"
-msgstr "Rexistro de vendas"
+#~ msgid "Aliquota"
+#~ msgstr "Taxa"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Periodo"
-msgstr "Período"
+#~ msgid "Company"
+#~ msgstr "Compañía"
-#. module: l10n_it
-#: view:account.report_libroiva:0
-#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
-#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
-msgid "Registri IVA"
-msgstr "Rexistro do IVE"
+#~ msgid "VENDITE"
+#~ msgstr "VENDAS"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imposta"
-msgstr "Imposto"
+#~ msgid "Anno Fiscale"
+#~ msgstr "Exercicio fiscal"
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.intra
-msgid "Regime Intra comunitario"
-msgstr "Rexime Intra Comunitario"
+#~ msgid "Registro acquisti"
+#~ msgstr "Rexistro de compras"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Data fattura"
-msgstr "Data da factura"
+#~ msgid "Protocollo"
+#~ msgstr "Protocolo"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imponibile"
-msgstr "Impoñible"
+#~ msgid "Fornitore"
+#~ msgstr "Provedor"
-#. module: l10n_it
-#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
-msgid "Italy - Generic Chart of Accounts"
-msgstr "Italia - Plan Xeral Contable"
+#~ msgid "ACQUISTI"
+#~ msgstr "Mercar"
-#. module: l10n_it
-#: model:ir.model,name:l10n_it.model_account_report_libroiva
-msgid "SQL view for libro IVA"
-msgstr "Vista SQL para o libro do IVE"
+#~ msgid "Fiscal year"
+#~ msgstr "Exercicio fiscal"
+
+#~ msgid "Numero"
+#~ msgstr "Número"
+
+#~ msgid "Periodo"
+#~ msgstr "Período"
+
+#~ msgid "Cliente"
+#~ msgstr "Cliente"
+
+#~ msgid "Registro vendite"
+#~ msgstr "Rexistro de vendas"
+
+#~ msgid "Imposta"
+#~ msgstr "Imposto"
+
+#~ msgid "Registri IVA"
+#~ msgstr "Rexistro do IVE"
+
+#~ msgid "Data fattura"
+#~ msgstr "Data da factura"
+
+#~ msgid "Imponibile"
+#~ msgstr "Impoñible"
+
+#~ msgid "SQL view for libro IVA"
+#~ msgstr "Vista SQL para o libro do IVE"
diff --git a/addons/l10n_it/i18n/it.po b/addons/l10n_it/i18n/it.po
index 6035a0b7306..b12fa0ca4d3 100644
--- a/addons/l10n_it/i18n/it.po
+++ b/addons/l10n_it/i18n/it.po
@@ -1,110 +1,20 @@
-# Italian translation for openobject-addons
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR , 2011.
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * l10n_it
#
msgid ""
msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME \n"
-"POT-Creation-Date: 2011-01-07 06:04+0000\n"
-"PO-Revision-Date: 2011-02-15 15:37+0000\n"
-"Last-Translator: FULL NAME \n"
-"Language-Team: Italian \n"
+"Project-Id-Version: OpenERP Server 6.0.2\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2011-08-11 20:06+0000\n"
+"PO-Revision-Date: 2011-11-24 10:54+0000\n"
+"Last-Translator: Olivier Dony (OpenERP) \n"
+"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:57+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
-
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
-msgid "Registro acquisti"
-msgstr "Registro acquisti"
-
-#. module: l10n_it
-#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
-msgid ""
-"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
-"the name of the company, the chart template to follow, the no. of digits to "
-"generate the code for your accounts and Bank account, currency to create "
-"Journals. Thus,the pure copy of chart Template is generated.\n"
-"\tThis is the same wizard that runs from Financial "
-"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
-"Chart of Accounts from a Chart Template."
-msgstr ""
-"Genera il Piano dei Conti da un Modello. Vi verrà richiesto di passare il "
-"nome dell'azienda, il modello da seguire, il numero di decimali per generare "
-"il codice dei tuoi conti e, per il conto della Banca, la valuta per creare "
-"il Libro Giornale. Così una copia vergine del Piano dei Conti, derivatante "
-"dal modello, viene generata.\n"
-"\tQuesto è la stessa procedura automatica che viene lanciata da: Gestione "
-"Finanziaria / Configurazione / Contabilità / Conti finanziari / Genera il "
-"Piano dei conti da un modello."
-
-#. module: l10n_it
-#: view:account.report_libroiva:0
-msgid "Anno Fiscale"
-msgstr "Anno Fiscale"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.it
-msgid "Italia"
-msgstr "Italia"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "REGISTRO IVA"
-msgstr "REGISTRO IVA"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Protocollo"
-msgstr "Protocollo"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.extra
-msgid "Regime Extra comunitario"
-msgstr "Regime Extra comunitario"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "VENDITE"
-msgstr "VENDITE"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Aliquota"
-msgstr "Aliquota"
-
-#. module: l10n_it
-#: field:account.report_libroiva,company_id:0
-msgid "Company"
-msgstr "Azienda"
-
-#. module: l10n_it
-#: field:account.report_libroiva,name:0
-msgid "Fiscal year"
-msgstr "Anno fiscale"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Numero"
-msgstr "Numero"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Fornitore"
-msgstr "Fornitore"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "ACQUISTI"
-msgstr "ACQUISTI"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
#. module: l10n_it
#: model:ir.module.module,description:l10n_it.module_meta_information
@@ -117,58 +27,88 @@ msgstr ""
" Piano dei conti italiano di un'impresa generica\n"
" "
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "Cliente"
-msgstr "Cliente"
-
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
-msgid "Registro vendite"
-msgstr "Registro vendite"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Periodo"
-msgstr "Periodo"
-
-#. module: l10n_it
-#: view:account.report_libroiva:0
-#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
-#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
-msgid "Registri IVA"
-msgstr "Registri IVA"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imposta"
-msgstr "Imposta"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.intra
-msgid "Regime Intra comunitario"
-msgstr "Regime Intra comunitario"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Data fattura"
-msgstr "Data fattura"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imponibile"
-msgstr "Imponibile"
-
#. module: l10n_it
#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
msgid "Italy - Generic Chart of Accounts"
msgstr "Italia - Piano dei conti generico"
#. module: l10n_it
-#: model:ir.model,name:l10n_it.model_account_report_libroiva
-msgid "SQL view for libro IVA"
-msgstr "Vista SQL per registro IVA"
+#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
+msgid ""
+"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
+"the name of the company, the chart template to follow, the no. of digits to "
+"generate the code for your accounts and Bank account, currency to create "
+"Journals. Thus,the pure copy of chart Template is generated.\n"
+"\tThis is the same wizard that runs from Financial "
+"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
+"Chart of Accounts from a Chart Template."
+msgstr ""
+"Genera il piano dei conti da un template. Verrà chiesto di indicare il nome "
+"dell'azienda, il piano dei conti da seguire, il numero di cifre per generare "
+"il codice dei conti, la valuta per creare i sezionali. Quindi, una semplice "
+"copia del template verrà generata.\n"
+"\tQuesto è lo stesso wizard che viene eseguito da "
+"Contabilità/Configurazione/Contabilità Generale/Assetto finanziario della "
+"nuova azienda"
+
+#. module: l10n_it
+#: model:ir.model,name:l10n_it.model_account_tax
+msgid "account.tax"
+msgstr "account.tax"
+
+#~ msgid "Aliquota"
+#~ msgstr "Aliquota"
+
+#~ msgid "Company"
+#~ msgstr "Azienda"
+
+#~ msgid "VENDITE"
+#~ msgstr "VENDITE"
+
+#~ msgid "Anno Fiscale"
+#~ msgstr "Anno Fiscale"
+
+#~ msgid "Registro acquisti"
+#~ msgstr "Registro acquisti"
+
+#~ msgid "Protocollo"
+#~ msgstr "Protocollo"
+
+#~ msgid "REGISTRO IVA"
+#~ msgstr "REGISTRO IVA"
+
+#~ msgid "Fornitore"
+#~ msgstr "Fornitore"
+
+#~ msgid "ACQUISTI"
+#~ msgstr "ACQUISTI"
+
+#~ msgid "Fiscal year"
+#~ msgstr "Anno fiscale"
+
+#~ msgid "Numero"
+#~ msgstr "Numero"
+
+#~ msgid "Cliente"
+#~ msgstr "Cliente"
+
+#~ msgid "Periodo"
+#~ msgstr "Periodo"
+
+#~ msgid "Registro vendite"
+#~ msgstr "Registro vendite"
+
+#~ msgid "Imposta"
+#~ msgstr "Imposta"
+
+#~ msgid "Registri IVA"
+#~ msgstr "Registri IVA"
+
+#~ msgid "Data fattura"
+#~ msgstr "Data fattura"
+
+#~ msgid "Imponibile"
+#~ msgstr "Imponibile"
+
+#~ msgid "SQL view for libro IVA"
+#~ msgstr "Vista SQL per registro IVA"
diff --git a/addons/l10n_it/i18n/l10n_it.pot b/addons/l10n_it/i18n/l10n_it.pot
index 7f210e4cd75..1c46674bb28 100644
--- a/addons/l10n_it/i18n/l10n_it.pot
+++ b/addons/l10n_it/i18n/l10n_it.pot
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: OpenERP Server 6.0.0-rc2\n"
+"Project-Id-Version: OpenERP Server 6.0.2\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
-"POT-Creation-Date: 2011-01-07 06:04:30+0000\n"
-"PO-Revision-Date: 2011-01-07 06:04:30+0000\n"
+"POT-Creation-Date: 2011-08-11 20:06+0000\n"
+"PO-Revision-Date: 2011-08-11 20:06+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -15,81 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
-msgid "Registro acquisti"
-msgstr ""
-
-#. module: l10n_it
-#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
-msgid "Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.\n"
-" This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template."
-msgstr ""
-
-#. module: l10n_it
-#: view:account.report_libroiva:0
-msgid "Anno Fiscale"
-msgstr ""
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.it
-msgid "Italia"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "REGISTRO IVA"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Protocollo"
-msgstr ""
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.extra
-msgid "Regime Extra comunitario"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "VENDITE"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Aliquota"
-msgstr ""
-
-#. module: l10n_it
-#: field:account.report_libroiva,company_id:0
-msgid "Company"
-msgstr ""
-
-#. module: l10n_it
-#: field:account.report_libroiva,name:0
-msgid "Fiscal year"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Numero"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Fornitore"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "ACQUISTI"
-msgstr ""
-
#. module: l10n_it
#: model:ir.module.module,description:l10n_it.module_meta_information
msgid "\n"
@@ -97,59 +22,19 @@ msgid "\n"
" "
msgstr ""
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "Cliente"
-msgstr ""
-
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
-msgid "Registro vendite"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Periodo"
-msgstr ""
-
-#. module: l10n_it
-#: view:account.report_libroiva:0
-#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
-#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
-msgid "Registri IVA"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imposta"
-msgstr ""
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.intra
-msgid "Regime Intra comunitario"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Data fattura"
-msgstr ""
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imponibile"
-msgstr ""
-
#. module: l10n_it
#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
msgid "Italy - Generic Chart of Accounts"
msgstr ""
#. module: l10n_it
-#: model:ir.model,name:l10n_it.model_account_report_libroiva
-msgid "SQL view for libro IVA"
+#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
+msgid "Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.\n"
+" This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template."
+msgstr ""
+
+#. module: l10n_it
+#: model:ir.model,name:l10n_it.model_account_tax
+msgid "account.tax"
msgstr ""
diff --git a/addons/l10n_it/i18n/pt_BR.po b/addons/l10n_it/i18n/pt_BR.po
index 7cabe3a4653..df9315127ae 100644
--- a/addons/l10n_it/i18n/pt_BR.po
+++ b/addons/l10n_it/i18n/pt_BR.po
@@ -7,20 +7,31 @@ msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
-"POT-Creation-Date: 2011-01-07 06:04+0000\n"
+"POT-Creation-Date: 2011-08-11 20:06+0000\n"
"PO-Revision-Date: 2011-03-10 23:11+0000\n"
"Last-Translator: Emerson \n"
"Language-Team: Brazilian Portuguese \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 05:57+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-25 05:22+0000\n"
+"X-Generator: Launchpad (build 14376)\n"
#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_debit
-msgid "Registro acquisti"
-msgstr "Registro acquisti"
+#: model:ir.module.module,description:l10n_it.module_meta_information
+msgid ""
+"\n"
+" Piano dei conti italiano di un'impresa generica\n"
+" "
+msgstr ""
+"\n"
+" Piano dei conti italiano di un'impresa generica\n"
+" "
+
+#. module: l10n_it
+#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
+msgid "Italy - Generic Chart of Accounts"
+msgstr "Italy - Generic Chart of Accounts"
#. module: l10n_it
#: model:ir.actions.todo,note:l10n_it.config_call_account_template_generic
@@ -42,132 +53,63 @@ msgstr ""
"Chart of Accounts from a Chart Template."
#. module: l10n_it
-#: view:account.report_libroiva:0
-msgid "Anno Fiscale"
-msgstr "Anno Fiscale"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.it
-msgid "Italia"
-msgstr "Italia"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "REGISTRO IVA"
-msgstr "REGISTRO IVA"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Protocollo"
-msgstr "Protocollo"
-
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.extra
-msgid "Regime Extra comunitario"
-msgstr "Regime Extra comunitario"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "VENDITE"
-msgstr "VENDITE"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Aliquota"
-msgstr "Aliquota"
-
-#. module: l10n_it
-#: field:account.report_libroiva,company_id:0
-msgid "Company"
-msgstr "Company"
-
-#. module: l10n_it
-#: field:account.report_libroiva,name:0
-msgid "Fiscal year"
-msgstr "Fiscal year"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Numero"
-msgstr "Numero"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Fornitore"
-msgstr "Fornitore"
-
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "ACQUISTI"
-msgstr "ACQUISTI"
-
-#. module: l10n_it
-#: model:ir.module.module,description:l10n_it.module_meta_information
-msgid ""
-"\n"
-" Piano dei conti italiano di un'impresa generica\n"
-" "
+#: model:ir.model,name:l10n_it.model_account_tax
+msgid "account.tax"
msgstr ""
-"\n"
-" Piano dei conti italiano di un'impresa generica\n"
-" "
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-msgid "Cliente"
-msgstr "Cliente"
+#~ msgid "Aliquota"
+#~ msgstr "Aliquota"
-#. module: l10n_it
-#: model:ir.actions.report.xml,name:l10n_it.account_ita_libroIVA_credit
-msgid "Registro vendite"
-msgstr "Registro vendite"
+#~ msgid "VENDITE"
+#~ msgstr "VENDITE"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Periodo"
-msgstr "Periodo"
+#~ msgid "Company"
+#~ msgstr "Company"
-#. module: l10n_it
-#: view:account.report_libroiva:0
-#: model:ir.actions.act_window,name:l10n_it.l10n_chart_it_report_libroIVA_action
-#: model:ir.ui.menu,name:l10n_it.menu_report_l10n_chart_it_libroIVA
-msgid "Registri IVA"
-msgstr "Registri IVA"
+#~ msgid "Anno Fiscale"
+#~ msgstr "Anno Fiscale"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imposta"
-msgstr "Imposta"
+#~ msgid "Registro acquisti"
+#~ msgstr "Registro acquisti"
-#. module: l10n_it
-#: model:account.fiscal.position.template,name:l10n_it.intra
-msgid "Regime Intra comunitario"
-msgstr "Regime Intra comunitario"
+#~ msgid "Protocollo"
+#~ msgstr "Protocollo"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Data fattura"
-msgstr "Data fattura"
+#~ msgid "REGISTRO IVA"
+#~ msgstr "REGISTRO IVA"
-#. module: l10n_it
-#: report:l10n_it.report.libroIVA_credito:0
-#: report:l10n_it.report.libroIVA_debito:0
-msgid "Imponibile"
-msgstr "Imponibile"
+#~ msgid "Fiscal year"
+#~ msgstr "Fiscal year"
-#. module: l10n_it
-#: model:ir.module.module,shortdesc:l10n_it.module_meta_information
-msgid "Italy - Generic Chart of Accounts"
-msgstr "Italy - Generic Chart of Accounts"
+#~ msgid "Fornitore"
+#~ msgstr "Fornitore"
-#. module: l10n_it
-#: model:ir.model,name:l10n_it.model_account_report_libroiva
-msgid "SQL view for libro IVA"
-msgstr "SQL view for libro IVA"
+#~ msgid "Numero"
+#~ msgstr "Numero"
+
+#~ msgid "Cliente"
+#~ msgstr "Cliente"
+
+#~ msgid "Imposta"
+#~ msgstr "Imposta"
+
+#~ msgid "Periodo"
+#~ msgstr "Periodo"
+
+#~ msgid "Registri IVA"
+#~ msgstr "Registri IVA"
+
+#~ msgid "ACQUISTI"
+#~ msgstr "ACQUISTI"
+
+#~ msgid "Data fattura"
+#~ msgstr "Data fattura"
+
+#~ msgid "Imponibile"
+#~ msgstr "Imponibile"
+
+#~ msgid "Registro vendite"
+#~ msgstr "Registro vendite"
+
+#~ msgid "SQL view for libro IVA"
+#~ msgstr "SQL view for libro IVA"
diff --git a/addons/l10n_it/libroIVA.py b/addons/l10n_it/libroIVA.py
deleted file mode 100644
index a78c81ffdb3..00000000000
--- a/addons/l10n_it/libroIVA.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2010
-# Italian OpenERP Community ()
-# Servabit srl
-# Agile Business Group sagl
-# Domsense srl
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-
-# ##################################################################################
-# Questa vista SQL viene usata solo per far scegliere l'anno di pianificazione all'utente
-# Viene infatti costruita una vista XML di tipo tree che contiene solo i diversi anni per i quali stata fatta almeno una pianificazione
-# ##################################################################################
-
-from osv import fields, osv
-
-class l10n_chart_it_report_libroIVA (osv.osv):
- _name = "account.report_libroiva"
- _description = "SQL view for libro IVA"
- _auto = False
- _rec_name = "name"
- #_order = "fiscal_year";
-
- _columns = {
- 'name': fields.char('Fiscal year',size=64),
- 'company_id': fields.many2one('res.company', 'Company'),
- }
-
- def init (self, cr) :
- cr.execute("""DROP VIEW IF EXISTS account_report_libroiva""")
- cr.execute("""
- CREATE VIEW account_report_libroiva AS (
- SELECT id, name, company_id FROM account_fiscalyear
- )""")
-l10n_chart_it_report_libroIVA()
-
-
diff --git a/addons/l10n_it/libroIVA_menu.xml b/addons/l10n_it/libroIVA_menu.xml
deleted file mode 100644
index 51e581ac11c..00000000000
--- a/addons/l10n_it/libroIVA_menu.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/addons/l10n_it/libroIVA_view.xml b/addons/l10n_it/libroIVA_view.xml
deleted file mode 100644
index bbc905e6da0..00000000000
--- a/addons/l10n_it/libroIVA_view.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
- l10n_chart_it_report_libroIVA_tree
- account.report_libroiva
- tree
-
-
-
-
-
-
-
-
-
-
- l10n_chart_it_report_libroIVA_form
- account.report_libroiva
- form
-
-
-
-
-
-
-
- Registri IVA
- account.report_libroiva
-
- form
- tree,form
-
-
-
-
-
diff --git a/addons/l10n_it/report.xml b/addons/l10n_it/report.xml
deleted file mode 100644
index e0ba4a33daf..00000000000
--- a/addons/l10n_it/report.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/l10n_it/report/__init__.py b/addons/l10n_it/report/__init__.py
deleted file mode 100644
index be32155c675..00000000000
--- a/addons/l10n_it/report/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-import libroIVA_credito
-import libroIVA_debito
\ No newline at end of file
diff --git a/addons/l10n_it/report/libroIVA_credito.py b/addons/l10n_it/report/libroIVA_credito.py
deleted file mode 100644
index b48c81d2475..00000000000
--- a/addons/l10n_it/report/libroIVA_credito.py
+++ /dev/null
@@ -1,79 +0,0 @@
-import datetime
-import time
-from report import report_sxw
-from osv import osv
-import pooler
-
-
-class l10n_chart_it_report_libroIVA_credito(report_sxw.rml_parse):
-
- def __init__(self, cr, uid, name, context):
- super(l10n_chart_it_report_libroIVA_credito,self).__init__(cr,uid,name,context)
- self.localcontext.update({
- 'time' : time,
- 'get_company' : self.get_company,
- 'get_periods' : self.get_periods,
- 'get_lines' : self.get_lines,
- })
-
-
- def get_company(self,fiscal_year):
- #print 'COMP = ',fiscal_year
- return ""
-
- def get_periods(self,fiscal_year):
- #print 'Fiscal year id:',fiscal_year.id
- obj=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
- fy=obj.browse(self.cr,self.uid,fiscal_year.id)
- #print 'Periods = ',fy.period_ids
- res=[rec for rec in fy.period_ids]
- #return fy.periods => non funziona?!? bool object !?!?
- return res
-
- def get_invoices(self,period):
- #print 'PERIOD = ',period.name
- obj=pooler.get_pool(self.cr.dbname).get('account.invoice')
- # Selezione tutte le fatture emesse nel periodo
- self.cr.execute( """
- SELECT id FROM account_invoice
- WHERE (state='open' OR state='paid') AND
- period_id="""+str(period.id)+"""
- AND (type='out_invoice' OR type='out_refund')
- """)
- ids=self.cr.fetchall()
- #print 'IDS = ',
- if ids:
- ids=[id[0] for id in ids ]
- invoices=obj.browse(self.cr,self.uid,ids)
- #print 'INVOICES = ',invoices
- return invoices
-
- def get_lines(self,fiscal_year):
- res=[]
- obj_fy=pooler.get_pool(self.cr.dbname).get('account.fiscalyear')
- fy=obj_fy.browse(self.cr,self.uid,fiscal_year.id)
- for period in fy.period_ids:
- invoices=self.get_invoices(period)
- for invoice in invoices:
- d={'periodo': period.name}
- d['protocollo']=invoice.number
- #print 'PARTNER ',invoice.partner_id.name
- causale=invoice.partner_id.name
- #print 'CAUSALE = ',causale
- d['causale']=causale
- d['numero']=invoice.reference
- d['data_doc']=invoice.date_invoice
- for tax in invoice.tax_line:
- #print '\tTAX: ',tax
- d['aliquota']=tax.tax_code_id.name
- d['imponibile']=tax.base
- d['imposta']=tax.amount
- res.append(d)
- d={'periodo':'', 'protocollo':'', 'causale':'', 'numero':'', 'data_doc':'', }
- return res
-
-
-
-report_sxw.report_sxw('report.l10n_it.report.libroIVA_credito','account.report_libroiva',
- 'l10n_it/report/libroIVA_credito.rml',
- parser=l10n_chart_it_report_libroIVA_credito,header=False)
diff --git a/addons/l10n_it/report/libroIVA_credito.rml b/addons/l10n_it/report/libroIVA_credito.rml
deleted file mode 100644
index 2b282f760b4..00000000000
--- a/addons/l10n_it/report/libroIVA_credito.rml
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [[ repeatIn(objects, 'o') ]]
-
-
\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-18 05:13+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: l10n_th
+#: model:ir.actions.todo,note:l10n_th.config_call_account_template_th
+msgid ""
+"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
+"the name of the company, the chart template to follow, the no. of digits to "
+"generate the code for your accounts and Bank account, currency to create "
+"Journals. Thus,the pure copy of chart Template is generated.\n"
+"This is the same wizard that runs from Financial "
+"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
+"Chart of Accounts from a Chart Template."
+msgstr ""
+
+#. module: l10n_th
+#: model:ir.module.module,shortdesc:l10n_th.module_meta_information
+msgid "Thailand - Thai Chart of Accounts"
+msgstr ""
+
+#. module: l10n_th
+#: model:ir.module.module,description:l10n_th.module_meta_information
+msgid ""
+"\n"
+"Chart of accounts for Thailand.\n"
+" "
+msgstr ""
diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml
index 50932a03437..f695d994acd 100644
--- a/addons/lunch/lunch_view.xml
+++ b/addons/lunch/lunch_view.xml
@@ -371,9 +371,11 @@
-
+
+
report.lunch.amountformtree,form
+ {'search_default_year': 1,"search_default_month":1}
diff --git a/addons/lunch/report/report_lunch_order.py b/addons/lunch/report/report_lunch_order.py
index 05f730db740..7e2b8de9f49 100644
--- a/addons/lunch/report/report_lunch_order.py
+++ b/addons/lunch/report/report_lunch_order.py
@@ -64,3 +64,5 @@ class report_lunch_order(osv.osv):
)
""")
report_lunch_order()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index 9c535966e17..159259f151d 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -479,11 +479,22 @@ class mail_message(osv.osv):
attachments = []
for attach in message.attachment_ids:
attachments.append((attach.datas_fname, base64.b64decode(attach.datas)))
+
+ body = message.body_html if message.subtype == 'html' else message.body_text
+ body_alternative = None
+ subtype_alternative = None
+ if message.subtype == 'html' and message.body_text:
+ # we have a plain text alternative prepared, pass it to
+ # build_message instead of letting it build one
+ body_alternative = message.body_text
+ subtype_alternative = 'plain'
+
msg = ir_mail_server.build_email(
email_from=message.email_from,
email_to=to_email(message.email_to),
subject=message.subject,
- body=message.body_html if message.subtype == 'html' else message.body_text,
+ body=body,
+ body_alternative=body_alternative,
email_cc=to_email(message.email_cc),
email_bcc=to_email(message.email_bcc),
reply_to=message.reply_to,
@@ -491,6 +502,7 @@ class mail_message(osv.osv):
references = message.references,
object_id=message.res_id and ('%s-%s' % (message.res_id,message.model)),
subtype=message.subtype,
+ subtype_alternative=subtype_alternative,
headers=message.headers and literal_eval(message.headers))
res = ir_mail_server.send_email(cr, uid, msg,
mail_server_id=message.mail_server_id.id,
diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml
index 83e7474fe1a..3169bca76c2 100644
--- a/addons/mail/mail_message_view.xml
+++ b/addons/mail/mail_message_view.xml
@@ -1,9 +1,6 @@
-
-
-
mail.message.formmail.message
@@ -100,8 +97,10 @@
search
-
+
+
+
@@ -132,7 +131,7 @@
formtree,form[('email_from', '!=', False)]
- {'search_default_outgoing':1}
+ {'search_default_received':1}
@@ -142,14 +141,10 @@
src_model="res.partner"
view_id="view_email_message_tree"/>
-
-
-
-
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 547281911c4..82832134c27 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -844,3 +844,5 @@ class report_xml(osv.osv):
report_xml()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign/report/campaign_analysis.py b/addons/marketing_campaign/report/campaign_analysis.py
index af04a7e6dff..ebbb6034a1a 100644
--- a/addons/marketing_campaign/report/campaign_analysis.py
+++ b/addons/marketing_campaign/report/campaign_analysis.py
@@ -99,3 +99,5 @@ class campaign_analysis(osv.osv):
)
""")
campaign_analysis()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_crm_demo/__init__.py b/addons/marketing_campaign_crm_demo/__init__.py
index 50a14119520..4c241b72be9 100644
--- a/addons/marketing_campaign_crm_demo/__init__.py
+++ b/addons/marketing_campaign_crm_demo/__init__.py
@@ -1 +1,3 @@
# Debian packaging removes blank files, so this comment is added.
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/membership/i18n/pt.po b/addons/membership/i18n/pt.po
index 4e956c14e09..8d6d58052ec 100644
--- a/addons/membership/i18n/pt.po
+++ b/addons/membership/i18n/pt.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
-"PO-Revision-Date: 2010-12-12 07:51+0000\n"
-"Last-Translator: Madalena_prime \n"
+"PO-Revision-Date: 2011-11-23 12:23+0000\n"
+"Last-Translator: Stephane Wirtel (OpenERP) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-05 04:59+0000\n"
-"X-Generator: Launchpad (build 14231)\n"
+"X-Launchpad-Export-Date: 2011-11-24 05:00+0000\n"
+"X-Generator: Launchpad (build 14336)\n"
#. module: membership
#: model:process.transition,name:membership.process_transition_invoicetoassociate0
@@ -474,7 +474,7 @@ msgstr "Versão da Lista de Preço de Venda do Membro"
msgid ""
"Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
-"Erro: O UOM por defeito e o UOM de compra devem estar na mesma categoria."
+"Erro: A UdM pré-defenida e a UdM de compra devem ser da mesma categoria."
#. module: membership
#: view:report.membership:0
diff --git a/addons/membership/membership_view.xml b/addons/membership/membership_view.xml
index b14a72b278e..a1c39165c82 100644
--- a/addons/membership/membership_view.xml
+++ b/addons/membership/membership_view.xml
@@ -107,7 +107,7 @@
Membership Productsproduct.product[('membership','=',True), ('type', '=', 'service')]
- {'membership':True, 'type':'service'}
+ {'membership':True, 'type':'service', 'default_membership': True, 'default_type': 'service'}
diff --git a/addons/membership/report/report_membership_view.xml b/addons/membership/report/report_membership_view.xml
index 27ccfae0e12..b0ac01ac89f 100644
--- a/addons/membership/report/report_membership_view.xml
+++ b/addons/membership/report/report_membership_view.xml
@@ -36,9 +36,10 @@
-
+
+
@@ -96,7 +97,7 @@
report.membershipform
- {"search_default_member":1, 'search_default_Revenue':1, 'search_default_this_month':1, 'search_default_salesman':1,'group_by_no_leaf':1}
+ {"search_default_year":1,"search_default_member":1, 'search_default_Revenue':1, 'search_default_this_month':1, 'search_default_salesman':1,'group_by_no_leaf':1}
diff --git a/addons/membership/test/test_membership.yml b/addons/membership/test/test_membership.yml
index 75e0f887cfe..27b755f156b 100644
--- a/addons/membership/test/test_membership.yml
+++ b/addons/membership/test/test_membership.yml
@@ -13,36 +13,22 @@
list_price: 80.00
- |
- "Mark Johnson" want to join "Gold Membership".
-- |
- I'm creating new member "Mark Johnson".
+ "Seagate" want to join "Gold Membership", so I'm checking "Current Membership State" of "Seagate". It is an "Non Member" or not.
-
- !record {model: res.partner, id: res_partner_markjohnson0}:
- address:
- - city: paris
- country_id: base.fr
- name: Mark Johnson
- street: 1 rue Rockfeller
- type: invoice
- zip: '75016'
- name: Mark Johnson
-- |
- I'm checking "Current Membership State" of "Mark Johnson". It is an "Non Member" or not.
--
- !assert {model: res.partner, id: res_partner_markjohnson0}:
+ !assert {model: res.partner, id: base.res_partner_seagate}:
- membership_state == 'none', 'Member should be has "Current Membership State" in "Non Member".'
- |
- I'm doing to make membership invoice for "Mark Johnson" on joining "Gold Membership".
+ I'm doing to make membership invoice for "Seagate" on joining "Gold Membership".
-
!python {model: res.partner}: |
- self.create_membership_invoice(cr, uid, [ref("res_partner_markjohnson0")], product_id=ref("product_product_membershipproduct0"), datas={"amount":80.00})
+ self.create_membership_invoice(cr, uid, [ref("base.res_partner_seagate")], product_id=ref("product_product_membershipproduct0"), datas={"amount":80.00})
- |
- I'm checking "Current Membership State" of "Mark Johnson". It is an "Waiting Member" or not.
+ I'm checking "Current Membership State" of "Seagate". It is an "Waiting Member" or not.
-
- !assert {model: res.partner, id: res_partner_markjohnson0}:
+ !assert {model: res.partner, id: base.res_partner_seagate}:
- membership_state == 'waiting', 'Member should be has "Current Membership State" in "Waiting Member".'
- |
- I'm Opening that Invoice which is created for "Mark Johnson".
+ I'm Opening that Invoice which is created for "Seagate".
-
!python {model: res.partner}: |
import netsvc
@@ -52,16 +38,16 @@
membership_line_pool = self.pool.get('membership.membership_line')
membership_pool = self.pool.get('product.product')
- membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('res_partner_markjohnson0'))])
+ membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('base.res_partner_seagate'))])
membership_lines = membership_line_pool.browse(cr, uid, membership_line_ids)
assert membership_lines, _('Membership is not registrated.')
membership_line = membership_lines[0]
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.invoice', membership_line.account_invoice_id.id, 'invoice_open', cr)
- |
- I'm checking "Current membership state" of "Mark Johnson". It is an "Invoiced Member" or not.
+ I'm checking "Current membership state" of "Seagate". It is an "Invoiced Member" or not.
-
- !assert {model: res.partner, id: res_partner_markjohnson0}:
+ !assert {model: res.partner, id: base.res_partner_seagate}:
- membership_state == 'invoiced', 'Member should be has "Current Membership State" in "Invoiced Member".'
- |
@@ -85,10 +71,10 @@
- membership_state == 'free', 'Member should be has "Current Membership State" in "Free Member".'
- |
- I'm set "Mark Johnson" as a associated member of "Ms. Johnson" and also set Non free member.
+ I'm set "Seagate" as a associated member of "Ms. Johnson" and also set Non free member.
-
!python {model: res.partner}: |
- self.write(cr, uid, [ref("res_partner_msjohnson0")], {'free_member': False, 'associate_member': ref("res_partner_markjohnson0")})
+ self.write(cr, uid, [ref("res_partner_msjohnson0")], {'free_member': False, 'associate_member': ref("base.res_partner_seagate")})
- |
I'm checking "Current membership state" of "Ms. Johnson". It is an "Paid Member" or not.
@@ -108,17 +94,17 @@
type: service
list_price: 50.00
- |
- I'm making invoice of "Mark Johnson" member on joining new membership "Regular Membership".
+ I'm making invoice of "Seagate" member on joining new membership "Regular Membership".
-
!python {model: res.partner}: |
- self.create_membership_invoice(cr, uid, [ref("res_partner_markjohnson0")], product_id=ref("product_product_membershipproduct1"), datas={"amount":50.00})
+ self.create_membership_invoice(cr, uid, [ref("base.res_partner_seagate")], product_id=ref("product_product_membershipproduct1"), datas={"amount":50.00})
- |
- I'm checking "Current membership state" of "Mark Johnson". It is an "Old Member" or not.
+ I'm checking "Current membership state" of "Seagate". It is an "Old Member" or not.
-
- !assert {model: res.partner, id: res_partner_markjohnson0}:
+ !assert {model: res.partner, id: base.res_partner_seagate}:
- membership_state == 'old', 'Member should be has "Current Membership State" in "Old Member".'
- |
- I'm doing to make credit note of invoice which is paid by "Mark Johnson" to cancel membership.
+ I'm doing to make credit note of invoice which is paid by "Seagate" to cancel membership.
-
!python {model: account.invoice}: |
from tools.translate import _
@@ -128,15 +114,15 @@
membership_pool = self.pool.get('product.product')
invoice_refund_pool = self.pool.get('account.invoice.refund')
- membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('res_partner_markjohnson0'))])
+ membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('base.res_partner_seagate'))])
membership_lines = membership_line_pool.browse(cr, uid, membership_line_ids)
assert membership_lines, _('Membership is not registrated.')
membership_line = membership_lines[0]
refund_id = invoice_refund_pool.create(cr, uid, {'description': 'Refund of Membership', 'filter_refund': 'refund'}, {'active_id': membership_line.account_invoice_id.id})
invoice_refund_pool.invoice_refund(cr, uid, [refund_id], {'active_id': membership_line.account_invoice_id.id, 'active_ids': [membership_line.account_invoice_id.id]})
- |
- I'm checking "Current membership state" of "Mark Johnson". It is an "Cancelled Member" or not.
+ I'm checking "Current membership state" of "Seagate". It is an "Cancelled Member" or not.
-
- !assert {model: res.partner, id: res_partner_markjohnson0}:
+ !assert {model: res.partner, id: base.res_partner_seagate}:
- membership_state == 'canceled', 'Member should be has "Current Membership State" in "Cancelled Member".'
diff --git a/addons/mrp/board_manufacturing_view.xml b/addons/mrp/board_manufacturing_view.xml
index 03d6947d215..427780f344c 100644
--- a/addons/mrp/board_manufacturing_view.xml
+++ b/addons/mrp/board_manufacturing_view.xml
@@ -7,17 +7,16 @@
form
diff --git a/addons/mrp/i18n/pt.po b/addons/mrp/i18n/pt.po
index f67b9afca9c..9574e9dc573 100644
--- a/addons/mrp/i18n/pt.po
+++ b/addons/mrp/i18n/pt.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
-"PO-Revision-Date: 2011-11-09 17:38+0000\n"
-"Last-Translator: DReis \n"
+"PO-Revision-Date: 2011-11-23 11:53+0000\n"
+"Last-Translator: Daniel Reis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-10 04:57+0000\n"
-"X-Generator: Launchpad (build 14263)\n"
+"X-Launchpad-Export-Date: 2011-11-24 05:00+0000\n"
+"X-Generator: Launchpad (build 14336)\n"
#. module: mrp
#: field:mrp.production,move_created_ids:0
@@ -1801,7 +1801,7 @@ msgstr "Empresa"
#. module: mrp
#: field:mrp.workcenter,time_cycle:0
msgid "Time for 1 cycle (hour)"
-msgstr "Tempo de um ciclo"
+msgstr "Tempo por ciclo (horas)"
#. module: mrp
#: model:ir.actions.report.xml,name:mrp.report_mrp_production_report
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 0fd75d7ca7a..356a762c0c5 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -491,6 +491,9 @@ class mrp_production(osv.osv):
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/',
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
}
+ _sql_constraints = [
+ ('name_uniq', 'unique(name, company_id)', 'Reference must be unique per Company!'),
+ ]
_order = 'priority desc, date_planned asc';
def _check_qty(self, cr, uid, ids, context=None):
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 13ac6287e52..67890b42134 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -529,7 +529,6 @@
Bill of Materials Structure
-
diff --git a/addons/mrp/product.py b/addons/mrp/product.py
index 9731d93f84b..c3f9ee855df 100644
--- a/addons/mrp/product.py
+++ b/addons/mrp/product.py
@@ -66,3 +66,5 @@ class product_product(osv.osv):
product_product()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mrp/report/mrp_production_order.py b/addons/mrp/report/mrp_production_order.py
index 4bb525db1ff..d0ff7ba7970 100644
--- a/addons/mrp/report/mrp_production_order.py
+++ b/addons/mrp/report/mrp_production_order.py
@@ -20,3 +20,5 @@
##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py
index a12c580e378..c072b821196 100644
--- a/addons/mrp/report/price.py
+++ b/addons/mrp/report/price.py
@@ -219,3 +219,5 @@ class report_custom(report_rml):
return xml
report_custom('report.product.price', 'product.product', '', 'addons/mrp/report/price.xsl')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mrp/test/mrp_phantom_bom.yml b/addons/mrp/test/mrp_phantom_bom.yml
index 41f1920dc2d..ca29b24ea23 100644
--- a/addons/mrp/test/mrp_phantom_bom.yml
+++ b/addons/mrp/test/mrp_phantom_bom.yml
@@ -179,11 +179,9 @@
-
!record {model: mrp.production, id: mrp_production_mo0}:
bom_id: mrp.mrp_bom_orangejuice0
- company_id: base.main_company
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
location_dest_id: stock.stock_location_output
location_src_id: stock.stock_location_stock
- name: MO/00002
product_id: mrp.product_product_orangejuice0
product_lines:
- name: Orange
diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml
index 2484345de9a..377a57d6121 100644
--- a/addons/mrp_operations/mrp_operations_view.xml
+++ b/addons/mrp_operations/mrp_operations_view.xml
@@ -268,8 +268,6 @@
Work Orders
-
-
-
-
-
-
+
+ PAD
diff --git a/addons/plugin/__init__.py b/addons/plugin/__init__.py
new file mode 100644
index 00000000000..1844c42011c
--- /dev/null
+++ b/addons/plugin/__init__.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import plugin_handler
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/plugin/__openerp__.py b/addons/plugin/__openerp__.py
new file mode 100644
index 00000000000..b598690cbf2
--- /dev/null
+++ b/addons/plugin/__openerp__.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+
+{
+ 'name': 'Common interface for CRM plugin (Thunderbird and Outlook)',
+ 'version': '1.0',
+ 'category': 'Hidden',
+ 'complexity': "easy",
+ 'description': """
+The common interface for pugin.
+=====================================================
+
+""",
+ 'author': 'OpenERP SA',
+ 'website': 'http://www.openerp.com',
+ 'depends': [
+ 'base',
+ ],
+ 'data': [],
+ 'demo': [],
+ 'test': [],
+ 'installable': True,
+ 'active': False,
+ 'images': [],
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py
new file mode 100644
index 00000000000..c4859771e35
--- /dev/null
+++ b/addons/plugin/plugin_handler.py
@@ -0,0 +1,153 @@
+'''
+Created on 18 oct. 2011
+
+@author: openerp
+'''
+
+from osv import osv, fields
+
+
+class plugin_handler(osv.osv_memory):
+ _name = 'plugin.handler'
+
+ def _make_url(self, cr, uid, res_id, model, context=None):
+ """
+ @param id: on which document the message is pushed
+ @param model: name of the document linked with the mail
+ @return url
+ """
+ base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url', default='http://localhost:8069', context=context)
+ if base_url:
+ base_url += '/?id=%s&model=%s'%(res_id,model)
+ return base_url
+
+ def is_installed(self, cr, uid):
+ return True
+
+ def partner_get(self, cr, uid, address_email):
+ ids = self.pool.get('res.partner.address').search(cr, uid, [('partner_id', '!=', False), ('email', 'like', address_email)])
+ res_id = ids and self.pool.get('res.partner.address').browse(cr, uid, ids[0]).partner_id.id or 0
+ url = self._make_url(cr, uid, res_id, 'res.partner')
+ return ('res.partner', res_id , url)
+
+ def document_get(self, cr, uid, email):
+ """
+ @param email: email is a standard RFC2822 email message
+ @return Dictionary which contain id and the model name of the document linked with the mail
+ if no document is found the id = 0
+ (model_name, res_id, name_get, url)
+ """
+ mail_message_obj = self.pool.get('mail.message')
+ model = False
+ res_id = 0
+ url = False
+ name = ""
+
+ msg = mail_message_obj.parse_message(email)
+ references = [msg.get('message-id')]
+ refs = msg.get('references',False)
+ if refs:
+ references.extend(refs.split())
+
+ msg_ids = mail_message_obj.search(cr, uid, [('message_id','in',references)])
+ if msg_ids:
+ msg = mail_message_obj.browse(cr, uid, msg_ids[0])
+ res_id = msg.res_id
+ model = msg.model
+ url = self._make_url(cr, uid, res_id, model)
+ name = self.pool.get(model).name_get(cr, uid, res_id)[1]
+ return (model, res_id, url, name)
+
+ def document_type(self, cr, uid, context=None):
+ """
+ Return the list of available model to push
+ res.partner is a special case
+ otherwise all model that inherit from mail.thread
+ ['res.partner', 'project.issue']
+ """
+ mail_thread_obj = self.pool.get('mail.thread')
+ doc_dict = mail_thread_obj.message_capable_models(cr, uid, context)
+ doc_dict['res.partner'] = "Partner"
+ return doc_dict.items()
+
+ # Can be used where search record was used
+ def list_document_get(self, cr, uid, model, name):
+ """
+ This function return the result of name_search on the object model
+ @param model: the name of the model
+ @param : the name of the document
+ @return : the result of name_search a list of tuple
+ [(id, 'name')]
+ """
+ return self.pool.get(model).name_search(cr,uid,name)
+
+ def push_message(self, cr, uid, model, email, res_id=0):
+ """
+ @param email: email is a standard RFC2822 email message
+ @param model: On which model the message is pushed
+ @param thread_id: on which document the message is pushed, if thread_id = 0 a new document is created
+ @return Dictionary which contain model , url and resource id.
+ """
+ mail_message = self.pool.get('mail.message')
+ model_obj = self.pool.get(model)
+
+ msg = mail_message.parse_message(email)
+ message_id = msg.get('message-id')
+
+
+ mail_ids = mail_message.search(cr, uid, [('message_id','=',message_id),('res_id','=',res_id),('model','=',model)])
+ if message_id and mail_ids :
+ mail_record = mail_message.browse(cr, uid, mail_ids)[0]
+ res_id = mail_record.res_id
+ notify = "Email already pushed"
+ elif res_id == 0:
+ if model == 'res.partner':
+ notify = 'User the button Partner to create a new partner'
+ else:
+ res_id = model_obj.message_new(cr, uid, msg)
+ notify = "Mail succefully pushed, a new %s has been created " % model
+ else:
+ model_obj.message_append_dict(cr, uid, [res_id], msg)
+ notify = "Mail succefully pushed"
+ url = self._make_url(cr, uid, res_id, model)
+ return (model, res_id, url, notify)
+
+ def contact_create(self, cr, uid, data, partner_id):
+ """
+ @param data : the data use to create the res.partner.address
+ [('field_name', value)], field name is required
+ @param partner_id : On which partner the address is attached
+ if partner_id = 0 then create a new partner with the same name that the address
+ @return : the partner_id sended or created, this allow the plugin to open the right partner page
+ """
+ partner_obj = self.pool.get('res.partner')
+ dictcreate = dict(data)
+ if partner_id == 0:
+ partner_id = partner_obj.create(cr, uid, {'name':dictcreate.get('name')})
+ dictcreate['partner_id'] = partner_id
+ self.pool.get('res.partner.address').create(cr, uid, dictcreate)
+ url = self._make_url(cr, uid, partner_id, 'res.partner')
+ return ('res.partner', partner_id, url)
+
+ # Specific to outlook rfc822 is not available so we split in arguments headerd,body,attachemnts
+ def push_message_outlook(self, cr, uid, model, headers, body_text, body_html, attachments):
+ pass
+ # ----------------------------------------
+ # solution 1
+ # construct a fake rfc822 from the separated arguement
+ #m = email.asdfsadf
+ # use the push_message method
+ #self.push_message(m)
+ # ----------------------------------------
+ # solution 2
+ # use self.pushmessage only with header and body
+ # add attachemnt yourself after
+
+ #ir_attachment_obj = self.pool.get('ir.attachment')
+ #attachment_ids = ir_attachment_obj.search(cr, uid, [('res_model', '=', data.get('res_model')), ('res_id', '=', data.get('res_id')), ('datas_fname', '=', data.get('datas_fname'))])
+ #if attachment_ids:
+ # return attachment_ids[0]
+ #else:
+ # vals = {"res_model": data.get('res_model'), "res_id": data.get('res_id'), "name": data.get('name'), "datas" : data.get('datas'), "datas_fname" : data.get('datas_fname')}
+ # return ir_attachment_obj.create(cr, uid, vals)
+ #return (model, res_id, url, notify)
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index bccb8d7fb1f..b19405bd43f 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -698,3 +698,5 @@ class product_product(osv.osv):
}
product_product()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js
index 59c13e0553c..d1611cd87d8 100644
--- a/addons/point_of_sale/static/src/js/pos.js
+++ b/addons/point_of_sale/static/src/js/pos.js
@@ -162,11 +162,11 @@ openerp.point_of_sale = function(db) {
/* global variable */
var pos;
- var App, CashRegister, CashRegisterCollection, Category, CategoryCollection, CategoryView,
- NumpadState, NumpadView, Order, OrderButtonView, OrderCollection, OrderView, Orderline,
- OrderlineCollection, OrderlineView, PaymentButtonView, PaymentView, Paymentline,
- PaymentlineCollection, PaymentlineView, PaypadView, Product, ProductCollection,
- ProductListView, ProductView, ReceiptLineView, ReceiptView, Shop, ShopView, StepsView;
+ var App, CashRegister, CashRegisterCollection, Category, CategoryCollection, CategoryWidget,
+ NumpadState, NumpadWidget, Order, OrderButtonView, OrderCollection, OrderWidget, Orderline,
+ OrderlineCollection, OrderlineWidget, PaymentButtonWidget, PaymentWidget, Paymentline,
+ PaymentlineCollection, PaymentlineWidget, PaypadWidget, Product, ProductCollection,
+ ProductListWidget, ProductWidget, ReceiptLineWidget, ReceiptWidget, Shop, ShopView, StepsWidget;
/*
---
@@ -530,57 +530,48 @@ openerp.point_of_sale = function(db) {
Views
---
*/
- NumpadView = (function() {
- __extends(NumpadView, Backbone.View);
- function NumpadView() {
- NumpadView.__super__.constructor.apply(this, arguments);
- }
-
- NumpadView.prototype.initialize = function(options) {
- return this.state = options.state;
- };
- NumpadView.prototype.events = {
- 'click button#numpad-backspace': 'clickDeleteLastChar',
- 'click button#numpad-minus': 'clickSwitchSign',
- 'click button.number-char': 'clickAppendNewChar',
- 'click button.mode-button': 'clickChangeMode'
- };
- NumpadView.prototype.clickDeleteLastChar = function() {
+ NumpadWidget = db.web.Widget.extend({
+ init: function(parent, element_id, options) {
+ this._super(parent, element_id);
+ this.state = options.state;
+ },
+ start: function() {
+ this.$element.find('button#numpad-backspace').click(_.bind(this.clickDeleteLastChar, this));
+ this.$element.find('button#numpad-minus').click(_.bind(this.clickSwitchSign, this));
+ this.$element.find('button.number-char').click(_.bind(this.clickAppendNewChar, this));
+ this.$element.find('button.mode-button').click(_.bind(this.clickChangeMode, this));
+ },
+ clickDeleteLastChar: function() {
return this.state.deleteLastChar();
- };
- NumpadView.prototype.clickSwitchSign = function() {
+ },
+ clickSwitchSign: function() {
return this.state.switchSign();
- };
- NumpadView.prototype.clickAppendNewChar = function(event) {
+ },
+ clickAppendNewChar: function(event) {
var newChar;
newChar = event.currentTarget.innerText;
return this.state.appendNewChar(newChar);
- };
- NumpadView.prototype.clickChangeMode = function(event) {
+ },
+ clickChangeMode: function(event) {
var newMode;
$('.selected-mode').removeClass('selected-mode');
$(event.currentTarget).addClass('selected-mode');
newMode = event.currentTarget.attributes['data-mode'].nodeValue;
return this.state.changeMode(newMode);
- };
- return NumpadView;
- })();
+ }
+ });
/*
Gives access to the payment methods (aka. 'cash registers')
*/
- PaypadView = (function() {
- __extends(PaypadView, Backbone.View);
- function PaypadView() {
- PaypadView.__super__.constructor.apply(this, arguments);
- }
-
- PaypadView.prototype.initialize = function(options) {
- return this.shop = options.shop;
- };
- PaypadView.prototype.events = {
- 'click button': 'performPayment'
- };
- PaypadView.prototype.performPayment = function(event) {
+ PaypadWidget = db.web.Widget.extend({
+ init: function(parent, element_id, options) {
+ this._super(parent, element_id);
+ this.shop = options.shop;
+ },
+ start: function() {
+ this.$element.find('button').click(_.bind(this.performPayment, this));
+ },
+ performPayment: function(event) {
var cashRegister, cashRegisterCollection, cashRegisterId;
/* set correct view */
$('.step-screen').hide();
@@ -592,32 +583,26 @@ openerp.point_of_sale = function(db) {
return (item.get('id')) === parseInt(cashRegisterId, 10);
}, this));
return (this.shop.get('selectedOrder')).addPaymentLine(cashRegister);
- };
- PaypadView.prototype.render = function() {
- $(this.el).empty();
+ },
+ render_element: function() {
+ this.$element.empty();
return (this.shop.get('cashRegisters')).each(__bind( function(cashRegister) {
- return $(this.el).append((new PaymentButtonView({
- model: cashRegister
- })).render());
+ var button = new PaymentButtonWidget();
+ button.model = cashRegister;
+ button.appendTo(this.$element);
}, this));
- };
- return PaypadView;
- })();
- PaymentButtonView = (function() {
- __extends(PaymentButtonView, Backbone.View);
- function PaymentButtonView() {
- PaymentButtonView.__super__.constructor.apply(this, arguments);
}
-
- PaymentButtonView.prototype.template = qweb_template('pos-payment-button-template');
- PaymentButtonView.prototype.render = function() {
- return $(this.el).html(this.template({
+ });
+ PaymentButtonWidget = db.web.Widget.extend({
+ template_fct: qweb_template('pos-payment-button-template'),
+ render_element: function() {
+ this.$element.html(this.template_fct({
id: this.model.get('id'),
name: (this.model.get('journal_id'))[1]
}));
- };
- return PaymentButtonView;
- })();
+ return this;
+ }
+ });
/*
There are 3 steps in a POS workflow:
1. prepare the order (i.e. chose products, quantities etc.)
@@ -626,112 +611,101 @@ openerp.point_of_sale = function(db) {
It should be possible to go back to any step as long as step 3 hasn't been completed.
Modifying an order after validation shouldn't be allowed.
*/
- StepsView = (function() {
- __extends(StepsView, Backbone.View);
- function StepsView() {
- StepsView.__super__.constructor.apply(this, arguments);
- }
-
- StepsView.prototype.initialize = function(options) {
- return this.step = "products";
- };
- StepsView.prototype.events = {
- 'click input.step-button': 'clickChangeStep'
- };
- StepsView.prototype.clickChangeStep = function(event) {
+ StepsWidget = db.web.Widget.extend({
+ init: function(parent, element_id) {
+ this._super(parent, element_id);
+ this.step = "products";
+ },
+ start: function() {
+ this.$element.find('input.step-button').click(_.bind(this.clickChangeStep, this));
+ },
+ clickChangeStep: function(event) {
var newStep;
newStep = event.currentTarget.attributes['data-step'].nodeValue;
$('.step-screen').hide();
$('#' + newStep + '-screen').show();
return this.step = newStep;
- };
- return StepsView;
- })();
+ }
+ });
/*
Shopping carts.
*/
- OrderlineView = (function() {
- __extends(OrderlineView, Backbone.View);
- function OrderlineView() {
- OrderlineView.__super__.constructor.apply(this, arguments);
- }
-
- OrderlineView.prototype.tagName = 'tr';
- OrderlineView.prototype.template = qweb_template('pos-orderline-template');
- OrderlineView.prototype.initialize = function(options) {
+ OrderlineWidget = db.web.Widget.extend({
+ tagName: 'tr',
+ template_fct: qweb_template('pos-orderline-template'),
+ init: function(parent, element_id, options) {
+ this._super(parent, element_id);
+ this.model = options.model;
this.model.bind('change', __bind( function() {
- $(this.el).hide();
- return this.render();
+ this.$element.hide();
+ this.render_element();
}, this));
this.model.bind('remove', __bind( function() {
- return $(this.el).remove();
+ return this.$element.remove();
}, this));
this.order = options.order;
- return this.numpadState = options.numpadState;
- };
- OrderlineView.prototype.events = {
- 'click': 'clickHandler'
- };
- OrderlineView.prototype.clickHandler = function() {
+ this.numpadState = options.numpadState;
+ },
+ start: function() {
+ this.$element.click(_.bind(this.clickHandler, this));
+ },
+ clickHandler: function() {
this.numpadState.reset();
return this.select();
- };
- OrderlineView.prototype.render = function() {
+ },
+ render_element: function() {
this.select();
- return $(this.el).html(this.template(this.model.toJSON())).fadeIn(400, function() {
+ return this.$element.html(this.template_fct(this.model.toJSON())).fadeIn(400, function() {
return $('#current-order').scrollTop($(this).offset().top);
});
- };
- OrderlineView.prototype.select = function() {
+ },
+ select: function() {
$('tr.selected').removeClass('selected');
- $(this.el).addClass('selected');
+ this.$element.addClass('selected');
return this.order.selected = this.model;
- };
- return OrderlineView;
- })();
- OrderView = (function() {
- __extends(OrderView, Backbone.View);
- function OrderView() {
- OrderView.__super__.constructor.apply(this, arguments);
- }
-
- OrderView.prototype.initialize = function(options) {
+ },
+ });
+ OrderWidget = db.web.Widget.extend({
+ init: function(parent, element_id, options) {
+ this._super(parent, element_id);
this.shop = options.shop;
this.numpadState = options.numpadState;
this.shop.bind('change:selectedOrder', this.changeSelectedOrder, this);
- return this.bindOrderLineEvents();
- };
- OrderView.prototype.changeSelectedOrder = function() {
+ this.bindOrderLineEvents();
+ },
+ changeSelectedOrder: function() {
this.currentOrderLines.unbind();
this.bindOrderLineEvents();
- return this.render();
- };
- OrderView.prototype.bindOrderLineEvents = function() {
+ return this.render_element();
+ },
+ bindOrderLineEvents: function() {
this.currentOrderLines = (this.shop.get('selectedOrder')).get('orderLines');
this.currentOrderLines.bind('add', this.addLine, this);
- this.currentOrderLines.bind('change', this.render, this);
+ this.currentOrderLines.bind('change', this.render_element, this);
return this.currentOrderLines.bind('remove', this.render, this);
- };
- OrderView.prototype.addLine = function(newLine) {
- $(this.el).append((new OrderlineView({
+ },
+ addLine: function(newLine) {
+ var line = new OrderlineWidget(null, null, {
model: newLine,
order: this.shop.get('selectedOrder'),
numpadState: this.numpadState
- })).render());
+ });
+ line.appendTo(this.$element);
return this.updateSummary();
- };
- OrderView.prototype.render = function() {
- $(this.el).empty();
+ },
+ render_element: function() {
+ this.$element.empty();
this.currentOrderLines.each(__bind( function(orderLine) {
- return $(this.el).append((new OrderlineView({
+ var line = new OrderlineWidget(null, null, {
model: orderLine,
order: this.shop.get('selectedOrder'),
numpadState: this.numpadState
- })).render());
+ });
+ line.appendTo(this.$element);
}, this));
return this.updateSummary();
- };
- OrderView.prototype.updateSummary = function() {
+ },
+ updateSummary: function() {
var currentOrder, tax, total, totalTaxExcluded;
currentOrder = this.shop.get('selectedOrder');
total = currentOrder.getTotal();
@@ -740,31 +714,25 @@ openerp.point_of_sale = function(db) {
$('#subtotal').html(totalTaxExcluded.toFixed(2)).hide().fadeIn();
$('#tax').html(tax.toFixed(2)).hide().fadeIn();
return $('#total').html(total.toFixed(2)).hide().fadeIn();
- };
- return OrderView;
- })();
+ },
+ });
/*
"Products" step.
*/
- CategoryView = (function() {
- __extends(CategoryView, Backbone.View);
- function CategoryView() {
- CategoryView.__super__.constructor.apply(this, arguments);
- }
-
- CategoryView.prototype.events = {
- 'click .oe-pos-categories-list a': 'changeCategory'
- };
-
- CategoryView.prototype.template = qweb_template('pos-category-template');
- CategoryView.prototype.render = function(ancestors, children) {
+ CategoryWidget = db.web.Widget.extend({
+ start: function() {
+ this.$element.find(".oe-pos-categories-list a").click(_.bind(this.changeCategory, this));
+ },
+ template_fct: qweb_template('pos-category-template'),
+ render_element: function() {
+ var self = this;
var c;
- return $(this.el).html(this.template({
+ this.$element.html(this.template_fct({
breadcrumb: (function() {
var _i, _len, _results;
_results = [];
- for (_i = 0, _len = ancestors.length; _i < _len; _i++) {
- c = ancestors[_i];
+ for (_i = 0, _len = self.ancestors.length; _i < _len; _i++) {
+ c = self.ancestors[_i];
_results.push(pos.categories[c]);
}
return _results;
@@ -772,88 +740,77 @@ openerp.point_of_sale = function(db) {
categories: (function() {
var _i, _len, _results;
_results = [];
- for (_i = 0, _len = children.length; _i < _len; _i++) {
- c = children[_i];
+ for (_i = 0, _len = self.children.length; _i < _len; _i++) {
+ c = self.children[_i];
_results.push(pos.categories[c]);
}
return _results;
})()
}));
- };
- CategoryView.prototype.changeCategory = function(a) {
+ },
+ changeCategory: function(a) {
var id = $(a.target).data("category-id");
- this.trigger("changeCategory", id);
- };
- return CategoryView;
- })();
- ProductView = (function() {
- __extends(ProductView, Backbone.View);
- function ProductView() {
- ProductView.__super__.constructor.apply(this, arguments);
- }
-
- ProductView.prototype.tagName = 'li';
- ProductView.prototype.className = 'product';
- ProductView.prototype.template = qweb_template('pos-product-template');
- ProductView.prototype.events = {
- 'click a': 'addToOrder'
- };
- ProductView.prototype.initialize = function(options) {
- return this.shop = options.shop;
- };
- ProductView.prototype.addToOrder = function(event) {
+ this.on_change_category(id);
+ },
+ on_change_category: function(id) {},
+ });
+ ProductWidget = db.web.Widget.extend({
+ tag_name:'li',
+ template_fct: qweb_template('pos-product-template'),
+ init: function(parent, element_id, options) {
+ this._super(parent, element_id);
+ this.model = options.model;
+ this.shop = options.shop;
+ },
+ start: function(options) {
+ $("a", this.$element).click(_.bind(this.addToOrder, this));
+ },
+ addToOrder: function(event) {
/* Preserve the category URL */
event.preventDefault();
return (this.shop.get('selectedOrder')).addProduct(this.model);
- };
- ProductView.prototype.render = function() {
- return $(this.el).html(this.template(this.model.toJSON()));
- };
- return ProductView;
- })();
- ProductListView = (function() {
- __extends(ProductListView, Backbone.View);
- function ProductListView() {
- ProductListView.__super__.constructor.apply(this, arguments);
- }
-
- ProductListView.prototype.tagName = 'ol';
- ProductListView.prototype.className = 'product-list';
- ProductListView.prototype.initialize = function(options) {
+ },
+ render_element: function() {
+ this.$element.addClass("product");
+ this.$element.html(this.template_fct(this.model.toJSON()));
+ return this;
+ },
+ });
+ ProductListWidget = db.web.Widget.extend({
+ init: function(parent, element_id, options) {
+ this._super(parent, element_id);
+ this.model = options.model;
this.shop = options.shop;
- return (this.shop.get('products')).bind('reset', this.render, this);
- };
- ProductListView.prototype.render = function() {
- $(this.el).empty();
+ this.shop.get('products').bind('reset', this.render_element, this);
+ },
+ render_element: function() {
+ this.$element.empty();
(this.shop.get('products')).each(__bind( function(product) {
- return $(this.el).append((new ProductView({
+ var p = new ProductWidget(null, null, {
model: product,
shop: this.shop
- })).render());
+ });
+ p.appendTo(this.$element);
}, this));
- return $('#products-screen').append(this.el);
- };
- return ProductListView;
- })();
+ return this;
+ },
+ });
/*
"Payment" step.
*/
- PaymentlineView = (function() {
- __extends(PaymentlineView, Backbone.View);
- function PaymentlineView() {
- PaymentlineView.__super__.constructor.apply(this, arguments);
- }
-
- PaymentlineView.prototype.tagName = 'tr';
- PaymentlineView.prototype.className = 'paymentline';
- PaymentlineView.prototype.template = qweb_template('pos-paymentline-template');
- PaymentlineView.prototype.initialize = function() {
- return this.model.bind('change', this.render, this);
- };
- PaymentlineView.prototype.events = {
- 'keyup input': 'changeAmount'
- };
- PaymentlineView.prototype.changeAmount = function(event) {
+ PaymentlineWidget = db.web.Widget.extend({
+ tag_name: 'tr',
+ template_fct: qweb_template('pos-paymentline-template'),
+ init: function(parent, element_id, options) {
+ this._super(parent, element_id);
+ this.model = options.model;
+ this.model.bind('change', this.render_element, this);
+ },
+ start: function () {
+ this.$element.addClass('paymentline');
+ $('input', this.$element).keyup(_.bind(this.changeAmount, this));
+ },
+ changeAmount: function(event) {
var newAmount;
newAmount = event.currentTarget.value;
if (newAmount && !isNaN(newAmount)) {
@@ -861,164 +818,155 @@ openerp.point_of_sale = function(db) {
amount: parseFloat(newAmount)
});
}
- };
- PaymentlineView.prototype.render = function() {
- return $(this.el).html(this.template({
+ },
+ render_element: function() {
+ this.$element.html(this.template_fct({
name: (this.model.get('journal_id'))[1],
amount: this.model.get('amount')
}));
- };
- return PaymentlineView;
- })();
- PaymentView = (function() {
- __extends(PaymentView, Backbone.View);
- function PaymentView() {
- PaymentView.__super__.constructor.apply(this, arguments);
- }
-
- PaymentView.prototype.initialize = function(options) {
+ return this;
+ },
+ });
+ PaymentWidget = db.web.Widget.extend({
+ init: function(parent, element_id, options) {
+ this._super(parent, element_id);
+ this.model = options.model;
this.shop = options.shop;
this.shop.bind('change:selectedOrder', this.changeSelectedOrder, this);
this.bindPaymentLineEvents();
- return this.bindOrderLineEvents();
- };
- PaymentView.prototype.paymentLineList = function() {
- return $(this.el).find('#paymentlines');
- };
- PaymentView.prototype.events = {
- 'click button#validate-order': 'validateCurrentOrder'
- };
- PaymentView.prototype.validateCurrentOrder = function() {
+ this.bindOrderLineEvents();
+ },
+ paymentLineList: function() {
+ return this.$element.find('#paymentlines');
+ },
+ start: function() {
+ $('button#validate-order', this.$element).click(_.bind(this.validateCurrentOrder, this));
+ },
+ validateCurrentOrder: function() {
var callback, currentOrder;
currentOrder = this.shop.get('selectedOrder');
- callback = __bind( function() {
+ callback = __bind(function() {
return currentOrder.set({
validated: true
});
}, this);
- return pos.push('pos.order', currentOrder.exportAsJSON(), callback);
- };
- PaymentView.prototype.bindPaymentLineEvents = function() {
+ pos.push('pos.order', currentOrder.exportAsJSON(), callback);
+ },
+ bindPaymentLineEvents: function() {
this.currentPaymentLines = (this.shop.get('selectedOrder')).get('paymentLines');
this.currentPaymentLines.bind('add', this.addPaymentLine, this);
- this.currentPaymentLines.bind('change', this.render, this);
- this.currentPaymentLines.bind('remove', this.render, this);
- return this.currentPaymentLines.bind('all', this.updatePaymentSummary, this);
- };
- PaymentView.prototype.bindOrderLineEvents = function() {
+ this.currentPaymentLines.bind('all', this.updatePaymentSummary, this);
+ },
+ bindOrderLineEvents: function() {
this.currentOrderLines = (this.shop.get('selectedOrder')).get('orderLines');
- return this.currentOrderLines.bind('all', this.updatePaymentSummary, this);
- };
- PaymentView.prototype.changeSelectedOrder = function() {
+ this.currentOrderLines.bind('all', this.updatePaymentSummary, this);
+ },
+ changeSelectedOrder: function() {
this.currentPaymentLines.unbind();
this.bindPaymentLineEvents();
this.currentOrderLines.unbind();
this.bindOrderLineEvents();
- return this.render();
- };
- PaymentView.prototype.addPaymentLine = function(newPaymentLine) {
- return this.paymentLineList().append((new PaymentlineView({
+ this.render_element();
+ },
+ addPaymentLine: function(newPaymentLine) {
+ var x = new PaymentlineWidget(null, null, {
model: newPaymentLine
- })).render());
- };
- PaymentView.prototype.render = function() {
+ });
+ x.appendTo(this.paymentLineList());
+ },
+ render_element: function() {
this.paymentLineList().empty();
this.currentPaymentLines.each(__bind( function(paymentLine) {
- return this.paymentLineList().append((new PaymentlineView({
- model: paymentLine
- })).render());
+ var x = new PaymentlineWidget(null, null, {
+ model: paymentLine
+ });
+ this.paymentLineList().append(x);
}, this));
- return this.updatePaymentSummary();
- };
- PaymentView.prototype.updatePaymentSummary = function() {
+ this.updatePaymentSummary();
+ },
+ updatePaymentSummary: function() {
var currentOrder, dueTotal, paidTotal, remaining, remainingAmount;
currentOrder = this.shop.get('selectedOrder');
paidTotal = currentOrder.getPaidTotal();
dueTotal = currentOrder.getTotal();
- $(this.el).find('#payment-due-total').html(dueTotal.toFixed(2));
- $(this.el).find('#payment-paid-total').html(paidTotal.toFixed(2));
+ this.$element.find('#payment-due-total').html(dueTotal.toFixed(2));
+ this.$element.find('#payment-paid-total').html(paidTotal.toFixed(2));
remainingAmount = dueTotal - paidTotal;
remaining = remainingAmount > 0 ? 0 : (-remainingAmount).toFixed(2);
- return $('#payment-remaining').html(remaining);
- };
- return PaymentView;
- })();
+ $('#payment-remaining').html(remaining);
+ },
+ });
/*
"Receipt" step.
*/
- ReceiptLineView = (function() {
- __extends(ReceiptLineView, Backbone.View);
- function ReceiptLineView() {
- ReceiptLineView.__super__.constructor.apply(this, arguments);
- }
-
- ReceiptLineView.prototype.tagName = 'tr';
- ReceiptLineView.prototype.className = 'receiptline';
- ReceiptLineView.prototype.template = qweb_template('pos-receiptline-template');
- ReceiptLineView.prototype.initialize = function() {
- return this.model.bind('change', this.render, this);
- };
- ReceiptLineView.prototype.render = function() {
- return $(this.el).html(this.template(this.model.toJSON()));
- };
- return ReceiptLineView;
- })();
- ReceiptView = (function() {
- __extends(ReceiptView, Backbone.View);
- function ReceiptView() {
- ReceiptView.__super__.constructor.apply(this, arguments);
- }
-
- ReceiptView.prototype.initialize = function(options) {
+ ReceiptLineWidget = db.web.Widget.extend({
+ tag_name: 'tr',
+ template_fct: qweb_template('pos-receiptline-template'),
+ init: function(parent, options) {
+ this._super(parent);
+ this.model = options.model;
+ this.model.bind('change', this.render_element, this);
+ },
+ render_element: function() {
+ this.$element.addClass('receiptline');
+ this.$element.html(this.template_fct(this.model.toJSON()));
+ },
+ });
+ ReceiptWidget = db.web.Widget.extend({
+ init: function(parent, options) {
+ this._super(parent);
+ this.model = options.model;
this.shop = options.shop;
this.shop.bind('change:selectedOrder', this.changeSelectedOrder, this);
this.bindOrderLineEvents();
- return this.bindPaymentLineEvents();
- };
- ReceiptView.prototype.events = {
- "click button#pos-finish-order": "finishOrder"
- };
- ReceiptView.prototype.finishOrder = function() {
+ this.bindPaymentLineEvents();
+ },
+ start: function () {
+ $('button#pos-finish-order', this.$element).click(_.bind(this.finishOrder, this));
+ },
+ finishOrder: function() {
$('.step-screen').hide();
$('#products-screen').show();
this.shop.get('selectedOrder').destroy();
- };
- ReceiptView.prototype.receiptLineList = function() {
- return $(this.el).find('#receiptlines');
- };
- ReceiptView.prototype.bindOrderLineEvents = function() {
+ },
+ receiptLineList: function() {
+ return this.$element.find('#receiptlines');
+ },
+ bindOrderLineEvents: function() {
this.currentOrderLines = (this.shop.get('selectedOrder')).get('orderLines');
this.currentOrderLines.bind('add', this.addReceiptLine, this);
- this.currentOrderLines.bind('change', this.render, this);
- return this.currentOrderLines.bind('remove', this.render, this);
- };
- ReceiptView.prototype.bindPaymentLineEvents = function() {
+ this.currentOrderLines.bind('change', this.render_element, this);
+ this.currentOrderLines.bind('remove', this.render_element, this);
+ },
+ bindPaymentLineEvents: function() {
this.currentPaymentLines = (this.shop.get('selectedOrder')).get('paymentLines');
- return this.currentPaymentLines.bind('all', this.updateReceiptSummary, this);
- };
- ReceiptView.prototype.changeSelectedOrder = function() {
+ this.currentPaymentLines.bind('all', this.updateReceiptSummary, this);
+ },
+ changeSelectedOrder: function() {
this.currentOrderLines.unbind();
this.bindOrderLineEvents();
this.currentPaymentLines.unbind();
this.bindPaymentLineEvents();
- return this.render();
- };
- ReceiptView.prototype.addReceiptLine = function(newOrderItem) {
- this.receiptLineList().append((new ReceiptLineView({
+ this.render_element();
+ },
+ addReceiptLine: function(newOrderItem) {
+ var x = new ReceiptLineWidget(null, {
model: newOrderItem
- })).render());
- return this.updateReceiptSummary();
- };
- ReceiptView.prototype.render = function() {
- this.receiptLineList().empty();
+ });
+ x.appendTo(this.receiptLineList());
+ this.updateReceiptSummary();
+ },
+ render_element: function() {
+ this.$element.html(qweb_template('pos-receipt-view'));
this.currentOrderLines.each(__bind( function(orderItem) {
- return this.receiptLineList().append((new ReceiptLineView({
+ var x = new ReceiptLineWidget(null, {
model: orderItem
- })).render());
+ });
+ x.appendTo(this.receiptLineList());
}, this));
- return this.updateReceiptSummary();
- };
- ReceiptView.prototype.updateReceiptSummary = function() {
+ this.updateReceiptSummary();
+ },
+ updateReceiptSummary: function() {
var change, currentOrder, tax, total;
currentOrder = this.shop.get('selectedOrder');
total = currentOrder.getTotal();
@@ -1026,10 +974,9 @@ openerp.point_of_sale = function(db) {
change = currentOrder.getPaidTotal() - total;
$('#receipt-summary-tax').html(tax.toFixed(2));
$('#receipt-summary-total').html(total.toFixed(2));
- return $('#receipt-summary-change').html(change.toFixed(2));
- };
- return ReceiptView;
- })();
+ $('#receipt-summary-change').html(change.toFixed(2));
+ },
+ });
OrderButtonView = (function() {
__extends(OrderButtonView, Backbone.View);
function OrderButtonView() {
@@ -1087,38 +1034,45 @@ openerp.point_of_sale = function(db) {
this.numpadState = new NumpadState({
shop: this.shop
});
- this.productListView = new ProductListView({
+ this.productListView = new ProductListWidget(null, "products-screen-ol", {
shop: this.shop
});
- this.paypadView = new PaypadView({
+ this.productListView.render_element();
+ this.productListView.start();
+ this.paypadView = new PaypadWidget(null, 'paypad', {
+ shop: this.shop
+ });
+ this.paypadView.render_element();
+ this.paypadView.start();
+ this.orderView = new OrderWidget(null, 'current-order-content', {
shop: this.shop,
- el: $('#paypad')
+ numpadState: this.numpadState
});
- this.paypadView.render();
- this.orderView = new OrderView({
+ this.orderView.start();
+ this.paymentView = new PaymentWidget(null, 'payment-screen', {
+ shop: this.shop
+ });
+ this.paymentView.render_element();
+ this.paymentView.start();
+ this.receiptView = new ReceiptWidget(null, {
shop: this.shop,
- numpadState: this.numpadState,
- el: $('#current-order-content')
});
- this.paymentView = new PaymentView({
- shop: this.shop,
- el: $('#payment-screen')
- });
- this.receiptView = new ReceiptView({
- shop: this.shop,
- el: $('#receipt-screen')
- });
- this.numpadView = new NumpadView({
- state: this.numpadState,
- el: $('#numpad')
- });
- return this.stepsView = new StepsView({
- el: $('#steps')
+ debugger;
+ this.receiptView.replace($('#receipt-screen'));
+ this.numpadView = new NumpadWidget(null, 'numpad', {
+ state: this.numpadState
});
+ this.numpadView.start();
+ this.stepsView = new StepsWidget(null, 'steps');
+ this.stepsView.start();
+ this.start();
};
ShopView.prototype.events = {
'click button#neworder-button': 'createNewOrder'
};
+ ShopView.prototype.start = function() {
+ this.productListView.start();
+ };
ShopView.prototype.createNewOrder = function() {
var newOrder;
newOrder = new Order;
@@ -1149,10 +1103,9 @@ openerp.point_of_sale = function(db) {
shop: this.shop,
el: $element
});
- this.categoryView = new CategoryView;
- this.categoryView.bind("changeCategory", this.category, this);
+ this.categoryView = new CategoryWidget(null, 'products-screen-categories');
+ this.categoryView.on_change_category.add_last(_.bind(this.category, this));
this.category();
- return this.categoryView;
};
App.prototype.category = function(id) {
var c, products;
@@ -1160,8 +1113,10 @@ openerp.point_of_sale = function(db) {
id = 0;
}
c = pos.categories[id];
- $('#products-screen').html(this.categoryView.render(c.ancestors, c.children));
- this.categoryView.delegateEvents();
+ this.categoryView.ancestors = c.ancestors;
+ this.categoryView.children = c.children;
+ this.categoryView.render_element();
+ this.categoryView.start();
products = pos.store.get('product.product').filter( function(p) {
var _ref;
return _ref = p.pos_categ_id[0], __indexOf.call(c.subtree, _ref) >= 0;
diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml
index b9148395cbe..74ff2229729 100644
--- a/addons/point_of_sale/static/src/xml/pos.xml
+++ b/addons/point_of_sale/static/src/xml/pos.xml
@@ -88,7 +88,10 @@
-
+
+
+
+
Payment
@@ -114,28 +117,7 @@
-
-
Receipt
-
-
-
- OpenERP Point of Sale
-
-
-
-
-
-
-
Total:
€
-
Tax:
€
-
Change:
€
-
-
-
-
-
-
+
@@ -237,4 +219,28 @@
+
+
+
Receipt
+
+
+
+ OpenERP Point of Sale
+
+
+
+
+
+
+
Total:
€
+
Tax:
€
+
Change:
€
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/point_of_sale/test/01_order_to_payment.yml b/addons/point_of_sale/test/01_order_to_payment.yml
index fd8ffbaa3e0..7c6b4817666 100644
--- a/addons/point_of_sale/test/01_order_to_payment.yml
+++ b/addons/point_of_sale/test/01_order_to_payment.yml
@@ -74,7 +74,7 @@
-
I click on the "Make Payment" wizard to pay the PoS order with a partial amount of 100.0 EUR
-
- !record {model: pos.make.payment, id: pos_make_payment_0, context: {'active_id': ref('pos_order_pos0'), 'active_ids': [ref('pos_order_pos0')]} }:
+ !record {model: pos.make.payment, id: pos_make_payment_0, context: '{"active_id": ref("pos_order_pos0"), "active_ids": [ref("pos_order_pos0")]}' }:
amount: 100.0
-
I click on the validate button to register the payment.
@@ -95,7 +95,7 @@
-
I pay the remaining balance.
-
- !record {model: pos.make.payment, id: pos_make_payment_1, context: {'active_id': [ref('pos_order_pos0')], 'active_ids': [ref('pos_order_pos0')]} }:
+ !record {model: pos.make.payment, id: pos_make_payment_1, context: '{"active_id": ref("pos_order_pos0"), "active_ids": [ref("pos_order_pos0")]}' }:
amount: !eval >
(450*2 + 300*3*1.05)*0.95-100.0
-
diff --git a/addons/point_of_sale/test/02_order_to_invoice.yml b/addons/point_of_sale/test/02_order_to_invoice.yml
index 3436e176678..0de4e518ebd 100644
--- a/addons/point_of_sale/test/02_order_to_invoice.yml
+++ b/addons/point_of_sale/test/02_order_to_invoice.yml
@@ -18,7 +18,7 @@
-
I click on the "Make Payment" wizard to pay the PoS order
-
- !record {model: pos.make.payment, id: pos_make_payment_2, context: {'active_id': ref('pos_order_pos1'), 'active_ids': [ref('pos_order_pos1')]} }:
+ !record {model: pos.make.payment, id: pos_make_payment_2, context: '{"active_id": ref("pos_order_pos1"), "active_ids": [ref("pos_order_pos1")]}' }:
amount: !eval >
(450*2 + 300*3*1.05)*0.95
-
diff --git a/addons/point_of_sale/wizard/pos_box_entries.py b/addons/point_of_sale/wizard/pos_box_entries.py
index 0c48aff736f..8313b345834 100644
--- a/addons/point_of_sale/wizard/pos_box_entries.py
+++ b/addons/point_of_sale/wizard/pos_box_entries.py
@@ -125,3 +125,5 @@ class pos_box_entries(osv.osv_memory):
pos_box_entries()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/wizard/pos_box_out.py b/addons/point_of_sale/wizard/pos_box_out.py
index b4298745c35..46f710c7882 100644
--- a/addons/point_of_sale/wizard/pos_box_out.py
+++ b/addons/point_of_sale/wizard/pos_box_out.py
@@ -110,3 +110,5 @@ class pos_box_out(osv.osv_memory):
pos_box_out()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py
index adf59e3cbce..3a50ac0f7c9 100644
--- a/addons/point_of_sale/wizard/pos_payment.py
+++ b/addons/point_of_sale/wizard/pos_payment.py
@@ -101,3 +101,5 @@ class pos_make_payment(osv.osv_memory):
pos_make_payment()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/wizard/pos_payment_report_user.py b/addons/point_of_sale/wizard/pos_payment_report_user.py
index 02db921618b..05d06f4df29 100644
--- a/addons/point_of_sale/wizard/pos_payment_report_user.py
+++ b/addons/point_of_sale/wizard/pos_payment_report_user.py
@@ -51,3 +51,5 @@ class pos_payment_report_user(osv.osv_memory):
pos_payment_report_user()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/point_of_sale/wizard/pos_receipt.py b/addons/point_of_sale/wizard/pos_receipt.py
index 71efee85b7c..f4feee85504 100644
--- a/addons/point_of_sale/wizard/pos_receipt.py
+++ b/addons/point_of_sale/wizard/pos_receipt.py
@@ -56,3 +56,5 @@ class pos_receipt(osv.osv_memory):
}
pos_receipt()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/portal/__init__.py b/addons/portal/__init__.py
index 89397d2eab5..b35d11bac45 100644
--- a/addons/portal/__init__.py
+++ b/addons/portal/__init__.py
@@ -24,3 +24,5 @@ import wizard
import res_user
import ir_ui_menu
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/portal/ir_ui_menu.py b/addons/portal/ir_ui_menu.py
index a4fe364a4fd..c8f59ca8bd1 100644
--- a/addons/portal/ir_ui_menu.py
+++ b/addons/portal/ir_ui_menu.py
@@ -56,3 +56,5 @@ class portal_menu(osv.osv):
portal_menu()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/portal/portal.py b/addons/portal/portal.py
index 1c7f84c363a..de39944e69f 100644
--- a/addons/portal/portal.py
+++ b/addons/portal/portal.py
@@ -226,3 +226,5 @@ portal_widget()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/portal/res_user.py b/addons/portal/res_user.py
index 2f32a65b761..127c3079b29 100644
--- a/addons/portal/res_user.py
+++ b/addons/portal/res_user.py
@@ -32,3 +32,5 @@ class res_users(osv.osv):
res_users()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/portal/wizard/__init__.py b/addons/portal/wizard/__init__.py
index 90b71a62c30..9d52ae0db6d 100644
--- a/addons/portal/wizard/__init__.py
+++ b/addons/portal/wizard/__init__.py
@@ -22,3 +22,5 @@
import portal_wizard
import share_wizard
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py
index 7157f22f129..706d6fd4a7f 100644
--- a/addons/portal/wizard/portal_wizard.py
+++ b/addons/portal/wizard/portal_wizard.py
@@ -225,3 +225,5 @@ wizard_user()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/portal/wizard/share_wizard.py b/addons/portal/wizard/share_wizard.py
index ab639bdeccc..b5c9d165cc6 100644
--- a/addons/portal/wizard/share_wizard.py
+++ b/addons/portal/wizard/share_wizard.py
@@ -184,3 +184,5 @@ class share_wizard_portal(osv.osv_memory):
share_wizard_portal()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/procurement/__init__.py b/addons/procurement/__init__.py
index 3420ef1f75e..4634166a9bd 100644
--- a/addons/procurement/__init__.py
+++ b/addons/procurement/__init__.py
@@ -22,4 +22,6 @@
import procurement
import wizard
import schedulers
-import company
\ No newline at end of file
+import company
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/procurement/board_mrp_procurement_view.xml b/addons/procurement/board_mrp_procurement_view.xml
index bf11fe79166..b45edd3cbdd 100644
--- a/addons/procurement/board_mrp_procurement_view.xml
+++ b/addons/procurement/board_mrp_procurement_view.xml
@@ -16,8 +16,8 @@
form
-
-
+
+
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index 3c22b2838ef..db953c8a319 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -202,6 +202,13 @@ class product_pricelist(osv.osv):
else:
categ_where = '(categ_id IS NULL)'
+ if partner:
+ partner_where = 'base <> -2 OR %s IN (SELECT name FROM product_supplierinfo WHERE product_id = %s) '
+ partner_args = (partner, product_id)
+ else:
+ partner_where = 'base <> -2 '
+ partner_args = ()
+
cr.execute(
'SELECT i.*, pl.currency_id '
'FROM product_pricelist_item AS i, '
@@ -209,11 +216,12 @@ class product_pricelist(osv.osv):
'WHERE (product_tmpl_id IS NULL OR product_tmpl_id = %s) '
'AND (product_id IS NULL OR product_id = %s) '
'AND (' + categ_where + ' OR (categ_id IS NULL)) '
+ 'AND (' + partner_where + ') '
'AND price_version_id = %s '
'AND (min_quantity IS NULL OR min_quantity <= %s) '
'AND i.price_version_id = v.id AND v.pricelist_id = pl.id '
'ORDER BY sequence',
- (tmpl_id, product_id, pricelist_version_ids[0], qty))
+ (tmpl_id, product_id) + partner_args + (pricelist_version_ids[0], qty))
res1 = cr.dictfetchall()
uom_price_already_computed = False
for res in res1:
@@ -296,148 +304,6 @@ class product_pricelist(osv.osv):
res.update({'item_id': {ids[-1]: res_multi.get('item_id', ids[-1])}})
return res
- def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None):
- '''
- context = {
- 'uom': Unit of Measure (int),
- 'partner': Partner ID (int),
- 'date': Date of the pricelist (%Y-%m-%d),
- }
- '''
- price = False
- item_id = 0
- if context is None:
- context = {}
- currency_obj = self.pool.get('res.currency')
- product_obj = self.pool.get('product.product')
- supplierinfo_obj = self.pool.get('product.supplierinfo')
- price_type_obj = self.pool.get('product.price.type')
-
- if context and ('partner_id' in context):
- partner = context['partner_id']
- context['partner_id'] = partner
- date = time.strftime('%Y-%m-%d')
- if context and ('date' in context):
- date = context['date']
- result = {}
- result['item_id'] = {}
- for id in ids:
- cr.execute('SELECT * ' \
- 'FROM product_pricelist_version ' \
- 'WHERE pricelist_id = %s AND active=True ' \
- 'AND (date_start IS NULL OR date_start <= %s) ' \
- 'AND (date_end IS NULL OR date_end >= %s) ' \
- 'ORDER BY id LIMIT 1', (id, date, date))
- plversion = cr.dictfetchone()
-
- if not plversion:
- raise osv.except_osv(_('Warning !'),
- _('No active version for the selected pricelist !\n' \
- 'Please create or activate one.'))
-
- cr.execute('SELECT id, categ_id ' \
- 'FROM product_template ' \
- 'WHERE id = (SELECT product_tmpl_id ' \
- 'FROM product_product ' \
- 'WHERE id = %s)', (prod_id,))
- tmpl_id, categ = cr.fetchone()
- categ_ids = []
- while categ:
- categ_ids.append(str(categ))
- cr.execute('SELECT parent_id ' \
- 'FROM product_category ' \
- 'WHERE id = %s', (categ,))
- categ = cr.fetchone()[0]
- if str(categ) in categ_ids:
- raise osv.except_osv(_('Warning !'),
- _('Could not resolve product category, ' \
- 'you have defined cyclic categories ' \
- 'of products!'))
- if categ_ids:
- categ_where = '(categ_id IN (' + ','.join(categ_ids) + '))'
- else:
- categ_where = '(categ_id IS NULL)'
-
- cr.execute(
- 'SELECT i.*, pl.currency_id '
- 'FROM product_pricelist_item AS i, '
- 'product_pricelist_version AS v, product_pricelist AS pl '
- 'WHERE (product_tmpl_id IS NULL OR product_tmpl_id = %s) '
- 'AND (product_id IS NULL OR product_id = %s) '
- 'AND (' + categ_where + ' OR (categ_id IS NULL)) '
- 'AND price_version_id = %s '
- 'AND (min_quantity IS NULL OR min_quantity <= %s) '
- 'AND i.price_version_id = v.id AND v.pricelist_id = pl.id '
- 'ORDER BY sequence',
- (tmpl_id, prod_id, plversion['id'], qty))
- res1 = cr.dictfetchall()
-
- for res in res1:
- item_id = 0
- if res:
- if res['base'] == -1:
- if not res['base_pricelist_id']:
- price = 0.0
- else:
- price_tmp = self.price_get(cr, uid,
- [res['base_pricelist_id']], prod_id,
- qty, context=context)[res['base_pricelist_id']]
- ptype_src = self.browse(cr, uid,
- res['base_pricelist_id']).currency_id.id
- price = currency_obj.compute(cr, uid, ptype_src,
- res['currency_id'], price_tmp, round=False)
- break
- elif res['base'] == -2:
- where = []
- if partner:
- where = [('name', '=', partner) ]
- sinfo = supplierinfo_obj.search(cr, uid,
- [('product_id', '=', tmpl_id)] + where)
- price = 0.0
- if sinfo:
- cr.execute('SELECT * ' \
- 'FROM pricelist_partnerinfo ' \
- 'WHERE suppinfo_id IN %s' \
- 'AND min_quantity <= %s ' \
- 'ORDER BY min_quantity DESC LIMIT 1', (tuple(sinfo),qty,))
- res2 = cr.dictfetchone()
- if res2:
- price = res2['price']
- break
- else:
- price_type = price_type_obj.browse(cr, uid, int(res['base']))
- price = currency_obj.compute(cr, uid,
- price_type.currency_id.id, res['currency_id'],
- product_obj.price_get(cr, uid, [prod_id],
- price_type.field, context=context)[prod_id], round=False, context=context)
-
- if price:
- price_limit = price
-
- price = price * (1.0+(res['price_discount'] or 0.0))
- price = rounding(price, res['price_round'])
- price += (res['price_surcharge'] or 0.0)
- if res['price_min_margin']:
- price = max(price, price_limit+res['price_min_margin'])
- if res['price_max_margin']:
- price = min(price, price_limit+res['price_max_margin'])
- item_id = res['id']
- break
-
- else:
- # False means no valid line found ! But we may not raise an
- # exception here because it breaks the search
- price = False
- result[id] = price
- result['item_id'] = {id: item_id}
- if context and ('uom' in context):
- product = product_obj.browse(cr, uid, prod_id)
- uom = product.uos_id or product.uom_id
- result[id] = self.pool.get('product.uom')._compute_price(cr,
- uid, uom.id, result[id], context['uom'])
-
- return result
-
product_pricelist()
diff --git a/addons/product/product.py b/addons/product/product.py
index 882a77e6f12..ecf1761318e 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -334,7 +334,7 @@ class product_template(osv.osv):
def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):
if uom_id:
return {'value': {'uom_po_id': uom_id}}
- return False
+ return {}
def write(self, cr, uid, ids, vals, context=None):
if 'uom_po_id' in vals:
diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml
index fc085aab922..122c8594de4 100644
--- a/addons/product/product_data.xml
+++ b/addons/product/product_data.xml
@@ -23,8 +23,8 @@
+ Resource: product.uom
+ -->
PCE
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index a0669795ad5..ac9ae8c5ec3 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -376,7 +376,6 @@
Products by Categories
-
diff --git a/addons/product/test/product_test.yml b/addons/product/test/product_test.yml
index f19b6a4a63c..ae75a552c79 100644
--- a/addons/product/test/product_test.yml
+++ b/addons/product/test/product_test.yml
@@ -5,7 +5,6 @@
name: 20KG
uom_type: bigger
category_id: product.product_uom_categ_kgm
- rounding: 0.010
factor_inv: 20
-
I create a 10KG UOM for 'Sugar'
@@ -14,14 +13,12 @@
name: 10KG
uom_type: bigger
category_id: product.product_uom_categ_kgm
- rounding: 0.010
factor_inv: 10
-
I create a new product 'Sugar' in 20KG UOM.
-
!record {model: product.product, id: product_sugar_id1}:
categ_id: 'product.product_category_rawmaterial0'
- cost_method: standard
name: Sugar 20KG
procure_method: make_to_order
standard_price: 400.0
diff --git a/addons/project/board_project_view.xml b/addons/project/board_project_view.xml
index f2c44fab574..a58557c94ba 100644
--- a/addons/project/board_project_view.xml
+++ b/addons/project/board_project_view.xml
@@ -81,16 +81,16 @@
form
diff --git a/addons/project/company.py b/addons/project/company.py
index 0967d130737..6400450cd3e 100644
--- a/addons/project/company.py
+++ b/addons/project/company.py
@@ -33,3 +33,5 @@ class res_company(osv.osv):
}
res_company()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project/project.py b/addons/project/project.py
index 1fc83771005..abebd2d35ff 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -75,11 +75,14 @@ class project(osv.osv):
def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
partner_obj = self.pool.get('res.partner')
if not part:
- return {'value':{'contact_id': False, 'pricelist_id': False}}
+ return {'value':{'contact_id': False}}
addr = partner_obj.address_get(cr, uid, [part], ['contact'])
- pricelist = partner_obj.read(cr, uid, part, ['property_product_pricelist'], context=context)
- pricelist_id = pricelist.get('property_product_pricelist', False) and pricelist.get('property_product_pricelist')[0] or False
- return {'value':{'contact_id': addr['contact'], 'pricelist_id': pricelist_id}}
+ val = {'contact_id': addr['contact']}
+ if 'pricelist_id' in self.fields_get(cr, uid, context=context):
+ pricelist = partner_obj.read(cr, uid, part, ['property_product_pricelist'], context=context)
+ pricelist_id = pricelist.get('property_product_pricelist', False) and pricelist.get('property_product_pricelist')[0] or False
+ val['pricelist_id'] = pricelist_id
+ return {'value': val}
def _progress_rate(self, cr, uid, ids, names, arg, context=None):
res = {}.fromkeys(ids, 0.0)
@@ -421,21 +424,55 @@ class task(osv.osv):
_log_create = True
_date_name = "date_start"
- def _read_group_type_id(self, cr, uid, ids, domain, context=None):
- context = context or {}
- stage_obj = self.pool.get('project.task.type')
- stage_ids = stage_obj.search(cr, uid, ['|',('id','in',ids)] + [('project_default','=',1)], context=context)
- return stage_obj.name_get(cr, uid, stage_ids, context=context)
- def _read_group_user_id(self, cr, uid, ids, domain, context={}):
- context = context or {}
- if type(context.get('project_id', None)) not in (int, long):
- return None
- proj = self.pool.get('project.project').browse(cr, uid, context['project_id'], context=context)
- ids += map(lambda x: x.id, proj.members)
- stage_obj = self.pool.get('res.users')
- stage_ids = stage_obj.search(cr, uid, [('id','in',ids)], context=context)
- return stage_obj.name_get(cr, uid, ids, context=context)
+ def _resolve_project_id_from_context(self, cr, uid, context=None):
+ """Return ID of project based on the value of 'project_id'
+ context key, or None if it cannot be resolved to a single project.
+ """
+ if context is None: context = {}
+ if type(context.get('project_id')) in (int, long):
+ project_id = context['project_id']
+ return project_id
+ if isinstance(context.get('project_id'), basestring):
+ project_name = context['project_id']
+ project_ids = self.pool.get('project.project').name_search(cr, uid, name=project_name)
+ if len(project_ids) == 1:
+ return project_ids[0][0]
+
+ def _read_group_type_id(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
+ stage_obj = self.pool.get('project.task.type')
+ project_id = self._resolve_project_id_from_context(cr, uid, context=context)
+ order = stage_obj._order
+ access_rights_uid = access_rights_uid or uid
+ if read_group_order == 'type_id desc':
+ # lame way to allow reverting search, should just work in the trivial case
+ order = '%s desc' % order
+ if project_id:
+ domain = ['|', ('id','in',ids), ('project_ids','in',project_id)]
+ else:
+ domain = ['|', ('id','in',ids), ('project_default','=',1)]
+ stage_ids = stage_obj._search(cr, uid, domain, order=order, access_rights_uid=access_rights_uid, context=context)
+ result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
+ # restore order of the search
+ result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
+ return result
+
+ def _read_group_user_id(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
+ res_users = self.pool.get('res.users')
+ project_id = self._resolve_project_id_from_context(cr, uid, context=context)
+ access_rights_uid = access_rights_uid or uid
+ if project_id:
+ ids += self.pool.get('project.project').read(cr, access_rights_uid, project_id, ['members'], context=context)['members']
+ order = res_users._order
+ # lame way to allow reverting search, should just work in the trivial case
+ if read_group_order == 'user_id desc':
+ order = '%s desc' % order
+ # de-duplicate and apply search order
+ ids = res_users._search(cr, uid, [('id','in',ids)], order=order, access_rights_uid=access_rights_uid, context=context)
+ result = res_users.name_get(cr, access_rights_uid, ids, context=context)
+ # restore order of the search
+ result.sort(lambda x,y: cmp(ids.index(x[0]), ids.index(y[0])))
+ return result
_group_by_full = {
'type_id': _read_group_type_id,
@@ -557,7 +594,12 @@ class task(osv.osv):
'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')], 'State', readonly=True, required=True,
help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
\n If the task is over, the states is set to \'Done\'.'),
- 'kanban_state': fields.selection([('blocked', 'Blocked'),('normal', 'Normal'),('done', 'Done')], 'Kanban State', readonly=True, required=False),
+ 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State',
+ help="A task's kanban state indicates special situations affecting it:\n"
+ " * Normal is the default situation\n"
+ " * Blocked indicates something is preventing the progress of this task\n"
+ " * Ready To Pull indicates the task is ready to be pulled to the next stage",
+ readonly=True, required=False),
'create_date': fields.datetime('Create Date', readonly=True,select=True),
'date_start': fields.datetime('Starting Date',select=True),
'date_end': fields.datetime('Ending Date',select=True),
@@ -837,37 +879,39 @@ class task(osv.osv):
self.write(cr, uid, ids, {'state': 'draft'}, context=context)
return True
- def do_delegate(self, cr, uid, task_id, delegate_data={}, context=None):
+ def do_delegate(self, cr, uid, ids, delegate_data={}, context=None):
"""
Delegate Task to another users.
"""
- task = self.browse(cr, uid, task_id, context=context)
- self.copy(cr, uid, task.id, {
- 'name': delegate_data['name'],
- 'user_id': delegate_data['user_id'],
- 'planned_hours': delegate_data['planned_hours'],
- 'remaining_hours': delegate_data['planned_hours'],
- 'parent_ids': [(6, 0, [task.id])],
- 'state': 'draft',
- 'description': delegate_data['new_task_description'] or '',
- 'child_ids': [],
- 'work_ids': []
- }, context=context)
- newname = delegate_data['prefix'] or ''
- self.write(cr, uid, [task.id], {
- 'remaining_hours': delegate_data['planned_hours_me'],
- 'planned_hours': delegate_data['planned_hours_me'] + (task.effective_hours or 0.0),
- 'name': newname,
- }, context=context)
- if delegate_data['state'] == 'pending':
- self.do_pending(cr, uid, [task.id], context)
- else:
- self.do_close(cr, uid, [task.id], context=context)
- user_pool = self.pool.get('res.users')
- delegate_user = user_pool.browse(cr, uid, delegate_data['user_id'], context=context)
- message = _("The task '%s' has been delegated to %s.") % (delegate_data['name'], delegate_user.name)
- self.log(cr, uid, task.id, message)
- return True
+ assert delegate_data['user_id'], _("Delegated User should be specified")
+ delegrated_tasks = {}
+ for task in self.browse(cr, uid, ids, context=context):
+ delegrated_task_id = self.copy(cr, uid, task.id, {
+ 'name': delegate_data['name'],
+ 'project_id': delegate_data['project_id'] and delegate_data['project_id'][0] or False,
+ 'user_id': delegate_data['user_id'] and delegate_data['user_id'][0] or False,
+ 'planned_hours': delegate_data['planned_hours'] or 0.0,
+ 'parent_ids': [(6, 0, [task.id])],
+ 'state': 'draft',
+ 'description': delegate_data['new_task_description'] or '',
+ 'child_ids': [],
+ 'work_ids': []
+ }, context=context)
+ newname = delegate_data['prefix'] or ''
+ task.write({
+ 'remaining_hours': delegate_data['planned_hours_me'],
+ 'planned_hours': delegate_data['planned_hours_me'] + (task.effective_hours or 0.0),
+ 'name': newname,
+ }, context=context)
+ if delegate_data['state'] == 'pending':
+ self.do_pending(cr, uid, task.id, context=context)
+ elif delegate_data['state'] == 'done':
+ self.do_close(cr, uid, task.id, context=context)
+
+ message = _("The task '%s' has been delegated to %s.") % (delegate_data['name'], delegate_data['user_id'][1])
+ self.log(cr, uid, task.id, message)
+ delegrated_tasks[task.id] = delegrated_task_id
+ return delegrated_tasks
def do_pending(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state': 'pending'}, context=context)
@@ -930,6 +974,20 @@ class task(osv.osv):
def prev_type(self, cr, uid, ids, *args):
return self._change_type(cr, uid, ids, False, *args)
+ # Overridden to reset the kanban_state to normal whenever
+ # the stage (type_id) of the task changes.
+ def write(self, cr, uid, ids, vals, context=None):
+ if isinstance(ids, (int, long)):
+ ids = [ids]
+ if vals and not 'kanban_state' in vals and 'type_id' in vals:
+ new_stage = vals.get('type_id')
+ vals_reset_kstate = dict(vals, kanban_state='normal')
+ for t in self.browse(cr, uid, ids, context=context):
+ write_vals = vals_reset_kstate if t.type_id != new_stage else vals
+ super(task,self).write(cr, uid, [t.id], write_vals, context=context)
+ return True
+ return super(task,self).write(cr, uid, ids, vals, context=context)
+
def unlink(self, cr, uid, ids, context=None):
if context == None:
context = {}
diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml
index d78f208526a..a3bfe9be673 100644
--- a/addons/project/project_data.xml
+++ b/addons/project/project_data.xml
@@ -1,30 +1,12 @@
-
-
-
-
- Project
- project.project
-
-
-
- Project task
- project.task
-
-
-
-
+
+
Projects3
-
-
+
@@ -47,7 +29,5 @@
Deployment
-
-
diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml
index ac4bc14c701..7592d24a145 100644
--- a/addons/project/project_demo.xml
+++ b/addons/project/project_demo.xml
@@ -210,7 +210,7 @@
Documentation
- 06-02-2011
+ 2011-02-06
@@ -241,7 +241,6 @@
Training and Presentation
- 09-21-2011
diff --git a/addons/project/wizard/project_task_delegate.py b/addons/project/wizard/project_task_delegate.py
index eaf5dea3084..efadc3f124b 100644
--- a/addons/project/wizard/project_task_delegate.py
+++ b/addons/project/wizard/project_task_delegate.py
@@ -31,14 +31,23 @@ class project_task_delegate(osv.osv_memory):
_columns = {
'name': fields.char('Delegated Title', size=64, required=True, help="New title of the task delegated to the user"),
- 'prefix': fields.char('Your Task Title', size=64, required=True, help="Title for your validation task"),
+ 'prefix': fields.char('Your Task Title', size=64, help="Title for your validation task"),
+ 'project_id': fields.many2one('project.project', 'Project', help="User you want to delegate this task to"),
'user_id': fields.many2one('res.users', 'Assign To', required=True, help="User you want to delegate this task to"),
'new_task_description': fields.text('New Task Description', help="Reinclude the description of the task in the task of the user"),
'planned_hours': fields.float('Planned Hours', help="Estimated time to close this task by the delegated user"),
- 'planned_hours_me': fields.float('Hours to Validate', required=True, help="Estimated time for you to validate the work done by the user to whom you delegate this task"),
- 'state': fields.selection([('pending','Pending'), ('done','Done'), ], 'Validation State', required=True, help="New state of your own task. Pending will be reopened automatically when the delegated task is closed")
+ 'planned_hours_me': fields.float('Hours to Validate', help="Estimated time for you to validate the work done by the user to whom you delegate this task"),
+ 'state': fields.selection([('pending','Pending'), ('done','Done'), ], 'Validation State', help="New state of your own task. Pending will be reopened automatically when the delegated task is closed")
}
+ def onchange_project_id(self, cr, uid, ids, project_id=False, context=None):
+ project_project = self.pool.get('project.project')
+ if not project_id:
+ return {'value':{'user_id': False}}
+ project = project_project.browse(cr, uid, project_id, context=context)
+ return {'value': {'user_id': project.user_id and project.user_id.id or False}}
+
+
def default_get(self, cr, uid, fields, context=None):
"""
This function gets default values
@@ -47,10 +56,15 @@ class project_task_delegate(osv.osv_memory):
if context is None:
context = {}
record_id = context and context.get('active_id', False) or False
+ if not record_id:
+ return res
task_pool = self.pool.get('project.task')
task = task_pool.browse(cr, uid, record_id, context=context)
task_name =tools.ustr(task.name)
+ if 'project_id' in fields:
+ res.update({'project_id': task.project_id and task.project_id.id})
+
if 'name' in fields:
if task_name.startswith(_('CHECK: ')):
newname = tools.ustr(task_name).replace(_('CHECK: '), '')
@@ -105,9 +119,19 @@ class project_task_delegate(osv.osv_memory):
task_id = context.get('active_id', False)
task_pool = self.pool.get('project.task')
delegate_data = self.read(cr, uid, ids, context=context)[0]
- delegate_data['user_id'] = delegate_data['user_id'][0]
- delegate_data['name'] = tools.ustr(delegate_data['name'])
- task_pool.do_delegate(cr, uid, task_id, delegate_data, context=context)
- return {'type': 'ir.actions.act_window_close'}
+ delegated_tasks = task_pool.do_delegate(cr, uid, [task_id], delegate_data, context=context)
+ models_data = self.pool.get('ir.model.data')
+
+ action_model, action_id = models_data.get_object_reference(cr, uid, 'project', 'action_view_task')
+ view_model, task_view_form_id = models_data.get_object_reference(cr, uid, 'project', 'view_task_form2')
+ view_model, task_view_tree_id = models_data.get_object_reference(cr, uid, 'project', 'view_task_tree2')
+ action = self.pool.get(action_model).read(cr, uid, action_id, context=context)
+ action['res_id'] = delegated_tasks[task_id]
+ action['view_id'] = False
+ action['views'] = [(task_view_form_id, 'form'), (task_view_tree_id, 'tree')]
+ action['help'] = False
+ return action
project_task_delegate()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project/wizard/project_task_delegate_view.xml b/addons/project/wizard/project_task_delegate_view.xml
index f9b27af05b3..072325c2b53 100644
--- a/addons/project/wizard/project_task_delegate_view.xml
+++ b/addons/project/wizard/project_task_delegate_view.xml
@@ -8,18 +8,19 @@
form
@@ -101,11 +101,42 @@
-
+
+ project.task.gtd.search
+ project.task
+ search
+ 50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Todo List
+ My Tasksproject.task
- {'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, 'search_default_user_id':uid, "search_default_draft": 1, "search_default_open": 1}
+
+ {'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1}
+ [('user_id','=',uid)]formtree,form,calendar,gantt,graph,kanban
diff --git a/addons/project_gtd/test/gtd_test.yml b/addons/project_gtd/test/gtd_test.yml
index 5c05dfd76cc..0583bc7e8e0 100644
--- a/addons/project_gtd/test/gtd_test.yml
+++ b/addons/project_gtd/test/gtd_test.yml
@@ -1,5 +1,5 @@
-
- Create a task 'Develop time management module' with monthly timebox
+ Create a task 'Develop time management module' with weekly timebox
-
!record {model: project.task, id: project_task_developtimemanagementmodule0}:
name: Develop time management module
@@ -7,7 +7,7 @@
project_id: project.project_project_22
remaining_hours: 15.0
state: draft
- timebox_id: project_gtd.timebox_monthly
+ timebox_id: project_gtd.timebox_weekly
-
@@ -36,12 +36,12 @@
sequence: 0.0
-
- Planify the task from monthly timebox to tomorrow timebox
+ Planify the task from weekly timebox to tomorrow timebox
-
!record {model: project.timebox.fill.plan, id: project_timebox_fill_plan_0}:
task_ids:
- project_task_developtimemanagementmodule0
- timebox_id: project_gtd.timebox_monthly
+ timebox_id: project_gtd.timebox_weekly
timebox_to_id: project_gtd_timebox_tomorrow1
@@ -75,4 +75,4 @@
Check task 'Develop time management module' is no more in tomorrow timebox
-
!assert {model: project.task, id: project_task_developtimemanagementmodule0, string: Task is not in tomorrow timebox}:
- - timebox_id.id != ref("project_gtd_timebox_tomorrow1")
\ No newline at end of file
+ - timebox_id.id != ref("project_gtd_timebox_tomorrow1")
diff --git a/addons/project_gtd/wizard/project_gtd_empty_view.xml b/addons/project_gtd/wizard/project_gtd_empty_view.xml
index b7ebeb1bd00..e66161b798f 100644
--- a/addons/project_gtd/wizard/project_gtd_empty_view.xml
+++ b/addons/project_gtd/wizard/project_gtd_empty_view.xml
@@ -31,7 +31,6 @@
- Empty Timeboxclient_action_multi
@@ -41,4 +40,4 @@
-
\ No newline at end of file
+
diff --git a/addons/project_gtd/wizard/project_gtd_fill_view.xml b/addons/project_gtd/wizard/project_gtd_fill_view.xml
index 41b99eb1b1e..9f9e080fc4e 100644
--- a/addons/project_gtd/wizard/project_gtd_fill_view.xml
+++ b/addons/project_gtd/wizard/project_gtd_fill_view.xml
@@ -33,7 +33,6 @@
- Plannify Timeboxclient_action_multi
@@ -43,4 +42,4 @@
-
\ No newline at end of file
+
diff --git a/addons/project_issue/board_project_issue_view.xml b/addons/project_issue/board_project_issue_view.xml
index cfe285134a7..2d30b2673b4 100644
--- a/addons/project_issue/board_project_issue_view.xml
+++ b/addons/project_issue/board_project_issue_view.xml
@@ -57,22 +57,16 @@
form
@@ -115,6 +109,7 @@
+
@@ -151,11 +146,11 @@
form
-
-
+
+
-
-
+
+
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 0833cab7441..6973002be23 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -48,6 +48,13 @@ class project_issue(crm.crm_case, osv.osv):
_order = "priority, create_date desc"
_inherit = ['mail.thread']
+ def write(self, cr, uid, ids, vals, context=None):
+ #Update last action date everytime the user change the stage, the state or send a new email
+ logged_fields = ['type_id', 'state', 'message_ids']
+ if any([field in vals for field in logged_fields]):
+ vals['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
+ return super(project_issue, self).write(cr, uid, ids, vals, context)
+
def case_open(self, cr, uid, ids, *args):
"""
@param self: The object pointer
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index a54ae14737d..9504f865256 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -197,6 +197,7 @@
+
@@ -322,9 +323,9 @@
-
-
-
+
+
+
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index f7e23c29a58..4ab1722336e 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -270,3 +270,5 @@ class project_task(osv.osv):
'phase_id': fields.many2one('project.phase', 'Project Phase'),
}
project_task()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_long_term/project_long_term_data.xml b/addons/project_long_term/project_long_term_data.xml
index 8da591f1337..ebc084668b7 100644
--- a/addons/project_long_term/project_long_term_data.xml
+++ b/addons/project_long_term/project_long_term_data.xml
@@ -1,16 +1,5 @@
-
-
-
- Project
- project.project
-
-
- Project task
- project.task
-
-
diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml
index 577ce6d135c..cdeb0a0d63d 100644
--- a/addons/project_long_term/project_long_term_view.xml
+++ b/addons/project_long_term/project_long_term_view.xml
@@ -377,7 +377,7 @@
+ name="Resources" parent="project.menu_definitions" sequence="3"/>
diff --git a/addons/project_long_term/wizard/project_compute_phases.py b/addons/project_long_term/wizard/project_compute_phases.py
index 57a1b3b6ed3..4a66cecf9cd 100644
--- a/addons/project_long_term/wizard/project_compute_phases.py
+++ b/addons/project_long_term/wizard/project_compute_phases.py
@@ -72,3 +72,5 @@ class project_compute_phases(osv.osv_memory):
return result
project_compute_phases()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_mrp/__init__.py b/addons/project_mrp/__init__.py
index 364dec5a437..df4f0fa8a52 100644
--- a/addons/project_mrp/__init__.py
+++ b/addons/project_mrp/__init__.py
@@ -21,3 +21,5 @@
import project_procurement
import project_mrp
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_mrp/project_mrp.py b/addons/project_mrp/project_mrp.py
index ea121033b5b..3bbb0658b11 100644
--- a/addons/project_mrp/project_mrp.py
+++ b/addons/project_mrp/project_mrp.py
@@ -57,6 +57,12 @@ product_product()
class sale_order(osv.osv):
_inherit ='sale.order'
+ def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, *args):
+ proc_data = super(sale_order, self)._prepare_order_line_procurement(cr,
+ uid, order, line, move_id, date_planned, *args)
+ proc_data['sale_line_id'] = line.id
+ return proc_data
+
def _picked_rate(self, cr, uid, ids, name, arg, context=None):
if not ids:
return {}
diff --git a/addons/project_mrp/test/project_task_procurement.yml b/addons/project_mrp/test/project_task_procurement.yml
index faf99dc5419..b2cc6a68363 100644
--- a/addons/project_mrp/test/project_task_procurement.yml
+++ b/addons/project_mrp/test/project_task_procurement.yml
@@ -1,10 +1,11 @@
--
- In order to test project_mrp module with OpenERP I want to create sale orders
- with product type 'service' so when procurement runs one task is created.
+- |
+ In order to test project_mrp module with OpenERP I create a sale order
+ with product type 'service' so when procurement runs one task is created for
+ the project associated with my sale order.
-
I create record for a service type product.
-
- !record {model: product.product, id: product_product_partnerstraining0}:
+ !record {model: product.product, id: product_product_partnerstraining0, view: False}:
categ_id: product.product_category_7
cost_method: standard
mes_type: fixed
@@ -15,8 +16,9 @@
uom_id: product.uom_day
uom_po_id: product.uom_day
warranty: 0.0
--
- I create a sale order for product Partners Training which has type 'Service'.
+- |
+ I create a sale order for product Partners Training which has type 'Service',
+ and select the appropriate Analytic Account matching my project.
-
!record {model: sale.order, id: sale_order_so0}:
date_order: !eval time.strftime('%Y-%m-%d')
@@ -40,6 +42,13 @@
pricelist_id: product.list0
shop_id: sale.shop
user_id: base.user_demo
+
+- I select the Analytic Account for my project on the sale order
+-
+ !python {model: sale.order}: |
+ acc_id = self.pool.get('project.project').browse(cr, uid,
+ ref('project.project_integrate_openerp')).analytic_account_id.id
+ self.write(cr, uid, ref('sale_order_so0'), {'project_id': acc_id})
-
I confirm this sale order.
-
@@ -60,11 +69,15 @@
- model: procurement.order
search: "[]"
-
- Now I check that one task is created for my sale order.
+ Now I check that one task is created for my sale order, in the desired project
-
!python {model: project.task}: |
order_obj = self.pool.get('sale.order')
- order = order_obj.browse(cr, uid, ref('sale_order_so0'))
- task_id = self.search(cr, uid, [('name','like', order.name)])
- assert task_id, 'No Task is created!'
-
+ order = order_obj.browse(cr, uid, ref('sale_order_so0'))
+ # planned_hours == 40 because default company project UOM is hours, and
+ # product was sold as 5.0 days.
+ task_id = self.search(cr, uid, [('name', '=', order.name+":Partners Training"),
+ ('project_id','=', ref('project.project_integrate_openerp')),
+ ('planned_hours','=', 40.0),
+ ('state','=','draft')])
+ assert task_id, 'Expected Task not found!'
\ No newline at end of file
diff --git a/addons/project_planning/board_project_planning_view.xml b/addons/project_planning/board_project_planning_view.xml
index 867dba5767f..db29a7f067a 100644
--- a/addons/project_planning/board_project_planning_view.xml
+++ b/addons/project_planning/board_project_planning_view.xml
@@ -5,11 +5,11 @@
board.project.planning.formboard.board
-
+ form
-
-
+
+
diff --git a/addons/project_retro_planning/i18n/oc.po b/addons/project_retro_planning/i18n/oc.po
new file mode 100644
index 00000000000..7451fd7b147
--- /dev/null
+++ b/addons/project_retro_planning/i18n/oc.po
@@ -0,0 +1,47 @@
+# Occitan (post 1500) translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2011-01-11 11:15+0000\n"
+"PO-Revision-Date: 2011-11-20 09:25+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Occitan (post 1500) \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-21 05:22+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: project_retro_planning
+#: model:ir.model,name:project_retro_planning.model_project_project
+msgid "Project"
+msgstr "Projècte"
+
+#. module: project_retro_planning
+#: model:ir.module.module,shortdesc:project_retro_planning.module_meta_information
+msgid "Project Retro planning"
+msgstr "Retroplanificacion de projèctes"
+
+#. module: project_retro_planning
+#: model:ir.module.module,description:project_retro_planning.module_meta_information
+msgid ""
+"\n"
+" - If end date of project is changed\n"
+" then the deadline date and start date for all the tasks will "
+"change accordingly "
+msgstr ""
+
+#. module: project_retro_planning
+#: constraint:project.project:0
+msgid "Error! project start-date must be lower then project end-date."
+msgstr ""
+
+#. module: project_retro_planning
+#: constraint:project.project:0
+msgid "Error! You cannot assign escalation to the same project!"
+msgstr ""
diff --git a/addons/project_scrum/board_project_scrum_view.xml b/addons/project_scrum/board_project_scrum_view.xml
index 5620950fa5a..2a9d3532b2d 100644
--- a/addons/project_scrum/board_project_scrum_view.xml
+++ b/addons/project_scrum/board_project_scrum_view.xml
@@ -76,15 +76,15 @@
form
@@ -133,8 +133,8 @@
form
-
-
+
+
diff --git a/addons/project_scrum/project_scrum.py b/addons/project_scrum/project_scrum.py
index b378b1a02b2..260eadd4a61 100644
--- a/addons/project_scrum/project_scrum.py
+++ b/addons/project_scrum/project_scrum.py
@@ -334,3 +334,5 @@ class project_scrum_meeting(osv.osv):
project_scrum_meeting()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_scrum/project_scrum_view.xml b/addons/project_scrum/project_scrum_view.xml
index 2ce12c70e1d..1893d9b1242 100644
--- a/addons/project_scrum/project_scrum_view.xml
+++ b/addons/project_scrum/project_scrum_view.xml
@@ -473,7 +473,6 @@
View sprint tasks
-
@@ -488,7 +487,6 @@
View sprint backlog
-
-
+
+
diff --git a/addons/purchase/__init__.py b/addons/purchase/__init__.py
index 301e32ebca9..66f92a60831 100644
--- a/addons/purchase/__init__.py
+++ b/addons/purchase/__init__.py
@@ -26,6 +26,7 @@ import wizard
import report
import stock
import company
+import edi
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/purchase/__openerp__.py b/addons/purchase/__openerp__.py
index 901fb6d3e98..b4f3a9adf30 100644
--- a/addons/purchase/__openerp__.py
+++ b/addons/purchase/__openerp__.py
@@ -40,7 +40,7 @@ Dashboard for purchase management that includes:
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images' : ['images/purchase_order.jpeg', 'images/purchase_analysis.jpeg', 'images/request_for_quotation.jpeg'],
- 'depends': ['base', 'account', 'stock', 'process', 'procurement'],
+ 'depends': ['stock', 'process', 'procurement'],
'data': [
'security/purchase_security.xml',
'security/ir.model.access.csv',
@@ -58,15 +58,17 @@ Dashboard for purchase management that includes:
'process/purchase_process.xml',
'report/purchase_report_view.xml',
'board_purchase_view.xml',
+ 'edi/purchase_order_action_data.xml',
],
'test': [
- 'test/process/cancel_order.yml',
+ 'test/process/cancel_order.yml',
'test/process/rfq2order2done.yml',
'test/process/generate_invoice_from_reception.yml',
- 'test/process/run_scheduler.yml',
- 'test/process/merge_order.yml',
+ 'test/process/run_scheduler.yml',
+ 'test/process/merge_order.yml',
+ 'test/process/edi_purchase_order.yml',
'test/ui/print_report.yml',
- 'test/ui/duplicate_order.yml',
+ 'test/ui/duplicate_order.yml',
'test/ui/delete_order.yml',
],
'demo': [
diff --git a/addons/purchase/board_purchase_view.xml b/addons/purchase/board_purchase_view.xml
index 8a289ccbedb..453f029aa0d 100644
--- a/addons/purchase/board_purchase_view.xml
+++ b/addons/purchase/board_purchase_view.xml
@@ -14,7 +14,6 @@
formtree,form[('date_order','>',time.strftime('%Y-01-01 00:00:00')),('date_order','<',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]
- Purchase Order Waiting Approval
@@ -23,7 +22,6 @@
formtree,form[('date_order','>',time.strftime('%Y-01-01 00:00:00')),('date_order','<',time.strftime('%Y-12-31 23:59:59')), ('state','in',('wait','confirmed'))]
-
@@ -131,25 +129,25 @@
form
diff --git a/addons/purchase/edi/__init__.py b/addons/purchase/edi/__init__.py
new file mode 100644
index 00000000000..be599e9736c
--- /dev/null
+++ b/addons/purchase/edi/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import purchase_order
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/purchase/edi/purchase_order.py b/addons/purchase/edi/purchase_order.py
new file mode 100644
index 00000000000..235b02645ed
--- /dev/null
+++ b/addons/purchase/edi/purchase_order.py
@@ -0,0 +1,202 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2011 OpenERP S.A.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from datetime import datetime, timedelta
+from dateutil.relativedelta import relativedelta
+
+from osv import fields, osv, orm
+from edi import EDIMixin
+from tools import DEFAULT_SERVER_DATE_FORMAT
+from tools.translate import _
+
+PURCHASE_ORDER_LINE_EDI_STRUCT = {
+ 'name': True,
+ 'date_planned': True,
+ 'product_id': True,
+ 'product_uom': True,
+ 'price_unit': True,
+ 'product_qty': True,
+ 'notes': True,
+
+ # fields used for web preview only - discarded on import
+ 'price_subtotal': True,
+}
+
+PURCHASE_ORDER_EDI_STRUCT = {
+ 'company_id': True, # -> to be changed into partner
+ 'name': True,
+ 'partner_ref': True,
+ 'origin': True,
+ 'date_order': True,
+ 'partner_id': True,
+ #custom: 'partner_address',
+ 'notes': True,
+ 'order_line': PURCHASE_ORDER_LINE_EDI_STRUCT,
+ #custom: currency_id
+
+ # fields used for web preview only - discarded on import
+ 'amount_total': True,
+ 'amount_untaxed': True,
+ 'amount_tax': True,
+}
+
+class purchase_order(osv.osv, EDIMixin):
+ _inherit = 'purchase.order'
+
+ def edi_export(self, cr, uid, records, edi_struct=None, context=None):
+ """Exports a purchase order"""
+ edi_struct = dict(edi_struct or PURCHASE_ORDER_EDI_STRUCT)
+ res_company = self.pool.get('res.company')
+ res_partner_address = self.pool.get('res.partner.address')
+ edi_doc_list = []
+ for order in records:
+ # generate the main report
+ self._edi_generate_report_attachment(cr, uid, order, context=context)
+
+ # Get EDI doc based on struct. The result will also contain all metadata fields and attachments.
+ edi_doc = super(purchase_order,self).edi_export(cr, uid, [order], edi_struct, context)[0]
+ edi_doc.update({
+ # force trans-typing to purchase.order upon import
+ '__import_model': 'sale.order',
+ '__import_module': 'sale',
+
+ 'company_address': res_company.edi_export_address(cr, uid, order.company_id, context=context),
+ 'partner_address': res_partner_address.edi_export(cr, uid, [order.partner_address_id], context=context)[0],
+ 'currency': self.pool.get('res.currency').edi_export(cr, uid, [order.pricelist_id.currency_id],
+ context=context)[0],
+ })
+ if edi_doc.get('order_line'):
+ for line in edi_doc['order_line']:
+ line['__import_model'] = 'sale.order.line'
+ edi_doc_list.append(edi_doc)
+ return edi_doc_list
+
+ def edi_import_company(self, cr, uid, edi_document, context=None):
+ # TODO: for multi-company setups, we currently import the document in the
+ # user's current company, but we should perhaps foresee a way to select
+ # the desired company among the user's allowed companies
+
+ self._edi_requires_attributes(('company_id','company_address'), edi_document)
+ res_partner_address = self.pool.get('res.partner.address')
+ res_partner = self.pool.get('res.partner')
+
+ # imported company = as a new partner
+ src_company_id, src_company_name = edi_document.pop('company_id')
+ partner_id = self.edi_import_relation(cr, uid, 'res.partner', src_company_name,
+ src_company_id, context=context)
+ partner_value = {'customer': True}
+ res_partner.write(cr, uid, [partner_id], partner_value, context=context)
+
+ # imported company_address = new partner address
+ address_info = edi_document.pop('company_address')
+ address_info['partner_id'] = (src_company_id, src_company_name)
+ address_info['type'] = 'default'
+ address_id = res_partner_address.edi_import(cr, uid, address_info, context=context)
+
+ # modify edi_document to refer to new partner/address
+ partner_address = res_partner_address.browse(cr, uid, address_id, context=context)
+ edi_document['partner_id'] = (src_company_id, src_company_name)
+ edi_document.pop('partner_address', False) # ignored
+ edi_document['partner_address_id'] = self.edi_m2o(cr, uid, partner_address, context=context)
+
+ return partner_id
+
+ def _edi_get_pricelist(self, cr, uid, partner_id, currency, context=None):
+ # TODO: refactor into common place for purchase/sale, e.g. into product module
+ partner_model = self.pool.get('res.partner')
+ partner = partner_model.browse(cr, uid, partner_id, context=context)
+ pricelist = partner.property_product_pricelist_purchase
+ if not pricelist:
+ pricelist = self.pool.get('ir.model.data').get_object(cr, uid, 'purchase', 'list0', context=context)
+
+ if not pricelist.currency_id == currency:
+ # look for a pricelist with the right type and currency, or make a new one
+ pricelist_type = 'purchase'
+ product_pricelist = self.pool.get('product.pricelist')
+ match_pricelist_ids = product_pricelist.search(cr, uid,[('type','=',pricelist_type),
+ ('currency_id','=',currency.id)])
+ if match_pricelist_ids:
+ pricelist_id = match_pricelist_ids[0]
+ else:
+ pricelist_name = _('EDI Pricelist (%s)') % (currency.name,)
+ pricelist_id = product_pricelist.create(cr, uid, {'name': pricelist_name,
+ 'type': pricelist_type,
+ 'currency_id': currency.id,
+ })
+ self.pool.get('product.pricelist.version').create(cr, uid, {'name': pricelist_name,
+ 'pricelist_id': pricelist_id})
+ pricelist = product_pricelist.browse(cr, uid, pricelist_id)
+
+ return self.edi_m2o(cr, uid, pricelist, context=context)
+
+ def _edi_get_location(self, cr, uid, partner_id, context=None):
+ partner_model = self.pool.get('res.partner')
+ partner = partner_model.browse(cr, uid, partner_id, context=context)
+ location = partner.property_stock_customer
+ if not location:
+ location = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
+ return self.edi_m2o(cr, uid, location, context=context)
+
+ def edi_import(self, cr, uid, edi_document, context=None):
+ self._edi_requires_attributes(('company_id','company_address','order_line','date_order','currency'), edi_document)
+
+ #import company as a new partner
+ partner_id = self.edi_import_company(cr, uid, edi_document, context=context)
+
+ # currency for rounding the discount calculations and for the pricelist
+ res_currency = self.pool.get('res.currency')
+ currency_info = edi_document.pop('currency')
+ currency_id = res_currency.edi_import(cr, uid, currency_info, context=context)
+ order_currency = res_currency.browse(cr, uid, currency_id)
+
+ partner_ref = edi_document.pop('partner_ref', False)
+ edi_document['partner_ref'] = edi_document['name']
+ edi_document['name'] = partner_ref or edi_document['name']
+ edi_document['pricelist_id'] = self._edi_get_pricelist(cr, uid, partner_id, order_currency, context=context)
+ edi_document['location_id'] = self._edi_get_location(cr, uid, partner_id, context=context)
+
+ # discard web preview fields, if present
+ edi_document.pop('amount_total', None)
+ edi_document.pop('amount_tax', None)
+ edi_document.pop('amount_untaxed', None)
+ edi_document.pop('payment_term', None)
+ edi_document.pop('order_policy', None)
+ edi_document.pop('user_id', None)
+
+ for order_line in edi_document['order_line']:
+ self._edi_requires_attributes(('date_planned', 'product_id', 'product_uom', 'product_qty', 'price_unit'), order_line)
+ # original sale order contains unit price and discount, but not final line price
+ discount = order_line.pop('discount', 0.0)
+ if discount:
+ order_line['price_unit'] = res_currency.round(cr, uid, order_currency,
+ (order_line['price_unit'] * (1 - (discount or 0.0) / 100.0)))
+ # sale order lines have sequence numbers, not purchase order lines
+ order_line.pop('sequence', None)
+
+ # discard web preview fields, if present
+ order_line.pop('price_subtotal', None)
+ return super(purchase_order,self).edi_import(cr, uid, edi_document, context=context)
+
+class purchase_order_line(osv.osv, EDIMixin):
+ _inherit='purchase.order.line'
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml
new file mode 100644
index 00000000000..f3f610b8e75
--- /dev/null
+++ b/addons/purchase/edi/purchase_order_action_data.xml
@@ -0,0 +1,156 @@
+
+
+
+
+
+ if not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='purchase.email_template_edi_purchase', context=context)
+ code
+ ir.actions.server
+
+ True
+ Auto-email confirmed purchase orders
+
+
+
+
+ Email Templates
+ email.template
+ form
+ form,tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Automated Purchase Order Notification Mail
+ ${object.validator.user_email or ''}
+ ${object.company_id.name} Order (Ref ${object.name or 'n/a' })
+ ${object.partner_address_id.email}
+
+
+
+
+
Hello${object.partner_address_id.name and ' ' or ''}${object.partner_address_id.name or ''},
+
+
Here is a purchase order confirmation from ${object.company_id.name}:
+
+
+ REFERENCES
+ Order number: ${object.name}
+ Order total: ${object.amount_total} ${object.pricelist_id.currency_id.name}
+ Order date: ${object.date_order}
+ % if object.origin:
+ Order reference: ${object.origin}
+ % endif
+ % if object.partner_ref:
+ Your reference: ${object.partner_ref}
+ % endif
+ Your contact: ${object.validator.name}
+
+
+
+ You can view the order confirmation document and download it using the following link:
+