- [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]
+ [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]
- [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]
+ [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]
@@ -500,4 +500,4 @@
-
\ No newline at end of file
+
diff --git a/addons/account_payment/account_payment_demo.xml b/addons/account_payment/account_payment_demo.xml
index 37705a05b07..65a8d341da4 100644
--- a/addons/account_payment/account_payment_demo.xml
+++ b/addons/account_payment/account_payment_demo.xml
@@ -6,6 +6,7 @@
00987654321bank
+ Direct Payment
diff --git a/addons/account_payment/test/account_payment.yml b/addons/account_payment/test/account_payment.yml
index e65b3ba0b89..3d863686847 100644
--- a/addons/account_payment/test/account_payment.yml
+++ b/addons/account_payment/test/account_payment.yml
@@ -9,6 +9,7 @@
partner_id: base.res_partner_9
sequence: 0.0
state: bank
+ bank: base.res_bank_1
-
I created a new Payment Mode
diff --git a/addons/account_payment/wizard/account_payment_populate_statement.py b/addons/account_payment/wizard/account_payment_populate_statement.py
index 0e7ea32e8d3..d223c58316f 100644
--- a/addons/account_payment/wizard/account_payment_populate_statement.py
+++ b/addons/account_payment/wizard/account_payment_populate_statement.py
@@ -91,7 +91,8 @@ class account_payment_populate_statement(osv.osv_memory):
'period_id': statement.period_id.id
}
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
- result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment')
+ context.update({'move_line_ids': [line.move_line_id.id]})
+ result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment', context=context)
voucher_line_dict = False
if result['value']['line_ids']:
for line_dict in result['value']['line_ids']:
diff --git a/addons/account_voucher/__init__.py b/addons/account_voucher/__init__.py
index 27aee55f2d7..41f33976c53 100644
--- a/addons/account_voucher/__init__.py
+++ b/addons/account_voucher/__init__.py
@@ -19,7 +19,7 @@
#
##############################################################################
-import voucher
+import account_voucher
import report
import wizard
diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py
index 3a846791c23..59495eddc5f 100644
--- a/addons/account_voucher/__openerp__.py
+++ b/addons/account_voucher/__openerp__.py
@@ -38,22 +38,22 @@
"update_xml" : [
"security/ir.model.access.csv",
- "voucher_sequence.xml",
- "voucher_workflow.xml",
- "voucher_report.xml",
+ "account_voucher_sequence.xml",
+ "account_voucher_workflow.xml",
+ "account_voucher_report.xml",
"wizard/account_voucher_unreconcile_view.xml",
"wizard/account_statement_from_invoice_view.xml",
- "voucher_view.xml",
+ "account_voucher_view.xml",
"voucher_payment_receipt_view.xml",
"voucher_sales_purchase_view.xml",
- "voucher_wizard.xml",
+ "account_voucher_wizard.xml",
"security/account_voucher_security.xml"
],
"test" : [
# "test/account_voucher.yml",
"test/sales_receipt.yml",
"test/sales_payment.yml",
- "test/account_voucher_report.yml"
+ "test/account_voucher_report.yml"
],
'certificate': '0037580727101',
"active": False,
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/account_voucher.py
similarity index 94%
rename from addons/account_voucher/voucher.py
rename to addons/account_voucher/account_voucher.py
index f0a4db96910..2ea6e4b39ab 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -48,7 +48,7 @@ account_move_line()
class account_voucher(osv.osv):
def _get_type(self, cr, uid, ids, context={}):
return context.get('type', False)
-
+
def _get_period(self, cr, uid, context={}):
if context.get('period_id', False):
return context.get('period_id')
@@ -61,7 +61,7 @@ class account_voucher(osv.osv):
return context.get('journal_id')
if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
return context.get('search_default_journal_id')
-
+
ttype = context.get('type', 'bank')
if ttype in ('payment', 'receipt'):
ttype = 'bank'
@@ -77,7 +77,7 @@ class account_voucher(osv.osv):
if not res:
return False
journal_id = res[0]
-
+
if not journal_id:
return False
journal = journal_pool.browse(cr, uid, journal_id)
@@ -109,7 +109,7 @@ class account_voucher(osv.osv):
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
return []
- return [(r['id'], (str(r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')]
+ return [(r['id'], (str("%.2f" % r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')]
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
res = super(account_voucher,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
@@ -187,33 +187,33 @@ class account_voucher(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
'tax_id': _get_tax,
}
-
+
def compute_tax(self, cr, uid, ids, context={}):
tax_pool = self.pool.get('account.tax')
partner_pool = self.pool.get('res.partner')
position_pool = self.pool.get('account.fiscal.position')
voucher_line_pool = self.pool.get('account.voucher.line')
voucher_pool = self.pool.get('account.voucher')
-
+
for voucher in voucher_pool.browse(cr, uid, ids, context):
voucher_amount = 0.0
for line in voucher.line_ids:
voucher_amount += line.untax_amount or line.amount
line.amount = line.untax_amount or line.amount
voucher_line_pool.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount})
-
+
if not voucher.tax_id:
self.write(cr, uid, [voucher.id], {'amount':voucher_amount, 'tax_amount':0.0})
continue
-
+
tax = [tax_pool.browse(cr, uid, voucher.tax_id.id)]
partner = partner_pool.browse(cr, uid, voucher.partner_id.id) or False
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
tax = tax_pool.browse(cr, uid, taxes)
-
+
total = voucher_amount
total_tax = 0.0
-
+
if not tax[0].price_include:
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes',[]):
total_tax += tax_line.get('amount')
@@ -223,17 +223,17 @@ class account_voucher(osv.osv):
for line in voucher.line_ids:
line_total = 0.0
line_tax = 0.0
-
+
for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes',[]):
line_tax += tax_line.get('amount')
line_total += tax_line.get('price_unit')
total_tax += line_tax
untax_amount = line.untax_amount or line.amount
voucher_line_pool.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount})
-
+
self.write(cr, uid, [voucher.id], {'amount':total, 'tax_amount':total_tax})
return True
-
+
def onchange_price(self, cr, uid, ids, line_ids, tax_id, partner_id=False, context={}):
tax_pool = self.pool.get('account.tax')
partner_pool = self.pool.get('res.partner')
@@ -246,16 +246,16 @@ class account_voucher(osv.osv):
voucher_total_tax = 0.0
voucher_total = 0.0
voucher_line_ids = []
-
+
total = 0.0
total_tax = 0.0
-
+
for line in line_ids:
line_amount = 0.0
line_amount = line[2].get('amount')
voucher_line_ids += [line[1]]
voucher_total += line_amount
-
+
total = voucher_total
total_tax = 0.0
if tax_id:
@@ -264,12 +264,12 @@ class account_voucher(osv.osv):
partner = partner_pool.browse(cr, uid, partner_id) or False
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
tax = tax_pool.browse(cr, uid, taxes)
-
+
if not tax[0].price_include:
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes',[]):
total_tax += tax_line.get('amount')
total += total_tax
-
+
res.update({
'amount':total or voucher_total,
'tax_amount':total_tax
@@ -277,7 +277,7 @@ class account_voucher(osv.osv):
return {
'value':res
}
-
+
def onchange_term_id(self, cr, uid, ids, term_id, amount):
term_pool = self.pool.get('account.payment.term')
terms = False
@@ -291,24 +291,24 @@ class account_voucher(osv.osv):
'date_due':due_date
})
return {'value':default}
-
+
def onchange_journal_voucher(self, cr, uid, ids, line_ids=False, tax_id=False, price=0.0, partner_id=False, journal_id=False, ttype=False, context={}):
"""price
Returns a dict that contains new values and context
-
+
@param partner_id: latest value from user input for field partner_id
@param args: other arguments
@param context: context arguments, like lang, time zone
-
+
@return: Returns a dict which contains new values, and context
"""
default = {
'value':{},
}
-
+
if not partner_id or not journal_id:
return default
-
+
partner_pool = self.pool.get('res.partner')
journal_pool = self.pool.get('account.journal')
@@ -328,32 +328,35 @@ class account_voucher(osv.osv):
default['value']['account_id'] = account_id
default['value']['type'] = ttype or tr_type
-
+
vals = self.onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context)
default['value'].update(vals.get('value'))
-
+
return default
-
- def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context={}):
+
+ def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None):
"""price
Returns a dict that contains new values and context
-
+
@param partner_id: latest value from user input for field partner_id
@param args: other arguments
@param context: context arguments, like lang, time zone
-
+
@return: Returns a dict which contains new values, and context
"""
if not journal_id:
return {}
-
+
+ if context is None:
+ context = {}
+
currency_pool = self.pool.get('res.currency')
move_pool = self.pool.get('account.move')
line_pool = self.pool.get('account.voucher.line')
move_line_pool = self.pool.get('account.move.line')
partner_pool = self.pool.get('res.partner')
journal_pool = self.pool.get('account.journal')
-
+
vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context)
vals = vals.get('value')
currency_id = vals.get('currency_id', currency_id)
@@ -383,7 +386,7 @@ class account_voucher(osv.osv):
default['value']['account_id'] = account_id
if journal.type not in ('cash', 'bank'):
return default
-
+
total_credit = 0.0
total_debit = 0.0
account_type = 'receivable'
@@ -393,21 +396,25 @@ class account_voucher(osv.osv):
else:
total_credit = price or 0.0
account_type = 'receivable'
- ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
+
+ if not context.get('move_line_ids', False):
+ ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
+ else:
+ ids = context['move_line_ids']
ids.reverse()
moves = move_line_pool.browse(cr, uid, ids)
-
+
company_currency = journal.company_id.currency_id.id
if company_currency != currency_id and ttype == 'payment':
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit)
elif company_currency != currency_id and ttype == 'receipt':
total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit)
-
+
for line in moves:
if line.credit and line.reconcile_partial_id and ttype == 'receipt':
continue
if line.debit and line.reconcile_partial_id and ttype == 'payment':
- continue
+ continue
total_credit += line.credit or 0.0
total_debit += line.debit or 0.0
@@ -416,7 +423,7 @@ class account_voucher(osv.osv):
continue
if line.debit and line.reconcile_partial_id and ttype == 'payment':
continue
-
+
orignal_amount = line.credit or line.debit or 0.0
rs = {
'name':line.move_id.name,
@@ -442,11 +449,11 @@ class account_voucher(osv.osv):
default['value']['line_cr_ids'].append(rs)
else:
default['value']['line_dr_ids'].append(rs)
-
+
if ttype == 'payment' and len(default['value']['line_cr_ids']) > 0:
default['value']['pre_line'] = 1
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
- default['value']['pre_line'] = 1
+ default['value']['pre_line'] = 1
return default
def onchange_date(self, cr, user, ids, date, context={}):
@@ -475,7 +482,7 @@ class account_voucher(osv.osv):
tax_id = False
if account_id and account_id.tax_ids:
tax_id = account_id.tax_ids[0].id
-
+
vals = self.onchange_price(cr, uid, ids, line_ids, tax_id, partner_id, context)
vals['value'].update({'tax_id':tax_id})
currency_id = journal.company_id.currency_id.id
@@ -499,7 +506,7 @@ class account_voucher(osv.osv):
reconcile_pool = self.pool.get('account.move.reconcile')
move_pool = self.pool.get('account.move')
voucher_line_pool = self.pool.get('account.voucher.line')
-
+
for voucher in self.browse(cr, uid, ids):
recs = []
for line in voucher.move_ids:
@@ -509,7 +516,7 @@ class account_voucher(osv.osv):
recs += [line.reconcile_partial_id.id]
reconcile_pool.unlink(cr, uid, recs)
-
+
if voucher.move_id:
move_pool.button_cancel(cr, uid, [voucher.move_id.id])
move_pool.unlink(cr, uid, [voucher.move_id.id])
@@ -547,7 +554,7 @@ class account_voucher(osv.osv):
return {'value':res}
def action_move_line_create(self, cr, uid, ids, context=None):
-
+
def _get_payment_term_lines(term_id, amount):
term_pool = self.pool.get('account.payment.term')
if term_id and amount:
@@ -561,10 +568,11 @@ class account_voucher(osv.osv):
analytic_pool = self.pool.get('account.analytic.line')
currency_pool = self.pool.get('res.currency')
invoice_pool = self.pool.get('account.invoice')
+ bank_st_line_obj = self.pool.get('account.bank.statement.line')
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
- if inv.number:
+ if inv.number:
name = inv.number
elif inv.journal_id.sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, inv.journal_id.sequence_id.id)
@@ -580,12 +588,17 @@ class account_voucher(osv.osv):
'period_id': inv.period_id and inv.period_id.id or False
}
move_id = move_pool.create(cr, uid, move)
-
+ line_bank_ids = bank_st_line_obj.search(cr, uid, [('voucher_id', '=', inv.id)], context=context)
+ if line_bank_ids:
+ bank_st_line_obj.write(cr, uid, line_bank_ids, {
+ 'move_ids': [(4, move_id, False)]
+ })
+
#create the first line manually
company_currency = inv.journal_id.company_id.currency_id.id
debit = 0.0
credit = 0.0
- # TODO: is there any other alternative then the voucher type ??
+ # TODO: is there any other alternative then the voucher type ??
# -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 inv.type in ('purchase', 'payment'):
credit = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
@@ -597,7 +610,7 @@ class account_voucher(osv.osv):
if credit < 0:
debit = -credit
credit = 0.0
-
+
move_line = {
'name':inv.name or '/',
'debit':debit,
@@ -627,7 +640,7 @@ class account_voucher(osv.osv):
if not line.amount:
continue
amount = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, line.amount)
-
+
move_line = {
'journal_id':inv.journal_id.id,
'period_id':inv.period_id.id,
@@ -649,7 +662,7 @@ class account_voucher(osv.osv):
line.type = 'cr'
else:
line.type = 'dr'
-
+
if (line.type=='dr'):
line_total += amount
move_line['debit'] = amount
@@ -716,7 +729,7 @@ class account_voucher_line(osv.osv):
_name = 'account.voucher.line'
_description = 'Voucher Lines'
_order = "move_line_id"
-
+
def _compute_balance(self, cr, uid, ids, name, args, context=None):
currency_pool = self.pool.get('res.currency')
rs_data = {}
@@ -725,16 +738,16 @@ class account_voucher_line(osv.osv):
company_currency = line.voucher_id.journal_id.company_id.currency_id.id
voucher_currency = line.voucher_id.currency_id.id
move_line = line.move_line_id or False
-
+
if not move_line:
res['amount_original'] = 0.0
res['amount_unreconciled'] = 0.0
-
+
elif move_line and move_line.credit > 0:
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit)
else:
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit)
-
+
if move_line:
res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.amount_unreconciled)
rs_data[line.id] = res
@@ -767,7 +780,7 @@ class account_voucher_line(osv.osv):
@param move_line_id: latest value from user input for field move_line_id
@param args: other arguments
@param context: context arguments, like lang, time zone
-
+
@return: Returns a dict which contains new values, and context
"""
res = {}
@@ -793,9 +806,9 @@ class account_voucher_line(osv.osv):
def default_get(self, cr, user, fields_list, context=None):
"""
Returns default values for fields
- @param fields_list: list of fields, for which default values are required to be read
+ @param fields_list: list of fields, for which default values are required to be read
@param context: context arguments, like lang, time zone
-
+
@return: Returns a dict that contains default values for fields
"""
journal_id = context.get('journal_id', False)
@@ -834,14 +847,26 @@ account_voucher_line()
class account_bank_statement(osv.osv):
_inherit = 'account.bank.statement'
+ def button_cancel(self, cr, uid, ids, context=None):
+ done = []
+ for st in self.browse(cr, uid, ids, context):
+ voucher_ids = []
+ for line in st.line_ids:
+ if line.voucher_id:
+ voucher_ids.append(line.voucher_id.id)
+ self.pool.get('account.voucher').cancel_voucher(cr, uid, voucher_ids, context)
+ self.pool.get('account.voucher').unlink(cr, uid, voucher_ids, context)
+ return super(account_bank_statement, self).button_cancel(cr, uid, ids, context=context)
+
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, next_number, context=None):
+ voucher_obj = self.pool.get('account.voucher')
+ wf_service = netsvc.LocalService("workflow")
st_line = self.pool.get('account.bank.statement.line').browse(cr, uid, st_line_id, context=context)
if st_line.voucher_id:
- self.pool.get('account.voucher').write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
- wf_service = netsvc.LocalService("workflow")
+ voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
- return self.pool.get('account.move.line').write(cr, uid, [x.id for x in st_line.voucher_id.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
- return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line, company_currency_id, next_number, context=context)
+ return self.pool.get('account.move.line').write(cr, uid, [x.id for x in st_line.voucher_id.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
+ return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
account_bank_statement()
@@ -851,17 +876,18 @@ class account_bank_statement_line(osv.osv):
def _amount_reconciled(self, cursor, user, ids, name, args, context=None):
if not ids:
return {}
+
res_currency_obj = self.pool.get('res.currency')
res = {}
company_currency_id = False
-
for line in self.browse(cursor, user, ids, context=context):
- if not company_currency_id:
- company_currency_id = line.company_id.id
+# if not company_currency_id:
+# company_currency_id = line.company_id.id
if line.voucher_id:
- res[line.id] = res_currency_obj.compute(cursor, user,
- company_currency_id, line.statement_id.currency.id,
- line.voucher_id.amount, context=context)
+ res[line.id] = line.voucher_id.amount#
+# res_currency_obj.compute(cursor, user,
+# company_currency_id, line.statement_id.currency.id,
+# line.voucher_id.amount, context=context)
else:
res[line.id] = 0.0
return res
@@ -877,7 +903,8 @@ class account_bank_statement_line(osv.osv):
statement_line = self.browse(cr, uid, ids, context)
unlink_ids = []
for st_line in statement_line:
- unlink_ids.append(st_line.voucher_id.id)
+ if st_line.voucher_id:
+ unlink_ids.append(st_line.voucher_id.id)
self.pool.get('account.voucher').unlink(cr, uid, unlink_ids, context=context)
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
diff --git a/addons/account_voucher/voucher_report.xml b/addons/account_voucher/account_voucher_report.xml
similarity index 80%
rename from addons/account_voucher/voucher_report.xml
rename to addons/account_voucher/account_voucher_report.xml
index 04bcb5254ba..db1b4279620 100644
--- a/addons/account_voucher/voucher_report.xml
+++ b/addons/account_voucher/account_voucher_report.xml
@@ -5,17 +5,17 @@
string="Voucher"
model="account.voucher"
name="voucher.cash_receipt.drcr"
- rml="account_voucher/report/report_voucher.rml"
+ rml="account_voucher/report/account_voucher.rml"
groups="base.group_extended"
auto="False"
header = "False"
menu="True"/>
-
+
diff --git a/addons/account_voucher/voucher_sequence.xml b/addons/account_voucher/account_voucher_sequence.xml
similarity index 100%
rename from addons/account_voucher/voucher_sequence.xml
rename to addons/account_voucher/account_voucher_sequence.xml
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/account_voucher_view.xml
similarity index 92%
rename from addons/account_voucher/voucher_view.xml
rename to addons/account_voucher/account_voucher_view.xml
index 972850e0114..d066c91ad0e 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/account_voucher_view.xml
@@ -193,9 +193,8 @@
-
-
- account.bank.statement.voucher.form.inherit
+
+ account.bank.statement.voucher.tree.inheritaccount.bank.statementform
@@ -207,5 +206,19 @@
+
+ account.bank.statement.voucher.form.inherit
+ account.bank.statement
+ form
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account_voucher/voucher_wizard.xml b/addons/account_voucher/account_voucher_wizard.xml
similarity index 100%
rename from addons/account_voucher/voucher_wizard.xml
rename to addons/account_voucher/account_voucher_wizard.xml
diff --git a/addons/account_voucher/voucher_workflow.xml b/addons/account_voucher/account_voucher_workflow.xml
similarity index 100%
rename from addons/account_voucher/voucher_workflow.xml
rename to addons/account_voucher/account_voucher_workflow.xml
diff --git a/addons/account_voucher/report/__init__.py b/addons/account_voucher/report/__init__.py
index eb69b63d856..b451c21b6a0 100644
--- a/addons/account_voucher/report/__init__.py
+++ b/addons/account_voucher/report/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,9 +15,9 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
-import report_voucher
-import report_voucher_print
+import account_voucher
+import account_voucher_print
diff --git a/addons/account_voucher/report/report_voucher.py b/addons/account_voucher/report/account_voucher.py
similarity index 97%
rename from addons/account_voucher/report/report_voucher.py
rename to addons/account_voucher/report/account_voucher.py
index d83c319d1ba..7655f294bf9 100644
--- a/addons/account_voucher/report/report_voucher.py
+++ b/addons/account_voucher/report/account_voucher.py
@@ -67,6 +67,6 @@ class report_voucher(report_sxw.rml_parse):
report_sxw.report_sxw(
'report.voucher.cash_receipt.drcr',
'account.voucher',
- 'addons/account_voucher/report/report_voucher.rml',
+ 'addons/account_voucher/report/account_voucher.rml',
parser=report_voucher,header="external"
)
diff --git a/addons/account_voucher/report/report_voucher.rml b/addons/account_voucher/report/account_voucher.rml
similarity index 100%
rename from addons/account_voucher/report/report_voucher.rml
rename to addons/account_voucher/report/account_voucher.rml
diff --git a/addons/account_voucher/report/report_voucher_print.py b/addons/account_voucher/report/account_voucher_print.py
similarity index 97%
rename from addons/account_voucher/report/report_voucher_print.py
rename to addons/account_voucher/report/account_voucher_print.py
index 6f405bbe975..0da644c6e4f 100644
--- a/addons/account_voucher/report/report_voucher_print.py
+++ b/addons/account_voucher/report/account_voucher_print.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -37,7 +37,7 @@ class report_voucher_print(report_sxw.rml_parse):
def convert(self, amount, cur):
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
return amt_en
-
+
def get_lines(self,voucher):
result = []
if voucher.type in ('payment','receipt'):
@@ -67,13 +67,13 @@ class report_voucher_print(report_sxw.rml_parse):
res['amount'] = amount
result.append(res)
return result
-
+
def get_title(self, type):
title = ''
if type:
title = type[0].swapcase() + type[1:] + " Voucher"
return title
-
+
def get_on_account(self, voucher):
name = ""
if voucher.type == 'receipt':
@@ -85,10 +85,10 @@ class report_voucher_print(report_sxw.rml_parse):
elif voucher.type == 'purchase':
name = "Purchase from "+str(voucher.partner_id.name)
return name
-
+
report_sxw.report_sxw(
'report.voucher.print',
'account.voucher',
- 'addons/account_voucher/report/report_voucher_print.rml',
+ 'addons/account_voucher/report/account_voucher_print.rml',
parser=report_voucher_print,header="external"
)
diff --git a/addons/account_voucher/report/report_voucher_print.rml b/addons/account_voucher/report/account_voucher_print.rml
similarity index 100%
rename from addons/account_voucher/report/report_voucher_print.rml
rename to addons/account_voucher/report/account_voucher_print.rml
diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py
index eb88ae5222c..926647afae1 100644
--- a/addons/account_voucher/wizard/account_statement_from_invoice.py
+++ b/addons/account_voucher/wizard/account_statement_from_invoice.py
@@ -71,9 +71,9 @@ class account_statement_from_invoice_lines(osv.osv_memory):
elif (line.invoice and line.invoice.currency_id.id <> statement.currency.id):
amount = currency_obj.compute(cr, uid, line.invoice.currency_id.id,
statement.currency.id, amount, context=ctx)
-
+
voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt') ,
- 'name': line.name,
+ 'name': line.name,
'partner_id': line.partner_id.id,
'journal_id': statement.journal_id.id,
'account_id': line.account_id.id,
@@ -83,7 +83,8 @@ class account_statement_from_invoice_lines(osv.osv_memory):
'amount':abs(amount),
'period_id':statement.period_id.id}
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
- result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'))
+ context.update({'move_line_ids': [line.id]})
+ result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), context=context)
voucher_line_dict = False
if result['value']['line_ids']:
for line_dict in result['value']['line_ids']:
diff --git a/addons/analytic/i18n/nl.po b/addons/analytic/i18n/nl.po
index b977c30283b..fbb8b85789d 100644
--- a/addons/analytic/i18n/nl.po
+++ b/addons/analytic/i18n/nl.po
@@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
-"PO-Revision-Date: 2010-09-24 14:42+0000\n"
-"Last-Translator: FULL NAME \n"
+"PO-Revision-Date: 2010-10-01 11:59+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: Dutch \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 05:17+0000\n"
+"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
-msgstr ""
+msgstr "Subrekeningen"
#. module: analytic
#: help:account.analytic.line,amount_currency:0
@@ -28,27 +28,31 @@ msgid ""
"The amount expressed in the related account currency if not equal to the "
"company one."
msgstr ""
+"Het bedrag in de valuta van de gekoppelde rekening als deze afwijkt van die "
+"van het bedrijf"
#. module: analytic
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
+"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten !"
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
-msgstr ""
+msgstr "Naam rekening"
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
-msgstr ""
+msgstr "Het aantal te rekenen eenheden"
#. module: analytic
#: help:account.analytic.line,currency_id:0
msgid "The related account currency if not equal to the company one."
msgstr ""
+"De valuta van de gekoppelde rekening wijkt af van die van het bedrijf."
#. module: analytic
#: model:ir.module.module,description:analytic.module_meta_information
@@ -56,31 +60,33 @@ msgid ""
"Module for defining analytic accounting object.\n"
" "
msgstr ""
+"Module voor het definiëren van kostenplaatsen.\n"
+" "
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
-msgstr ""
+msgstr "Status"
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
-msgstr ""
+msgstr "Rekeningbeheerder"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
-msgstr ""
+msgstr "Concept"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
-msgstr ""
+msgstr "Gesloten"
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
-msgstr ""
+msgstr "Debit"
#. module: analytic
#: help:account.analytic.account,state:0
@@ -100,32 +106,46 @@ msgid ""
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
+"* Nadat de rekening is gemaakt, wordt de status 'Concept'. "
+" \n"
+"* Als er een gekoppelde relatie is, kan de status naar 'Open'. "
+" \n"
+"* Als er openstaand saldo is, kan de status naar 'Wacht'. "
+" \n"
+"* En tenslotte als alle transacties klaar zijn, dan gaat de status naar "
+"'Gesloten'. \n"
+"* Het project kan zowel in 'Sjabloon' als in 'Lopend' zijn.\n"
+" Als het in 'Sjabloon' status is, dan kunnen we projecten maken op basis van "
+"het sjabloon project. Als het status 'Lopend' heeft, dan is het een gewoon "
+"project. \n"
+" Als het moet worden nagekeken is de status 'Wacht'.\n"
+" Als het project klaar is dan is de status 'Klaar'."
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
-msgstr ""
+msgstr "Rekeningsoort"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
-msgstr ""
+msgstr "Sjabloon"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
-msgstr ""
+msgstr "Wacht"
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
-msgstr ""
+msgstr "Kostenplaatsboeking"
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
-msgstr ""
+msgstr "Omschrijving"
#. module: analytic
#: help:account.analytic.line,amount:0
@@ -133,133 +153,134 @@ msgid ""
"Calculated by multiplying the quantity and the price given in the Product's "
"cost price."
msgstr ""
+"Berekend door het aantal en de product kostprijs te vermenigvuldigen."
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
-msgstr ""
+msgstr "Bedrijf"
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
-msgstr ""
+msgstr "Maximum aantal"
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
-msgstr ""
+msgstr "Gebruiker"
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
-msgstr ""
+msgstr "Bovenliggende kostenplaats"
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
-msgstr ""
+msgstr "Datum"
#. module: analytic
#: field:account.analytic.account,currency_id:0
#: field:account.analytic.line,currency_id:0
msgid "Account currency"
-msgstr ""
+msgstr "Kostenplaats valuta"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
-msgstr ""
+msgstr "Weergave"
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of quantity of hours."
-msgstr ""
+msgstr "Stelt de bovengrens in van het aantal uren."
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
-msgstr ""
+msgstr "Credit"
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
-msgstr ""
+msgstr "Bedrag"
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
-msgstr ""
+msgstr "Contactpersoon"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
-msgstr ""
+msgstr "Geannuleerd"
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
-msgstr ""
+msgstr "Saldo"
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
-msgstr ""
+msgstr "Begindatum"
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
-msgstr ""
+msgstr "Aantal"
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
-msgstr ""
+msgstr "Einddatum"
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
-msgstr ""
+msgstr "Rekeningcode"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
-msgstr ""
+msgstr "Normaal"
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
-msgstr ""
+msgstr "Volledige naam kostenplaats"
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
#: model:ir.module.module,shortdesc:analytic.module_meta_information
msgid "Analytic Account"
-msgstr ""
+msgstr "Kostenplaats"
#. module: analytic
#: field:account.analytic.account,company_currency_id:0
msgid "Currency"
-msgstr ""
+msgstr "Valuta"
#. module: analytic
#: field:account.analytic.line,amount_currency:0
msgid "Amount currency"
-msgstr ""
+msgstr "Bedrag in valuta"
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
-msgstr ""
+msgstr "Gekoppelde relatie"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
-msgstr ""
+msgstr "Open"
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
-msgstr ""
+msgstr "Kostenplaatsboekingen"
diff --git a/addons/base_action_rule/i18n/nl.po b/addons/base_action_rule/i18n/nl.po
index 794fc75af49..6d6bc8f3d25 100644
--- a/addons/base_action_rule/i18n/nl.po
+++ b/addons/base_action_rule/i18n/nl.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-19 12:20+0000\n"
-"PO-Revision-Date: 2010-09-12 15:32+0000\n"
-"Last-Translator: FULL NAME \n"
+"PO-Revision-Date: 2010-10-02 08:12+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: Dutch \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 05:18+0000\n"
+"X-Launchpad-Export-Date: 2010-10-03 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_action_rule
@@ -22,68 +22,72 @@ msgstr ""
msgid ""
"Check this if you want the rule to send an email to the responsible person."
msgstr ""
+"Vink dit aan wanneer de regel een email moet versturen naar de "
+"verantwoordelijke persoon."
#. module: base_action_rule
#: field:base.action.rule,act_remind_partner:0
msgid "Remind Partner"
-msgstr ""
+msgstr "Relatie herinneren"
#. module: base_action_rule
#: field:base.action.rule,trg_partner_categ_id:0
msgid "Partner Category"
-msgstr ""
+msgstr "Relatiecategorie"
#. module: base_action_rule
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Ongeldige naam van het model in de actie definitie."
#. module: base_action_rule
#: help:base.action.rule,act_remind_user:0
msgid ""
"Check this if you want the rule to send a reminder by email to the user."
msgstr ""
+"Vink dit aan wanneer u wilt dat de regel de gebruiker via de mail een "
+"herinnering stuurt."
#. module: base_action_rule
#: field:base.action.rule,trg_state_to:0
msgid "Button Pressed"
-msgstr ""
+msgstr "Knop ingedrukt"
#. module: base_action_rule
#: field:base.action.rule,model_id:0
msgid "Object"
-msgstr ""
+msgstr "Object"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_email:0
msgid "Mail to these Emails"
-msgstr ""
+msgstr "Mail naar deze emails"
#. module: base_action_rule
#: field:base.action.rule,act_state:0
msgid "Set State to"
-msgstr ""
+msgstr "Zet status op"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Body"
-msgstr ""
+msgstr "Email bericht"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Days"
-msgstr ""
+msgstr "Dagen"
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:0
#, python-format
msgid "Error!"
-msgstr ""
+msgstr "Fout!"
#. module: base_action_rule
#: field:base.action.rule,act_reply_to:0
msgid "Reply-To"
-msgstr ""
+msgstr "Antwoord naar"
#. module: base_action_rule
#: help:base.action.rule,act_email_cc:0
@@ -91,128 +95,132 @@ msgid ""
"These people will receive a copy of the future communication between partner "
"and users by email"
msgstr ""
+"Deze personen krijgen via email een kopie van toekomstige communicatie "
+"tussen relatie en gebruikers"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Minutes"
-msgstr ""
+msgstr "Minuten"
#. module: base_action_rule
#: field:base.action.rule,name:0
msgid "Rule Name"
-msgstr ""
+msgstr "Regelnaam"
#. module: base_action_rule
#: help:base.action.rule,act_remind_partner:0
msgid ""
"Check this if you want the rule to send a reminder by email to the partner."
msgstr ""
+"Aanvinken als u wilt dat de regel de relatie een herinnering via email "
+"stuurt."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Reminders"
-msgstr ""
+msgstr "Email herinneringen"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Partner"
-msgstr ""
+msgstr "Voorwaarden op relatiemodel"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Deadline"
-msgstr ""
+msgstr "Uiterste datum"
#. module: base_action_rule
#: field:base.action.rule,trg_partner_id:0
msgid "Partner"
-msgstr ""
+msgstr "Relatie"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_subject)s = Object subject"
-msgstr ""
+msgstr "%(object_subject)s = Object onderwerp"
#. module: base_action_rule
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr ""
+msgstr "Ongeldige XML voor weergave opbouw!"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Special Keywords to Be Used in The Body"
-msgstr ""
+msgstr "Speciale sleutelwoorden die in het bericht kunnen worden gebruikt"
#. module: base_action_rule
#: field:base.action.rule,trg_state_from:0
msgid "State"
-msgstr ""
+msgstr "Status"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_email:0
msgid "Email-id of the persons whom mail is to be sent"
-msgstr ""
+msgstr "Email-id van de personen waarvan de mail wordt verstuurd"
#. module: base_action_rule
#: view:base.action.rule:0
#: model:ir.module.module,shortdesc:base_action_rule.module_meta_information
msgid "Action Rule"
-msgstr ""
+msgstr "Actieregel"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Fields to Change"
-msgstr ""
+msgstr "Te veranderen velden"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Creation Date"
-msgstr ""
+msgstr "Aanmaakdatum"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Last Action Date"
-msgstr ""
+msgstr "Laatste actiedatum"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Hours"
-msgstr ""
+msgstr "Uren"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_id)s = Object ID"
-msgstr ""
+msgstr "%(object_id)s = Object ID"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Delay After Trigger Date"
-msgstr ""
+msgstr "Vertraging na Activeerdatum"
#. module: base_action_rule
#: field:base.action.rule,act_remind_attach:0
msgid "Remind with Attachment"
-msgstr ""
+msgstr "Herinneren met bijlage"
#. module: base_action_rule
#: constraint:ir.cron:0
msgid "Invalid arguments"
-msgstr ""
+msgstr "Ongeldige argumenten"
#. module: base_action_rule
#: field:base.action.rule,act_user_id:0
msgid "Set Responsible to"
-msgstr ""
+msgstr "Zet verantwoordelijke op"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "None"
-msgstr ""
+msgstr "Geen"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_phone)s = Responsible phone"
-msgstr ""
+msgstr "%(object_user_phone)s = Telefoon verantwoordelijke"
#. module: base_action_rule
#: view:base.action.rule:0
@@ -220,11 +228,14 @@ msgid ""
"The rule uses the AND operator. The model must match all non-empty fields so "
"that the rule executes the action described in the 'Actions' tab."
msgstr ""
+"De regel gebruikt een EN bewerking. Het model moet met alle niet-lege velden "
+"overeenkomen om de regel de in de 'Acties' tab beschreven actie te laten "
+"uitvoeren."
#. module: base_action_rule
#: field:base.action.rule,trg_date_range_type:0
msgid "Delay type"
-msgstr ""
+msgstr "Soort vertraging"
#. module: base_action_rule
#: help:base.action.rule,regex_name:0
@@ -234,11 +245,15 @@ msgid ""
"string 'urgent'\n"
"Note: This is case sensitive search."
msgstr ""
+"Reguliere expressie voor overeenkomende naam van de bron; \n"
+"i.e.: 'urgent.*' zal zoeken naar records met de naam beginnend met de tekst "
+"'urgent'\n"
+"Opmerking: dit zoeken is hoofdletter gevoelig."
#. module: base_action_rule
#: field:base.action.rule,act_method:0
msgid "Call Object Method"
-msgstr ""
+msgstr "Object-methode aanroepen"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_watchers:0
@@ -246,31 +261,33 @@ msgid ""
"Check this if you want the rule to mark CC(mail to any other person defined "
"in actions)."
msgstr ""
+"Vink aan als u wilt dat de regel CC markeert (mail naar een andere in de "
+"acties gedefinieerde persoon)."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner)s = Partner name"
-msgstr ""
+msgstr "%(partner)s = Naam relatie"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Note"
-msgstr ""
+msgstr "Notitie"
#. module: base_action_rule
#: constraint:ir.ui.menu:0
msgid "Error ! You can not create recursive Menu."
-msgstr ""
+msgstr "Fout ! U kunt geen recursief menu maken."
#. module: base_action_rule
#: field:base.action.rule,trg_date_range:0
msgid "Delay after trigger date"
-msgstr ""
+msgstr "Vertraging na activeerdatum"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions"
-msgstr ""
+msgstr "Voorwaarden"
#. module: base_action_rule
#: help:base.action.rule,trg_date_range:0
@@ -279,47 +296,50 @@ msgid ""
"need a delay before the trigger date, like sending a reminder 15 minutes "
"before a meeting."
msgstr ""
+"Vertraging na activeerdatum, specificeert dat u een negatief getal kunt "
+"invoeren als u vertraging vóór de activeerdatum wilt, zoals een herinnering "
+"15 minuten voor een vergadering versturen."
#. module: base_action_rule
#: field:base.action.rule,active:0
msgid "Active"
-msgstr ""
+msgstr "Actief"
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:0
#, python-format
msgid "No E-Mail ID Found for your Company address!"
-msgstr ""
+msgstr "Geen email-ID gevonden bij uw bedrijfsadres!"
#. module: base_action_rule
#: field:base.action.rule,act_remind_user:0
msgid "Remind Responsible"
-msgstr ""
+msgstr "Herinneren verantwoordelijke"
#. module: base_action_rule
#: model:ir.module.module,description:base_action_rule.module_meta_information
msgid "This module allows to implement action rules for any object."
-msgstr ""
+msgstr "Deze module laat u actieregels voor elk object implementeren."
#. module: base_action_rule
#: help:base.action.rule,sequence:0
msgid "Gives the sequence order when displaying a list of rules."
-msgstr ""
+msgstr "Geeft de volgorde aan waarin de lijst van regels wordt weergegeven."
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Months"
-msgstr ""
+msgstr "Maanden"
#. module: base_action_rule
#: field:base.action.rule,filter_id:0
msgid "Filter"
-msgstr ""
+msgstr "Filter"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Date"
-msgstr ""
+msgstr "Datum"
#. module: base_action_rule
#: help:base.action.rule,server_action_id:0
@@ -327,108 +347,111 @@ msgid ""
"Describes the action name.\n"
"eg:on which object which action to be taken on basis of which condition"
msgstr ""
+"Beschrijft de actie naam.\n"
+"ie: op welk object welke actie wordt uitgevoerd onder welke conditie"
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_ir_cron
msgid "ir.cron"
-msgstr ""
+msgstr "ir.cron"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_description)s = Object description"
-msgstr ""
+msgstr "%(object_description)s = Object omschrijving"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Actions"
-msgstr ""
+msgstr "Email acties"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Information"
-msgstr ""
+msgstr "Email Informatie"
#. module: base_action_rule
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
+"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten !"
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_base_action_rule
msgid "Action Rules"
-msgstr ""
+msgstr "Actieregels"
#. module: base_action_rule
#: help:base.action.rule,act_mail_body:0
msgid "Content of mail"
-msgstr ""
+msgstr "Inhoud van mail"
#. module: base_action_rule
#: field:base.action.rule,trg_user_id:0
msgid "Responsible"
-msgstr ""
+msgstr "Verantwoordelijke"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner_email)s = Partner Email"
-msgstr ""
+msgstr "%(partner_email)s = Relatie email"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_date)s = Creation date"
-msgstr ""
+msgstr "%(object_date)s = Aanmaakdatum"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_email)s = Responsible Email"
-msgstr ""
+msgstr "%(object_user_email)s = Verantwoordelijke email"
#. module: base_action_rule
#: field:base.action.rule,act_mail_body:0
msgid "Mail body"
-msgstr ""
+msgstr "E-mail berichttekst"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_watchers:0
msgid "Mail to Watchers (CC)"
-msgstr ""
+msgstr "E-mail naar toeschouwers (CC)"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Server Action to be Triggered"
-msgstr ""
+msgstr "Server actie om te activeren"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_user:0
msgid "Mail to Responsible"
-msgstr ""
+msgstr "E-mail naar verantwoordelijke"
#. module: base_action_rule
#: field:base.action.rule,act_email_cc:0
msgid "Add Watchers (Cc)"
-msgstr ""
+msgstr "Toevoegen toeschouwers (Cc)"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Fields"
-msgstr ""
+msgstr "Voorwaarden op Model velden"
#. module: base_action_rule
#: model:ir.actions.act_window,name:base_action_rule.base_action_rule_act
#: model:ir.ui.menu,name:base_action_rule.menu_base_action_rule_form
msgid "Automated Actions"
-msgstr ""
+msgstr "Geautomatiseerde acties"
#. module: base_action_rule
#: field:base.action.rule,server_action_id:0
msgid "Server Action"
-msgstr ""
+msgstr "Server-actie"
#. module: base_action_rule
#: field:base.action.rule,regex_name:0
msgid "Regex on Resource Name"
-msgstr ""
+msgstr "Regex op bronnaam"
#. module: base_action_rule
#: help:base.action.rule,act_remind_attach:0
@@ -436,21 +459,23 @@ msgid ""
"Check this if you want that all documents attached to the object be attached "
"to the reminder email sent."
msgstr ""
+"Vink dit aan als u wilt dat alle bij het object gevoegde documenten worden "
+"bijgevoegd bij de verstuurde herinnering."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Timing"
-msgstr ""
+msgstr "Voorwaarden op timing"
#. module: base_action_rule
#: field:base.action.rule,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Volgnummer"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Actions"
-msgstr ""
+msgstr "Acties"
#. module: base_action_rule
#: help:base.action.rule,active:0
@@ -458,23 +483,25 @@ msgid ""
"If the active field is set to False, it will allow you to hide the rule "
"without removing it."
msgstr ""
+"Als het actief veld uitzet, kunt u de regel verbergen zonder haar te "
+"verwijderen."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user)s = Responsible name"
-msgstr ""
+msgstr "%(object_user)s = Naam verantwoordelijke"
#. module: base_action_rule
#: field:base.action.rule,create_date:0
msgid "Create Date"
-msgstr ""
+msgstr "Aanmaakdatum"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on States"
-msgstr ""
+msgstr "Voorwaarden op status"
#. module: base_action_rule
#: field:base.action.rule,trg_date_type:0
msgid "Trigger Date"
-msgstr ""
+msgstr "Activeerdatum"
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 5ccfbdb23d8..b71e2daa447 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -673,9 +673,10 @@ true, it will allow you to hide the event alarm information without removing it.
new_res_alarm = res_alarm_obj.create(cr, uid, val, context=context)
else:
new_res_alarm = alarm_ids[0]
- cr.execute('Update %s set base_calendar_alarm_id=%s, alarm_id=%s \
- where id=%s' % (model_obj._table, \
- cal_alarm.id, new_res_alarm, data.id))
+ cr.execute('UPDATE %s ' % model_obj._table + \
+ ' SET base_calendar_alarm_id=%s, alarm_id=%s ' \
+ ' WHERE id=%s',
+ (cal_alarm.id, new_res_alarm, data.id))
self.do_alarm_unlink(cr, uid, [data.id], model)
if basic_alarm:
@@ -697,9 +698,10 @@ true, it will allow you to hide the event alarm information without removing it.
'user_id': uid
}
alarm_id = alarm_obj.create(cr, uid, vals)
- cr.execute('Update %s set base_calendar_alarm_id=%s, alarm_id=%s \
- where id=%s' % (model_obj._table, \
- alarm_id, basic_alarm.id, data.id))
+ cr.execute('UPDATE %s ' % model_obj._table + \
+ ' SET base_calendar_alarm_id=%s, alarm_id=%s '
+ ' WHERE id=%s', \
+ ( alarm_id, basic_alarm.id, data.id) )
return True
def do_alarm_unlink(self, cr, uid, ids, model, context=None):
@@ -722,7 +724,7 @@ true, it will allow you to hide the event alarm information without removing it.
if alarm_ids:
alarm_obj.unlink(cr, uid, alarm_ids)
cr.execute('Update %s set base_calendar_alarm_id=NULL, alarm_id=NULL\
- where id=%s' % (model_obj._table, datas.id))
+ where id=%%d' % model_obj._table,(datas.id,))
return True
res_alarm()
@@ -994,10 +996,10 @@ class calendar_event(osv.osv):
context = {}
cr.execute("UPDATE %s set freq='None',interval=0,count=0,end_date=Null,\
mo=False,tu=False,we=False,th=False,fr=False,sa=False,su=False,\
- day=0,select1='date',month_list=Null ,byday=Null where id=%s" % (self._table, id))
+ day=0,select1='date',month_list=Null ,byday=Null where id=%%s" % (self._table), (id,))
if not value:
- cr.execute("UPDATE %s set rrule_type='none' where id=%s" % (self._table, id))
+ cr.execute("UPDATE %s set rrule_type='none' where id=%%s" % self._table,(id,))
return True
val = {}
for part in value.split(';'):
@@ -1063,7 +1065,7 @@ class calendar_event(osv.osv):
'rule_type': rrule_type,
'id': id,
})
- cr.execute(qry % val)
+ cr.execute(qry, val) # Hopefully psycopg2 works with dicts. But, FIXME
return True
def _get_rulestring(self, cr, uid, ids, name, arg, context=None):
@@ -1081,7 +1083,7 @@ class calendar_event(osv.osv):
if datas.get('rrule_type'):
if datas.get('rrule_type') == 'none':
result[event] = False
- cr.execute("UPDATE %s set exrule=Null where id=%s" % (self._table, event))
+ cr.execute("UPDATE %s set exrule=Null where id=%%s" % self._table,( event,))
elif datas.get('rrule_type') == 'custom':
if datas.get('interval', 0) < 0:
raise osv.except_osv('Warning!', 'Interval can not be Negative')
@@ -1258,7 +1260,7 @@ true, it will allow you to hide the event alarm information without removing it.
if defaults.get('location'):
qry += ", location = '%(location)s'"
qry += "WHERE id = %s" % (event_id)
- cr.execute(qry %(defaults))
+ cr.execute(qry, defaults)
return True
@@ -1283,8 +1285,7 @@ true, it will allow you to hide the event alarm information without removing it.
if ids and (base_start_date or base_until_date):
cr.execute("select m.id, m.rrule, m.date, m.date_deadline, m.duration, \
m.exdate, m.exrule, m.recurrent_id, m.recurrent_uid from " + self._table + \
- " m where m.id in ("\
- + ','.join(map(lambda x: str(x), ids))+")")
+ " m where m.id = ANY(%s)", (ids,) )
count = 0
for data in cr.dictfetchall():
@@ -1683,10 +1684,8 @@ class calendar_todo(osv.osv):
@param context: A standard dictionary for contextual values
"""
- event = self.browse(cr, uid, id, context=context)
- cr.execute("UPDATE %s set date_start='%s' where id=%s" \
- % (self._table, value, id))
- return True
+ assert name == 'date'
+ return self.write(cr, uid, id, { 'date_start': value }, context=context)
_columns = {
'date': fields.function(_get_date, method=True, fnct_inv=_set_date, \
diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml
index c3292452298..2a0ed14080f 100644
--- a/addons/base_calendar/base_calendar_view.xml
+++ b/addons/base_calendar/base_calendar_view.xml
@@ -122,7 +122,7 @@
separator="1" help="Delegated Invitations" />
-
+
diff --git a/addons/base_calendar/i18n/nl.po b/addons/base_calendar/i18n/nl.po
index 678032a17bd..75ca37ec081 100644
--- a/addons/base_calendar/i18n/nl.po
+++ b/addons/base_calendar/i18n/nl.po
@@ -8,32 +8,32 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-19 12:50+0000\n"
-"PO-Revision-Date: 2010-09-16 12:31+0000\n"
-"Last-Translator: FULL NAME \n"
+"PO-Revision-Date: 2010-10-03 20:01+0000\n"
+"Last-Translator: Wouter Schrijvers \n"
"Language-Team: Dutch \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 05:17+0000\n"
+"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_calendar
#: selection:calendar.alarm,trigger_related:0
#: selection:res.alarm,trigger_related:0
msgid "The event starts"
-msgstr ""
+msgstr "De activiteit begint"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
#: selection:calendar.event,freq:0
#: selection:calendar.todo,freq:0
msgid "Hourly"
-msgstr ""
+msgstr "Ieder uur"
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Required to Join"
-msgstr ""
+msgstr "Deelname vereist"
#. module: base_calendar
#: help:calendar.event,exdate:0
@@ -42,11 +42,13 @@ msgid ""
"This property defines the list of date/time exceptions for a recurring "
"calendar component."
msgstr ""
+"Hiermee bepaalt u de datum/tijd-uitzonderingslijst voor een terugkerend "
+"kalender-item"
#. module: base_calendar
#: field:calendar.event.edit.all,name:0
msgid "Title"
-msgstr ""
+msgstr "Titel"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
@@ -55,50 +57,50 @@ msgstr ""
#: selection:calendar.todo,freq:0
#: selection:calendar.todo,rrule_type:0
msgid "Monthly"
-msgstr ""
+msgstr "Maandelijks"
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Invited User"
-msgstr ""
+msgstr "Uitgenodigde gebruikers"
#. 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 ""
+msgstr "Herinneringen"
#. 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 ""
+msgstr "zondag"
#. module: base_calendar
#: view:calendar.attendee:0
#: field:calendar.attendee,role:0
msgid "Role"
-msgstr ""
+msgstr "Functie"
#. module: base_calendar
#: view:calendar.attendee:0
#: view:calendar.event:0
msgid "Invitation details"
-msgstr ""
+msgstr "Details uitnodiging"
#. module: base_calendar
#: selection:base.calendar.set.exrule,byday:0
#: selection:calendar.event,byday:0
#: selection:calendar.todo,byday:0
msgid "Fourth"
-msgstr ""
+msgstr "vierde"
#. module: base_calendar
#: field:calendar.event,show_as:0
#: field:calendar.todo,show_as:0
msgid "Show as"
-msgstr ""
+msgstr "Weergeven als"
#. module: base_calendar
#: field:base.calendar.set.exrule,day:0
@@ -108,52 +110,52 @@ msgstr ""
#: field:calendar.todo,day:0
#: selection:calendar.todo,select1:0
msgid "Date of month"
-msgstr ""
+msgstr "Dag van de maand"
#. module: base_calendar
#: selection:calendar.event,class:0
#: selection:calendar.todo,class:0
msgid "Public"
-msgstr ""
+msgstr "Openbaar"
#. module: base_calendar
#: selection:calendar.alarm,trigger_interval:0
#: selection:res.alarm,trigger_interval:0
msgid "Hours"
-msgstr ""
+msgstr "Uren"
#. 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 ""
+msgstr "maart"
#. module: base_calendar
#: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:0
#, python-format
msgid "Warning !"
-msgstr ""
+msgstr "Waarschuwing !"
#. 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 ""
+msgstr "vrijdag"
#. module: base_calendar
#: field:calendar.event,allday:0
#: field:calendar.todo,allday:0
msgid "All Day"
-msgstr ""
+msgstr "Hele dag"
#. module: base_calendar
#: field:base.calendar.set.exrule,select1:0
#: field:calendar.event,select1:0
#: field:calendar.todo,select1:0
msgid "Option"
-msgstr ""
+msgstr "Optie"
#. module: base_calendar
#: selection:calendar.attendee,availability:0
@@ -161,12 +163,12 @@ msgstr ""
#: selection:calendar.todo,show_as:0
#: selection:res.users,availability:0
msgid "Free"
-msgstr ""
+msgstr "Vrij"
#. module: base_calendar
#: help:calendar.attendee,rsvp:0
msgid "Indicats whether the favor of a reply is requested"
-msgstr ""
+msgstr "Geeft aan of een antwoordverzoek gevraagd wordt"
#. module: base_calendar
#: model:ir.model,name:base_calendar.model_ir_attachment
@@ -176,32 +178,32 @@ msgstr ""
#. module: base_calendar
#: help:calendar.attendee,delegated_to:0
msgid "The users that the original request was delegated to"
-msgstr ""
+msgstr "De gebruikers aan wie het oorspronkelijke verzoek toegewezen was"
#. module: base_calendar
#: view:calendar.attendee:0
#: field:calendar.attendee,delegated_to:0
msgid "Delegated To"
-msgstr ""
+msgstr "Toegewezen aan"
#. module: base_calendar
#: field:base.calendar.set.exrule,we:0
#: field:calendar.event,we:0
#: field:calendar.todo,we:0
msgid "Wed"
-msgstr ""
+msgstr "woe"
#. module: base_calendar
#: view:calendar.event:0
msgid "Show time as"
-msgstr ""
+msgstr "Tijd weergeven als"
#. module: base_calendar
#: field:base.calendar.set.exrule,tu:0
#: field:calendar.event,tu:0
#: field:calendar.todo,tu:0
msgid "Tue"
-msgstr ""
+msgstr "din"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
@@ -210,43 +212,43 @@ msgstr ""
#: selection:calendar.todo,freq:0
#: selection:calendar.todo,rrule_type:0
msgid "Yearly"
-msgstr ""
+msgstr "Jaarlijks"
#. module: base_calendar
#: selection:calendar.alarm,trigger_related:0
#: selection:res.alarm,trigger_related:0
msgid "The event ends"
-msgstr ""
+msgstr "De activiteit eindigt"
#. module: base_calendar
#: selection:base.calendar.set.exrule,byday:0
#: selection:calendar.event,byday:0
#: selection:calendar.todo,byday:0
msgid "Last"
-msgstr ""
+msgstr "Laatste"
#. module: base_calendar
#: help:calendar.attendee,state:0
msgid "Status of the attendee's participation"
-msgstr ""
+msgstr "Deelnamestatus genodigde"
#. module: base_calendar
#: selection:calendar.attendee,cutype:0
msgid "Room"
-msgstr ""
+msgstr "Zaal"
#. module: base_calendar
#: selection:calendar.alarm,trigger_interval:0
#: selection:res.alarm,trigger_interval:0
msgid "Days"
-msgstr ""
+msgstr "dagen"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
#: selection:calendar.event,freq:0
#: selection:calendar.todo,freq:0
msgid "No Repeat"
-msgstr ""
+msgstr "Niet terugkerend"
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:0
@@ -254,74 +256,74 @@ msgstr ""
#: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:0
#, python-format
msgid "Error!"
-msgstr ""
+msgstr "Fout!"
#. module: base_calendar
#: selection:calendar.attendee,role:0
msgid "Chair Person"
-msgstr ""
+msgstr "Voorzitter"
#. module: base_calendar
#: selection:calendar.alarm,action:0
msgid "Procedure"
-msgstr ""
+msgstr "Werkwijze"
#. module: base_calendar
#: view:calendar.event:0
msgid "Select data for Custom Rule"
-msgstr ""
+msgstr "Selecteer gegevens voor aangepaste regel"
#. module: base_calendar
#: selection:calendar.event,state:0
#: selection:calendar.todo,state:0
msgid "Cancelled"
-msgstr ""
+msgstr "Geannuleerd"
#. module: base_calendar
#: selection:calendar.alarm,trigger_interval:0
#: selection:res.alarm,trigger_interval:0
msgid "Minutes"
-msgstr ""
+msgstr "Minuten"
#. module: base_calendar
#: selection:calendar.alarm,action:0
msgid "Display"
-msgstr ""
+msgstr "Weergave"
#. module: base_calendar
#: view:calendar.event.edit.all:0
msgid "Edit all Occurrences"
-msgstr ""
+msgstr "Reeks bewerken"
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Invitation type"
-msgstr ""
+msgstr "Soort uitnodiging"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
#: selection:calendar.event,freq:0
#: selection:calendar.todo,freq:0
msgid "Secondly"
-msgstr ""
+msgstr "Per seconde"
#. module: base_calendar
#: field:calendar.alarm,event_date:0
#: field:calendar.attendee,event_date:0
#: view:calendar.event:0
msgid "Event Date"
-msgstr ""
+msgstr "Datum activiteit"
#. module: base_calendar
#: view:calendar.attendee:0
#: view:calendar.event:0
msgid "Group By..."
-msgstr ""
+msgstr "Groepeer op.."
#. module: base_calendar
#: help:calendar.attendee,partner_id:0
msgid "Partner related to contact"
-msgstr ""
+msgstr "Relatie gekoppeld aan contactpersoon"
#. module: base_calendar
#: help:calendar.attendee,cutype:0
@@ -339,34 +341,34 @@ msgstr ""
#: field:calendar.alarm,event_end_date:0
#: field:calendar.attendee,event_end_date:0
msgid "Event End Date"
-msgstr ""
+msgstr "Einddatum activiteit"
#. module: base_calendar
#: selection:calendar.attendee,role:0
msgid "Optional Participation"
-msgstr ""
+msgstr "Deelname optioneel"
#. module: base_calendar
#: field:calendar.event,date_deadline:0
#: field:calendar.todo,date_deadline:0
msgid "Deadline"
-msgstr ""
+msgstr "Uiterste datum"
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:0
#, python-format
msgid "Warning!"
-msgstr ""
+msgstr "Waarschuwing!"
#. module: base_calendar
#: view:base.calendar.set.exrule:0
msgid "_Cancel"
-msgstr ""
+msgstr "_Annuleren"
#. module: base_calendar
#: model:ir.module.module,shortdesc:base_calendar.module_meta_information
msgid "Basic Calendar Functionality"
-msgstr ""
+msgstr "Basis kalender functionaliteit"
#. module: base_calendar
#: field:calendar.event,organizer:0
@@ -374,7 +376,7 @@ msgstr ""
#: field:calendar.todo,organizer:0
#: field:calendar.todo,organizer_id:0
msgid "Organizer"
-msgstr ""
+msgstr "Organisator"
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:0
@@ -382,76 +384,76 @@ msgstr ""
#: model:res.request.link,name:base_calendar.request_link_meeting
#, python-format
msgid "Event"
-msgstr ""
+msgstr "Activiteit"
#. module: base_calendar
#: selection:calendar.alarm,trigger_occurs:0
#: selection:res.alarm,trigger_occurs:0
msgid "Before"
-msgstr ""
+msgstr "Vóór"
#. module: base_calendar
#: view:calendar.event:0
#: selection:calendar.event,state:0
#: selection:calendar.todo,state:0
msgid "Confirmed"
-msgstr ""
+msgstr "Bevestigd"
#. module: base_calendar
#: model:ir.actions.act_window,name:base_calendar.action_calendar_event_edit_all
msgid "Edit all events"
-msgstr ""
+msgstr "Reeks bewerken"
#. module: base_calendar
#: field:calendar.alarm,attendee_ids:0
#: field:calendar.event,attendee_ids:0
#: field:calendar.todo,attendee_ids:0
msgid "Attendees"
-msgstr ""
+msgstr "Deelnemers"
#. module: base_calendar
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Ongeldige modelnaam in de actie-definiëring."
#. module: base_calendar
#: view:calendar.event:0
msgid "Confirm"
-msgstr ""
+msgstr "Bevestigen"
#. module: base_calendar
#: model:ir.model,name:base_calendar.model_calendar_todo
msgid "Calendar Task"
-msgstr ""
+msgstr "Kalender-taak"
#. module: base_calendar
#: field:base.calendar.set.exrule,su:0
#: field:calendar.event,su:0
#: field:calendar.todo,su:0
msgid "Sun"
-msgstr ""
+msgstr "zon"
#. module: base_calendar
#: field:calendar.attendee,cutype:0
msgid "Invite Type"
-msgstr ""
+msgstr "Type uitnodiging"
#. module: base_calendar
#: view:res.alarm:0
msgid "Reminder details"
-msgstr ""
+msgstr "Details herinnering"
#. module: base_calendar
#: field:calendar.attendee,parent_ids:0
msgid "Delegrated From"
-msgstr ""
+msgstr "Toegewezen door"
#. 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 ""
+msgstr "Dag van de maand"
#. module: base_calendar
#: view:calendar.event:0
@@ -459,94 +461,94 @@ msgstr ""
#: field:calendar.event.edit.all,location:0
#: field:calendar.todo,location:0
msgid "Location"
-msgstr ""
+msgstr "Plaats"
#. module: base_calendar
#: field:base_calendar.invite.attendee,send_mail:0
msgid "Send mail?"
-msgstr ""
+msgstr "E-mail sturen?"
#. module: base_calendar
#: field:base_calendar.invite.attendee,email:0
#: selection:calendar.alarm,action:0
#: field:calendar.attendee,email:0
msgid "Email"
-msgstr ""
+msgstr "E-mail"
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Event Detail"
-msgstr ""
+msgstr "Detail activiteit"
#. module: base_calendar
#: selection:calendar.alarm,state:0
msgid "Run"
-msgstr ""
+msgstr "Uitvoeren"
#. module: base_calendar
#: model:ir.model,name:base_calendar.model_calendar_alarm
msgid "Event alarm information"
-msgstr ""
+msgstr "Informatie herinnering activiteit"
#. module: base_calendar
#: selection:calendar.event,class:0
#: selection:calendar.todo,class:0
msgid "Confidential"
-msgstr ""
+msgstr "Vertrouwelijk"
#. 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 ""
+msgstr "Herhaal tot"
#. module: base_calendar
#: view:calendar.event:0
msgid "Visibility"
-msgstr ""
+msgstr "Zichtbaarheid"
#. module: base_calendar
#: field:calendar.attendee,rsvp:0
msgid "Required Reply?"
-msgstr ""
+msgstr "Antwoord vereist?"
#. module: base_calendar
#: field:calendar.event,base_calendar_url:0
#: field:calendar.todo,base_calendar_url:0
msgid "Caldav URL"
-msgstr ""
+msgstr "Caldav URL"
#. module: base_calendar
#: field:calendar.event,recurrent_uid:0
#: field:calendar.todo,recurrent_uid:0
msgid "Recurrent ID"
-msgstr ""
+msgstr "Terugkerend ID"
#. 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 ""
+msgstr "juli"
#. module: base_calendar
#: view:calendar.attendee:0
#: selection:calendar.attendee,state:0
msgid "Accepted"
-msgstr ""
+msgstr "Geaccepteerd"
#. module: base_calendar
#: field:base.calendar.set.exrule,th:0
#: field:calendar.event,th:0
#: field:calendar.todo,th:0
msgid "Thu"
-msgstr ""
+msgstr "don"
#. module: base_calendar
#: field:calendar.attendee,child_ids:0
msgid "Delegrated To"
-msgstr ""
+msgstr "Toegewezen aan"
#. module: base_calendar
#: constraint:ir.cron:0
@@ -556,29 +558,29 @@ msgstr ""
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Required Reply"
-msgstr ""
+msgstr "Antwoord vereist"
#. module: base_calendar
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr ""
+msgstr "Ongeldige XML, kan overzicht niet weergeven!"
#. module: base_calendar
#: selection:calendar.attendee,role:0
msgid "Participation required"
-msgstr ""
+msgstr "Deelname vereist"
#. module: base_calendar
#: field:calendar.event,create_date:0
#: field:calendar.todo,create_date:0
msgid "Created"
-msgstr ""
+msgstr "Aangemaakt"
#. module: base_calendar
#: selection:calendar.event,class:0
#: selection:calendar.todo,class:0
msgid "Private"
-msgstr ""
+msgstr "Privé"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
@@ -587,43 +589,43 @@ msgstr ""
#: selection:calendar.todo,freq:0
#: selection:calendar.todo,rrule_type:0
msgid "Daily"
-msgstr ""
+msgstr "Dagelijks"
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:0
#, python-format
msgid "Can not Duplicate"
-msgstr ""
+msgstr "Kopiëren niet mogelijk"
#. module: base_calendar
#: field:calendar.event,class:0
#: field:calendar.todo,class:0
msgid "Mark as"
-msgstr ""
+msgstr "Markeren als"
#. module: base_calendar
#: view:calendar.attendee:0
#: field:calendar.attendee,partner_address_id:0
msgid "Contact"
-msgstr ""
+msgstr "Contactpersoon"
#. module: base_calendar
#: view:calendar.attendee:0
#: view:calendar.event:0
msgid "Delegate"
-msgstr ""
+msgstr "Toewijzen"
#. module: base_calendar
#: field:base_calendar.invite.attendee,partner_id:0
#: view:calendar.attendee:0
#: field:calendar.attendee,partner_id:0
msgid "Partner"
-msgstr ""
+msgstr "Partner"
#. module: base_calendar
#: view:base.calendar.set.exrule:0
msgid "Select data for ExRule"
-msgstr ""
+msgstr "Selecteer gegevens voor uitzondering regel"
#. module: base_calendar
#: view:base_calendar.invite.attendee:0
diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py
index 98369962ab7..47f5681addf 100644
--- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py
+++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py
@@ -159,8 +159,8 @@ send an Email to Invited Person')
if not partner_id:
return {'value': {'contact_ids': []}}
- cr.execute('select id from res_partner_address \
- where partner_id=%s' % (partner_id))
+ cr.execute('SELECT id FROM res_partner_address \
+ WHERE partner_id=%s', (partner_id,))
contacts = map(lambda x: x[0], cr.fetchall())
return {'value': {'contact_ids': contacts}}
diff --git a/addons/base_report_creator/base_report_creator_view.xml b/addons/base_report_creator/base_report_creator_view.xml
index 8752a573725..ad438c710b4 100644
--- a/addons/base_report_creator/base_report_creator_view.xml
+++ b/addons/base_report_creator/base_report_creator_view.xml
@@ -143,34 +143,9 @@
-
-
-
- base_report_creator.report.simple.tree
- base_report_creator.report
- tree
-
-
-
-
-
-
-
-
- base_report_creator.report
- tree
-
-
-
+
diff --git a/addons/base_report_designer/base_report_designer_installer.xml b/addons/base_report_designer/base_report_designer_installer.xml
index 21537d3d63c..4ea4970d19a 100644
--- a/addons/base_report_designer/base_report_designer_installer.xml
+++ b/addons/base_report_designer/base_report_designer_installer.xml
@@ -72,21 +72,10 @@
{'menu':True}
-
-
-
-
-
-
-
-
diff --git a/addons/base_setup/__init__.py b/addons/base_setup/__init__.py
index 80680b6615e..59598f6577a 100644
--- a/addons/base_setup/__init__.py
+++ b/addons/base_setup/__init__.py
@@ -60,25 +60,15 @@ class base_setup_config_choice(osv.osv_memory):
'config_logo' : _get_image
}
- def set_default_menu(self, cr, uid, menu, context=None):
- user = self.pool.get('res.users')\
- .browse(cr, uid, uid, context=context)
-
- user.write({'action_id': menu.id,
- 'menu_id': menu.id})
-
- def get_default_menu(self, cr, uid, context=None):
- actions = self.pool.get('ir.actions.act_window')
-
- current_menu_id = actions.search(cr, uid, [('name','=','Menu')],
- context=context)
- assert len(current_menu_id) == 1,\
- 'A given user should only have one menu item'
- return actions.browse(cr, uid, current_menu_id[0], context=context)
+ def reset_menu(self, cr, uid, context=None):
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ menu_id = user._get_menu()
+ user.write({'action_id': False,
+ 'menu_id': menu_id})
+ return self.pool.get('ir.actions.act_window').browse(cr, uid, menu_id, context=context)
def menu(self, cr, uid, ids, context=None):
- menu = self.get_default_menu(cr, uid, context=context)
- self.set_default_menu(cr, uid, menu, context=context)
+ menu = self.reset_menu(cr, uid, context=context)
if menu.view_id.id:
view_id = (menu.view_id.id, menu.view_id.name)
@@ -98,9 +88,7 @@ class base_setup_config_choice(osv.osv_memory):
}
def config(self, cr, uid, ids, context=None):
- menu = self.get_default_menu(cr, uid, context=context)
- self.set_default_menu(cr, uid, menu, context=context)
-
+ self.reset_menu(cr, uid, context=context)
return self.pool.get('res.config').next(cr, uid, [], context=context)
base_setup_config_choice()
diff --git a/addons/base_synchro/__openerp__.py b/addons/base_synchro/__openerp__.py
index 69fcb839715..bd285821e2b 100644
--- a/addons/base_synchro/__openerp__.py
+++ b/addons/base_synchro/__openerp__.py
@@ -24,9 +24,12 @@
"version":"0.1",
"author":"Tiny",
"category":"Generic Modules/Base",
+ "description": """Synchronization with all objects.""",
"depends":["base"],
"demo_xml":[],
- "update_xml":["base_synchro_wizard.xml","base_synchro_view.xml"],
+ "update_xml":[ "wizard/base_synchro_view.xml",
+ "base_synchro_view.xml",
+ "security/ir.model.access.csv",],
"active":False,
"installable":True,
}
diff --git a/addons/base_synchro/base_synchro_obj.py b/addons/base_synchro/base_synchro_obj.py
index 5093c8f787e..64fad4cd687 100755
--- a/addons/base_synchro/base_synchro_obj.py
+++ b/addons/base_synchro/base_synchro_obj.py
@@ -42,7 +42,7 @@ class base_synchro_server(osv.osv):
base_synchro_server()
class base_synchro_obj(osv.osv):
- '''Class to store the operations done by wizart'''
+ '''Class to store the operations done by wizard'''
_name = "base.synchro.obj"
_description = "Register Class"
_columns = {
@@ -66,6 +66,10 @@ class base_synchro_obj(osv.osv):
#
# Return a list of changes: [ (date, id) ]
#
+
+ def get_ids(self, cr, uid, object, dt, domain=[], context={}):
+ return self._get_ids(cr, uid, object, dt, domain, context)
+
def _get_ids(self, cr, uid, object, dt, domain=[], context={}):
result = []
if dt:
diff --git a/addons/base_synchro/base_synchro_view.xml b/addons/base_synchro/base_synchro_view.xml
index 97995106070..e35a43837fa 100755
--- a/addons/base_synchro/base_synchro_view.xml
+++ b/addons/base_synchro/base_synchro_view.xml
@@ -30,6 +30,37 @@
+
+ base.synchro.obj.line.form
+ base.synchro.obj.line
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Filters
+ ir.actions.act_window
+ base.synchro.obj.line
+ form
+
+
+
+
Synchronized instances
@@ -56,7 +87,7 @@
-
+
@@ -81,6 +112,37 @@
+
+ base.synchro.obj.line.form
+ base.synchro.obj
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Filters
+ ir.actions.act_window
+ base.synchro.obj
+ form
+
+
+
+
Synchronized objectsir.actions.act_window
@@ -115,15 +177,15 @@
form
diff --git a/addons/base_synchro/base_synchro_wizard.xml b/addons/base_synchro/base_synchro_wizard.xml
deleted file mode 100644
index b26b3bbae2b..00000000000
--- a/addons/base_synchro/base_synchro_wizard.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/addons/base_synchro/security/ir.model.access.csv b/addons/base_synchro/security/ir.model.access.csv
new file mode 100644
index 00000000000..fa0f00e8ccd
--- /dev/null
+++ b/addons/base_synchro/security/ir.model.access.csv
@@ -0,0 +1,5 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"base_synchro_server","base.synchro.server","model_base_synchro_server","base.group_system",1,1,1,1
+" base_synchro_obj"," base.synchro.obj","model_base_synchro_obj","base.group_system",1,1,1,1
+"base_synchro_obj_avoid","base.synchro.obj.avoid","model_base_synchro_obj_avoid","base.group_system",1,1,1,1
+"base_synchro_obj_line","base.synchro.obj.line","model_base_synchro_obj_line","base.group_system",1,1,1,1
diff --git a/addons/base_synchro/wizard/__init__.py b/addons/base_synchro/wizard/__init__.py
index 7ff450acd76..3deff83f9e3 100644
--- a/addons/base_synchro/wizard/__init__.py
+++ b/addons/base_synchro/wizard/__init__.py
@@ -19,4 +19,5 @@
#
##############################################################################
import base_synchro
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_synchro/wizard/base_synchro.py b/addons/base_synchro/wizard/base_synchro.py
index 3a394d4ba3b..c83ec7df0e9 100644
--- a/addons/base_synchro/wizard/base_synchro.py
+++ b/addons/base_synchro/wizard/base_synchro.py
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+## -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@@ -18,7 +18,6 @@
# along with this program. If not, see .
#
##############################################################################
-import wizard
import osv
from datetime import date
import time
@@ -27,26 +26,7 @@ import xmlrpclib
import re
import tools
import threading
-
-acc_synchro_form = '''
-'''
-
-acc_synchro_fields = {
- 'server_url': {'string':'Server URL', 'type':'many2one', 'relation':'base.synchro.server','required':True},
- 'user_id': {'string':'Send Result To', 'type':'many2one', 'relation':'res.users', 'default': lambda uid,data,state: uid},
-}
-
-finish_form ='''
-
-'''
+from osv import osv, fields
class RPCProxyOne(object):
def __init__(self, server, ressource):
@@ -66,13 +46,26 @@ class RPCProxy(object):
def get(self, ressource):
return RPCProxyOne(self.server, ressource)
-class wizard_cost_account_synchro(wizard.interface):
+class base_synchro(osv.osv_memory):
+ """Base Synchronization """
+ _name = 'base.synchro'
+
+ _columns = {
+ 'server_url': fields.many2one('base.synchro.server', "Server URL", required=True),
+ 'user_id': fields.many2one('res.users', "Send Result To",),
+ }
+
+ _defaults = {
+ 'user_id': lambda self,cr,uid,context: uid,
+ }
+
start_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
report = []
report_total = 0
report_create = 0
report_write = 0
- def _synchronize(self, cr, uid, server, object, context):
+
+ def synchronize(self, cr, uid, server, object, context):
pool = pooler.get_pool(cr.dbname)
self.meta = {}
ids = []
@@ -80,14 +73,14 @@ class wizard_cost_account_synchro(wizard.interface):
pool2 = pool
#try:
if object.action in ('d','b'):
- ids = pool1.get('base.synchro.obj')._get_ids(cr, uid,
+ ids = pool1.get('base.synchro.obj').get_ids(cr, uid,
object.model_id.model,
object.synchronize_date,
eval(object.domain),
{'action':'d'}
)
if object.action in ('u','b'):
- ids += pool2.get('base.synchro.obj')._get_ids(cr, uid,
+ ids += pool2.get('base.synchro.obj').get_ids(cr, uid,
object.model_id.model,
object.synchronize_date,
eval(object.domain),
@@ -109,7 +102,7 @@ class wizard_cost_account_synchro(wizard.interface):
if object.model_id.model=='crm.case.history':
fields = ['email','description','log_id']
value = pool_src.get(object.model_id.model).read(cr, uid, [id], fields)[0]
- value = self._data_transform(cr, uid, pool_src, pool_dest, object.model_id.model, value, action)
+ value = self.data_transform(cr, uid, pool_src, pool_dest, object.model_id.model, value, action)
id2 = self.get_id(cr, uid, object.id, id, action, context)
#
# Transform value
@@ -133,7 +126,7 @@ class wizard_cost_account_synchro(wizard.interface):
else:
print value
idnew = pool_dest.get(object.model_id.model).create(cr, uid, value)
- synid = pool.get('base.synchro.obj.line').create(cr, uid, {
+ synid = self.pool.get('base.synchro.obj.line').create(cr, uid, {
'obj_id': object.id,
'local_id': (action=='u') and id or idnew,
'remote_id': (action=='d') and id or idnew
@@ -141,25 +134,20 @@ class wizard_cost_account_synchro(wizard.interface):
self.report_total+=1
self.report_create+=1
self.meta = {}
- return 'finish'
+ return True
- #
- # IN: object and ID
- # OUT: ID of the remote object computed:
- # If object is synchronised, read the sync database
- # Otherwise, use the name_search method
- #
def get_id(self, cr, uid, object_id, id, action, context={}):
pool = pooler.get_pool(cr.dbname)
+ line_pool = pool.get('base.synchro.obj.line')
field_src = (action=='u') and 'local_id' or 'remote_id'
field_dest = (action=='d') and 'local_id' or 'remote_id'
- rid = pool.get('base.synchro.obj.line').search(cr, uid, [('obj_id','=',object_id), (field_src,'=',id)], context=context)
+ rid = line_pool.search(cr, uid, [('obj_id','=',object_id), (field_src,'=',id)], context=context)
result = False
if rid:
- result = pool.get('base.synchro.obj.line').read(cr, uid, rid, [field_dest], context=context)[0][field_dest]
+ result = line_pool.read(cr, uid, rid, [field_dest], context=context)[0][field_dest]
return result
- def _relation_transform(self, cr, uid, pool_src, pool_dest, object, id, action, context={}):
+ def relation_transform(self, cr, uid, pool_src, pool_dest, object, id, action, context={}):
if not id:
return False
pool = pooler.get_pool(cr.dbname)
@@ -186,7 +174,14 @@ class wizard_cost_account_synchro(wizard.interface):
print self.report.append('WARNING: Record "%s" on relation %s not found, set to null.' % (names,object))
return result
- def _data_transform(self, cr, uid, pool_src, pool_dest, object, data, action='u', context={}):
+ #
+ # IN: object and ID
+ # OUT: ID of the remote object computed:
+ # If object is synchronised, read the sync database
+ # Otherwise, use the name_search method
+ #
+
+ def data_transform(self, cr, uid, pool_src, pool_dest, object, data, action='u', context={}):
self.meta.setdefault(pool_src, {})
if not object in self.meta[pool_src]:
self.meta[pool_src][object] = pool_src.get(object).fields_get(cr, uid, context)
@@ -201,12 +196,12 @@ class wizard_cost_account_synchro(wizard.interface):
del data[f]
elif ftype == 'many2one':
if data[f]:
- df = self._relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], data[f][0], action, context)
+ df = self.relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], data[f][0], action, context)
data[f] = df
if not data[f]:
del data[f]
elif ftype == 'many2many':
- res = map(lambda x: self._relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], x, action, context), data[f])
+ res = map(lambda x: self.relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], x, action, context), data[f])
data[f] = [(6, 0, res)]
del data['id']
return data
@@ -215,21 +210,22 @@ class wizard_cost_account_synchro(wizard.interface):
# Find all objects that are created or modified after the synchronize_date
# Synchronize these obejcts
#
- def _upload_download(self, db_name, uid, data, context):
- cr = pooler.get_db(db_name).cursor()
+
+
+ def upload_download(self, cr, uid, ids, context):
start_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
+ syn_obj = self.browse(cr, uid, ids)[0]
pool = pooler.get_pool(cr.dbname)
- server = pool.get('base.synchro.server').browse(cr, uid, data['form']['server_url'], context)
+ server = pool.get('base.synchro.server').browse(cr, uid, ids, context)[0]
for object in server.obj_ids:
dt = time.strftime('%Y-%m-%d %H:%M:%S')
- self._synchronize(cr, uid, server, object, context)
+ self.synchronize(cr, uid, server, object, context)
if object.action=='b':
time.sleep(1)
dt = time.strftime('%Y-%m-%d %H:%M:%S')
- pool.get('base.synchro.obj').write(cr, uid, [object.id], {'synchronize_date': dt})
- cr.commit()
+ self.pool.get('base.synchro.obj').write(cr, uid, [object.id], {'synchronize_date': dt})
end_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
- if 'user_id' in data['form'] and data['form']['user_id']:
+ if 'user_id' in syn_obj.user_id:
request = pooler.get_pool(cr.dbname).get('res.request')
if not self.report:
self.report.append('No exception.')
@@ -248,32 +244,26 @@ Exceptions:
request.create(cr, uid, {
'name' : "Synchronization report",
'act_from' : uid,
- 'act_to' : data['form']['user_id'],
+ 'act_to' : syn_obj.user_id,
'body': summary,
})
- cr.commit()
- cr.close()
- return 'finish'
+ return True
- def _upload_download_multi_thread(self, cr, uid, data, context):
- threaded_synchronization = threading.Thread(target=self._upload_download, args=(cr.dbname, uid, data, context))
- threaded_synchronization.start()
- return 'finish'
-
- states = {
- 'init': {
- 'actions': [],
- 'result': {'type':'form', 'arch':acc_synchro_form, 'fields':acc_synchro_fields, 'state':[('end','Cancel'),('upload_download','Synchronize')]}
- },
- 'upload_download': {
- 'actions': [],
- 'result':{'type':'choice', 'next_state': _upload_download_multi_thread}
- },
- 'finish': {
- 'actions': [],
- 'result':{'type':'form', 'arch':finish_form,'fields':{},'state':[('end','Ok')]}
- },
- }
-wizard_cost_account_synchro('account.analytic.account.transfer')
+ def upload_download_multi_thread(self, cr, uid, data, context):
+ threaded_synchronization = threading.Thread(target=self.upload_download, args=(cr, uid, data, context))
+ threaded_synchronization.run()
+ data_obj = self.pool.get('ir.model.data')
+ id2 = data_obj._get_id(cr, uid, 'base_synchro', 'view_base_synchro_finish')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ return {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'base.synchro',
+ 'views': [(id2, 'form')],
+ 'view_id': False,
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ }
+base_synchro()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/base_synchro/wizard/base_synchro_view.xml b/addons/base_synchro/wizard/base_synchro_view.xml
new file mode 100644
index 00000000000..291e2c4385e
--- /dev/null
+++ b/addons/base_synchro/wizard/base_synchro_view.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+ Base Synchronization
+ base.synchro
+ form
+
+
+
+
+
+
+ Base Synchronization
+ ir.actions.act_window
+ base.synchro
+ form
+ form
+ new
+
+
+
+
+ Base Synchronization
+ base.synchro
+ form
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/board/board_view.xml b/addons/board/board_view.xml
index 984a17caa51..d48ddd6a025 100644
--- a/addons/board/board_view.xml
+++ b/addons/board/board_view.xml
@@ -1,9 +1,6 @@
-
board.note.search
@@ -23,7 +20,7 @@
-
+
@@ -33,11 +30,11 @@
-
+
-
+
@@ -113,7 +110,7 @@
-
+
board.board.searchboard.board
@@ -136,19 +133,13 @@
-
+ id="menu_view_board_form" parent="base.reporting_menu" sequence="1"/>
0:
@@ -797,8 +798,8 @@ class basic_calendar_fields(osv.osv):
@param context: A standard dictionary for contextual values
"""
- cr.execute('select name from basic_calendar_attributes \
- where id=%s' % (vals.get('name')))
+ cr.execute('SELECT name FROM basic_calendar_attributes \
+ WHERE id=%s', (vals.get('name'),))
name = cr.fetchone()
name = name[0]
if name in ('valarm', 'attendee'):
diff --git a/addons/caldav/calendar_collection.py b/addons/caldav/calendar_collection.py
index 06e799b1686..8dd4ff053c9 100644
--- a/addons/caldav/calendar_collection.py
+++ b/addons/caldav/calendar_collection.py
@@ -34,11 +34,11 @@ class calendar_collection(osv.osv):
def _get_root_calendar_directory(self, cr, uid, context=None):
objid = self.pool.get('ir.model.data')
try:
- mid = objid._get_id(cr, uid, 'document', 'dir_calendars')
+ mid = objid._get_id(cr, uid, 'document', 'dir_calendars')
if not mid:
return False
- root_id = objid.read(cr, uid, mid, ['res_id'])['res_id']
- root_cal_dir = self.browse(cr, uid, root_id, context=context)
+ root_id = objid.read(cr, uid, mid, ['res_id'])['res_id']
+ root_cal_dir = self.browse(cr,uid, root_id, context=context)
return root_cal_dir.name
except Exception, e:
import netsvc
@@ -67,7 +67,7 @@ class calendar_collection(osv.osv):
], limit=1, context=context)
root_cal_dir = self._get_root_calendar_directory(cr, uid, context=context)
- if not calendar_ids:
+ if not calendar_ids:
return root_cal_dir
calendar_id = calendar_ids[0]
calendar = calendar_obj.browse(cr, uid, calendar_id,
diff --git a/addons/claim_from_delivery/i18n/ru.po b/addons/claim_from_delivery/i18n/ru.po
index 2d5b27ce972..611b3900cd8 100644
--- a/addons/claim_from_delivery/i18n/ru.po
+++ b/addons/claim_from_delivery/i18n/ru.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-20 12:02+0000\n"
-"PO-Revision-Date: 2010-09-29 13:45+0000\n"
+"PO-Revision-Date: 2010-09-30 06:47+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: claim_from_delivery
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index edfe79540e6..76ac424f1e0 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -145,53 +145,29 @@ class crm_case(object):
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
- s = self.get_stage_dict(cr, uid, ids, context=context)
- section = self._name
- stage = False
+ stage_pool = self.pool.get('crm.case.stage')
+ model = self._name
for case in self.browse(cr, uid, ids, context):
- if section in s:
- st = not context.get('force_domain', False) and case.stage_id.id or False
- if st in s[section]:
- data = {'stage_id': s[section][st]}
- stage = s[section][st]
- self.write(cr, uid, [case.id], data)
- return stage
-
- def get_stage_dict(self, cr, uid, ids, context=None):
- """This function gives dictionary for stage according to stage levels
- @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 ids: List of case IDs
- @param context: A standard dictionary for contextual values"""
- if not context:
- context = {}
- stage_obj = self.pool.get('crm.case.stage')
- res = self.read(cr, uid, ids, ['section_id', 'stage_id'], context)[0]
- section_id = res['section_id'] and res['section_id'][0] or False
- stage_id = res['stage_id'] and res['stage_id'][0] or False
-
- # We select either the stages in the same section as the current stage
- # if it a stage that does not have a section, or the stages of the
- # current section of the case
- if stage_id:
- stage_record = stage_obj.browse(cr, uid, stage_id)
- if not stage_record.section_id:
- section_id = False # only select stages without section
-
- domain = [('object_id.model', '=', self._name), '|', ('section_id', '=', section_id),('section_id','=',False)]
- if 'force_domain' in context and context['force_domain']:
- domain += context['force_domain']
- sid = stage_obj.search(cr, uid, domain, context=context)
- s = {}
- previous = {}
- section = self._name
-
- for stage in stage_obj.browse(cr, uid, sid, context=context):
- s.setdefault(section, {})
- s[section][previous.get(section, False)] = stage.id
- previous[section] = stage.id
- return s
+ next_stage = False
+ data = {}
+ domain = [('object_id.model', '=', model)]
+ if case.section_id and case.section_id.stage_ids:
+ domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids)))
+ stages = stage_pool.search(cr, uid, domain, order='sequence')
+ index = -1
+ if case.stage_id and case.stage_id.id in stages:
+ index = stages.index(case.stage_id.id)
+ if index + 1 == len(stages):
+ return False
+ else:
+ next_stage = stages[index + 1]
+ if next_stage:
+ data = {'stage_id': next_stage}
+ stage = stage_pool.browse(cr, uid, next_stage, context=context)
+ if stage.on_change:
+ data.update({'probability': stage.probability})
+ self.write(cr, uid, [case.id], data, context=context)
+ return next_stage
def stage_previous(self, cr, uid, ids, context=None):
"""This function computes previous stage for case from its current stage
@@ -203,21 +179,28 @@ class crm_case(object):
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
-
- s = self.get_stage_dict(cr, uid, ids, context=context)
- section = self._name
stage_pool = self.pool.get('crm.case.stage')
+ model = self._name
for case in self.browse(cr, uid, ids, context):
- if section in s:
- st = not context.get('force_domain', False) and case.stage_id.id or False
- s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
- if st in s[section]:
- data = {'stage_id': s[section][st]}
- if s[section][st]:
- stage = stage_pool.browse(cr, uid, s[section][st], context=context)
- if stage.on_change:
- data.update({'probability': stage.probability})
- self.write(cr, uid, [case.id], data)
+ prev_stage = False
+ data = {}
+ domain = [('object_id.model', '=', model)]
+ if case.section_id and case.section_id.stage_ids:
+ domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids)))
+ stages = stage_pool.search(cr, uid, domain, order='sequence')
+ index = 0
+ if case.stage_id and case.stage_id.id in stages:
+ index = stages.index(case.stage_id.id)
+ if index == 0:
+ return False
+ else:
+ prev_stage = stages[index - 1]
+ if prev_stage:
+ data = {'stage_id': prev_stage}
+ stage = stage_pool.browse(cr, uid, prev_stage, context=context)
+ if stage.on_change:
+ data.update({'probability': stage.probability})
+ self.write(cr, uid, [case.id], data, context=context)
return True
def onchange_partner_id(self, cr, uid, ids, part, email=False):
@@ -492,6 +475,43 @@ class crm_case(object):
return res
+class crm_case_stage(osv.osv):
+ """ Stage of case """
+
+ _name = "crm.case.stage"
+ _description = "Stage of case"
+ _rec_name = 'name'
+ _order = "sequence"
+
+ _columns = {
+ 'name': fields.char('Stage Name', size=64, required=True, translate=True),
+ 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
+ 'object_id': fields.many2one('ir.model', 'Object Name'),
+ 'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
+ 'on_change': fields.boolean('Change Probability Automatically', \
+ help="Change Probability on next and previous stages."),
+ 'requirements': fields.text('Requirements')
+ }
+ def _find_object_id(self, cr, uid, context=None):
+ """Finds id for case object
+ @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 context: A standard dictionary for contextual values
+ """
+ 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]
+
+ _defaults = {
+ 'sequence': lambda *args: 1,
+ 'probability': lambda *args: 0.0,
+ 'object_id' : _find_object_id
+ }
+
+crm_case_stage()
+
+
class crm_case_section(osv.osv):
"""Sales Team"""
@@ -517,7 +537,8 @@ class crm_case_section(osv.osv):
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'),
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"),
'note': fields.text('Description'),
- 'working_hours': fields.float('Working Hours', digits=(16,2 )),
+ 'working_hours': fields.float('Working Hours', digits=(16,2 )),
+ 'stage_ids':fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
}
_defaults = {
@@ -619,43 +640,6 @@ class crm_case_resource_type(osv.osv):
crm_case_resource_type()
-class crm_case_stage(osv.osv):
- """ Stage of case """
-
- _name = "crm.case.stage"
- _description = "Stage of case"
- _rec_name = 'name'
- _order = "sequence"
-
- _columns = {
- 'name': fields.char('Stage Name', size=64, required=True, translate=True),
- 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
- 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
- 'object_id': fields.many2one('ir.model', 'Object Name'),
- 'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
- 'on_change': fields.boolean('Change Probability Automatically', \
- help="Change Probability on next and previous stages."),
- 'requirements': fields.text('Requirements')
- }
- def _find_object_id(self, cr, uid, context=None):
- """Finds id for case object
- @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 context: A standard dictionary for contextual values
- """
- 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]
-
- _defaults = {
- 'sequence': lambda *args: 1,
- 'probability': lambda *args: 0.0,
- 'object_id' : _find_object_id
- }
-
-crm_case_stage()
-
def _links_get(self, cr, uid, context=None):
"""Gets links value for reference field
@param self: The object pointer
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 76260082602..263339c7121 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -126,8 +126,8 @@ class crm_lead(crm_case, osv.osv):
'contact_name': fields.char('Contact Name', size=64),
'partner_name': fields.char("Partner Name", size=64),
- 'optin': fields.boolean('Opt-In'),
- 'optout': fields.boolean('Opt-Out'),
+ 'optin': fields.boolean('Opt-In', help="If opt-in is checked, this contact has accepted to receive emails."),
+ 'optout': fields.boolean('Opt-Out', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."),
'type':fields.selection([
('lead','Lead'),
('opportunity','Opportunity'),
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
index 2616d97d612..cb80a7d28e9 100644
--- a/addons/crm/crm_lead_data.xml
+++ b/addons/crm/crm_lead_data.xml
@@ -8,7 +8,6 @@
New
-
@@ -16,7 +15,6 @@
Qualification
-
@@ -24,7 +22,6 @@
Proposition
-
@@ -32,7 +29,6 @@
Negotiation
-
@@ -40,7 +36,6 @@
Win
-
@@ -48,10 +43,15 @@
Lost
-
+
+ Sales Department
+ Sales
+
+
+
Telesales
diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml
index 65daf5d79d5..b98d26a0e6e 100644
--- a/addons/crm/crm_lead_menu.xml
+++ b/addons/crm/crm_lead_menu.xml
@@ -8,9 +8,8 @@
tree,form['|', ('type','=','lead'), ('type','=',False)]
- {"search_default_user_id":uid,'search_default_current':1}
- {'search_default_current':1, 'default_type': 'lead', 'search_default_section_id':section_id}
+ {'search_default_current':1, 'default_type': 'lead', 'search_default_section_id': section_id}A lead is a first, unqualified, contact with a new prospect. Use leads when you import a database of prospects or integrate your website's contact form with OpenERP. After having been qualified, the lead can be converted to a partner and a business opportunity for a further detailed tracking of the related activities.
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 2cbd1581ff5..c1e37445c6c 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -55,8 +55,7 @@
-
+
-
+
diff --git a/addons/crm/crm_phonecall_demo.xml b/addons/crm/crm_phonecall_demo.xml
index 824c40454be..683cbd9735f 100644
--- a/addons/crm/crm_phonecall_demo.xml
+++ b/addons/crm/crm_phonecall_demo.xml
@@ -16,7 +16,6 @@
-
@@ -32,7 +31,6 @@
-
@@ -48,7 +46,6 @@
-
@@ -64,7 +61,6 @@
-
@@ -80,7 +76,6 @@
-
@@ -96,7 +91,6 @@
-
diff --git a/addons/crm/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml
index 141a6add970..c4263a47a18 100644
--- a/addons/crm/crm_phonecall_menu.xml
+++ b/addons/crm/crm_phonecall_menu.xml
@@ -31,7 +31,7 @@
formtree,calendar
- {"search_default_user_id":uid, 'search_default_section_id':section_id}
+ {"search_default_user_id":uid, 'search_default_section_id': section_id}
@@ -67,7 +67,7 @@
tree,calendar
-
+ Trace easily all your Inbound calls. The Inbound menu open a search view in editable mode, so you can easily modify or add a new call record. With the actions buttons convert a lead into an opportunity or plan a meeting.
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index 0832c0a16ee..afc6edd5295 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -71,7 +71,7 @@
attrs="{'invisible':[('opportunity_id','!=',False)]}" />
@@ -150,7 +150,7 @@
attrs="{'invisible':[('opportunity_id','!=',False)]}" />
@@ -250,8 +250,8 @@
name="current"
domain="[('state','in', ('draft','open','pending'))]"/>
@@ -272,7 +272,7 @@
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 061888d02fb..bb15b3631b8 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -48,6 +48,10 @@
+
+
+
+
@@ -97,8 +101,6 @@
-
-
@@ -113,7 +115,6 @@
"""
result['arch'] = _moves_arch_lst
@@ -162,6 +162,7 @@ class pos_return(osv.osv_memory):
stock_move_obj = self.pool.get('stock.move')
property_obj= self.pool.get("ir.property")
uom_obj =self. pool.get('product.uom')
+ statementl_obj = self.pool.get('account.bank.statement.line')
wf_service = netsvc.LocalService("workflow")
#Todo :Need to clean the code
if active_id:
@@ -171,7 +172,9 @@ class pos_return(osv.osv_memory):
for order_id in order_obj.browse(cr, uid, [active_id], context=context):
prop_ids = property_obj.search(cr, uid,[('name', '=', 'property_stock_customer')])
val = property_obj.browse(cr, uid, prop_ids[0]).value_reference
- cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id))
+ cr.execute("SELECT s.id FROM stock_location s, stock_warehouse w "
+ "WHERE w.lot_stock_id=s.id AND w.id=%s ",
+ (order_id.shop_id.warehouse_id.id,))
res = cr.fetchone()
location_id = res and res[0] or None
stock_dest_id = val.id
@@ -185,10 +188,13 @@ class pos_return(osv.osv_memory):
'lines':[],
'statement_ids':[],
'picking_id':[]})
+ account_def = property_obj.get(cr, uid, 'property_account_payable', 'res.partner', context=context)
+ amount = 0.0
for line in order_id.lines:
if line.id:
try:
qty = data['return%s' %line.id]
+ amount += qty * line.price_unit
except :
qty = line.qty
stock_move_obj.create(cr, uid, {
@@ -204,6 +210,15 @@ class pos_return(osv.osv_memory):
'date_planned': date_cur
})
line_obj.copy(cr, uid, line.id, {'qty': -qty, 'order_id': new_order})
+ statementl_obj.create(cr, uid, {
+ 'name': 'Refund %s'%order_id.name,
+ 'statement_id': order_id.statement_ids[0].statement_id.id,
+ 'pos_statement_id': new_order,
+ 'date': time.strftime('%Y-%m-%d'),
+ 'account_id': order_id.partner_id and order_id.partner_id.property_account_payable \
+ and order_id.partner_id.property_account_payable.id or account_def.id,
+ 'amount': -amount,
+ })
order_obj.write(cr,uid, [active_id,new_order], {'state': 'done'})
wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_confirm', cr)
picking_obj.force_assign(cr, uid, [new_picking], context)
@@ -254,7 +269,9 @@ class add_product(osv.osv_memory):
qty=data['quantity']
prop_ids = property_obj.search(cr, uid, [('name', '=', 'property_stock_customer')])
val = property_obj.browse(cr, uid, prop_ids[0]).value_reference
- cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id))
+ cr.execute("SELECT s.id FROM stock_location s, stock_warehouse w "
+ "WHERE w.lot_stock_id=s.id AND w.id=%s ",
+ (order_id.shop_id.warehouse_id.id,))
res=cr.fetchone()
location_id=res and res[0] or None
stock_dest_id = val.id
@@ -316,7 +333,9 @@ class add_product(osv.osv_memory):
for order_id in order_obj.browse(cr, uid, active_ids, context=context):
prop_ids =property_obj.search(cr, uid, [('name', '=', 'property_stock_customer')])
val = property_obj.browse(cr, uid, prop_ids[0]).value_reference
- cr.execute("select s.id from stock_location s, stock_warehouse w where w.lot_stock_id=s.id and w.id= %d "%(order_id.shop_id.warehouse_id.id))
+ cr.execute("SELECT s.id FROM stock_location s, stock_warehouse w "
+ " WHERE w.lot_stock_id=s.id AND w.id=%s ",
+ (order_id.shop_id.warehouse_id.id,))
res=cr.fetchone()
location_id=res and res[0] or None
stock_dest_id = val.id
@@ -331,13 +350,13 @@ class add_product(osv.osv_memory):
'date':date_cur
})
for line in order_id.lines:
- key=('return%s') %line.id
+ key= 'return%s' % line.id
if line.id:
if data.has_key(key):
- qty = data['return%s' %line.id]
+ qty = data[key]
lines_obj.write(cr,uid,[line.id], {
- 'qty_rfd':(line.qty or 0.0) + data['return%s' %line.id],
- 'qty':line.qty-(data['return%s' %line.id] or 0.0)
+ 'qty_rfd':(line.qty or 0.0) + data[key],
+ 'qty':line.qty-(data[key] or 0.0)
})
else:
qty = line.qty
@@ -349,7 +368,7 @@ class add_product(osv.osv_memory):
'location_id':location_id,
'product_id':line.product_id.id,
'location_dest_id':stock_dest_id,
- 'name':'%s (return)' %order_id.name,
+ 'name':'%s (return)' % order_id.name,
'date':date_cur,
'date_planned':date_cur
})
diff --git a/addons/process/process_view.xml b/addons/process/process_view.xml
index f33af42c533..72cb18499e2 100644
--- a/addons/process/process_view.xml
+++ b/addons/process/process_view.xml
@@ -4,7 +4,7 @@
@@ -121,7 +121,7 @@
- Process
+ Processesprocess.processformtree,form
diff --git a/addons/procurement/i18n/ru.po b/addons/procurement/i18n/ru.po
index 4aa9937c935..ed26402d8b0 100644
--- a/addons/procurement/i18n/ru.po
+++ b/addons/procurement/i18n/ru.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-20 08:51+0000\n"
-"PO-Revision-Date: 2010-09-29 16:40+0000\n"
+"PO-Revision-Date: 2010-09-30 06:44+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:44+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: procurement
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index a4b93827660..90d55d47251 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -222,7 +222,7 @@ class product_pricelist(osv.osv):
price = 0.0
else:
price_tmp = self.price_get(cr, uid,
- [res['base_pricelist_id']], prod_id,
+ [res['base_pricelist_id']], product_id,
qty)[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)
@@ -388,7 +388,7 @@ class product_pricelist(osv.osv):
price = 0.0
else:
price_tmp = self.price_get(cr, uid,
- [res['base_pricelist_id']], prod_id,
+ [res['base_pricelist_id']], product_id,
qty)[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)
diff --git a/addons/product/report/product_pricelist.py b/addons/product/report/product_pricelist.py
index 613de646fe0..1148718668b 100644
--- a/addons/product/report/product_pricelist.py
+++ b/addons/product/report/product_pricelist.py
@@ -112,13 +112,14 @@ class product_pricelist(report_sxw.rml_parse):
return res
def _get_price(self,pricelist_id, product_id,qty):
+ sale_price_digits = self.get_digits(dp='Sale Price')
pool = pooler.get_pool(self.cr.dbname)
price_dict = pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id,qty)
if price_dict[pricelist_id]:
- price = self.formatLang(price_dict[pricelist_id])
+ price = self.formatLang(price_dict[pricelist_id], digits=sale_price_digits)
else:
res = pool.get('product.product').read(self.cr, self.uid, [product_id])
- price = self.formatLang(res[0]['list_price'])
+ price = self.formatLang(res[0]['list_price'], digits=sale_price_digits)
return price
report_sxw.report_sxw('report.product.pricelist','product.product','addons/product/report/product_pricelist.rml',parser=product_pricelist)
diff --git a/addons/project/project.py b/addons/project/project.py
index a1f02124c9d..996e79a1f8b 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -174,10 +174,10 @@ class project(osv.osv):
'warn_manager': fields.boolean('Warn Manager', help="If you check this field, the project manager will receive a request each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', help="Project's member. Not used in any computation, just for information purpose.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'tasks': fields.one2many('project.task', 'project_id', "Project tasks"),
- 'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects."),
- 'effective_hours': fields.function(_progress_rate, multi="progress", method=True, string='Time Spent', help="Sum of spent hours of all tasks related to this project and its child projects."),
- 'total_hours': fields.function(_progress_rate, multi="progress", method=True, string='Total Time', help="Sum of total hours of all tasks related to this project and its child projects."),
- 'progress_rate': fields.function(_progress_rate, multi="progress", method=True, string='Progress', type='float', group_operator="avg", help="Percent of tasks closed according to the total of tasks todo."),
+ 'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.", store=True),
+ 'effective_hours': fields.function(_progress_rate, multi="progress", method=True, string='Time Spent', help="Sum of spent hours of all tasks related to this project and its child projects.", store=True),
+ 'total_hours': fields.function(_progress_rate, multi="progress", method=True, string='Total Time', help="Sum of total hours of all tasks related to this project and its child projects.", store=True),
+ 'progress_rate': fields.function(_progress_rate, multi="progress", method=True, string='Progress', type='float', group_operator="avg", help="Percent of tasks closed according to the total of tasks todo.", store=True),
'warn_customer': fields.boolean('Warn Partner', help="If you check this, the user will have a popup when closing a task that propose a message to send by email to the customer.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
@@ -441,6 +441,7 @@ class task(osv.osv):
'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'),
'manager_id': fields.related('project_id', 'analytic_account_id', 'user_id', type='many2one', relation='res.users', string='Project Manager'),
'company_id': fields.many2one('res.company', 'Company'),
+ 'id': fields.integer('ID'),
}
_defaults = {
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 501c4787dee..6efc64dd494 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -302,7 +302,8 @@
tree
-
+
+
diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py
index e411248db4b..f4d8b32e569 100644
--- a/addons/project/report/project_report.py
+++ b/addons/project/report/project_report.py
@@ -72,7 +72,7 @@ class report_project_task_user(osv.osv):
date_trunc('day',t.date_end) as date_end,
to_date(to_char(t.date_deadline, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_deadline,
-- sum(cast(to_char(date_trunc('day',t.date_end) - date_trunc('day',t.date_start),'DD') as int)) as no_of_days,
- (extract('epoch' from (t.date_end-t.date_start)))/(3600*24) as no_of_days,
+ abs((extract('epoch' from (t.date_end-t.date_start)))/(3600*24)) as no_of_days,
t.user_id,
progress as progress,
t.project_id,
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index b7caea037a0..cb30a4b861c 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -155,7 +155,7 @@
project.vs.hourstree
-
+
@@ -177,7 +177,7 @@
- Project and remaining hours
+ Remaining Hours Per Projectproject.vs.hoursformgraph,tree
@@ -189,6 +189,7 @@
tree
+
@@ -262,7 +263,8 @@
- My projects: Planned vs Total hours
+
+ Projects: Planned Vs Total hoursproject.vs.hoursformgraph,tree
@@ -271,9 +273,9 @@
-
- tree
-
+
+ graph
+
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 17df3444b27..2788b59ed7d 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -141,7 +141,7 @@ class project_issue(crm.crm_case, osv.osv):
else:
res[issue.id][field] = abs(float(duration))
return res
-
+
_columns = {
'id': fields.integer('ID'),
'name': fields.char('Name', size=128, required=True),
@@ -185,7 +185,7 @@ class project_issue(crm.crm_case, osv.osv):
method=True, multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="float", store=True),
- 'assigned_to': fields.many2one('res.users', 'Assigned to', help='This is the current user to whom the related task have been assigned'),
+ 'assigned_to': fields.related('task_id', 'user_id', string = 'Assigned to', type="many2one", relation="res.users", store=True, help='This is the current user to whom the related task have been assigned'),
'working_hours_open': fields.function(_compute_day, string='Working Hours to Open the Issue', \
method=True, multi='working_days_open', type="float", store=True),
'working_hours_close': fields.function(_compute_day, string='Working Hours to Close the Issue', \
@@ -193,6 +193,7 @@ class project_issue(crm.crm_case, osv.osv):
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
'date_action_last': fields.datetime('Last Action', readonly=1),
'date_action_next': fields.datetime('Next Action', readonly=1),
+ 'progress': fields.related('task_id', 'progress', string='Progress (%)',group_operator="avg", store=True),
}
def _get_project(self, cr, uid, context):
@@ -245,6 +246,7 @@ class project_issue(crm.crm_case, osv.osv):
vals = {
'task_id': new_task_id,
+ 'state':'open'
}
case_obj.write(cr, uid, [bug.id], vals)
@@ -286,6 +288,15 @@ class project_issue(crm.crm_case, osv.osv):
if not stage.on_change:
return {'value':{}}
return {'value':{}}
+
+ def onchange_task_id(self, cr, uid, ids, task_id, context=None):
+ if context is None:
+ context = {}
+ result = {}
+ if not task_id:
+ return {'value':{}}
+ task = self.pool.get('project.task').browse(cr, uid, task_id, context)
+ return {'value':{'assigned_to': task.user_id.id,}}
def case_escalate(self, cr, uid, ids, *args):
"""Escalates case to top level
@@ -307,6 +318,7 @@ class project_issue(crm.crm_case, osv.osv):
else:
raise osv.except_osv(_('Warning !'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
self.write(cr, uid, [case.id], data)
+ self._history(cr, uid, cases, _('Escalate'))
return True
def message_new(self, cr, uid, msg, context):
@@ -358,6 +370,31 @@ class project_issue(crm.crm_case, osv.osv):
return res
+ def get_stage_dict(self, cr, uid, ids, context=None):
+ """This function gives dictionary for stage according to stage levels
+ @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 ids: List of case IDs
+ @param context: A standard dictionary for contextual values"""
+ if not context:
+ context = {}
+ stage_obj = self.pool.get('crm.case.stage')
+ domain = [('object_id.model', '=', self._name)]
+ if 'force_domain' in context and context['force_domain']:
+ domain += context['force_domain']
+ sid = stage_obj.search(cr, uid, domain, context=context)
+ s = {}
+ previous = {}
+ section = self._name
+
+ for stage in stage_obj.browse(cr, uid, sid, context=context):
+ s.setdefault(section, {})
+ s[section][previous.get(section, False)] = stage.id
+ previous[section] = stage.id
+ return s
+
+
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context=None):
if context is None:
context = {}
@@ -405,6 +442,17 @@ class project_issue(crm.crm_case, osv.osv):
@param **args: Return Dictionary of Keyword Value
"""
return True
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if not context:
+ context={}
+ issue = self.read(cr, uid, id, ['name'], context=context)
+ if not default:
+ default = {}
+ default = default.copy()
+ default['name'] = issue['name'] + _(' (copy)')
+ return super(project_issue, self).copy(cr, uid, id, default=default,
+ context=context)
project_issue()
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index ef4ecdd3957..a66dfe90560 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -68,7 +68,7 @@
-
+
@@ -85,9 +85,10 @@
-
+
+
@@ -201,6 +202,7 @@
+
@@ -224,9 +226,9 @@
-
+
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index 9003bd608a7..5d5a0489fa9 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -135,7 +135,7 @@
+ context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index a535015d067..2caf36766b0 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -20,6 +20,7 @@
##############################################################################
from datetime import datetime
+from dateutil.relativedelta import relativedelta
from tools.translate import _
from osv import fields, osv
from resource.faces import task as Task
@@ -90,13 +91,26 @@ class project_phase(osv.osv):
model_data_obj = self.pool.get('ir.model.data')
model_data_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour')
return model_data_obj.read(cr, uid, [model_data_id], ['res_id'])[0]['res_id']
+
+ def _compute(self, cr, uid, ids, context=None):
+ res = {}
+ if not ids:
+ return res
+ for phase in self.browse(cr, uid, ids, context=context):
+ tot = 0.0
+ for task in phase.task_ids:
+ tot += task.planned_hours
+ res[phase.id] = {
+ 'total_hours' : tot
+ }
+ return res
_columns = {
'name': fields.char("Name", size=64, required=True),
'date_start': fields.date('Start Date', help="Starting Date of the phase", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'date_end': fields.date('End Date', help="Ending Date of the phase", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
- 'constraint_date_start': fields.date('Start Date', help='force the phase to start after this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
- 'constraint_date_end': fields.date('End Date', help='force the phase to finish before this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
+ 'constraint_date_start': fields.date('Minimum Start Date', help='force the phase to start after this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
+ 'constraint_date_end': fields.date('Deadline', help='force the phase to finish before this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'project_id': fields.many2one('project.project', 'Project', required=True),
'next_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'prv_phase_id', 'next_phase_id', 'Next Phases', states={'cancelled':[('readonly',True)]}),
'previous_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'next_phase_id', 'prv_phase_id', 'Previous Phases', states={'cancelled':[('readonly',True)]}),
@@ -108,7 +122,8 @@ class project_phase(osv.osv):
'responsible_id': fields.many2one('res.users', 'Responsible', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
help='If the phase is created the state \'Draft\'.\n If the phase is started, the state becomes \'In Progress\'.\n If review is needed the phase is in \'Pending\' state.\
- \n If the phase is over, the states is set to \'Done\'.')
+ \n If the phase is over, the states is set to \'Done\'.'),
+ 'total_hours': fields.function(_compute, method=True, string='Total Hours'),
}
_defaults = {
'responsible_id': lambda obj,cr,uid,context: uid,
@@ -130,6 +145,14 @@ class project_phase(osv.osv):
project_id = project_obj.browse(cr, uid, project, context=context)
result['date_start'] = project_id.date_start
return {'value': result}
+
+ def onchange_days(self, cr, uid, ids, project, context=None):
+ result = {}
+ for id in ids:
+ project_id = self.browse(cr, uid, id, context=context)
+ newdate = datetime.strptime(project_id.date_start, '%Y-%m-%d') + relativedelta(days=project_id.duration or 0.0)
+ result['date_end'] = newdate.strftime('%Y-%m-%d')
+ return {'value': result}
def _check_date_start(self, cr, uid, phase, date_end, context=None):
if context is None:
@@ -277,7 +300,6 @@ class project_phase(osv.osv):
context = {}
resource_pool = self.pool.get('resource.resource')
uom_pool = self.pool.get('product.uom')
- phase_resource = False
if context is None:
context = {}
default_uom_id = self._get_default_uom_id(cr, uid)
@@ -290,11 +312,11 @@ class project_phase(osv.osv):
duration = str(avg_hours) + 'H'
# Create a new project for each phase
def Project():
+ # If project has working calendar then that
+ # else the default one would be considered
start = start_date
minimum_time_unit = 1
resource = phase_resource_obj
- # If project has working calendar then that
- # else the default one would be considered
if calendar_id:
working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context)
vacation = tuple(resource_pool.compute_vacation(cr, uid, calendar_id))
@@ -372,8 +394,10 @@ class project_resource_allocation(osv.osv):
_columns = {
'resource_id': fields.many2one('resource.resource', 'Resource', required=True),
'phase_id': fields.many2one('project.phase', 'Project Phase', ondelete='cascade', required=True),
- 'phase_id_date_start': fields.related('phase_id', 'date_start', type='date', string='Starting Date of the phase'),
- 'phase_id_date_end': fields.related('phase_id', 'date_end', type='date', string='Ending Date of the phase'),
+ 'project_id': fields.related('phase_id', 'project_id', type='many2one', relation="project.project", string='Project', store=True),
+ 'user_id': fields.related('resource_id', 'user_id', type='many2one', relation="res.users", string='User'),
+ 'date_start': fields.date('Start Date', help="Starting Date"),
+ 'date_end': fields.date('End Date', help="Ending Date"),
'useability': fields.float('Usability', help="Usability of this resource for this project phase in percentage (=50%)"),
}
_defaults = {
diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml
index a3ff3b39669..3412ba7ca08 100644
--- a/addons/project_long_term/project_long_term_view.xml
+++ b/addons/project_long_term/project_long_term_view.xml
@@ -13,14 +13,27 @@
project.resource.allocationgantt
-
-
-
+
+
+
+
+ project.resource.allocation.calendar
+ project.resource.allocation
+ calendar
+
+
+
+
+
+
+
+
+
project.resource.allocation.form
@@ -28,9 +41,14 @@
form
@@ -151,6 +177,7 @@
+
@@ -263,7 +290,7 @@
Project Phasesproject.phaseform
- tree,form,gantt,calendar
+ gantt,tree,form,calendar{'search_default_responsible_id':uid}You can subdivide your larger projects into several phases. For each phase, you can define your resources allocation (humans or engine), describe de differend task and link your phase with previous and next one, add constraints date and scheduling. A gantt view of your project phase is also available from this menu. Gantt view is a graphically draw of the project plan; it includes any task dependencies by visually adjusting task durations and priorities, and by linking tasks to each other.
@@ -299,7 +326,30 @@
# ------------------------------------------------------
# Project Task
# ------------------------------------------------------
-
+
+
+ phase.task.form2
+ project.task
+ form
+
+
+
+
+
+
+
+
+ phase.task.search.form
+ project.task
+ search
+
+
+
+
+
+
+
+
tree
+
@@ -67,8 +68,10 @@
project.messagessearch
-
+
+
+
@@ -86,7 +89,7 @@
- Communication Messages
+ Project Messagesproject.messagesform
diff --git a/addons/project_planning/project_planning_view.xml b/addons/project_planning/project_planning_view.xml
index 93a5c2c81b7..9363413e4a2 100644
--- a/addons/project_planning/project_planning_view.xml
+++ b/addons/project_planning/project_planning_view.xml
@@ -278,7 +278,6 @@
-
@@ -294,6 +293,7 @@
report_account_analytic.planning.statformgraph,tree
+ {"search_default_user_id":uid}
.
#
##############################################################################
-from mx import DateTime
from osv import fields, osv
from tools.translate import _
import re
import time
import tools
-
+from datetime import datetime
+from dateutil.relativedelta import relativedelta
class project_scrum_project(osv.osv):
_inherit = 'project.project'
@@ -147,7 +147,7 @@ class project_scrum_sprint(osv.osv):
proj = self.pool.get('project.project').browse(cr, uid, [project_id])[0]
v['product_owner_id']= proj.product_owner_id and proj.product_owner_id.id or False
v['scrum_master_id']= proj.user_id and proj.user_id.id or False
- v['date_stop'] = (DateTime.now() + DateTime.RelativeDateTime(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
+ v['date_stop'] = (datetime.now() + relativedelta(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
return {'value':v}
project_scrum_sprint()
@@ -257,14 +257,14 @@ class project_scrum_product_backlog(osv.osv):
'name' : fields.char('Feature', size=64, required=True),
'note' : fields.text('Note'),
'active' : fields.boolean('Active', help="If Active field is set to true, it will allow you to hide the product backlog without removing it."),
- 'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)], help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
+ 'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)]),
'user_id': fields.many2one('res.users', 'Author'),
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint'),
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('done','Done'),('cancel','Cancelled')], 'State', required=True),
'progress': fields.function(_compute, multi="progress", group_operator="avg", type='float', method=True, string='Progress', help="Computed as: Time Spent / Total Time."),
- 'effective_hours': fields.function(_compute, multi="effective_hours", method=True, string='Spent Hours', help="Computed using the sum of the time spent on every related tasks"),
+ 'effective_hours': fields.function(_compute, multi="effective_hours", method=True, string='Spent Hours', help="Computed using the sum of the time spent on every related tasks", store=True),
'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),
'create_date': fields.datetime("Creation Date", readonly=True),
'task_hours': fields.function(_compute, multi="task_hours", method=True, string='Task Hours', help='Estimated time of the total hours of the tasks')
diff --git a/addons/project_scrum/project_scrum_view.xml b/addons/project_scrum/project_scrum_view.xml
index fcf7cae08f5..843b35646e4 100644
--- a/addons/project_scrum/project_scrum_view.xml
+++ b/addons/project_scrum/project_scrum_view.xml
@@ -41,7 +41,7 @@
-
+
@@ -192,7 +192,19 @@
-
+
+
+ project.scrum.sprint.calendar
+ project.scrum.sprint
+ calendar
+
+
+
+
+
+
+
+
project.scrum.sprint.treeproject.scrum.sprint
@@ -333,7 +345,7 @@
Sprintsproject.scrum.sprintform
- tree,form
+ tree,form,calendar{"search_default_filter_current": 1, "search_default_scrum_master_id":uid}
@@ -345,7 +357,19 @@
-
+
+
+ project.scrum.meeting.calendar
+ project.scrum.meeting
+ calendar
+
+
+
+
+
+
+
+
project.scrum.meeting.treeproject.scrum.meeting
@@ -424,7 +448,7 @@
Scrum Meetingsproject.scrum.meetingform
- tree,form
+ tree,form,calendar{'search_default_scrum_daily':1,'search_default_project_id':project_id}
diff --git a/addons/project_scrum/wizard/project_scrum_backlog_create_task.py b/addons/project_scrum/wizard/project_scrum_backlog_create_task.py
index 2b8a641622d..1e0e9df66d5 100644
--- a/addons/project_scrum/wizard/project_scrum_backlog_create_task.py
+++ b/addons/project_scrum/wizard/project_scrum_backlog_create_task.py
@@ -31,6 +31,7 @@ class backlog_create_task(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
task = self.pool.get('project.task')
backlog_id = self.pool.get('project.scrum.product.backlog')
+ document_pool = self.pool.get('ir.attachment')
ids_task = []
if context is None:
@@ -39,9 +40,9 @@ class backlog_create_task(osv.osv_memory):
backlogs = backlog_id.browse(cr, uid, context['active_ids'], context=context)
result = mod_obj._get_id(cr, uid, 'project', 'view_task_search_form')
id = mod_obj.read(cr, uid, result, ['res_id'])
-
+
for backlog in backlogs:
- ids_task.append(task.create(cr, uid, {
+ task_id = task.create(cr, uid, {
'product_backlog_id': backlog.id,
'name': backlog.name,
'description': backlog.note,
@@ -50,8 +51,11 @@ class backlog_create_task(osv.osv_memory):
'planned_hours': backlog.expected_hours,
'remaining_hours':backlog.expected_hours,
'sequence':backlog.sequence,
- }))
-
+ })
+ document_ids = document_pool.search(cr, uid, [('res_id', '=', backlog.id), ('res_model', '=', backlog_id._name)])
+ for document_id in document_ids:
+ document_pool.copy(cr, uid, document_id, default={'res_id':task_id, 'res_model':task._name})
+ ids_task.append(task_id)
return {
'domain': "[('product_backlog_id','in',["+','.join(map(str, context['active_ids']))+"])]",
'name': 'Tasks',
diff --git a/addons/purchase/i18n/ru.po b/addons/purchase/i18n/ru.po
index 1eb0196db22..ab3c213f91d 100644
--- a/addons/purchase/i18n/ru.po
+++ b/addons/purchase/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 14:29+0000\n"
+"PO-Revision-Date: 2010-09-30 06:38+0000\n"
"Last-Translator: Chertykov Denis \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-09-30 04:39+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: purchase
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index 2b6d1f3bbed..5fbc2cbdcc2 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -333,7 +333,7 @@
Taxes :
- [[ formatLang(o.amount_tax) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Purchase Price')) ]] [[ o.pricelist_id.currency_id. symbol ]]
@@ -364,4 +364,4 @@
-
\ No newline at end of file
+
diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml
index 3daeab14881..de25b07ff9d 100644
--- a/addons/purchase_requisition/purchase_requisition_view.xml
+++ b/addons/purchase_requisition/purchase_requisition_view.xml
@@ -102,7 +102,7 @@
treepurchase.requisition
-
+
diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml
index 8e4f92da708..08a1ab14fe0 100644
--- a/addons/report_intrastat/report/invoice.rml
+++ b/addons/report_intrastat/report/invoice.rml
@@ -488,7 +488,7 @@
- [[ format(o.amount_tax or removeParentNode('blockTable')) ]]
+ [[ o.amount_tax and formatLang(o.amount_tax, digits=get_digits(dp='Account')) or removeParentNode('blockTable') ]]
diff --git a/addons/sale/i18n/ru.po b/addons/sale/i18n/ru.po
index 5bf8551edbf..556ed670eaf 100644
--- a/addons/sale/i18n/ru.po
+++ b/addons/sale/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 20:42+0000\n"
+"PO-Revision-Date: 2010-09-30 06:52+0000\n"
"Last-Translator: Chertykov Denis \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-09-30 04:42+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
diff --git a/addons/sale/i18n/vi.po b/addons/sale/i18n/vi.po
index 5ef0479bf3d..b3cabdca617 100644
--- a/addons/sale/i18n/vi.po
+++ b/addons/sale/i18n/vi.po
@@ -8,13 +8,13 @@ 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-09-29 08:39+0000\n"
-"Last-Translator: OpenERP Administrators \n"
+"PO-Revision-Date: 2010-10-03 07:41+0000\n"
+"Last-Translator: Phong Nguyen \n"
"Language-Team: Vietnamese \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
+"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
@@ -40,7 +40,7 @@ msgstr "Đặt giao hàng"
#. module: sale
#: field:sale.order.line,address_allotment_id:0
msgid "Allotment Partner"
-msgstr ""
+msgstr "Đối tác phân phối"
#. module: sale
#: constraint:ir.actions.act_window:0
@@ -58,11 +58,13 @@ msgid ""
"If you don't have enough stock available to deliver all at once, do you "
"accept partial shipments or not?"
msgstr ""
+"Nếu bạn không có đủ hàng để giao hàng toàn bộ một lần, bạn có chấp nhận giao "
+"hàng từng phần hay không?"
#. module: sale
#: selection:sale.order.line,type:0
msgid "from stock"
-msgstr ""
+msgstr "theo nhu cầu dự báo"
#. module: sale
#: field:sale.config.picking_policy,step:0
@@ -100,13 +102,13 @@ msgstr "Sửa lại"
#. module: sale
#: selection:sale.order,state:0
msgid "Invoice Exception"
-msgstr ""
+msgstr "Hóa đơn ngoại lệ"
#. module: sale
#: help:sale.order,picking_ids:0
msgid ""
"This is the list of picking list that have been generated for this invoice"
-msgstr ""
+msgstr "Đây là danh sách các sản phẩm đã chọn được tạo ra cho hóa đơn này"
#. module: sale
#: model:process.node,note:sale.process_node_deliveryorder0
@@ -126,7 +128,7 @@ msgstr "Xác nhận"
#. module: sale
#: view:sale.order:0
msgid "Make Invoice"
-msgstr ""
+msgstr "Lập hóa đơn"
#. module: sale
#: field:sale.order.line,price_subtotal:0
@@ -139,6 +141,8 @@ msgid ""
"Whenever confirm button is clicked, the draft state is moved to manual. that "
"is, quotation is moved to sale order."
msgstr ""
+"Bất kỳ khi nào nút xác nhận được chọn, trạng thái dự thảo sẽ được chuyển "
+"sang thủ công. Nghĩa là, báo giá được chuyển thành đơn chào hàng."
#. module: sale
#: model:process.transition.action,name:sale.process_transition_action_cancelorder0
@@ -194,7 +198,7 @@ msgstr "Đã hủy bỏ"
#. module: sale
#: selection:sale.order,state:0
msgid "Shipping Exception"
-msgstr ""
+msgstr "Vận chuyển ngoại lệ"
#. module: sale
#: field:sale.order,amount_total:0
@@ -229,7 +233,7 @@ msgstr "Tất cả một lúc"
#. module: sale
#: model:process.transition,note:sale.process_transition_saleprocurement0
msgid "Procurement is created after confirmation of sale order."
-msgstr ""
+msgstr "Việc thu mua hàng được tạo sau khi có xác nhận của đơn chào hàng."
#. module: sale
#: field:sale.order,project_id:0
@@ -271,7 +275,7 @@ msgstr "Thông tin các dơn đặt hàng"
#. module: sale
#: field:sale.order.line,product_uos_qty:0
msgid "Quantity (UoS)"
-msgstr ""
+msgstr "Số lượng (Đơn vị bán)"
#. module: sale
#: help:sale.order,invoice_quantity:0
@@ -281,6 +285,11 @@ msgid ""
"choose if you invoice based on ordered or shipped quantities. If the product "
"is a service, shipped quantities means hours spent on the associated tasks."
msgstr ""
+"Đơn chào hàng sẽ tự động tạo hóa đơn gợi ý (hóa đơn dự thảo). Số lượng yêu "
+"cầu và số lượng giao hàng có thể không giống nhau. Bạn phải chọn nếu bạn lập "
+"hóa đơn dựa trên số lượng đặt hàng hay số lượng giao hàng. Nếu sản phẩm là "
+"một dịch vụ, số lượng giao hàng có nghĩa là số giờ đã dùng để thực hiện các "
+"công việc liên quan."
#. module: sale
#: selection:sale.order.line,state:0
@@ -355,7 +364,7 @@ msgstr "Dòng hoá đơn"
#. module: sale
#: model:process.transition.action,name:sale.process_transition_action_forceassignation0
msgid "Force Assignation"
-msgstr ""
+msgstr "Phân phối lực lượng"
#. module: sale
#: view:sale.order:0
@@ -368,6 +377,9 @@ msgid ""
"Packing list is created when 'Assign' is being clicked after confirming the "
"sale order. This transaction moves the sale order to packing list."
msgstr ""
+"Bảng kê bao bì hàng hóa được tạo khi nút 'Chỉ định' được chọn sau khi xác "
+"nhận đơn chào hàng. Giao dịch này chuyển đơn chào hàng sang bảng kê bao bì "
+"hàng hóa."
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree8
@@ -386,6 +398,8 @@ msgid ""
"When you select Shipping Ploicy = 'Automatic Invoice after delivery' , it "
"will automatic create after delivery."
msgstr ""
+"Khi bạn chọn chính sách vận chuyển = 'Tự động xuất hóa đơn sau khi giao "
+"hàng', nó sẽ tự động tạo sau khi giao hàng."
#. module: sale
#: selection:sale.order,picking_policy:0
@@ -475,7 +489,7 @@ msgstr ""
#. module: sale
#: field:sale.shop,payment_account_id:0
msgid "Payment Accounts"
-msgstr ""
+msgstr "Tài khoản thanh toán"
#. module: sale
#: constraint:product.template:0
@@ -506,7 +520,7 @@ msgstr "Tài khoản thanh toán"
#. module: sale
#: wizard_button:sale.advance_payment_inv,create,end:0
msgid "Close"
-msgstr ""
+msgstr "Đóng"
#. module: sale
#: model:process.node,name:sale.process_node_invoice0
@@ -534,18 +548,18 @@ msgstr "Giảm giá (%)"
#. module: sale
#: model:process.node,note:sale.process_node_invoice0
msgid "Draft customer invoice, to be reviewed by accountant."
-msgstr ""
+msgstr "Hóa đơn khách hàng dự thảo, sẽ được kế toán xem xét lại."
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree3
#: model:ir.ui.menu,name:sale.menu_action_order_tree3
msgid "Sales Order To Be Invoiced"
-msgstr ""
+msgstr "Đơn chào hàng sẽ được lập hóa đơn"
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
msgid "Procurement for each line"
-msgstr ""
+msgstr "Thu mua hàng cho mỗi sản phẩm"
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree10
@@ -556,7 +570,7 @@ msgstr ""
#. module: sale
#: wizard_view:sale.advance_payment_inv,create:0
msgid "Invoices"
-msgstr ""
+msgstr "Hóa đơn"
#. module: sale
#: view:sale.order:0
@@ -581,7 +595,7 @@ msgstr ""
#. module: sale
#: field:sale.order.line,product_packaging:0
msgid "Packaging"
-msgstr ""
+msgstr "Đóng gói"
#. module: sale
#: model:ir.module.module,shortdesc:sale.module_meta_information
diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml
index 3f44ef2afb3..a4eab5aa86d 100644
--- a/addons/sale/report/sale_order.rml
+++ b/addons/sale/report/sale_order.rml
@@ -312,7 +312,7 @@
Net Total :
- [[ formatLang(o.amount_untaxed ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
@@ -325,7 +325,7 @@
Taxes :
- [[ formatLang(o.amount_tax ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
@@ -338,7 +338,7 @@
Total :
- [[ formatLang(o.amount_total ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
@@ -361,4 +361,4 @@
-
\ No newline at end of file
+
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index 183a034f1d2..b2d76e31dfb 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -86,17 +86,17 @@
-
-
-
+
+
+
-
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 96f80fe6f18..fef8f21000f 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -21,12 +21,12 @@
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
+import time
+
from osv import fields, osv
from tools.translate import _
import decimal_precision as dp
import netsvc
-import time
-
class sale_shop(osv.osv):
_name = "sale.shop"
@@ -37,7 +37,10 @@ class sale_shop(osv.osv):
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse'),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist'),
'project_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('parent_id', '!=', False)]),
- 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=False),
+ }
+ _defaults = {
+ 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'sale.shop', context=c),
}
sale_shop()
@@ -62,6 +65,7 @@ class sale_order(osv.osv):
'shipped': False,
'invoice_ids': [],
'picking_ids': [],
+ 'date_confirm':False,
'name': self.pool.get('ir.sequence').get(cr, uid, 'sale.order'),
})
return super(sale_order, self).copy(cr, uid, id, default, context=context)
@@ -864,13 +868,6 @@ class sale_order_line(osv.osv):
'product_packaging': False
}
- def create_sale_order_line_invoice(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
- context.update({'active_ids' : ids,'active_id' : ids})
- self.pool.get('sale.order.line.make.invoice').make_invoices(cr, uid, ids, context=context)
- return True
-
def invoice_line_create(self, cr, uid, ids, context=None):
if context is None:
context = {}
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index eec5847ed92..be0d254debd 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -157,10 +157,10 @@
@@ -364,6 +364,7 @@ to your configuration: from the sales order, from the pickings, etc.
+
@@ -373,7 +374,6 @@ to your configuration: from the sales order, from the pickings, etc.
form
-
@@ -381,50 +381,36 @@ to your configuration: from the sales order, from the pickings, etc.
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/sale/test/so_make_line_invoice.yml b/addons/sale/test/so_make_line_invoice.yml
index 0aa18df1c9f..d5e81c9e96c 100644
--- a/addons/sale/test/so_make_line_invoice.yml
+++ b/addons/sale/test/so_make_line_invoice.yml
@@ -41,15 +41,20 @@
-
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so3}
-
- I click on the "Create Invoice" button of sale order line
+ I click on the "Make Invoice" button of sale order line
+-
+ !record {model: sale.order.line.make.invoice, id: sale_order_line_make_invoice_0}:
+ {}
+-
+ I click on the "Create Invoice" button of wizard
-
- !python {model: sale.order.line}: |
+ !python {model: sale.order.line.make.invoice}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
sol = so.order_line[0]
- self.create_sale_order_line_invoice(cr, uid, [sol.id], {"lang": "en_US",
- "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
- "search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
+ self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_0")], {"lang": "en_US",
+ "tz": False, "active_model": "sale.order.line", "active_ids": [sol.id],
+ "search_default_uninvoiced": 1, "active_id": sol.id,
})
-
I verify that "Invoiced" has been set to True.
@@ -115,17 +120,20 @@
sale_id=self.browse(cr, uid, ref("sale_order_so3"))
assert(sale_id.invoiced == True), "Paid has not been set to true"
-
- I click on the "Create Invoice" button of sale order and verify that it gives a warning message
+ I create an invoice for another sale order line. I click on the "Make Invoice" button of sale order line
-
- I create an invoice for another sale order line. I click on the "Create Invoice" button of sale order line
--
- !python {model: sale.order.line}: |
+ !record {model: sale.order.line.make.invoice, id: sale_order_line_make_invoice_1}:
+ {}
+-
+ I click on the "Create Invoice" button of wizard
+-
+ !python {model: sale.order.line.make.invoice}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
sol = so.order_line[1]
- self.create_sale_order_line_invoice(cr, uid, [sol.id], {"lang": "en_US",
- "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
- "search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
+ self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_1")], {"lang": "en_US",
+ "tz": False, "active_model": "sale.order.line", "active_ids": [sol.id],
+ "search_default_uninvoiced": 1, "active_id": sol.id,
})
-
I verify that invoice for sale order line has been created.
diff --git a/addons/sale/wizard/sale_line_invoice.xml b/addons/sale/wizard/sale_line_invoice.xml
index 63a26587d43..b48247f8e58 100644
--- a/addons/sale/wizard/sale_line_invoice.xml
+++ b/addons/sale/wizard/sale_line_invoice.xml
@@ -20,7 +20,18 @@
sale.order.line.make.invoiceformform
+ new
+
+
+
+
+ Make Invoices
+ client_action_multi
+
+ action
+ sale.order.line
+
\ No newline at end of file
diff --git a/addons/sale/wizard/sale_make_invoice.xml b/addons/sale/wizard/sale_make_invoice.xml
index 2bef6b67513..106e6945207 100644
--- a/addons/sale/wizard/sale_make_invoice.xml
+++ b/addons/sale/wizard/sale_make_invoice.xml
@@ -24,8 +24,18 @@
sale.make.invoiceformform
+ new
-
+
+
+
+
+ Make Invoices
+ client_action_multi
+
+ action
+ sale.order
+
\ No newline at end of file
diff --git a/addons/sale_crm/i18n/ru.po b/addons/sale_crm/i18n/ru.po
index f7882eacc5b..6585d3294e4 100644
--- a/addons/sale_crm/i18n/ru.po
+++ b/addons/sale_crm/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 18:56+0000\n"
+"PO-Revision-Date: 2010-09-30 06:39+0000\n"
"Last-Translator: Chertykov Denis \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-09-30 04:39+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_crm
diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml
index f4305329d0d..8a8eb0d2c1e 100644
--- a/addons/sale_journal/sale_journal_view.xml
+++ b/addons/sale_journal/sale_journal_view.xml
@@ -1,8 +1,9 @@
-
+
+ parent="base.menu_base_config" sequence="5" groups="base.group_system,base.group_sale_salesman"/>
diff --git a/addons/sale_layout/report/report_sale_layout.py b/addons/sale_layout/report/report_sale_layout.py
index 20ad66313a2..3e61a6cd3e9 100755
--- a/addons/sale_layout/report/report_sale_layout.py
+++ b/addons/sale_layout/report/report_sale_layout.py
@@ -1,5 +1,5 @@
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -14,21 +14,22 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
import time
-import pooler
from report import report_sxw
rml_parents = {
- 'tr':1,
- 'li':1,
+ 'tr': 1,
+ 'li': 1,
'story': 0,
'section': 0
}
+
+
class sale_order_1(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(sale_order_1, self).__init__(cr, uid, name, context)
@@ -39,98 +40,94 @@ class sale_order_1(report_sxw.rml_parse):
})
self.context = context
-#
+ def sale_order_lines(self, sale_order):
+ result = []
+ sub_total = {}
+ info = []
+ order_lines = []
+ res = {}
- def sale_order_lines(self,sale_order):
- result =[]
- sub_total={}
- info=[]
- order_lines=[]
- res={}
- list_in_seq=[]
ids = self.pool.get('sale.order.line').search(self.cr, self.uid, [('order_id', '=', sale_order.id)])
- for id in range(0,len(ids)):
- order = self.pool.get('sale.order.line').browse(self.cr, self.uid,ids[id], self.context.copy())
+ for id in range(0, len(ids)):
+ order = self.pool.get('sale.order.line').browse(self.cr, self.uid, ids[id], self.context.copy())
order_lines.append(order)
-
- i=1
- j=0
- sum_flag={}
- sum_flag[j]=-1
+
+ i = 1
+ j = 0
+ sum_flag = {}
+ sum_flag[j] = -1
for entry in order_lines:
- res={}
+ res = {}
- if entry.layout_type=='article':
- res['tax_id']=', '.join(map(lambda x: x.name, entry.tax_id)) or ''
- res['name']=entry.name
- res['product_uom_qty']="%.2f"%(entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00)
- res['product_uom']=entry.product_uos and entry.product_uos.name or entry.product_uom.name
- res['price_unit']="%.2f"%(entry.price_unit or 0.00)
- res['discount']="%.2f"%(entry.discount and entry.discount or 0.00)
- res['price_subtotal']="%.2f"%(entry.price_subtotal and entry.price_subtotal or 0.00)
- sub_total[i]= entry.price_subtotal and entry.price_subtotal
- i=i+1
- res['note']=entry.notes or ''
- res['currency']=sale_order.pricelist_id.currency_id.name
- res['layout_type']=entry.layout_type
-
+ if entry.layout_type == 'article':
+ res['tax_id'] = ', '.join(map(lambda x: x.name, entry.tax_id)) or ''
+ res['name'] = entry.name
+ res['product_uom_qty'] = entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00
+ res['product_uom'] = entry.product_uos and entry.product_uos.name or entry.product_uom.name
+ res['price_unit'] = entry.price_unit or 0.00
+ res['discount'] = entry.discount and entry.discount or 0.00
+ res['price_subtotal'] = entry.price_subtotal and entry.price_subtotal or 0.00
+ sub_total[i] = entry.price_subtotal and entry.price_subtotal
+ i = i + 1
+ res['note'] = entry.notes or ''
+ res['currency'] = sale_order.pricelist_id.currency_id.name
+ res['layout_type'] = entry.layout_type
else:
+ res['product_uom_qty'] = ''
+ res['price_unit'] = ''
+ res['discount'] = ''
+ res['tax_id'] = ''
+ res['layout_type'] = entry.layout_type
+ res['note'] = entry.notes or ''
+ res['product_uom'] = ''
- res['product_uom_qty']=''
- res['price_unit']=''
- res['discount']=''
- res['tax_id']=''
- res['layout_type']=entry.layout_type
- res['note']=entry.notes or ''
- res['product_uom']=''
-
- if entry.layout_type=='subtotal':
- res['name']=entry.name
- sum=0
- sum_id=0
- if sum_flag[j]==-1:
- temp=1
+ if entry.layout_type == 'subtotal':
+ res['name'] = entry.name
+ sum = 0
+ sum_id = 0
+ if sum_flag[j] == -1:
+ temp = 1
else:
- temp=sum_flag[j]
+ temp = sum_flag[j]
- for sum_id in range(temp,len(sub_total)+1):
- sum+=sub_total[sum_id]
- sum_flag[j+1]= sum_id +1
+ for sum_id in range(temp, len(sub_total)+1):
+ sum += sub_total[sum_id]
+ sum_flag[j+1] = sum_id +1
- j=j+1
- res['price_subtotal']="%.2f"%(sum)
- res['currency']=sale_order.pricelist_id.currency_id.name
- res['quantity']=''
- res['price_unit']=''
- res['discount']=''
- res['tax_id']=''
- res['product_uom']=''
- elif entry.layout_type=='title':
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
- elif entry.layout_type=='text':
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
- elif entry.layout_type=='line':
- res['product_uom_qty']='__________'
- res['price_unit']='______________'
- res['discount']='___________'
- res['tax_id']='_________________'
- res['product_uom']='_____'
- res['name']='_______________________________________'
- res['price_subtotal']='_________'
- res['currency']='_______'
- elif entry.layout_type=='break':
- res['layout_type']=entry.layout_type
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
+ j = j + 1
+ res['price_subtotal'] = sum
+ res['currency'] = sale_order.pricelist_id.currency_id.name
+ res['quantity'] = ''
+ res['price_unit'] = ''
+ res['discount'] = ''
+ res['tax_id'] = ''
+ res['product_uom'] = ''
+ elif entry.layout_type == 'title':
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
+ elif entry.layout_type == 'text':
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
+ elif entry.layout_type == 'line':
+ res['product_uom_qty'] = '__________'
+ res['price_unit'] = '______________'
+ res['discount'] = '___________'
+ res['tax_id'] = '_________________'
+ res['product_uom'] = '_____'
+ res['name'] = '_______________________________________'
+ res['price_subtotal'] = '_________'
+ res['currency'] = '_______'
+ elif entry.layout_type == 'break':
+ res['layout_type'] = entry.layout_type
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
else:
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=sale_order.pricelist_id.currency_id.name
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = sale_order.pricelist_id.currency_id.name
result.append(res)
return result
diff --git a/addons/sale_layout/report/report_sale_layout.rml b/addons/sale_layout/report/report_sale_layout.rml
index d33d424a8a2..b01affd5329 100755
--- a/addons/sale_layout/report/report_sale_layout.rml
+++ b/addons/sale_layout/report/report_sale_layout.rml
@@ -318,13 +318,13 @@
[[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['product_uom'] ]]
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ a['price_unit'] ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ formatLang(a['price_unit'], digits=get_digits(dp='Sale Price')) ]]
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['discount'] ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['discount'], digits=get_digits(dp='Sale Price')) ]]
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['price_subtotal'] ]] [[ o.pricelist_id.currency_id.symbol ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['price_subtotal'], digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id.symbol ]]
diff --git a/addons/sale_order_dates/sale_order_dates.py b/addons/sale_order_dates/sale_order_dates.py
index ce82796235f..beca56b838e 100644
--- a/addons/sale_order_dates/sale_order_dates.py
+++ b/addons/sale_order_dates/sale_order_dates.py
@@ -56,9 +56,9 @@ class sale_order_dates(osv.osv):
return res
_columns = {
- 'commitment_date': fields.function(_get_commitment_date, method=True,store=True, type='date', string='Commitment Date'),
- 'requested_date': fields.date('Requested Date'),
- 'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True,string='Effective Date'),
+ 'commitment_date': fields.function(_get_commitment_date, method=True,store=True, type='date', string='Commitment Date', help="Date on which delivery of products is to be made"),
+ 'requested_date': fields.date('Requested Date', help="Date on which customer has requested for sales"),
+ 'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True,string='Effective Date',help="Date on which picking is created"),
}
sale_order_dates()
diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml
index 317180c7209..c2b46959e1d 100644
--- a/addons/stock/report/picking.rml
+++ b/addons/stock/report/picking.rml
@@ -181,7 +181,7 @@
[[ picking.origin or '']]
- [[ (picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and and picking.address_id.name) or '' ]]
+ [[ (picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and picking.address_id.name) or '' ]]
[[ formatLang(picking.min_date,date_time = True) ]]
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index d73a842bedd..f5c4ebd41e3 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -110,7 +110,6 @@ class stock_location(osv.osv):
@param field_names: Name of field
@return: Dictionary of values
"""
- result = dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids])
product_product_obj = self.pool.get('product.product')
@@ -118,6 +117,9 @@ class stock_location(osv.osv):
res_products_by_location = sorted(cr.dictfetchall(), key=itemgetter('location_id'))
products_by_location = dict((k, [v['product_id'] for v in itr]) for k, itr in groupby(res_products_by_location, itemgetter('location_id')))
+ result = dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids])
+ result.update(dict([(i, {}.fromkeys(field_names, 0.0)) for i in list(set([aaa['location_id'] for aaa in res_products_by_location]))]))
+
currency_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id.id
currency_obj = self.pool.get('res.currency')
currency = self.pool.get('res.currency').browse(cr, uid, currency_id)
@@ -129,6 +131,8 @@ class stock_location(osv.osv):
for prod in product_product_obj.browse(cr, uid, product_ids, context=c):
for f in field_names:
if f == 'stock_real':
+ if loc_id not in result:
+ result[loc_id] = {}
result[loc_id][f] += prod.qty_available
elif f == 'stock_virtual':
result[loc_id][f] += prod.virtual_available
diff --git a/addons/stock_location/i18n/ru.po b/addons/stock_location/i18n/ru.po
index 364ee89e09c..03be7d6afc7 100644
--- a/addons/stock_location/i18n/ru.po
+++ b/addons/stock_location/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 10:09+0000\n"
-"Last-Translator: OpenERP Administrators \n"
+"PO-Revision-Date: 2010-10-02 08:09+0000\n"
+"Last-Translator: irbiserg@mail.ru \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-09-30 04:43+0000\n"
+"X-Launchpad-Export-Date: 2010-10-03 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock_location
@@ -29,7 +29,7 @@ msgstr "Неправильный XML для просмотра архитект
#. module: stock_location
#: model:ir.module.module,shortdesc:stock_location.module_meta_information
msgid "Stock Location Paths"
-msgstr ""
+msgstr "Расположение патча"
#. module: stock_location
#: constraint:ir.model:0
@@ -80,7 +80,7 @@ msgstr "Ручное управление"
#. module: stock_location
#: model:ir.model,name:stock_location.model_stock_location_path
msgid "stock.location.path"
-msgstr ""
+msgstr "расположение патча"
#. module: stock_location
#: help:stock.location.path,auto:0
diff --git a/addons/subscription/subscription_view.xml b/addons/subscription/subscription_view.xml
index abe58ced56d..b27414bb60c 100644
--- a/addons/subscription/subscription_view.xml
+++ b/addons/subscription/subscription_view.xml
@@ -15,11 +15,11 @@
form
diff --git a/addons/survey/report/survey_analysis_report.py b/addons/survey/report/survey_analysis_report.py
index e72034e11d2..c95bd33ac32 100644
--- a/addons/survey/report/survey_analysis_report.py
+++ b/addons/survey/report/survey_analysis_report.py
@@ -189,9 +189,9 @@ class survey_analysis(report_rml):
for ans in que.answer_choice_ids:
rml += """
""" + to_xml(tools.ustr(ans.answer)) + """
"""
- cr.execute("select count(id) from survey_response_answer sra where sra.answer_id = %d" % ans.id)
+ cr.execute("select count(id) from survey_response_answer sra where sra.answer_id = %s", (ans.id,))
tot_res = cr.fetchone()[0]
- cr.execute("select count(id) ,sra.column_id from survey_response_answer sra where sra.answer_id = %d group by sra.column_id" % ans.id)
+ cr.execute("select count(id) ,sra.column_id from survey_response_answer sra where sra.answer_id=%s group by sra.column_id", (ans.id,))
calc_res = cr.dictfetchall()
for mat_col in range(1, len(matrix_ans)):
percantage = 0.0
@@ -210,7 +210,7 @@ class survey_analysis(report_rml):
rml += """"""
if que.is_comment_require:
- cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
+ cr.execute("select count(id) from survey_response_line where question_id = %s and comment != ''",(que.id,))
tot_res = cr.fetchone()[0]
rml += """
""" + to_xml(tools.ustr(que.comment_label)) + """
""" + tools.ustr(tot_res) + """
"""
@@ -244,7 +244,7 @@ class survey_analysis(report_rml):
if que.is_comment_require:
# if que.make_comment_field:
-# cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
+# cr.execute("select count(id) from survey_response_line where question_id = %s and comment != ''", (que.id,))
# tot_res = cr.fetchone()[0]
# tot_avg = 0.00
# if que.tot_resp:
@@ -253,13 +253,13 @@ class survey_analysis(report_rml):
#
""" + str(tot_avg) + """%
#
""" + tools.ustr(tot_res) + """
"""
# else:
- cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
+ cr.execute("select count(id) from survey_response_line where question_id = %s and comment != ''", (que.id,))
tot_res = cr.fetchone()[0]
rml += """
""" + to_xml(tools.ustr(que.comment_label)) + """
""" + tools.ustr(tot_res) + """
"""
elif que.type in['single_textbox']:
- cr.execute("select count(id) from survey_response_line where question_id = %d and single_text!=''" % que.id)
+ cr.execute("select count(id) from survey_response_line where question_id = %s and single_text!=''",(que.id,))
rml += """
@@ -270,7 +270,7 @@ class survey_analysis(report_rml):
"""
elif que.type in['comment']:
- cr.execute("select count(id) from survey_response_line where question_id = %d and comment !=''" % que.id)
+ cr.execute("select count(id) from survey_response_line where question_id = %s and comment !=''", (que.id,))
rml += """
@@ -303,12 +303,12 @@ class survey_analysis(report_rml):
rating_weight_sum = 0
for mat_col in range(1, len(matrix_ans)):
cr.execute("select count(sra.answer_id) from survey_response_line sr, survey_response_answer sra\
- where sr.id = sra.response_id and sra.answer_id = %d and sra.column_id ='%d'" % (ans.id,matrix_ans[mat_col][0]))
+ where sr.id = sra.response_id and sra.answer_id = %s and sra.column_id ='%s'", (ans.id,matrix_ans[mat_col][0]))
tot_res = cr.fetchone()[0]
cr.execute("select count(sra.answer_id),sqc.rating_weight from survey_response_line sr, survey_response_answer sra ,\
survey_question_column_heading sqc where sr.id = sra.response_id and \
- sqc.question_id = sr.question_id and sra.answer_id = %d and sqc.title ='%s'\
- group by sra.answer_id,sqc.rating_weight" % (ans.id,matrix_ans[mat_col][1]))
+ sqc.question_id = sr.question_id and sra.answer_id = %s and sqc.title ='%s'\
++ group by sra.answer_id,sqc.rating_weight", (ans.id,matrix_ans[mat_col][1]))
col_weight = cr.fetchone()
if not col_weight:
@@ -352,10 +352,10 @@ class survey_analysis(report_rml):
rml += """
""" + to_xml(tools.ustr(menu)) + """
"""
rml += """
Answer Count
"""
cr.execute("select count(id), sra.answer_id from survey_response_answer sra \
- where sra.column_id='%s' group by sra.answer_id " % (column.id))
+ where sra.column_id='%s' group by sra.answer_id ", (column.id,))
res_count = cr.dictfetchall()
cr.execute("select count(sra.id),sra.value_choice, sra.answer_id, sra.column_id from survey_response_answer sra \
- where sra.column_id='%s' group by sra.value_choice ,sra.answer_id, sra.column_id" % (column.id))
+ where sra.column_id='%s' group by sra.value_choice ,sra.answer_id, sra.column_id", (column.id,))
calc_percantage = cr.dictfetchall()
for ans in que.answer_choice_ids:
@@ -393,7 +393,7 @@ class survey_analysis(report_rml):
Answer Count
"""
for ans in que.answer_choice_ids:
- cr.execute("select answer from survey_response_answer where answer_id=%d group by answer" % ans.id)
+ cr.execute("select answer from survey_response_answer where answer_id=%s group by answer", (ans.id,))
tot_res = cr.dictfetchall()
total = 0
for tot in tot_res:
diff --git a/addons/survey/security/ir.model.access.csv b/addons/survey/security/ir.model.access.csv
index 2a64acdb0d4..5ea4017fb01 100644
--- a/addons/survey/security/ir.model.access.csv
+++ b/addons/survey/security/ir.model.access.csv
@@ -36,3 +36,16 @@
"access_survey_request_employee","survey.request.employee","model_survey_request","base.group_user",1,0,0,0
"access_survey_response_employee","survey.response employee","model_survey_response","base.group_user",1,0,0,0
"access_survey_employee","survey.employee","model_survey","base.group_user",1,0,0,0
+"access_survey_survey_user","survey.survey.user","model_survey","group_survey_user",1,1,1,1
+"access_survey_type_survey_user","survey.type.survey.user","model_survey_type","group_survey_user",1,1,1,1
+"access_survey_page_survey_user","survey.page.survey.user","model_survey_page","group_survey_user",1,1,1,1
+"access_survey_request_survey_user","survey.request.survey.user","model_survey_request","group_survey_user",1,1,1,1
+"access_survey_question_survey_user","survey.question.survey.user","model_survey_question","group_survey_user",1,1,1,1
+"access_survey_answer_survey_user","survey.answer.survey.user","model_survey_answer","group_survey_user",1,1,1,1
+"access_survey_response_survey_user","survey.response.survey.user","model_survey_response","group_survey_user",1,1,1,1
+"access_survey_response_answer_survey_user","survey.response.answer.survey.user","model_survey_response_answer","group_survey_user",1,1,1,1
+"access_survey_history_survey_user","survey.history.survey.user","model_survey_history","group_survey_user",1,1,1,1
+"access_survey_question_column_heading_survey_user","survey.question.column.heading.survey.user","model_survey_question_column_heading","group_survey_user",1,0,0,0
+"access_survey_tbl_column_heading_survey_user","survey.tbl.column.heading.survey.user","model_survey_tbl_column_heading","group_survey_user",1,1,1,1
+"access_survey_response_line_survey_user","survey.response.line.survey.user","model_survey_response_line","group_survey_user",1,1,1,1
+"access_survey_res_partner_address_survey_user","survey.res.partner.address.survey.user","base.model_res_partner_address","group_survey_user",1,1,1,0
diff --git a/addons/survey/security/survey_security.xml b/addons/survey/security/survey_security.xml
index 6c3559fa138..1506fdaec1b 100644
--- a/addons/survey/security/survey_security.xml
+++ b/addons/survey/security/survey_security.xml
@@ -11,6 +11,9 @@
Tools / User
+
+ Survey / User
+
diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml
index a45d8e2edc3..4fc58962442 100644
--- a/addons/survey/survey_view.xml
+++ b/addons/survey/survey_view.xml
@@ -4,11 +4,11 @@
+ groups="base.group_tool_manager,base.group_tool_user,base.group_system,base.group_user,group_survey_user" sequence="2"/>
-
+
@@ -25,9 +25,10 @@
+
+ context="{'active':True,'survey_id': active_id}" attrs="{'invisible':[('id','=',0)]}"/>
-
+
@@ -291,7 +292,7 @@
+ groups="base.group_tool_manager,base.group_tool_user,base.group_system,group_survey_user"/>