diff --git a/addons/account/account.py b/addons/account/account.py
index 67abf8b4520..b01f659a70d 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -629,8 +629,8 @@ class account_journal(osv.osv):
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want new account moves to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation.'),
'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"),
-# 'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
-# help="The sequence used for invoice numbers in this journal."),
+ 'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
+ help="The sequence used for invoice numbers in this journal."),
'allow_date':fields.boolean('Check Date not in the Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'),
}
@@ -695,13 +695,13 @@ class account_journal(osv.osv):
'sequence_id':seq_id
})
-# if journal.type in journal_type and not journal.invoice_sequence_id:
-# res_ids = date_pool.search(cr, uid, [('model','=','ir.sequence'), ('name','=',journal_seq.get(journal.type, 'sale'))])
-# inv_seq_id = date_pool.browse(cr, uid, res_ids[0]).res_id
-# inv_seq_id
-# res.update({
-# 'invoice_sequence_id':inv_seq_id
-# })
+ if journal.type in journal_type and not journal.invoice_sequence_id:
+ res_ids = date_pool.search(cr, uid, [('model','=','ir.sequence'), ('name','=',journal_seq.get(journal.type, 'sale'))])
+ inv_seq_id = date_pool.browse(cr, uid, res_ids[0]).res_id
+ inv_seq_id
+ res.update({
+ 'invoice_sequence_id':inv_seq_id
+ })
result = self.write(cr, uid, [journal.id], res)
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index ac82fc1b6cc..22df9059305 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -138,7 +138,7 @@
-
+
@@ -216,7 +216,7 @@
-
+
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 3ae70200ffb..f8c38ccbf92 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -388,14 +388,15 @@
+
+
+
+
+
-
-
-
-
@@ -455,7 +456,7 @@
-
+
@@ -530,12 +531,16 @@
-
+
+
+
+
-
+
@@ -1261,7 +1266,7 @@
-
+
@@ -1481,7 +1486,7 @@
-
+
@@ -2433,7 +2438,7 @@
-
+
@@ -2537,7 +2542,7 @@
-
+
diff --git a/addons/account/i18n/et.po b/addons/account/i18n/et.po
index de29b97400e..455b6da50ce 100644
--- a/addons/account/i18n/et.po
+++ b/addons/account/i18n/et.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-07-22 20:15+0000\n"
+"PO-Revision-Date: 2010-07-29 06:54+0000\n"
"Last-Translator: lyyser \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: 2010-07-23 04:07+0000\n"
+"X-Launchpad-Export-Date: 2010-07-30 03:36+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -6042,12 +6042,12 @@ msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Fiscal Year(s)(Maximum Three Years)"
-msgstr ""
+msgstr "Vali finantsaasta(d) (maksimum kolm aastat)"
#. module: account
#: wizard_field:account.balance.account.balance.report,init,select_account:0
msgid "Select Reference Account(for % comparision)"
-msgstr ""
+msgstr "Valige võrdluskonto (% võrdluseks)"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index b15c8667972..1816f4c31bf 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -231,8 +231,8 @@ class account_invoice(osv.osv):
('in_refund','Supplier Refund'),
],'Type', readonly=True, select=True, change_default=True),
- 'number': fields.related('move_id','name', type='char', readonly=True, size=64, relation='account.move', store=True, string='Number'),
- #'number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
+# 'number': fields.related('move_id','name', type='char', readonly=True, size=64, relation='account.move', store=True, string='Number'),
+ 'number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
'reference': fields.char('Invoice Reference', size=64, help="The partner reference of this invoice."),
'reference_type': fields.selection(_get_reference_type, 'Reference Type',
required=True, readonly=True, states={'draft':[('readonly',False)]}),
@@ -769,7 +769,7 @@ class account_invoice(osv.osv):
cur_obj = self.pool.get('res.currency')
context = {}
for inv in self.browse(cr, uid, ids):
- if not inv.journal_id.sequence_id:
+ if not inv.journal_id.invoice_sequence_id:
raise osv.except_osv(_('Error !'), _('Please define sequence on invoice journal'))
if not inv.invoice_line:
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
@@ -927,35 +927,45 @@ class account_invoice(osv.osv):
}
def action_number(self, cr, uid, ids, *args):
- #TODO: not correct fix but required a frech values before reading it.
- self.write(cr, uid, ids, {})
+# #TODO: not correct fix but required a frech values before reading it.
+# self.write(cr, uid, ids, {})
+#
+ cr.execute('SELECT id, type, number, move_id, reference ' \
+ 'FROM account_invoice ' \
+ 'WHERE id IN ('+','.join(map(str,ids))+')')
+ obj_inv = self.browse(cr, uid, ids)[0]
- for obj_inv in self.browse(cr, uid, ids):
- id = obj_inv.id
- invtype = obj_inv.type
- number = obj_inv.number
- move_id = obj_inv.move_id and obj_inv.move_id.id or False
- reference = obj_inv.reference or ''
-
- if invtype in ('in_invoice', 'in_refund'):
- ref = reference
- else:
- ref = self._convert_ref(cr, uid, number)
-
- cr.execute('UPDATE account_move SET ref=%s ' \
- 'WHERE id=%s AND (ref is null OR ref = \'\')',
- (ref, move_id))
- cr.execute('UPDATE account_move_line SET ref=%s ' \
- 'WHERE move_id=%s AND (ref is null OR ref = \'\')',
- (ref, move_id))
- cr.execute('UPDATE account_analytic_line SET ref=%s ' \
- 'FROM account_move_line ' \
- 'WHERE account_move_line.move_id = %s ' \
- 'AND account_analytic_line.move_id = account_move_line.id',
+ for (id, invtype, number, move_id, reference) in cr.fetchall():
+ if not number:
+ if obj_inv.journal_id.invoice_sequence_id:
+ sid = obj_inv.journal_id.invoice_sequence_id.id
+ number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
+ else:
+ number = self.pool.get('ir.sequence').get(cr, uid, 'account.invoice.' + invtype)
+
+ if invtype in ('in_invoice', 'in_refund'):
+ ref = reference
+ else:
+ ref = self._convert_ref(cr, uid, number)
+
+ cr.execute('UPDATE account_invoice SET number=%s ' \
+ 'WHERE id=%s', (number, id))
+ cr.execute('UPDATE account_move SET ref=%s ' \
+ 'WHERE id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
+ cr.execute('UPDATE account_move_line SET ref=%s ' \
+ 'WHERE move_id=%s AND (ref is null OR ref = \'\')',
+ (ref, move_id))
+ cr.execute('UPDATE account_analytic_line SET ref=%s ' \
+ 'FROM account_move_line ' \
+ 'WHERE account_move_line.move_id = %s ' \
+ 'AND account_analytic_line.move_id = account_move_line.id',
+ (ref, move_id))
+
for inv_id, name in self.name_get(cr, uid, [id]):
message = _('Invoice ') + " '" + name + "' "+ _("is validated.")
self.log(cr, uid, inv_id, message)
+
return True
def action_cancel(self, cr, uid, ids, *args):
diff --git a/addons/account/wizard/account_balance_report.py b/addons/account/wizard/account_balance_report.py
index 5d02f9fa972..0d2a56d96d6 100644
--- a/addons/account/wizard/account_balance_report.py
+++ b/addons/account/wizard/account_balance_report.py
@@ -109,7 +109,6 @@ class account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance',
'datas': data,
- 'nodestroy':True,
}
def _check_date(self, cr, uid, data, context=None):
@@ -128,7 +127,6 @@ class account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance',
'datas': data,
- 'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
diff --git a/addons/account/wizard/account_bs_report.py b/addons/account/wizard/account_bs_report.py
index dfd035680f2..193e33395f5 100644
--- a/addons/account/wizard/account_bs_report.py
+++ b/addons/account/wizard/account_bs_report.py
@@ -139,14 +139,12 @@ class account_bs_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet.horizontal',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet',
'datas': data,
- 'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
diff --git a/addons/account/wizard/account_central_journal.py b/addons/account/wizard/account_central_journal.py
index b1a0f3c2849..dc213f159ab 100644
--- a/addons/account/wizard/account_central_journal.py
+++ b/addons/account/wizard/account_central_journal.py
@@ -52,7 +52,6 @@ class account_central_journal(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.central.journal',
'datas': datas,
- 'nodestroy':True,
}
account_central_journal()
diff --git a/addons/account/wizard/account_compare_account_balance_report.py b/addons/account/wizard/account_compare_account_balance_report.py
index af844854271..629e1ae798e 100644
--- a/addons/account/wizard/account_compare_account_balance_report.py
+++ b/addons/account/wizard/account_compare_account_balance_report.py
@@ -74,14 +74,12 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
- 'nodestroy':True,
}
if data['form']['format_perc']==1:
if len(data['form']['fiscalyear'])<=2:
@@ -90,14 +88,12 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
- 'nodestroy':True,
}
else:
if len(data['form']['fiscalyear'])==3:
@@ -106,7 +102,6 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
- 'nodestroy':True,
}
else:
raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.'))
@@ -119,7 +114,6 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
- 'nodestroy':True,
}
else:
raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.'))
@@ -129,14 +123,12 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
- 'nodestroy':True,
}
account_compare_account_balance_report()
diff --git a/addons/account/wizard/account_general_journal.py b/addons/account/wizard/account_general_journal.py
index 8bd2913ae62..f22846f1637 100644
--- a/addons/account/wizard/account_general_journal.py
+++ b/addons/account/wizard/account_general_journal.py
@@ -52,7 +52,6 @@ class account_general_journal(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.general.journal',
'datas': datas,
- 'nodestroy':True,
}
account_general_journal()
diff --git a/addons/account/wizard/account_general_ledger_report.py b/addons/account/wizard/account_general_ledger_report.py
index ad5e74786b0..f8c7794673b 100644
--- a/addons/account/wizard/account_general_ledger_report.py
+++ b/addons/account/wizard/account_general_ledger_report.py
@@ -107,14 +107,12 @@ class account_general_ledger_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger_landscape',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger',
'datas': data,
- 'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
@@ -141,14 +139,12 @@ class account_general_ledger_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger_landscape',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger',
'datas': data,
- 'nodestroy':True,
}
account_general_ledger_report()
diff --git a/addons/account/wizard/account_invoice_state_view.xml b/addons/account/wizard/account_invoice_state_view.xml
index 1fd466a9dce..7130e7dc758 100644
--- a/addons/account/wizard/account_invoice_state_view.xml
+++ b/addons/account/wizard/account_invoice_state_view.xml
@@ -44,7 +44,7 @@
-
+
diff --git a/addons/account/wizard/account_journal_select_view.xml b/addons/account/wizard/account_journal_select_view.xml
index 4fc94ec0d6c..f5df24fa585 100644
--- a/addons/account/wizard/account_journal_select_view.xml
+++ b/addons/account/wizard/account_journal_select_view.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/addons/account/wizard/account_move_bank_reconcile_view.xml b/addons/account/wizard/account_move_bank_reconcile_view.xml
index b80e17f18c8..d41993733df 100644
--- a/addons/account/wizard/account_move_bank_reconcile_view.xml
+++ b/addons/account/wizard/account_move_bank_reconcile_view.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/addons/account/wizard/account_move_journal_view.xml b/addons/account/wizard/account_move_journal_view.xml
index af9dd313255..d766153a9b4 100644
--- a/addons/account/wizard/account_move_journal_view.xml
+++ b/addons/account/wizard/account_move_journal_view.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/addons/account/wizard/account_move_line_reconcile_select_view.xml b/addons/account/wizard/account_move_line_reconcile_select_view.xml
index 4f88f618727..22bc289f816 100644
--- a/addons/account/wizard/account_move_line_reconcile_select_view.xml
+++ b/addons/account/wizard/account_move_line_reconcile_select_view.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/addons/account/wizard/account_move_line_select_view.xml b/addons/account/wizard/account_move_line_select_view.xml
index 8c462318271..645b5a098e3 100644
--- a/addons/account/wizard/account_move_line_select_view.xml
+++ b/addons/account/wizard/account_move_line_select_view.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/addons/account/wizard/account_move_line_unreconcile_select_view.xml b/addons/account/wizard/account_move_line_unreconcile_select_view.xml
index f2a3882db91..ae1b069a1dc 100644
--- a/addons/account/wizard/account_move_line_unreconcile_select_view.xml
+++ b/addons/account/wizard/account_move_line_unreconcile_select_view.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/addons/account/wizard/account_open_closed_fiscalyear_view.xml b/addons/account/wizard/account_open_closed_fiscalyear_view.xml
index afc7b7e6828..435f15388c1 100644
--- a/addons/account/wizard/account_open_closed_fiscalyear_view.xml
+++ b/addons/account/wizard/account_open_closed_fiscalyear_view.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/addons/account/wizard/account_partner_balance_report.py b/addons/account/wizard/account_partner_balance_report.py
index c6d82128256..5d023d8f8ec 100644
--- a/addons/account/wizard/account_partner_balance_report.py
+++ b/addons/account/wizard/account_partner_balance_report.py
@@ -82,7 +82,6 @@ class account_partner_balance(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.partner.balance',
'datas': data,
- 'nodestroy':True,
}
def _check_date(self, cr, uid, data, context):
@@ -98,7 +97,6 @@ class account_partner_balance(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.partner.balance',
'datas': data,
- 'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
diff --git a/addons/account/wizard/account_partner_balance_report_view.xml b/addons/account/wizard/account_partner_balance_report_view.xml
index 4827fac5480..abbddcd5074 100644
--- a/addons/account/wizard/account_partner_balance_report_view.xml
+++ b/addons/account/wizard/account_partner_balance_report_view.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/addons/account/wizard/account_pl_report.py b/addons/account/wizard/account_pl_report.py
index 9ae7a4dbedf..87f5accf068 100644
--- a/addons/account/wizard/account_pl_report.py
+++ b/addons/account/wizard/account_pl_report.py
@@ -136,14 +136,12 @@ class account_pl_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'pl.account.horizontal',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'pl.account',
'datas': data,
- 'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
diff --git a/addons/account/wizard/account_print_journal.py b/addons/account/wizard/account_print_journal.py
index f40efe3eb99..53c73e66355 100644
--- a/addons/account/wizard/account_print_journal.py
+++ b/addons/account/wizard/account_print_journal.py
@@ -59,7 +59,6 @@ class account_print_journal(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.journal.period.print',
'datas': datas,
- 'nodestroy':True,
}
account_print_journal()
diff --git a/addons/account/wizard/account_reconcile_view.xml b/addons/account/wizard/account_reconcile_view.xml
index 5ce124bfcc7..4d8283ab0c1 100644
--- a/addons/account/wizard/account_reconcile_view.xml
+++ b/addons/account/wizard/account_reconcile_view.xml
@@ -2,30 +2,30 @@
-
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -36,41 +36,41 @@
-
-
-
+
+
+
account.move.line.reconcile.full.form
account.move.line.reconcile
form
-
-
- Reconcile Entries
+
+
+ Reconcile Entries
account.move.line.reconcile
form
tree,form
-
- new
+
+ new
@@ -81,72 +81,72 @@
action
account.move.line
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
account.move.line.reconcile.writeoff.form
account.move.line.reconcile.writeoff
form
-
+
diff --git a/addons/account/wizard/account_third_party_ledger.py b/addons/account/wizard/account_third_party_ledger.py
index daff801f3bd..fa40cd0bdc6 100644
--- a/addons/account/wizard/account_third_party_ledger.py
+++ b/addons/account/wizard/account_third_party_ledger.py
@@ -97,14 +97,12 @@ class account_partner_ledger(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger',
'datas': data,
- 'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger_other',
'datas': data,
- 'nodestroy':True,
}
def _check_date(self, cr, uid, data, context=None):
@@ -122,7 +120,6 @@ class account_partner_ledger(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger',
'datas': data,
- 'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml
index 6bae6c55d74..f4cd436c9a2 100644
--- a/addons/account/wizard/account_use_model_view.xml
+++ b/addons/account/wizard/account_use_model_view.xml
@@ -70,7 +70,7 @@
-
+
diff --git a/addons/account/wizard/account_vat.py b/addons/account/wizard/account_vat.py
index 15c5a55203a..80f4f8360a1 100644
--- a/addons/account/wizard/account_vat.py
+++ b/addons/account/wizard/account_vat.py
@@ -22,43 +22,42 @@
from osv import osv, fields
class account_vat_declaration(osv.osv_memory):
- _name = 'account.vat.declaration'
- _description = 'Account Vat Declaration'
+ _name = 'account.vat.declaration'
+ _description = 'Account Vat Declaration'
- _columns = {
+ _columns = {
'based_on': fields.selection([('invoices','Invoices'),
- ('payments','Payments'),],
- 'Based On', required=True),
+ ('payments','Payments'),],
+ 'Based On', required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
- 'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"),
- }
+ 'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"),
+ }
- def _get_company(self, cr, uid, context={}):
- user_obj = self.pool.get('res.users')
- company_obj = self.pool.get('res.company')
- user = user_obj.browse(cr, uid, uid, context=context)
- if user.company_id:
- return user.company_id.id
- else:
- return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
+ def _get_company(self, cr, uid, context={}):
+ user_obj = self.pool.get('res.users')
+ company_obj = self.pool.get('res.company')
+ user = user_obj.browse(cr, uid, uid, context=context)
+ if user.company_id:
+ return user.company_id.id
+ else:
+ return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
- _defaults = {
- 'based_on': 'invoices',
- 'company_id': _get_company
- }
+ _defaults = {
+ 'based_on': 'invoices',
+ 'company_id': _get_company
+ }
- def create_vat(self, cr, uid, ids, context={}):
- if context is None:
- context = {}
- datas = {'ids': context.get('active_ids', [])}
- datas['model'] = 'account.tax.code'
- datas['form'] = self.read(cr, uid, ids)[0]
- return {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'account.vat.declaration',
- 'datas': datas,
- 'nodestroy':True,
- }
+ def create_vat(self, cr, uid, ids, context={}):
+ if context is None:
+ context = {}
+ datas = {'ids': context.get('active_ids', [])}
+ datas['model'] = 'account.tax.code'
+ datas['form'] = self.read(cr, uid, ids)[0]
+ return {
+ 'type': 'ir.actions.report.xml',
+ 'report_name': 'account.vat.declaration',
+ 'datas': datas,
+ }
account_vat_declaration()
diff --git a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py
index 825ab26aaf9..2429650a800 100644
--- a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py
+++ b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py
@@ -67,7 +67,6 @@ class account_crossovered_analytic(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.analytic.account.crossovered.analytic',
'datas': datas,
- 'nodestroy': True
}
account_crossovered_analytic()
diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py
index 868249365ee..c3fd73370eb 100644
--- a/addons/account_followup/wizard/account_followup_print.py
+++ b/addons/account_followup/wizard/account_followup_print.py
@@ -304,7 +304,6 @@ class account_followup_print_all(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account_followup.followup.print',
'datas': datas,
- 'nodestroy': True
}
account_followup_print_all()
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 0b1b9b01b23..e1005512127 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -203,7 +203,7 @@ class account_voucher(osv.osv):
}
self.write(cr, uid, ids, res)
else:
- raise osv.except_osv('Invalid action !', 'You cannot post to Pro-Forma a voucher with Total amount = 0 !')
+ raise osv.except_osv(_('Invalid action !'), _('You can not post to Pro-Forma a voucher with Total amount = 0 !'))
return True
def proforma_voucher(self, cr, uid, ids, context={}):
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index 46e1f7342c1..aaebfe4c09d 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -89,7 +89,7 @@
-
+
@@ -126,7 +126,7 @@
-
+
diff --git a/addons/account_voucher_payment/account_voucher_payment.py b/addons/account_voucher_payment/account_voucher_payment.py
index 3d860146520..2bae0e6f75a 100755
--- a/addons/account_voucher_payment/account_voucher_payment.py
+++ b/addons/account_voucher_payment/account_voucher_payment.py
@@ -22,6 +22,38 @@
from osv import fields, osv
from tools.translate import _
+class account_invoice(osv.osv):
+ _inherit = 'account.invoice'
+
+ def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
+ """
+ Returns a list of ids based on search domain {args}
+
+ @param cr: A database cursor
+ @param user: ID of the user currently logged in
+ @param args: list of conditions to be applied in search opertion
+ @param offset: default from first record, you can start from nth record
+ @param limit: number of records to be obtained as a result of search opertion
+ @param order: ordering on any field(s)
+ @param context: context arguments, like lang, time zone
+ @param count:
+
+ @return: Returns a list of ids based on search domain
+ """
+ ttype = context.get('ttype', False)
+ if ttype and ttype in ('rec_voucher', 'bank_rec_voucher'):
+ args += [('type','in', ['out_invoice', 'in_refund'])]
+ elif ttype and ttype in ('pay_voucher', 'bank_pay_voucher'):
+ args += [('type','in', ['in_invoice', 'out_refund'])]
+ elif ttype and ttype in('journal_sale_vou', 'journal_pur_voucher', 'journal_voucher'):
+ raise osv.except_osv(_('Invalid action !'), _('You can not reconcile sales, purchase, or journal entry with invoice !'))
+ args += [('type','=', 'do_not_allow_search')]
+
+ res = super(account_invoice, self).search(cr, user, args, offset, limit, order, context, count)
+ return res
+
+account_invoice()
+
class account_move_line(osv.osv):
_inherit = "account.move.line"
_columns = {
@@ -158,11 +190,12 @@ class account_voucher(osv.osv):
move_line_id = move_line_pool.create(cr, uid, move_line)
line_ids += [move_line_id]
- if line.invoice_id:
+ if line.invoice_id and inv.type in ('pay_voucher', 'bank_pay_voucher', 'rec_voucher', 'bank_rec_voucher'):
rec_ids += [move_line_id]
for move_line in line.invoice_id.move_id.line_id:
if line.account_id.id == move_line.account_id.id:
- rec_ids += [move_line.id]
+ rec_ids += [move_line.id]
+
if rec_ids:
move_line_pool.reconcile_partial(cr, uid, rec_ids)
@@ -196,7 +229,7 @@ class account_voucher_line(osv.osv):
res = super(account_voucher_line, self).move_line_get_item(cr, uid, line, context)
res['invoice'] = line.invoice_id or False
return res
-
+
def onchange_invoice_id(self, cr, uid, ids, invoice_id, currency_id):
currency_pool = self.pool.get('res.currency')
invoice_pool = self.pool.get('account.invoice')
diff --git a/addons/account_voucher_payment/account_voucher_payment_view.xml b/addons/account_voucher_payment/account_voucher_payment_view.xml
index 3f118120c8a..6da4c7d45e2 100755
--- a/addons/account_voucher_payment/account_voucher_payment_view.xml
+++ b/addons/account_voucher_payment/account_voucher_payment_view.xml
@@ -10,10 +10,10 @@
-
+
-
+
diff --git a/addons/base_module_quality/i18n/id.po b/addons/base_module_quality/i18n/id.po
new file mode 100644
index 00000000000..edd55c91ab6
--- /dev/null
+++ b/addons/base_module_quality/i18n/id.po
@@ -0,0 +1,185 @@
+# Indonesian translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-08-28 16:01+0000\n"
+"PO-Revision-Date: 2010-07-29 09:25+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Indonesian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-07-30 03:37+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: base_module_quality
+#: field:module.quality.check,final_score:0
+msgid "Final Score (%)"
+msgstr ""
+
+#. module: base_module_quality
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: base_module_quality
+#: model:ir.module.module,shortdesc:base_module_quality.module_meta_information
+msgid "Base module quality"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.check,name:0
+msgid "Rated Module"
+msgstr ""
+
+#. module: base_module_quality
+#: view:module.quality.detail:0
+msgid "Detail"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.detail,note:0
+msgid "Note"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.detail,state:0
+msgid "State"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.detail,detail:0
+msgid "Details"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.detail,ponderation:0
+msgid "Ponderation"
+msgstr ""
+
+#. module: base_module_quality
+#: help:module.quality.detail,ponderation:0
+msgid ""
+"Some tests are more critical than others, so they have a bigger weight in "
+"the computation of final rating"
+msgstr ""
+
+#. module: base_module_quality
+#: view:module.quality.check:0
+#: field:module.quality.check,check_detail_ids:0
+msgid "Tests"
+msgstr ""
+
+#. module: base_module_quality
+#: selection:module.quality.detail,state:0
+msgid "Skipped"
+msgstr ""
+
+#. module: base_module_quality
+#: help:module.quality.detail,state:0
+msgid ""
+"The test will be completed only if the module is installed or if the test "
+"may be processed on uninstalled module."
+msgstr ""
+
+#. module: base_module_quality
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: base_module_quality
+#: model:ir.model,name:base_module_quality.model_module_quality_check
+msgid "module.quality.check"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.detail,name:0
+msgid "Name"
+msgstr ""
+
+#. module: base_module_quality
+#: wizard_field:quality_detail_save,init,module_file:0
+msgid "Save report"
+msgstr ""
+
+#. module: base_module_quality
+#: wizard_field:quality_detail_save,init,name:0
+msgid "File name"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.detail,score:0
+msgid "Score (%)"
+msgstr ""
+
+#. module: base_module_quality
+#: help:quality_detail_save,init,name:0
+msgid "Save report as .html format"
+msgstr ""
+
+#. module: base_module_quality
+#: view:module.quality.detail:0
+#: field:module.quality.detail,summary:0
+msgid "Summary"
+msgstr ""
+
+#. module: base_module_quality
+#: model:ir.actions.wizard,name:base_module_quality.quality_detail_save
+msgid "Report Save"
+msgstr ""
+
+#. module: base_module_quality
+#: wizard_view:quality_detail_save,init:0
+msgid "Standard entries"
+msgstr ""
+
+#. module: base_module_quality
+#: view:module.quality.detail:0
+msgid "Save Report"
+msgstr ""
+
+#. module: base_module_quality
+#: code:addons/base_module_quality/wizard/module_quality_check.py:0
+#: model:ir.actions.wizard,name:base_module_quality.create_quality_check_id
+#, python-format
+msgid "Quality Check"
+msgstr ""
+
+#. module: base_module_quality
+#: model:ir.model,name:base_module_quality.model_module_quality_detail
+msgid "module.quality.detail"
+msgstr ""
+
+#. module: base_module_quality
+#: selection:module.quality.detail,state:0
+msgid "Done"
+msgstr ""
+
+#. module: base_module_quality
+#: code:addons/base_module_quality/speed_test/speed_test.py:0
+#: view:module.quality.check:0
+#: view:module.quality.detail:0
+#, python-format
+msgid "Result"
+msgstr ""
+
+#. module: base_module_quality
+#: wizard_button:quality_detail_save,init,end:0
+msgid "Cancel"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.detail,message:0
+msgid "Message"
+msgstr ""
+
+#. module: base_module_quality
+#: field:module.quality.detail,quality_check_id:0
+msgid "Quality"
+msgstr ""
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index 0b170a85924..16306abfb44 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -124,7 +124,7 @@ Create dashboard for CRM that includes:
],
'test': [
'test/test_crm_lead.yml',
- #'test/test_crm_meeting.yml',
+ 'test/test_crm_meeting.yml',
'test/test_crm_opportunity.yml',
'test/test_crm_phonecall.yml',
],
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 0ad779d403f..56a30c4791a 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -164,8 +164,9 @@ class crm_lead(osv.osv, crm_case):
}
def create(self, cr, uid, vals, context=None):
- if not vals.get('stage_id',False):
- raise osv.except_osv('Error', _('There is no stage defined for this Sales Team'))
+# FIXME: Do we really need this? if yes, this is not a correct way to check for stage
+# if not vals.get('stage_id',False):
+# raise osv.except_osv('Error', _('There is no stage defined for this Sales Team'))
return super(crm_lead, self).create(cr, uid, vals, context=context)
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
diff --git a/addons/crm/test/test_crm_meeting.yml b/addons/crm/test/test_crm_meeting.yml
index 6365c913b1f..ef86261f091 100644
--- a/addons/crm/test/test_crm_meeting.yml
+++ b/addons/crm/test/test_crm_meeting.yml
@@ -55,8 +55,8 @@
I will search for one of the recurrent event and count the number of meeting.
-
!python {model: crm.meeting}: |
- ids = self.search(cr, uid, [('date', '>=', '2010-05-21 00:00:00'), ('date', '<=', '2010-04-21 00:00:00')] )
- assert len(ids) == 9
+ ids = self.search(cr, uid, [('date', '>=', '2010-04-21 00:00:00'), ('date', '<=', '2010-05-21 00:00:00')] )
+ assert len(ids) == 10
- |
Now If I want to edit meetings information for all occurence I click on "Edit All" button.
@@ -81,11 +81,6 @@
partner_id: base.res_partner_9
user_ids:
- base.user_demo
-- |
- If I set Send mail boolean as True I can see that an email is send to
- specified email address with proper meeting information.
--
- #This is not working for send mail boolean as True.
-
I click on "Invite" button of "Invite attendee" wizard.
-
diff --git a/addons/crm/test/test_crm_phonecall.yml b/addons/crm/test/test_crm_phonecall.yml
index af28c19a10e..1351ba88199 100644
--- a/addons/crm/test/test_crm_phonecall.yml
+++ b/addons/crm/test/test_crm_phonecall.yml
@@ -72,7 +72,6 @@
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
phonecall_id: 'crm_phonecall_interviewcall0'
- rrule_type: weekly
state: open
- |
diff --git a/addons/crm_claim/report/crm_claim_report_view.xml b/addons/crm_claim/report/crm_claim_report_view.xml
index 45aec4ead2b..7bde655a980 100644
--- a/addons/crm_claim/report/crm_claim_report_view.xml
+++ b/addons/crm_claim/report/crm_claim_report_view.xml
@@ -167,7 +167,7 @@
string="Done"
domain="[('state','=','done')]"/>
-
diff --git a/addons/crm_fundraising/report/crm_fundraising_report_view.xml b/addons/crm_fundraising/report/crm_fundraising_report_view.xml
index 94bf096c622..8029a5574d3 100644
--- a/addons/crm_fundraising/report/crm_fundraising_report_view.xml
+++ b/addons/crm_fundraising/report/crm_fundraising_report_view.xml
@@ -158,7 +158,7 @@
string="Done"
domain="[('state','=','done')]"/>
-
diff --git a/addons/document/test/document_test2.yml b/addons/document/test/document_test2.yml
index 712399afac3..34e834a5306 100644
--- a/addons/document/test/document_test2.yml
+++ b/addons/document/test/document_test2.yml
@@ -1,10 +1,10 @@
--
- In order to test the document management
-
- I make sure the default installation has some storage and root directory.
+ In order to test the document management I make sure the default installation has some storage.
-
!assert {model: document.storage, id: storage_default }:
- id != False
+-
+ I make sure the default installation has some root directory.
-
!assert {model: document.directory, id: dir_root}:
- storage_id != False
@@ -19,11 +19,12 @@
defaults work)
-
!record {model: ir.attachment, id: file_test1 }:
- name: Test file
+ name: Test file.txt
-
I delete the attachment from the root folder
-
- !delete {model: ir.attachment, id: file_test1, search: }
+ !python {model: ir.attachment}: |
+ self.unlink(cr, uid, [ref('file_test1')])
-
I create an attachment into the Testing folder.
-
@@ -34,13 +35,13 @@
I update the attachment with data, namely "abcd"
-
!record {model: ir.attachment, id: file_test2 }:
- datas: "abcd"
+ datas: "YWJjZA==\n"
-
I test that the datas of the attachment are correct
-
!assert {model: ir.attachment, id: file_test2 }:
- - datas == "abcd\n"
- - file_size == 5
+ - datas == "YWJjZA==\n"
+ - file_size == 4
- file_type == 'text/plain'
-
I rename the attachment.
@@ -57,9 +58,9 @@
I create an attachment to a 3rd resource, eg. a res.country
-
!record {model: ir.attachment, id: attach_3rd }:
- name: 'Res country attachment.txt'
+ name: 'Country attachment.txt'
parent_id: dir_tests
- datas: 'defg'
+ datas: "Q291bnRyeSBhdHRhY2htZW50IGNvbnRlbnQ=\n"
res_model: res.country
res_id: !eval ref("base.za")
-
@@ -69,4 +70,7 @@
ids = self.search(cr, uid, [('res_model', '=', 'res.country'), ('res_id', '=', ref("base.za"))])
assert ids == [ ref("attach_3rd")], ids
-
- !delete {model: ir.attachment, id: attach_3rd, search: }
+ I delete the attachment
+-
+ !python {model: ir.attachment}: |
+ self.unlink(cr, uid, [ref('attach_3rd')])
diff --git a/addons/hr_evaluation/test/test_hr_evaluation.yml b/addons/hr_evaluation/test/test_hr_evaluation.yml
index 6e9b11df3bc..cdee65dde26 100644
--- a/addons/hr_evaluation/test/test_hr_evaluation.yml
+++ b/addons/hr_evaluation/test/test_hr_evaluation.yml
@@ -1,16 +1,14 @@
-- |
+-
In order to test hr_evaluation module for OpenERP, I will create plan then create evaluation under that plan.
-
- |
- Given that I have "R & D" Department for employee.
--
+
+ I create new Department.
+-
!record {model: hr.department, id: hr_department_rd0}:
manager_id: base.user_root
- name: 'R & D '
--
- |
- Given that I have Employee “Mark Johnson” which take Interview.
- select "R & D" Department.
+ name: 'R & D'
+-
+ I create a new employee.
-
!record {model: hr.employee, id: hr_employee_employee0}:
address_home_id: base.res_partner_address_1
@@ -20,32 +18,31 @@
name: Mark Johnson
user_id: base.user_root
department_id: 'hr_department_rd0'
-- |
- I create new employee “Phil Graves ” and select "Mark Johnson" as
- Manager.
--
+-
+ I create another new employee and assign first one as it's Manager.
+-
!record {model: hr.employee, id: hr_employee_employee1}:
address_home_id: base.res_partner_address_3000
company_id: base.main_company
gender: male
- name: Phil Graves
+ name: Phil Graves
user_id: base.user_demo
parent_id: 'hr_employee_employee0'
-- |
- I Create "Employee Evaluation" survey for Manager's Evaluation Plan.
+-
+ I Create an "Employee Evaluation" survey for Manager's Evaluation Plan.
-
!record {model: 'survey', id: survey_0}:
title: 'Employee Evaluation'
max_response_limit: 20
response_user: 2
-- |
- I Create "Employee Evaluation" page in "Employee Evaluation" survey.
+-
+ I Create an "Employee Evaluation" page in "Employee Evaluation" survey.
-
!record {model: 'survey.page', id: survey_employee_page_0}:
title: 'Employee Evaluation'
survey_id: survey_0
-- |
+-
I Create "What is your Name" question in "Employee Evaluation" survey page.
-
!record {model: 'survey.question', id: survey_p_question_0}:
@@ -53,7 +50,7 @@
type: 'single_textbox'
sequence: 1
page_id: survey_employee_page_0
-- |
+-
I Create "What is your gender" Question in "Employee Evaluation" survey page.
-
!record {model: 'survey.question', id: survey_p_question_1}:
@@ -62,30 +59,30 @@
sequence: 2
is_require_answer: true
page_id: survey_employee_page_0
-- |
+-
I Create "Male" answer in question "What is your gender?"
-
!record {model: 'survey.answer', id: survey_p_1_1}:
answer: 'Male'
sequence: 1
question_id : survey_p_question_1
-- |
+-
I Create "Female" answer in question "What is your gender?"
-
!record {model: 'survey.answer', id: survey_p_1_2}:
answer: 'Female'
sequence: 2
question_id : survey_p_question_1
-
-- |
- Now Survey set in open state.
+
+-
+ I set the survey in open state.
-
!python {model: survey}: |
self.survey_open(cr, uid, [ref("survey_0")], context)
-- |
- I creating a Evaluation plan and select "Employee Evaluation" survey for "Send to Subordinates" and "Final interview with Manager" Phase.
--
+-
+ I create an Evaluation plan and select "Employee Evaluation" survey for "Send to Subordinates" and "Final interview with Manager" Phase.
+-
!record {model: hr_evaluation.plan, id: hr_evaluation_plan_managersplan0}:
company_id: base.main_company
month_first: 3
@@ -99,54 +96,52 @@
name: Final Interview with manager
sequence: 2
survey_id: 'survey_0'
-
-- |
- Now I create Evaluation for "Phil Graves" Employee under "Manager Evaluation Plan".
--
+
+-
+ I create an Evaluation for employee under "Manager Evaluation Plan".
+-
!record {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
date: '2010-06-28'
employee_id: 'hr_employee_employee1'
plan_id: 'hr_evaluation_plan_managersplan0'
progress: 0.0
state: draft
-- |
- I check that Evaluation is in "Draft" state.
+-
+ I check that evaluation is in "Draft" state.
-
!assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
- - state == 'draft'
-- |
- I start Evaluation process by click on "Start Evaluation" button.
+ - state == 'draft'
+-
+ I start the evaluation process by click on "Start Evaluation" button.
-
!python {model: hr_evaluation.evaluation}: |
- self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
+ self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
-- |
- After that Manager Evaluation plan is In Progress.
- I close this servey request by giving answer of survey question.
+-
+ I close this servey request by giving answer of survey question.
-
!python {model: hr.evaluation.interview}: |
self.survey_req_done(cr, uid, [ref('hr_evaluation_evaluation_0')])
-- |
- I click on "Final Validation" button to finalize Evaluation.
--
+-
+ I click on "Final Validation" button to finalise evaluation.
+-
!python {model: hr_evaluation.evaluation}: |
self.button_final_validation(cr, uid, [ref("hr_evaluation.hr_evaluation_evaluation_0")],
{"active_ids": [ref("hr_evaluation.menu_open_view_hr_evaluation_tree")]})
-
-- |
+
+-
I check that state is "Final Validation".
-
- !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
- - state == 'progress'
-- |
+ !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
+ - state == 'progress'
+-
Give Rating "Meet expectations" by selecting overall Rating.
--
+-
!record {model: hr_evaluation.evaluation, id: hr_evaluation.hr_evaluation_evaluation_0}:
rating: '2'
-
-- |
+
+-
I close this Evaluation by click on "Done" button of this wizard.
--
+-
!python {model: hr_evaluation.evaluation}: |
self.button_done(cr, uid, [ref("hr_evaluation.hr_evaluation_evaluation_0")], {"active_ids": [ref("hr_evaluation.menu_open_view_hr_evaluation_tree")]})
-
\ No newline at end of file
diff --git a/addons/hr_expense/test/test_hr_expense.yml b/addons/hr_expense/test/test_hr_expense.yml
index 70e2bfb874d..5fa0175eba1 100644
--- a/addons/hr_expense/test/test_hr_expense.yml
+++ b/addons/hr_expense/test/test_hr_expense.yml
@@ -1,27 +1,27 @@
-- |
- In order to test hr_expenses for OpenERP, I create expense for employee and manage employee's expenses.
-- |
- Creating unit of measure category "Working Time".
+-
+ In order to test hr_expenses for OpenERP, I create expenses for employee and manage employee's expenses.
+-
+ I create an unit of measure category "Working Time".
-
!record {model: product.uom.categ, id: product_uom_categ_workingtime0}:
name: Working Time.
-- |
- Given that I have employee "Marc John" and his address.
+-
+ I create a new employee.
-
!record {model: hr.employee, id: hr.employee1}:
address_home_id: base.res_partner_address_1
address_id: base.main_address
-- |
- I create product unit of measure "Hour".
+-
+ I create product unit of measure "Hour".
-
!record {model: product.uom, id: product_uom_hour0}:
category_id: 'product_uom_categ_workingtime0'
factor: 8.0
name: Hour
rounding: 0.01
-- |
- Creating a product "travel" and select uom "Hour" and category "Working Time".
+-
+ I Create a product "travel".
-
!record {model: product.product, id: product_product_travel0}:
categ_id: product.product_category_services
@@ -41,8 +41,8 @@
weight: 0.0
weight_net: 0.0
-- |
- Now I create Expense "September Expenses" for Marc John.And select product "travel".
+-
+ I create an expense.
-
!record {model: hr.expense.expense, id: hr_expense_expense_september0}:
company_id: base.main_company
@@ -58,38 +58,38 @@
uom_id: product.product_uom_unit
unit_amount: 700.0
user_id: base.user_root
-- |
- I check that expenses on "draft" state.
+-
+ I check that expense is in "Draft" state.
-
!assert {model: hr.expense.expense, id: hr_expense_expense_september0}:
- state == 'draft'
-- |
+-
I confirm this expenses by click on "Confirm" button.
-
!workflow {model: hr.expense.expense, action: confirm, ref: hr_expense_expense_september0}
-- |
+-
I check that state is "Waiting Confirmation".
-
!assert {model: hr.expense.expense, id: hr_expense_expense_september0}:
- state == 'confirm'
-- |
+-
I accept this expense by click on "Accept" button.
-
!workflow {model: hr.expense.expense, action: validate, ref: hr_expense_expense_september0}
-- |
+-
I invoiced this expenses by click on "Invoice" button.
-
!workflow {model: hr.expense.expense, action: invoice, ref: hr_expense_expense_september0}
-- |
+-
I check that state is "Invoiced"
-
!assert {model: hr.expense.expense, id: hr_expense_expense_september0}:
- state == 'invoiced'
-- |
- Now I check that Invoice is created for that expenses.
+-
+ I check that Invoice is created for the expense.
-
!python {model: hr.expense.expense}: |
exp = self.browse(cr, uid, [ref('hr_expense_expense_september0')])[0]
diff --git a/addons/hr_holidays/report/hr_holidays_report_view.xml b/addons/hr_holidays/report/hr_holidays_report_view.xml
index 9f7b3a43cfc..a2a7b104ea6 100644
--- a/addons/hr_holidays/report/hr_holidays_report_view.xml
+++ b/addons/hr_holidays/report/hr_holidays_report_view.xml
@@ -56,7 +56,7 @@
help = "Draft and Confirmed leaves"/>
-
+
diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml
index 2d77c1d820e..9c2ce90cd7a 100644
--- a/addons/hr_payroll/hr_payroll_demo.xml
+++ b/addons/hr_payroll/hr_payroll_demo.xml
@@ -8,6 +8,7 @@
Marketing Executive
+
per
@@ -19,6 +20,7 @@
House Rant Allowance
+
fix
@@ -30,6 +32,7 @@
Convance Allowance
+
fix
@@ -41,6 +44,7 @@
Professional Tax
+
per
@@ -52,7 +56,7 @@
Provident Fund
-
+
@@ -62,7 +66,7 @@
Bonamy
user
-
+
@@ -74,7 +78,7 @@
-
+
SLIP/001
@@ -87,6 +91,6 @@
Salary Slip of Bonamy for June-2010
-
+
diff --git a/addons/hr_payroll/test/payment_advice.yml b/addons/hr_payroll/test/payment_advice.yml
index de86d8c27be..a2a9c3d5dbe 100644
--- a/addons/hr_payroll/test/payment_advice.yml
+++ b/addons/hr_payroll/test/payment_advice.yml
@@ -2,7 +2,7 @@
I test the 'Payment Advice' in order to check the hr_payroll in OpenERP
-
I create a new employee “Richie”
--
+-
!record {model: hr.employee, id: hr_employee_richie0}:
address_home_id: base.res_partner_address_1
address_id: base.res_partner_address_9
@@ -27,8 +27,8 @@
salary_account: account.a_recv
vehicle_distance: 0.0
-
- Then I create a new payment advice record
--
+ I create a new payment advice record
+-
!record {model: hr.payroll.advice, id: hr_payroll_advice_advice0}:
account_id: account.cash
line_ids:
@@ -38,15 +38,15 @@
flag: C
name: Axis Bank
name: advice1
--
- In order to confirm a sheet I click on "Confirm Sheet" button
--
+-
+ I confirmed the sheet by click on "Confirm Sheet" button.
+-
!python {model: hr.payroll.advice}: |
self.confirm_sheet(cr, uid, [ref("hr_payroll_advice_advice0")], {"lang": "en_US",
"active_model": "ir.ui.menu", "active_ids": [ref("hr_payroll.hr_menu_payment_advice")],
"tz": False, "active_id": ref("hr_payroll.hr_menu_payment_advice")})
-
- I check that a state has transferred from draft to confirm
+ I check that a state is "Confirm"
-
!python {model: hr.payroll.advice}: |
from tools.translate import _
diff --git a/addons/hr_payroll/test/payroll_register.yml b/addons/hr_payroll/test/payroll_register.yml
index 317ad40ac32..f5772602db4 100644
--- a/addons/hr_payroll/test/payroll_register.yml
+++ b/addons/hr_payroll/test/payroll_register.yml
@@ -2,7 +2,7 @@
I test the 'Payroll Register' in order to check the hr_payroll in OpenERP
-
I create a new employee “Keith”
--
+-
!record {model: hr.employee, id: hr_employee_keith0}:
address_home_id: base.res_partner_address_3
address_id: base.res_partner_address_9
@@ -27,7 +27,7 @@
salary_account: account.a_recv
vehicle_distance: 0.0
-
- I create a payroll register record
+ I create a payroll register record.
-
!record {model: hr.payroll.register, id: hr_payroll_register_payroll0}:
bank_journal_id: account.bank_journal
@@ -38,8 +38,8 @@
bank_journal_id: account.bank_journal
journal_id: account.expenses_journal
name: payroll1
--
- I click on Compute button
+-
+ I click on Compute button.
-
!python {model: hr.payroll.register}: |
self.compute_sheet(cr, uid, [ref("hr_payroll_register_payroll0")], {"lang": "en_US",
@@ -47,7 +47,7 @@
[ref("hr_payroll.hr_menu_payroll_register")], "section_id": False, "active_id":
ref("hr_payroll.hr_menu_payroll_register"), })
-
- Then I click on Verify Sheet button
+ Then I click on Verify Sheet button.
-
!python {model: hr.payroll.register}: |
self.verify_sheet(cr, uid, [ref("hr_payroll_register_payroll0")], {"lang": "en_US",
@@ -60,4 +60,4 @@
!python {model: hr.payroll.register}: |
from tools.translate import _
reg_brw=self.browse(cr, uid, ref("hr_payroll_register_payroll0"))
- assert(reg_brw.state == 'hr_check'), _('State not changed!')
+ assert(reg_brw.state == 'hr_check'), _('State not changed!')
diff --git a/addons/hr_payroll/test/payslip.yml b/addons/hr_payroll/test/payslip.yml
index 1ecab075da0..f1c860f8edd 100644
--- a/addons/hr_payroll/test/payslip.yml
+++ b/addons/hr_payroll/test/payslip.yml
@@ -1,8 +1,16 @@
-
I test the 'Payment Advice' in order to check the hr_payroll in OpenERP
+-
+ I Create a bank record
+-
+ !record {model: res.partner.bank, id: res_partner_bank_0}:
+ acc_number: '987654321'
+ partner_id: base.res_partner_desertic_hispafuentes
+ sequence: 0.0
+ state: bank
-
I create a new employee “Richard”
--
+-
!record {model: hr.employee, id: hr_employee_richard0}:
address_home_id: base.res_partner_address_2
address_id: base.res_partner_address_9
@@ -24,10 +32,11 @@
name: Richard
pg_joining: '2009-12-01'
property_bank_account: account.cash
+ bank_account_id: res_partner_bank_0
salary_account: account.a_recv
vehicle_distance: 0.0
-
- I create a new payroll structure for software developer
+ I create a new payroll structure for software developer
-
!record {model: hr.payroll.structure, id: hr_payroll_structure_softwaredeveloper0}:
code: SD
@@ -75,58 +84,60 @@
name: Software Developer
-
I create a employee payslip record
--
+-
!record {model: hr.payslip, id: hr_payslip_0}:
bank_journal_id: account.bank_journal
employee_id: hr_payroll.hr_employee_richard0
journal_id: account.expenses_journal
--
+-
I click on 'Compute Sheet' button
--
+-
!workflow {model: hr.payslip, action: compute_sheet, ref: hr_payslip_0}
--
+-
+ just to test
+-
!python {model: hr.payslip}: |
self.compute_sheet(cr, uid, [ref("hr_payslip_0")], {"lang": "en_US", "tz": False,
"active_model": "ir.ui.menu", "department_id": False, "active_ids": [ref("hr_payroll.menu_department_tree")],
"section_id": False, "active_id": ref("hr_payroll.menu_department_tree"),
})
-
- I check that an order which was in the "New Slip" state has transit to "Wating for Verification" state
+ I check that the order is now in "Waiting for Verification" state
-
!python {model: hr.payslip}: |
from tools.translate import _
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
- assert(payslip_brw.state == 'draft'), _('State not changed!')
+ assert(payslip_brw.state == 'draft'), _('State not changed!')
+-
+ I click on Verify Sheet button.
-
- Then I click on Verify Sheet button
--
!workflow {model: hr.payslip, action: verify_sheet, ref: hr_payslip_0}
-
- I check that an order which was in the "Wating for Verification" state has transit to "Wating for HR Verification" state
+ I check that the order is in the "Waiting for HR Verification" state
-
!python {model: hr.payslip}: |
from tools.translate import _
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
- assert(payslip_brw.state == 'hr_check'), _('State not changed!')
+ assert(payslip_brw.state == 'hr_check'), _('State not changed!')
-
- Then I click on Complete HR Checking button
+ I click on Complete HR Checking button.
-
!workflow {model: hr.payslip, action: final_verify_sheet, ref: hr_payslip_0}
-
- I check that an order which was in the "'Wating for HR Verification'" state has transit to "Confirm Sheet" state
+ I check that the order is in "Confirm Sheet" state.
-
!python {model: hr.payslip}: |
from tools.translate import _
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
- assert(payslip_brw.state == 'confirm'), _('State not changed!')
--
- Then I click on Pay Salary button
--
+ assert(payslip_brw.state == 'confirm'), _('State not changed!')
+-
+ I click on Pay Salary button
+-
!workflow {model: hr.payslip, action: process_sheet, ref: hr_payslip_0}
-
- I check that an order which was in the "Confirm Sheet" state has transit to "Paid Salary" state
+ I check that the order is in "Paid Salary" state.
-
!python {model: hr.payslip}: |
from tools.translate import _
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
- assert(payslip_brw.state == 'done'), _('State not changed!')
+ assert(payslip_brw.state == 'done'), _('State not changed!')
diff --git a/addons/hr_payroll/wizard/hr_payroll_employees_detail.py b/addons/hr_payroll/wizard/hr_payroll_employees_detail.py
index 314dcfa94bb..c2d0e3c4116 100755
--- a/addons/hr_payroll/wizard/hr_payroll_employees_detail.py
+++ b/addons/hr_payroll/wizard/hr_payroll_employees_detail.py
@@ -63,7 +63,6 @@ class hr_payroll_employees_detail(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'employees.salary',
'datas': datas,
- 'nodestroy':True,
}
hr_payroll_employees_detail()
diff --git a/addons/hr_payroll/wizard/hr_payroll_year_salary.py b/addons/hr_payroll/wizard/hr_payroll_year_salary.py
index 0445d559f58..a7091540894 100755
--- a/addons/hr_payroll/wizard/hr_payroll_year_salary.py
+++ b/addons/hr_payroll/wizard/hr_payroll_year_salary.py
@@ -65,7 +65,6 @@ class hr_payroll_year_salary(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'year.salary',
'datas': datas,
- 'nodestroy':True,
}
hr_payroll_year_salary()
diff --git a/addons/hr_recruitment/test/test_hr_recruitment.yml b/addons/hr_recruitment/test/test_hr_recruitment.yml
index 3b865efe113..f5689b67787 100644
--- a/addons/hr_recruitment/test/test_hr_recruitment.yml
+++ b/addons/hr_recruitment/test/test_hr_recruitment.yml
@@ -1,91 +1,86 @@
-- |
- In order to test hr_recruitment module for OpenERP, I will create applicants form, Manages job positions and the recruitement process.
-- |
- I create job position for employee to manage job position.
-
- |
- For that First I create Department "R & D" in Department form for which I make recruitment.
--
+ In order to test hr_recruitment module for OpenERP, I will create applicants form, Manages job positions and the recruitment process.
+-
+
+ I create a department.
+-
!record {model: hr.department, id: hr_department_rd0}:
manager_id: base.user_root
name: 'R & D '
-
-- |
- Now I will create new Job Position. I will check successfull creation of new Job Position by adding the information.
--
+
+-
+ I create new Job Position.
+-
!record {model: hr.job, id: hr_job_jea0}:
department_id: 'hr_department_rd0'
- description: 'Position of Junier Application Engineer '
+ description: 'Position of Jr. Application Engineer'
expected_employees: 5
- name: 'JEA '
-- |
- Given that I have stage "Initial Jobs Demand".
--
+ name: 'JAE '
+-
+ I create a recruitment stage "Initial Jobs Demand".
+-
!record {model: hr.recruitment.stage, id: hr_recrutiment_stage_first0}:
name: 'Initial Jobs Demand'
- sequence: 1
-- |
- I create applicants for "Fresher" and specify job information for that applicant.
--
+ sequence: 1
+-
+ I create an applicant.
+-
!record {model: hr.applicant, id: hr_applicant_fresher0}:
availability: 0.0
department_id: hr.dep_it
name: Fresher
partner_address_id: base.res_partner_address_tang
partner_id: base.res_partner_asus
- partner_name: Jose
- partner_phone: '999666735'
+ partner_name: Marion Jones
+ partner_phone: '1111112223'
response: 0.0
salary_expected: 0.0
salary_proposed: 0.0
- stage_id: crm.stage_lead3
- type_id: hr_recruitment.type_job2
- stage_id: hr_recrutiment_stage_first0
-
-- |
- I check that applicant is on "draft" state.
+ stage_id: hr_recrutiment_stage_first0
+ type_id: hr_recruitment.degree_licenced
+
+-
+ I check that applicant is on "draft" state.
-
!assert {model: hr.applicant, id: hr_applicant_fresher0}:
- - state == 'draft'
-
-- |
- I start progress by click on "In Progress" button.
--
+ - state == 'draft'
+
+-
+ I change the state by click on "In Progress" button.
+-
!python {model: hr.applicant}: |
self.case_open(cr, uid, [ref("hr_applicant_fresher0")], {"active_ids": [ref("hr_recruitment.menu_crm_case_categ0_act_job")],
- })
+ })
-- |
- Given that I have case category "Employee".
+-
+ I create a new case category.
-
!record {model: crm.case.categ, id: crm_case_categ_employee0}:
name: 'Employee'
-
-- |
- I make phonecall for this applicant by click on "Schedule a Phone Call" button.
+
-
- !record {model: hr.recruitment.job2phonecall, id: hr_recruitment_forinterview0}:
+ I schedule a phonecall for this applicant by click on "Schedule a Phone Call" button.
+-
+ !record {model: hr.recruitment.job2phonecall, id: hr_recruitment_forinterview0}:
user_id: base.user_root
deadline: '05/28/2010 11:51:00'
note: 'For interview.'
category_id: 'crm_case_categ_employee0'
-
-- |
+
+-
I click on "Schedule phonecall" button of this wizard.
-
!python {model: hr.recruitment.job2phonecall}: |
- self.make_phonecall(cr, uid, [ref('hr_recruitment_forinterview0')], {'active_ids': [ref('hr_applicant_fresher0')]})
-
-- |
- I schedule meeting for interview of this applicant by click on "Schdule Meeting" button.
--
+ self.make_phonecall(cr, uid, [ref('hr_recruitment_forinterview0')], {'active_ids': [ref('hr_applicant_fresher0')]})
+
+-
+ I schedule meeting for interview of this applicant by click on "Schedule Meeting" button.
+-
!python {model: hr.applicant}: |
self.action_makeMeeting(cr, uid, [ref('hr_recruitment_forinterview0')])
-- |
- I can see that Meeting's calendar view is shown.
- then I click on the date on which I want schedule meeting.
- I fill proper data for that meeting and save it.
--
+-
+ I create an entry for the meeting with the applicant.
+-
!record {model: crm.meeting, id: crm_meeting_fresher0}:
alarm_id: base_calendar.alarm1
count: 0.0
@@ -101,15 +96,14 @@
rrule_type: none
state: open
user_id: base.user_root
-
-- |
- After Meeting of this applicant , I hired employee by click on "Hired" button of this form.
--
+
+-
+ On a successful meeting with the applicant, I hired employee by click on "Hired" button.
+-
!python {model: hr.applicant}: |
self.case_close(cr, uid, [ref('hr_applicant_fresher0')])
-- |
- I check that applicant state is "done".
+-
+ I check that applicant state is "Hired".
-
!assert {model: hr.applicant, id: hr_applicant_fresher0}:
- state == 'done'
-
\ No newline at end of file
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index a848fc6d352..730adebe049 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -154,9 +154,10 @@ class account_invoice(osv.osv):
inv = self.browse(cr, uid, [id])[0]
if inv.type == 'in_invoice':
+ obj_analytic_account = self.pool.get('account.analytic.account')
for il in iml:
if il['account_analytic_id']:
- to_invoice = self.pool.get('account.analytic.account').read(cr, uid, [il['account_analytic_id']], ['to_invoice'])[0]['to_invoice']
+ to_invoice = obj_analytic_account.read(cr, uid, [il['account_analytic_id']], ['to_invoice'])[0]['to_invoice']
if to_invoice:
il['analytic_lines'][0][2]['to_invoice'] = to_invoice[0]
return iml
diff --git a/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml b/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml
index 431c30d8cb1..51d507f1df0 100644
--- a/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml
+++ b/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml
@@ -1,8 +1,8 @@
-- |
+-
In order to test hr_timesheet_invoice in OpenERP, I create account line to manage invoice based on costs.
-- |
- In order to test flow, I create analytic line for sednacom analytic account.
--
+-
+ I create an account analytic line.
+-
!record {model: account.analytic.line, id: account_analytic_line_developyamlforhrmodule0}:
account_id: account.analytic_sednacom
amount: -1.0
@@ -17,17 +17,16 @@
unit_amount: 5.00
user_id: base.user_root
-- |
- Give partner name and price list in analytic account.
--
+-
+ Assign partner name and price list in analytic account.
+-
!record {model: account.analytic.account, id: account.analytic_sednacom}:
partner_id: base.res_partner_9
pricelist_id: product.list0
-
-- |
+
+-
I create invoice on analytic Line using "Invoice analytic Line" wizard.
- Give date , detail of each work , time spend on that work on this wizard.
--
+-
!record {model: hr.timesheet.invoice.create, id: hr_timesheet_invoice_create_0}:
accounts:
- account.analytic_sednacom
@@ -36,54 +35,50 @@
price: 1
product: hr_timesheet.product_consultant
time: 1
-
-- |
+
+-
I click on "Create Invoice" button of "Invoice analytic Line" wizard to create invoice.
--
+-
!python {model: hr.timesheet.invoice.create}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule0")]})
-
-- |
- I check that Invoice is create for this timesheet.
+
+-
+ I check that Invoice is created for this timesheet.
-
!python {model: account.analytic.line}: |
exp = self.browse(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')])[0]
-
analytic_account_obj = self.pool.get('account.analytic.account')
-
data = self.pool.get('hr.timesheet.invoice.create').read(cr, uid, [ref("hr_timesheet_invoice_create_0")], [], context)[0]
-
account_ids = data['accounts']
for account in analytic_account_obj.browse(cr, uid, account_ids, context):
partner = account.partner_id.id
-
+
invoice_obj = self.pool.get('account.invoice')
invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner)])
invoice_id = invoice_obj.browse(cr, uid, invoice_ids)[0]
for invoice in invoice_id.invoice_line:
product = invoice.product_id.id
-
+
product_exp = data['product']
assert product == product_exp
-- |
- I creating a final invoice for "Sednacom" analytic account.
--
+-
+ I create final invoice for this analytic account.
+-
!record {model: hr.timesheet.invoice.create.final, id: hr_timesheet_invoice_create_final_0}:
balance_product: hr_timesheet.product_consultant
date: 1
name: 1
price: 1
time: 1
-- |
- I click on "Create Invoice" button to create Invoice.
--
+-
+ I click on "Create Invoice" button to create Invoice.
+-
!python {model: hr.timesheet.invoice.create.final}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_final_0")], {"active_ids": [ref("account.analytic_sednacom")]})
-
-
-- |
- I can also make some theoretical revenue reports.
-- |
- I can also see timesheet profit using Timesheet profit report.
\ No newline at end of file
+
+-
+ I can also make some theoretical revenue reports.
+-
+ I can also see timesheet profit using Timesheet profit report.
\ No newline at end of file
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 1ed01c53281..57a1e4aaaa2 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -166,7 +166,7 @@ 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(data['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(context['active_ids']), product_id, factor_id))
line_ids = cr.dictfetchall()
note = []
@@ -188,7 +188,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
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(data['ids'])))
+ 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'])))
invoice_obj.button_reset_taxes(cr, uid, [last_invoice], context)
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index cc28c24c5ee..be04a9d5186 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -180,7 +180,7 @@
-
+
diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
index c21a5b36ebb..1486d7f9bb4 100644
--- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
+++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml
@@ -99,6 +99,7 @@
-
!python {model: hr_timesheet_sheet.sheet}: |
uid = ref('base.user_root')
+ import netsvc
for sheet in self.browse(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')]):
di = sheet.user_id.company_id.timesheet_max_difference
if (abs(sheet.total_difference) < di) or not di:
diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml
index 07f996942c5..5d0fe20c801 100644
--- a/addons/lunch/lunch_view.xml
+++ b/addons/lunch/lunch_view.xml
@@ -62,7 +62,7 @@
name="%(action_lunch_order_cancel)d"
string="Cancel Order"
type="action" states="confirmed"
- icon="terp-gtk-stop" />
+ icon="gtk-cancel" />
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 46e1e28ade7..787557145e3 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -674,7 +674,6 @@ class marketing_campaign_workitem(osv.osv):
'type' : 'ir.actions.report.xml',
'report_name': wi_obj.activity_id.report_id.report_name,
'datas' : datas,
- 'nodestroy': True,
}
else:
raise osv.except_osv(_('No preview'),_('The current step for this item has no email or report to preview.'))
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 2ffdd78e284..e7f5473b42a 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -81,7 +81,7 @@ class purchase_order(osv.osv):
res={}
purchase_obj=self.browse(cr, uid, ids, context=context)
for purchase in purchase_obj:
- res[purchase.id] = False
+ res[purchase.id] = time.strftime('%Y-%m-%d %H:%M:%S')
if purchase.order_line:
min_date=purchase.order_line[0].date_planned
for line in purchase.order_line:
diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml
index 4ded6620847..4d393b22435 100644
--- a/addons/sale_crm/sale_crm_view.xml
+++ b/addons/sale_crm/sale_crm_view.xml
@@ -37,7 +37,7 @@
+ help="My Sales Team(s)"/>
diff --git a/addons/sale_layout/i18n/fr.po b/addons/sale_layout/i18n/fr.po
index 41c3115135c..8786f6edb7d 100755
--- a/addons/sale_layout/i18n/fr.po
+++ b/addons/sale_layout/i18n/fr.po
@@ -1,21 +1,20 @@
-# translation of fr_FR.po to Français
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * sale_layout
+# French translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
#
-# Numerigraphe , 2009.
msgid ""
msgstr ""
-"Project-Id-Version: fr_FR\n"
-"Report-Msgid-Bugs-To: support@openerp.com\n"
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-11-26 08:45+0000\n"
-"PO-Revision-Date: 2010-01-19 05:23+0000\n"
-"Last-Translator: Numérigraphe \n"
-"Language-Team: Français\n"
+"PO-Revision-Date: 2010-07-29 08:56+0000\n"
+"Last-Translator: FULL NAME \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: 2010-05-21 03:45+0000\n"
+"X-Launchpad-Export-Date: 2010-07-30 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_layout
diff --git a/addons/survey/survey.py b/addons/survey/survey.py
index 8cac202fe40..a78fe55ea2d 100644
--- a/addons/survey/survey.py
+++ b/addons/survey/survey.py
@@ -124,7 +124,6 @@ class survey(osv.osv):
'type': 'ir.actions.report.xml',
'report_name': 'survey.browse.response',
'datas': datas,
- 'nodestroy': True,
'context' : context
}
else:
@@ -135,7 +134,6 @@ class survey(osv.osv):
'type': 'ir.actions.report.xml',
'report_name': 'survey.form',
'datas': datas,
- 'nodestroy':True,
'context' : context
}
return report