Filter By [[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]]
Display Account
-
Printing Date
+
Target Moves
[[ get_account(data) or removeParentNode('para') ]]
@@ -187,7 +187,7 @@
[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]
Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]
Display Account
-
Printing Date
+
Target Moves
[[ get_account(data) or removeParentNode('para') ]]
@@ -186,7 +186,7 @@
[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]
Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]
Partner's
-
Printing Date
+
Target Moves
-
-
[[ get_account(data) or '' ]]
+
+
[[ get_account(data) or '' ]]
[[ get_fiscalyear(data) or '' ]]
-
[[', '.join([ lt or '' for lt in get_journal(data) ]) ]]
+
[[', '.join([ lt or '' for lt in get_journal(data) ]) ]]
[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]]
- [[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
-
-
Start Date
-
End Date
-
-
-
[[ formatLang(get_start_date(data),date=True) ]]
-
[[ formatLang(get_end_date(data),date=True) ]]
-
-
- [[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
-
-
Start Period
-
End Period
-
-
-
[[ get_start_period(data) or removeParentNode('para') ]]
-
[[ get_end_period(data) or removeParentNode('para') ]]
diff --git a/addons/account/report/invoice.py b/addons/account/report/account_print_invoice.py
similarity index 95%
rename from addons/account/report/invoice.py
rename to addons/account/report/account_print_invoice.py
index b232a33b9d9..280bc0bc7a0 100644
--- a/addons/account/report/invoice.py
+++ b/addons/account/report/account_print_invoice.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 .
#
##############################################################################
@@ -31,7 +31,7 @@ class account_invoice(report_sxw.rml_parse):
report_sxw.report_sxw(
'report.account.invoice',
'account.invoice',
- 'addons/account/report/invoice.rml',
+ 'addons/account/report/account_print_invoice.rml',
parser=account_invoice
)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/report/invoice.rml b/addons/account/report/account_print_invoice.rml
similarity index 99%
rename from addons/account/report/invoice.rml
rename to addons/account/report/account_print_invoice.rml
index 173cbd1e6c4..c6ff4015ea6 100644
--- a/addons/account/report/invoice.rml
+++ b/addons/account/report/account_print_invoice.rml
@@ -362,7 +362,7 @@
- Fiscal Mapping Remark :
+ Fiscal Position:
[[ (o.fiscal_position.note and format(o.fiscal_position and o.fiscal_position.note)) or removeParentNode('blockTable') ]]
diff --git a/addons/account/report/overdue.py b/addons/account/report/account_print_overdue.py
similarity index 98%
rename from addons/account/report/overdue.py
rename to addons/account/report/account_print_overdue.py
index ebf50224a50..c59dd56a02f 100644
--- a/addons/account/report/overdue.py
+++ b/addons/account/report/account_print_overdue.py
@@ -90,7 +90,7 @@ class Overdue(report_sxw.rml_parse):
return message
report_sxw.report_sxw('report.account.overdue', 'res.partner',
- 'addons/account/report/overdue.rml', parser=Overdue)
+ 'addons/account/report/account_print_overdue.rml', parser=Overdue)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/report/overdue.rml b/addons/account/report/account_print_overdue.rml
similarity index 100%
rename from addons/account/report/overdue.rml
rename to addons/account/report/account_print_overdue.rml
diff --git a/addons/account/report/account_profit_horizontal.rml b/addons/account/report/account_profit_horizontal.rml
index d55b2e93a43..8c66f223df9 100644
--- a/addons/account/report/account_profit_horizontal.rml
+++ b/addons/account/report/account_profit_horizontal.rml
@@ -156,7 +156,7 @@
Fiscal Year
Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]
Display Account
-
Printing Date
+
Target Moves
[[ get_account(data) or removeParentNode('para') ]]
@@ -184,7 +184,7 @@
[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]
Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]
Display Account
-
Printing Date
+
Target Moves
[[ get_account(data) or removeParentNode('para') ]]
@@ -185,7 +185,7 @@
[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]
@@ -265,4 +243,4 @@
-
\ No newline at end of file
+
diff --git a/addons/hr_payroll/report/payslip.rml b/addons/hr_payroll/report/payslip.rml
index 58b2fd81275..cdbbe6bd5f4 100755
--- a/addons/hr_payroll/report/payslip.rml
+++ b/addons/hr_payroll/report/payslip.rml
@@ -1,6 +1,6 @@
-
+
@@ -333,7 +333,7 @@
Identification No
- [[ o.employee_id.otherid or '' ]]
+ [[ o.employee_id.passport_id and o.employee_id.passport_id.name or '' ]]
@@ -349,7 +349,7 @@
Designation
- [[ o.employee_id.contract_ids and o.employee_id.contract_ids[0].job_id.name or '' ]]
+ [[ o.employee_id.contract_id and o.employee_id.contract_id.job_id.name or '' ]]
@@ -392,7 +392,7 @@
Basic Salary
- [[ formatLang(o.basic_before_leaves) ]] [[ o.company_id.currency_id.symbol ]]
+ [[ formatLang(o.basic_before_leaves) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]]
- Total Deductions([[ o.company_id.currency_id.code ]])
+ Total Deductions([[ o.company_id and o.company_id.currency_id.code or '' ]])
- [[ formatLang(o.deduction) ]] [[ o.company_id.currency_id.symbol ]]
+ [[ formatLang(o.deduction) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]]
@@ -539,13 +539,13 @@
- [[ ol.type in ['advance','loan','otherpay','otherdeduct','installment'] and ol.code or '' ]]
+ [[ ol.code or '' ]]
- [[ ol.type in ['advance','loan','otherpay'] and formatLang(ol.total) or '' ]] [[ ol.type in ['advance','loan','otherpay'] and o.company_id.currency_id.symbol or '' ]]
+ [[ ol.type in ['advance','loan','otherpay'] and formatLang(ol.total) or '' ]] [[ ol.type in ['advance','loan','otherpay'] and o.company_id and o.company_id.currency_id.symbol or '' ]]
- [[ ol.type in ['otherdeduct','installment'] and formatLang(ol.total) or '' ]] [[ ol.type in ['advance','loan','otherpay'] and o.company_id.currency_id.symbol or '' ]]
+ [[ ol.type in ['otherdeduct','installment'] and formatLang(ol.total) or '' ]] [[ ol.type in ['otherdeduct','installment'] and o.company_id and o.company_id.currency_id.symbol or '' ]]
@@ -558,10 +558,10 @@
- Net Amount([[ o.company_id.currency_id.code ]])
+ Net Amount([[ o.company_id and o.company_id.currency_id.code or '' ]])
- [[ formatLang(o.net) ]] [[ o.company_id.currency_id.symbol ]]
+ [[ formatLang(o.net) ]] [[ o.company_id and o.company_id.currency_id.symbol or '' ]]
@@ -609,4 +609,4 @@
-
\ No newline at end of file
+
diff --git a/addons/hr_payroll/report/report_emp_salary_structure.py b/addons/hr_payroll/report/report_emp_salary_structure.py
index 7deafcf63e4..e875e774b43 100644
--- a/addons/hr_payroll/report/report_emp_salary_structure.py
+++ b/addons/hr_payroll/report/report_emp_salary_structure.py
@@ -33,32 +33,32 @@ class salary_structure_report(report_sxw.rml_parse):
self.localcontext.update({
'time': time,
'get_type':self.get_type,
- 'get_contract':self.get_contract,
+ #'get_contract':self.get_contract,
'get_line_amount_type':self.get_line_amount_type,
'get_line_type':self.get_line_type,
'get_line_amount_symbol':self.get_line_amount_symbol
})
- def get_contract(self,emp):
- curr_date = "'"+time.strftime("%Y-%m-%d")+"'"
- sql_req= '''
- SELECT c.id as id, c.wage as wage, struct_id as struct
- FROM hr_contract c
- LEFT JOIN hr_employee emp on (c.employee_id=emp.id)
- LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id)
- LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id)
- WHERE
- (emp.id=%s) AND
- (date_start <= %s) AND
- (date_end IS NULL OR date_end >= %s)
- LIMIT 1
- '''%(emp.id, curr_date, curr_date)
- self.cr.execute(sql_req)
- contract_id = self.cr.dictfetchone()
- if not contract_id:
- return []
- contract = self.pool.get('hr.contract').browse(self.cr, self.uid, [contract_id['id']])
- return contract
+# def get_contract(self,emp):
+# curr_date = "'"+time.strftime("%Y-%m-%d")+"'"
+# sql_req= '''
+# SELECT c.id as id, c.wage as wage, struct_id as struct
+# FROM hr_contract c
+# LEFT JOIN hr_employee emp on (c.employee_id=emp.id)
+# LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id)
+# LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id)
+# WHERE
+# (emp.id=%s) AND
+# (date_start <= %s) AND
+# (date_end IS NULL OR date_end >= %s)
+# LIMIT 1
+# '''%(emp.id, curr_date, curr_date)
+# self.cr.execute(sql_req)
+# contract_id = self.cr.dictfetchone()
+# if not contract_id:
+# return []
+# contract = self.pool.get('hr.contract').browse(self.cr, self.uid, [contract_id['id']])
+# return contract
def get_type(self,type):
return type[0].swapcase() + type[1:] +' Salary'
diff --git a/addons/hr_payroll/report/report_emp_salary_structure.rml b/addons/hr_payroll/report/report_emp_salary_structure.rml
index 6bfc528e4e0..5f81a0942ae 100644
--- a/addons/hr_payroll/report/report_emp_salary_structure.rml
+++ b/addons/hr_payroll/report/report_emp_salary_structure.rml
@@ -1,6 +1,6 @@
-
+
@@ -10,10 +10,6 @@
-
-
-
-
@@ -127,6 +123,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -138,10 +174,6 @@
-
-
-
-
@@ -150,10 +182,6 @@
-
-
-
-
@@ -166,9 +194,6 @@
-
-
-
@@ -177,9 +202,6 @@
-
-
-
@@ -241,24 +263,11 @@
[[repeatIn(objects,'employee')]]
-
-
-
- Salary Structure
-
-
-
-
-
-
-
-
-
-
+
- [[repeatIn(get_contract(employee),'cont')]]
+ [[ not employee.contract_id and removeParentNode('section') ]]
@@ -290,7 +299,7 @@
[[ employee.name ]]
- Other Id
+ Other No.
[[ employee.otherid or '' ]]
@@ -309,7 +318,7 @@
Designation
- [[ cont.job_id.name or '' ]]
+ [[ employee.contract_id.job_id and employee.contract_id.job_id.name or '' ]]
Phone No.
@@ -325,7 +334,7 @@
-
+
@@ -347,19 +356,19 @@
Start Date
- [[ formatLang(cont.date_start,date=True) or '' ]]
+ [[ formatLang(employee.contract_id.date_start,date=True) or '' ]]
End Date
- [[ formatLang(cont.date_end,date=True) or removeParentNode('para') ]]
+ [[ formatLang(employee.contract_id.date_end,date=True) or removeParentNode('para') ]]
Type
- [[ get_type(cont.wage_type_id.type) or '' ]]
+ [[ get_type(employee.contract_id.wage_type_id.type) or '' ]]
@@ -369,17 +378,55 @@
Salary
- [[ formatLang(cont.wage) or '' ]] [[ employee.company_id.currency_id.symbol]]
+ [[ formatLang(employee.contract_id.wage) or '' ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]
Notes:
- [[ cont.notes or '' ]]
+ [[ employee.contract_id.notes or '' ]]
-
+
+
+
+ Basic
+
+
+ [[ formatLang(employee.basic) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]
+
+
+ Allowances
+
+
+ [[ formatLang(employee.advantages_gross) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]
+
+
+ Gross Salary
+
+
+ [[ formatLang(employee.gross) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]
+
+
+
+
+
+
+ Deductions
+
+
+ [[ formatLang(employee.advantages_net) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]
+
+
+ Net Salary
+
+
+ [[ formatLang(employee.net) ]] [[ employee.company_id and employee.company_id.currency_id.symbol or '' ]]
+
+
+
+
@@ -396,7 +443,7 @@
-
+
Code
@@ -404,32 +451,20 @@
Name
+
+ Amount
+
Amount Type
-
- Amount / Percentage
-
-
- Type
-
-
- Category
-
-
- General Account
-
-
- Analytic Account
-
- [[repeatIn(cont.struct_id.line_ids,'line')]]
-
+ [[repeatIn(employee.contract_id.struct_id and employee.contract_id.struct_id.line_ids or [],'line')]]
+
[[ line.code or '' ]]
@@ -437,24 +472,12 @@
[[ line.name ]]
+
+ [[ line.amount_type =='per' and formatLang(line.amount*100) or formatLang(line.amount)]] [[ get_line_amount_symbol(line.amount_type) ]]
+
[[ get_line_amount_type(line.amount_type) ]]
-
- [[ formatLang(line.amount) or '']][[ get_line_amount_symbol(line.amount_type) ]]
-
-
- [[ get_line_type(line.type) ]]
-
-
- [[ line.category_id.name ]]
-
-
- [[ line.account_id.name ]]
-
-
- [[ line.analytic_account_id and line.analytic_account_id.name or '' ]]
-
-
+
diff --git a/addons/l10n_ch/wizard/bvr_import.py b/addons/l10n_ch/wizard/bvr_import.py
index 9d055bcfb5f..3bcf4255f3f 100644
--- a/addons/l10n_ch/wizard/bvr_import.py
+++ b/addons/l10n_ch/wizard/bvr_import.py
@@ -72,13 +72,12 @@ def _reconstruct_invoice_ref(cursor, user, reference, context=None):
def _import(obj, cursor, user, data, context=None):
pool = pooler.get_pool(cursor.dbname)
+ statement_obj = pool.get('account.bank.statement')
statement_line_obj = pool.get('account.bank.statement.line')
# statement_reconcile_obj = pool.get('account.bank.statement.reconcile')
- voucher_obj = self.pool.get('account.voucher')
- voucher_line_obj = self.pool.get('account.voucher.line')
+ voucher_obj = pool.get('account.voucher')
+ voucher_line_obj = pool.get('account.voucher.line')
move_line_obj = pool.get('account.move.line')
- property_obj = pool.get('ir.property')
- model_fields_obj = pool.get('ir.model.fields')
attachment_obj = pool.get('ir.attachment')
file = data['form']['file']
statement_id = data['id']
@@ -137,22 +136,17 @@ def _import(obj, cursor, user, data, context=None):
total_cost += record['cost']
records.append(record)
- model_fields_ids = model_fields_obj.search(cursor, user, [
- ('name', 'in', ['property_account_receivable', 'property_account_payable']),
- ('model', '=', 'res.partner'),
- ], context=context)
- property_ids = property_obj.search(cursor, user, [
- ('fields_id', 'in', model_fields_ids),
- ('res_id', '=', False),
- ], context=context)
-
+# model_fields_ids = model_fields_obj.search(cursor, user, [
+# ('name', 'in', ['property_account_receivable', 'property_account_payable']),
+# ('model', '=', 'res.partner'),
+# ], context=context)
+# property_ids = property_obj.search(cursor, user, [
+# ('fields_id', 'in', model_fields_ids),
+# ('res_id', '=', False),
+# ], context=context)
account_receivable = False
account_payable = False
- for property in property_obj.browse(cursor, user, property_ids, context=context):
- if property.fields_id.name == 'property_account_receivable':
- account_receivable = int(property.value.split(',')[1])
- elif property.fields_id.name == 'property_account_payable':
- account_payable = int(property.value.split(',')[1])
+ statement = statement_obj.browse(cursor, user, statement_id, context=context)
for record in records:
# Remove the 11 first char because it can be adherent number
@@ -166,6 +160,7 @@ def _import(obj, cursor, user, data, context=None):
'type': (record['amount'] >= 0 and 'customer') or 'supplier',
'statement_id': statement_id,
}
+
line_ids = move_line_obj.search(cursor, user, [
('ref', 'like', reference),
('reconcile_id', '=', False),
@@ -174,22 +169,49 @@ def _import(obj, cursor, user, data, context=None):
if not line_ids:
line_ids = _reconstruct_invoice_ref(cursor, user, reference, None)
- line2reconcile = False
partner_id = False
account_id = False
for line in move_line_obj.browse(cursor, user, line_ids, context=context):
- if line.partner_id.id:
- partner_id = line.partner_id.id
+ account_receivable = line.partner_id.property_account_receivable.id
+ account_payable = line.partner_id.property_account_payable.id
+ partner_id = line.partner_id.id
+ move_id = line.move_id.id
if record['amount'] >= 0:
if round(record['amount'] - line.debit, 2) < 0.01:
- line2reconcile = line.id
+# line2reconcile = line.id
account_id = line.account_id.id
break
else:
if round(line.credit + record['amount'], 2) < 0.01:
- line2reconcile = line.id
+# line2reconcile = line.id
account_id = line.account_id.id
break
+ result = voucher_obj.onchange_partner_id(cursor, user, [], partner_id=partner_id, journal_id=statement.journal_id.id, price=abs(record['amount']), currency_id= statement.currency.id, ttype='payment', context=context)
+
+ voucher_res = { 'type': 'payment' ,
+ 'name': values['name'],
+ 'partner_id': partner_id,
+ 'journal_id': statement.journal_id.id,
+ 'account_id': result.get('account_id', statement.journal_id.default_credit_account_id.id),
+ 'company_id': statement.company_id.id,
+ 'currency_id': statement.currency.id,
+ 'date': record['date'] or time.strftime('%Y-%m-%d'),
+ 'amount': abs(record['amount']),
+ 'period_id': statement.period_id.id
+ }
+ voucher_id = voucher_obj.create(cursor, user, voucher_res, context=context)
+ context.update({'move_line_ids': line_ids})
+ values['voucher_id'] = voucher_id
+ voucher_line_dict = False
+ if result['value']['line_ids']:
+ for line_dict in result['value']['line_ids']:
+ move_line = move_line_obj.browse(cursor, user, line_dict['move_line_id'], context)
+ if move_id == move_line.move_id.id:
+ voucher_line_dict = line_dict
+ if voucher_line_dict:
+ voucher_line_dict.update({'voucher_id':voucher_id})
+ voucher_line_obj.create(cursor, user, voucher_line_dict, context=context)
+
if not account_id:
if record['amount'] >= 0:
account_id = account_receivable
@@ -201,31 +223,6 @@ def _import(obj, cursor, user, data, context=None):
values['account_id'] = account_id
values['partner_id'] = partner_id
- if line2reconcile:
- voucher_res = { 'type': 'payment' ,
- 'name': line.name,
- 'partner_id': line.partner_id.id,
- 'journal_id': statement.journal_id.id,
- 'account_id': account,
- 'company_id': statement.company_id.id,
- 'currency_id': statement.currency.id,
- 'date': line.date or time.strftime('%Y-%m-%d'),
- 'amount': abs(amount),
- 'period_id': statement.period_id.id
- }
- voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
- context.update({'move_line_ids': line_ids})
- 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']:
- move_line = self.pool.get('account.move.line').browse(cr, uid, line_dict['move_line_id'], context)
- if line.move_line_id.move_id.id == move_line.move_id.id:
- voucher_line_dict = line_dict
- if voucher_line_dict:
- voucher_line_dict.update({'voucher_id':voucher_id})
- voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
- values['voucher_id'] = voucher_id
# values['reconcile_id'] = statement_reconcile_obj.create(cursor, user, {
# 'line_ids': [(6, 0, [line2reconcile])],
# }, context=context)
diff --git a/addons/marketing/i18n/nl.po b/addons/marketing/i18n/nl.po
index bcf2ce6e299..d194189a5ee 100644
--- a/addons/marketing/i18n/nl.po
+++ b/addons/marketing/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-20 07:04+0000\n"
-"PO-Revision-Date: 2010-10-06 15:02+0000\n"
-"Last-Translator: Douwe Wullink (Dypalio) \n"
+"PO-Revision-Date: 2010-10-08 07:32+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-10-08 04:39+0000\n"
+"X-Launchpad-Export-Date: 2010-10-09 12:13+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: marketing
diff --git a/addons/marketing/i18n/ru.po b/addons/marketing/i18n/ru.po
new file mode 100644
index 00000000000..e0e0b256623
--- /dev/null
+++ b/addons/marketing/i18n/ru.po
@@ -0,0 +1,124 @@
+# Russian translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2010-08-20 07:04+0000\n"
+"PO-Revision-Date: 2010-10-10 07:29+0000\n"
+"Last-Translator: OpenERP Administrators \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-10-11 04:45+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: marketing
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "Некорректный формат XML для просмотра архитектуры!"
+
+#. module: marketing
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Название объекта должно начинаться с x_ и не должно содержать специальных "
+"символов !"
+
+#. module: marketing
+#: field:marketing.installer,progress:0
+msgid "Configuration Progress"
+msgstr ""
+
+#. module: marketing
+#: view:marketing.installer:0
+msgid "title"
+msgstr "заголовок"
+
+#. module: marketing
+#: field:marketing.installer,email_template:0
+msgid "Automated E-Mails"
+msgstr "Автоматизированные рассылки"
+
+#. module: marketing
+#: field:marketing.installer,config_logo:0
+msgid "Image"
+msgstr "Изображение"
+
+#. module: marketing
+#: help:marketing.installer,marketing_campaign:0
+msgid ""
+"Helps you to manage marketing campaigns and automate actions and "
+"communication steps."
+msgstr ""
+"Помогает Вам настроить маркетинговые кампании и автоматизировать действия и "
+"этапы взамодействия"
+
+#. module: marketing
+#: help:marketing.installer,marketing_campaign_mailchimp:0
+msgid ""
+"This modules integrate mailchimp.com's service with OpenERP to automate mass "
+"mailings."
+msgstr ""
+"Этот модуль интегрирует в OpenERP сервисы mailchimp.com для автоматизации "
+"почтовых рассылок"
+
+#. module: marketing
+#: model:ir.module.module,description:marketing.module_meta_information
+msgid "Menu for Marketing"
+msgstr ""
+
+#. module: marketing
+#: help:marketing.installer,email_template:0
+msgid ""
+"Helps you to design templates of emails and integrate them in your different "
+"processes."
+msgstr ""
+"Помогает разработать шаблоны сообщений электронной почты и интегрировать их "
+"в ваши процессы."
+
+#. module: marketing
+#: help:marketing.installer,crm_profiling:0
+msgid ""
+"Helps you to perform segmentation within partners and design questionaires."
+msgstr ""
+
+#. module: marketing
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Недопустимое имя модели в определении действия."
+
+#. module: marketing
+#: model:ir.module.module,shortdesc:marketing.module_meta_information
+msgid "Marketing"
+msgstr "Маркетинг"
+
+#. module: marketing
+#: field:marketing.installer,crm_profiling:0
+msgid "Profiling Tools"
+msgstr "Средства профилирования"
+
+#. module: marketing
+#: field:marketing.installer,marketing_campaign:0
+msgid "Marketing Campaigns"
+msgstr "Маркетинговые кампании"
+
+#. module: marketing
+#: model:ir.model,name:marketing.model_marketing_installer
+msgid "marketing.installer"
+msgstr ""
+
+#. module: marketing
+#: field:marketing.installer,marketing_campaign_mailchimp:0
+msgid "Mailchimp Integration"
+msgstr "Интеграция с сервисом MailChimp"
+
+#. module: marketing
+#: model:ir.actions.act_window,name:marketing.action_marketing_installer
+msgid "Marketing Modules Installation"
+msgstr "Установка модулей маркетинга"
diff --git a/addons/marketing_campaign/i18n/ru.po b/addons/marketing_campaign/i18n/ru.po
new file mode 100644
index 00000000000..bbcc17a7e60
--- /dev/null
+++ b/addons/marketing_campaign/i18n/ru.po
@@ -0,0 +1,935 @@
+# Russian translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2010-08-20 07:09+0000\n"
+"PO-Revision-Date: 2010-10-10 07:30+0000\n"
+"Last-Translator: OpenERP Administrators \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-10-11 04:45+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid "The current step for this item has no email or report to preview."
+msgstr ""
+"Текущий шаг для этого элемента не имеет доступных для предварительного "
+"просмотра отчетов иили шаблонов электронной почты"
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.transition,trigger:0
+msgid "Time"
+msgstr "Время"
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: view:marketing.campaign:0
+#: view:marketing.campaign.segment:0
+#: view:marketing.campaign.workitem:0
+msgid "Group By..."
+msgstr "Группировать по .."
+
+#. module: marketing_campaign
+#: field:marketing.campaign.transition,trigger:0
+msgid "Trigger"
+msgstr "Активатор"
+
+#. module: marketing_campaign
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Недопустимое имя модели в определении действия."
+
+#. module: marketing_campaign
+#: field:campaign.analysis,count:0
+msgid "# of Actions"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+msgid "Campaign Editor"
+msgstr "Редактор кампаний"
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+msgid "Today"
+msgstr "Сегодня"
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "March"
+msgstr "Март"
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,object_id:0
+#: field:marketing.campaign.segment,object_id:0
+#: field:marketing.campaign.workitem,object_id:0
+msgid "Object"
+msgstr "Объект"
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: view:marketing.campaign.segment:0
+msgid "Set to Draft"
+msgstr "Сделать черновиком"
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,to_ids:0
+msgid "Next Activities"
+msgstr "Следующие действия"
+
+#. module: marketing_campaign
+#: view:marketing.campaign.segment:0
+msgid "Synchronization"
+msgstr "Синхронизация"
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+msgid "This Year"
+msgstr "Этот год"
+
+#. module: marketing_campaign
+#: help:marketing.campaign,partner_field_id:0
+msgid ""
+"The generated workitems will be linked to the partner related to the record. "
+"If the record is the partner itself left this field empty."
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid "No preview"
+msgstr "Без предпросмотра"
+
+#. module: marketing_campaign
+#: view:marketing.campaign.activity:0
+msgid "Outgoing Transitions"
+msgstr "Исходящее перемещение"
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+msgid "Reset"
+msgstr "Сброс"
+
+#. module: marketing_campaign
+#: help:marketing.campaign.activity,type:0
+msgid ""
+"Describe type of action to be performed on the Activity.Eg : Send email,Send "
+"paper.."
+msgstr ""
+"Опишите тип действия которое необходимо выполнить. Например: Отправить "
+"электронную почту, отправить буклет ..."
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.transition,interval_type:0
+msgid "Year(s)"
+msgstr "Год (а)"
+
+#. module: marketing_campaign
+#: help:marketing.campaign.activity,report_directory_id:0
+msgid "This folder is used to store the generated reports"
+msgstr "Сгенереированные отчеты будут сохранены в этой папке"
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: selection:marketing.campaign,state:0
+#: selection:marketing.campaign.segment,state:0
+#: selection:marketing.campaign.workitem,state:0
+msgid "Cancelled"
+msgstr "Отменено"
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.transition,trigger:0
+msgid "Automatic"
+msgstr "Автоматически"
+
+#. module: marketing_campaign
+#: view:marketing.campaign.activity:0
+msgid "Activity Definition"
+msgstr "Определение действия"
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,keep_if_condition_not_met:0
+msgid "Keep as cancelled when condition not met"
+msgstr "Оставить как отмененное если условие не выполнено."
+
+#. module: marketing_campaign
+#: help:marketing.campaign,mode:0
+msgid ""
+"Test - It creates and process all the activities directly (without waiting "
+"for the delay on transitions) but does not send emails or produce reports.\n"
+"Test in Realtime - It creates and processes all the activities directly but "
+"does not send emails or produce reports.\n"
+"With Manual Confirmation - the campaigns runs normally, but the user has to "
+"validate all workitem manually.\n"
+"Normal - the campaign runs normally and automatically sends all emails and "
+"reports (be very careful with this mode, you're live!)"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: field:campaign.analysis,campaign_id:0
+#: view:marketing.campaign:0
+#: field:marketing.campaign.activity,campaign_id:0
+#: view:marketing.campaign.segment:0
+#: field:marketing.campaign.segment,campaign_id:0
+#: field:marketing.campaign.workitem,campaign_id:0
+msgid "Campaign"
+msgstr "Кампания"
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,start:0
+msgid "Start"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: field:campaign.analysis,segment_id:0
+#: view:marketing.campaign.workitem:0
+#: field:marketing.campaign.workitem,segment_id:0
+msgid "Segment"
+msgstr "Сегмент"
+
+#. module: marketing_campaign
+#: field:marketing.campaign.segment,sync_mode:0
+msgid "Workitem creation mode"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.transition,interval_type:0
+msgid "Month(s)"
+msgstr "Месяц (ы)"
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid ""
+"The campaign hasn't any starting activity nor any activity with a signal and "
+"no previous activity."
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: field:campaign.analysis,partner_id:0
+#: model:ir.model,name:marketing_campaign.model_res_partner
+#: field:marketing.campaign.workitem,partner_id:0
+msgid "Partner"
+msgstr "Партнёр"
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.segment,sync_mode:0
+msgid "If record created after last sync"
+msgstr "Если запись сделана после последней синхронизации"
+
+#. module: marketing_campaign
+#: view:marketing.campaign.activity:0
+msgid "Transitions"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.segment:0
+msgid "Create After Sync"
+msgstr "Создать После Синхронизации"
+
+#. module: marketing_campaign
+#: view:marketing.campaign.segment:0
+msgid "Dates"
+msgstr "Даты"
+
+#. module: marketing_campaign
+#: help:marketing.campaign.segment,sync_mode:0
+msgid ""
+"Determines when new workitems should be created for records matching a "
+"segment."
+msgstr ""
+"Определяет, должен ли рабочий элемент создаваться для записи соответствующей "
+"сегменту"
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: view:marketing.campaign:0
+#: field:marketing.campaign,state:0
+#: view:marketing.campaign.segment:0
+#: field:marketing.campaign.segment,state:0
+#: view:marketing.campaign.workitem:0
+#: field:marketing.campaign.workitem,state:0
+msgid "State"
+msgstr "Статус"
+
+#. module: marketing_campaign
+#: model:ir.module.module,description:marketing_campaign.module_meta_information
+msgid ""
+"\n"
+"Allows you to setup leads automation through marketing campaigns. The "
+"campaigns\n"
+"are dynamic and multi-channels. The process:\n"
+"* Design marketing campaigns that incluces mail templates, reports to "
+"print,\n"
+" miscelleanous actions, etc.\n"
+"* Define segments that are selections of target people\n"
+"* Launch your campaign to automate communications.\n"
+"\n"
+"If you need demo data, you can install the module "
+"marketing_campaign_crm_demo.\n"
+" "
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign.activity,condition:0
+msgid ""
+"Python expression to decide whether the activity can be executed, otherwise "
+"it will be deleted or cancelled.The expression may use the following "
+"[browsable] variables:\n"
+" - activity: the campaign activity\n"
+" - workitem: the campaign workitem\n"
+" - object: the object this campaign item represents\n"
+" - transitions: list of campaign transitions outgoing from this activity\n"
+"...- re: Python regular expression module"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+msgid "Marketing Reports"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,type:0
+msgid "Type"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.workitem,res_name:0
+msgid "Resource Name"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: view:marketing.campaign.segment:0
+msgid "Run"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid ""
+"The campaign cannot be started: an email account is missing in the email "
+"activity '%s'"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,from_ids:0
+msgid "Previous Activities"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.transition,activity_from_id:0
+msgid "Previous Activity"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+msgid "Marketing Campaign Activities"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+#: field:marketing.campaign.workitem,error_msg:0
+msgid "Error Message"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.actions.act_window,name:marketing_campaign.action_campaign_analysis_all
+#: model:ir.actions.act_window,name:marketing_campaign.action_marketing_campaign_form
+#: model:ir.ui.menu,name:marketing_campaign.menu_action_campaign_analysis_all
+#: model:ir.ui.menu,name:marketing_campaign.menu_marketing_campaign
+#: model:ir.ui.menu,name:marketing_campaign.menu_marketing_campaign_form
+#: view:marketing.campaign:0
+msgid "Campaigns"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.transition,interval_type:0
+msgid "Interval Unit"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:campaign.analysis,country_id:0
+msgid "Country"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "July"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.ui.menu,name:marketing_campaign.menu_marketing_configuration
+msgid "Configuration"
+msgstr ""
+
+#. module: marketing_campaign
+#: constraint:ir.cron:0
+msgid "Invalid arguments"
+msgstr ""
+
+#. module: marketing_campaign
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.transition,interval_type:0
+msgid "Hour(s)"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.model,name:marketing_campaign.model_marketing_campaign_segment
+msgid "Campaign Segment"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.segment:0
+#: view:marketing.campaign.workitem:0
+msgid "Cancel"
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign.activity,keep_if_condition_not_met:0
+msgid ""
+"By activating this option, workitems that aren't executed because the "
+"condition is not met are marked as cancelled instead of being deleted."
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+msgid "Exceptions"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:res.partner,workitem_ids:0
+msgid "Workitems"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign,fixed_cost:0
+msgid "Fixed Cost"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.transition,interval_nbr:0
+msgid "Interval Value"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:campaign.analysis,revenue:0
+#: field:marketing.campaign.activity,revenue:0
+msgid "Revenue"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "September"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "December"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: field:campaign.analysis,month:0
+msgid "Month"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.transition,activity_to_id:0
+msgid "Next Activity"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,email_template_id:0
+msgid "The e-mail to send when this activity is activated"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+msgid "This Month"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+msgid "Test Mode"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.model,name:marketing_campaign.model_ir_actions_report_xml
+msgid "ir.actions.report.xml"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+msgid "Manual Mode"
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign.activity,server_action_id:0
+msgid "The action to perform when this activity is activated"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign,partner_field_id:0
+msgid "Partner Field"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.model,name:marketing_campaign.model_campaign_analysis
+msgid "Campaign Analysis"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign,mode:0
+msgid "Test in Realtime"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign,mode:0
+msgid "Test Directly"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,report_directory_id:0
+msgid "Directory"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.segment,sync_last_date:0
+msgid "Latest Synchronization"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: selection:marketing.campaign,state:0
+#: view:marketing.campaign.segment:0
+#: selection:marketing.campaign.segment,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: marketing_campaign
+#: constraint:ir.ui.menu:0
+msgid "Error ! You can not create recursive Menu."
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.segment,date_run:0
+msgid "Launching Date"
+msgstr ""
+
+#. module: marketing_campaign
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+msgid "Preview"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: view:marketing.campaign.segment:0
+#: view:marketing.campaign.workitem:0
+msgid "Status"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.segment:0
+msgid "Run Date"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+msgid "Related Resource"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "August"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign,mode:0
+msgid "Normal"
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign.activity,start:0
+msgid "This activity is launched when the campaign starts."
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign.activity,signal:0
+msgid ""
+"An activity with a signal can be called programmatically. Be careful, the "
+"workitem is always created when a signal is sent"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "June"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.segment,sync_mode:0
+msgid "All records (no duplicates)"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: field:campaign.analysis,date:0
+#: view:marketing.campaign.workitem:0
+msgid "Date"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "November"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,condition:0
+msgid "Condition"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,report_id:0
+msgid "The report to generate when this activity is activated"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+#: selection:marketing.campaign.workitem,state:0
+msgid "Exception"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "October"
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign,fixed_cost:0
+msgid ""
+"Fixed cost for the campaign (used for campaign analysis), see also variable "
+"cost on activities"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "January"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+#: field:marketing.campaign.workitem,date:0
+msgid "Execution Date"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.model,name:marketing_campaign.model_marketing_campaign_workitem
+msgid "Campaign Workitem"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.segment,ir_filter_id:0
+msgid "Filter"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.segment:0
+msgid "Synchronize"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid "Error"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.activity:0
+#: field:marketing.campaign.activity,server_action_id:0
+#: selection:marketing.campaign.activity,type:0
+msgid "Action"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid "Automatic transition"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:res.partner:0
+msgid "History"
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign,object_id:0
+msgid "Choose the model on which you want this campaign to be run"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.module.module,shortdesc:marketing_campaign.module_meta_information
+msgid "marketing_campaign"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+msgid "Process"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#: selection:marketing.campaign.transition,trigger:0
+#, python-format
+msgid "Cosmetic"
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign.transition,trigger:0
+msgid "How is the destination workitem triggered"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: selection:marketing.campaign,state:0
+#: selection:marketing.campaign.segment,state:0
+#: selection:marketing.campaign.workitem,state:0
+msgid "Done"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.model,name:marketing_campaign.model_email_template
+msgid "Email Templates for Models"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: view:marketing.campaign.segment:0
+msgid "Close"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid "The campaign cannot be marked as done before all segments are done"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.workitem,res_id:0
+msgid "Resource ID"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.model,name:marketing_campaign.model_marketing_campaign_transition
+msgid "Campaign Transition"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: view:marketing.campaign.workitem:0
+#: selection:marketing.campaign.workitem,state:0
+msgid "To Do"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.workitem:0
+msgid "Campaign Step"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.actions.act_window,name:marketing_campaign.action_marketing_campaign_segment_form
+#: model:ir.ui.menu,name:marketing_campaign.menu_marketing_campaign_segment_form
+#: view:marketing.campaign.segment:0
+msgid "Segments"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.actions.act_window,name:marketing_campaign.act_marketing_campaing_segment_opened
+msgid "All Segments"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.activity:0
+msgid "Incoming Transitions"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.activity,type:0
+msgid "E-mail"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid ""
+"The campaign cannot be started: the email account is not approved in the "
+"email activity '%s'"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.transition,interval_type:0
+msgid "Day(s)"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign,activity_ids:0
+#: view:marketing.campaign.activity:0
+msgid "Activities"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "May"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign.segment:0
+msgid "Modified after Sync"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: selection:marketing.campaign,state:0
+#: view:marketing.campaign.segment:0
+#: selection:marketing.campaign.segment,state:0
+msgid "Running"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.activity,type:0
+msgid "Paper"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid "After %(interval_nbr)d %(interval_type)s"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.model,name:marketing_campaign.model_marketing_campaign
+msgid "Marketing Campaign"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.segment,date_done:0
+msgid "End Date"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "February"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: field:marketing.campaign,object_id:0
+msgid "Resource"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign,name:0
+#: field:marketing.campaign.activity,name:0
+#: field:marketing.campaign.segment,name:0
+#: field:marketing.campaign.transition,name:0
+msgid "Name"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid "Email Preview"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,signal:0
+msgid "Signal"
+msgstr ""
+
+#. module: marketing_campaign
+#: help:marketing.campaign.workitem,date:0
+msgid "If date is not set, this workitem have to be run manually"
+msgstr ""
+
+#. module: marketing_campaign
+#: code:addons/marketing_campaign/marketing_campaign.py:0
+#, python-format
+msgid "The campaign cannot be started: there are no activities in it"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:campaign.analysis,month:0
+msgid "April"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:marketing.campaign:0
+#: field:marketing.campaign,mode:0
+msgid "Mode"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:campaign.analysis,activity_id:0
+#: view:marketing.campaign.workitem:0
+#: field:marketing.campaign.workitem,activity_id:0
+msgid "Activity"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.actions.act_window,name:marketing_campaign.action_marketing_campaign_workitem
+#: model:ir.ui.menu,name:marketing_campaign.menu_action_marketing_campaign_workitem
+msgid "Campaign Followup"
+msgstr ""
+
+#. module: marketing_campaign
+#: model:ir.model,name:marketing_campaign.model_marketing_campaign_activity
+msgid "Campaign Activity"
+msgstr ""
+
+#. module: marketing_campaign
+#: field:marketing.campaign.activity,variable_cost:0
+msgid "Variable Cost"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign.segment,sync_mode:0
+msgid "If record modified after last sync (no duplicates)"
+msgstr ""
+
+#. module: marketing_campaign
+#: selection:marketing.campaign,mode:0
+msgid "With Manual Confirmation"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: field:campaign.analysis,total_cost:0
+msgid "Cost"
+msgstr ""
+
+#. module: marketing_campaign
+#: view:campaign.analysis:0
+#: field:campaign.analysis,year:0
+msgid "Year"
+msgstr ""
diff --git a/addons/marketing_campaign_mailchimp/__init__.py b/addons/marketing_campaign_mailchimp/__init__.py
deleted file mode 100644
index 808e5fc281f..00000000000
--- a/addons/marketing_campaign_mailchimp/__init__.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-import marketing_campaign_mailchimp
-import wizard
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/__openerp__.py b/addons/marketing_campaign_mailchimp/__openerp__.py
deleted file mode 100644
index b046b4ef782..00000000000
--- a/addons/marketing_campaign_mailchimp/__openerp__.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-
-{
- "name" : "",
- "version" : "1.1",
- "depends" : ['marketing_campaign'],
- "author" : "OpenERP SA",
- "category": 'Generic Modules/Marketing',
- "description": """
- This module provides integration of the mailchimp.com marketing campaign and mailing-list service, connecting via Mailchimp's WebServices API.
- You can define multiple Mailchimp accounts and then use them as you wish through a new type of activity, providing direct connection to your Mailchimp Lists.""",
- 'website': 'http://www.openerp.com',
- 'init_xml': [],
- 'update_xml': [
- "security/ir.model.access.csv",
- 'marketing_campaign_mailchimp_view.xml',
- 'wizard/create_list_view.xml',
- ],
- 'demo_xml': [],
- 'installable': True,
- 'active': False,
-}
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp.py b/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp.py
deleted file mode 100644
index 2b482867694..00000000000
--- a/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp.py
+++ /dev/null
@@ -1,211 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-import urllib
-import urllib2
-import simplejson as json
-import time
-
-from osv import fields, osv
-
-mailchimp_url = 'http://%s.api.mailchimp.com/1.2'
-
-class mailchimp_account(osv.osv):
- _name = "mailchimp.account"
-
- _columns = {
- 'name': fields.char('Account Name', size=64),
- 'username': fields.char('Username', size=64, required=True),
- 'password': fields.char('Password', size=64, required=True),
- 'apikey': fields.char('API Key', size=128),
- 'data_center': fields.selection([('us1', 'US1'), ('us2', 'US2'),
- ('uk1', 'UK1')], 'Data Center'),
- 'state': fields.selection([('draft', 'Draft'), ('approved', 'Approved'),
- ('cancelled', 'Cancelled')], 'State', readonly=True)
- }
-
- _defaults = {
- 'state': lambda *a: 'draft'
- }
-
- def get_response(self, cr, uid, mailchimp_id, method, params={}):
- mailchimp_account = self.browse(cr, uid, mailchimp_id)
- params['output'] = 'json'
- if method == 'login':
- params['username'] = mailchimp_account.username
- params['password'] = mailchimp_account.password
- else :
- params['apikey'] = mailchimp_account.apikey
- url = mailchimp_url%mailchimp_account.data_center+ '/?method=%s'%method
- params = urllib.urlencode(params, doseq=True)
- response = urllib2.urlopen(url, params)
- return json.loads(response.read())
-
- def button_approve(self, cr, uid, ids, context):
- acc_obj = self.browse(cr, uid, ids)[0]
- vals = {}
- if not acc_obj.apikey:
- method = 'login'
- else:
- method = 'ping'
- response = self.get_response(cr, uid, acc_obj.id, method)
- if 'error' not in response:
- if method == 'login' :
- vals['apikey'] = response
- vals['state'] = 'approved'
- self.write(cr, uid, ids, vals)
- else :
- raise osv.except_osv('Error!!!',
- "Can't approved accoutnt : %s"%response['error'])
- return True
-
- def button_cancel(self, cr, uid, ids, context):
- self.write(cr, uid, ids, {'state': 'cancelled'})
- return True
-
- def add_partner_list(self, cr, uid, account_id, list_id, partner_ids):
- vals = {} # just dictionary with partner_id and updated in list or not
- for partner in self.pool.get('res.partner').browse(cr, uid, partner_ids):
- params = {
- 'id' : list_id,
- 'email_address' : partner.email,
- 'email_type':'text',
- 'merge_vars[FNAME]':partner.name ,
- 'merge_vars[date]' : time.strftime('%Y-%m-%d'),
- 'merge_vars[phone]' : partner.phone,
- 'merge_vars[website]' : partner.website,
- 'merge_vars[address][country]' : partner.country.code,
- 'merge_vars[address][city]' : partner.city,
- 'double_optin':False
- }
- vals[partner.id] = self.get_response(cr, uid, account_id,
- 'listSubscribe', params)
- return vals
-
-mailchimp_account()
-
-class mailchimp_list(osv.osv_memory):
- _name = "mailchimp.list"
- _description = "Mailchimp list"
-
- _columns = {
- 'mailchimp_account_id': fields.many2one('mailchimp.account',
- 'Mailchimp Account', required=True),
- 'name': fields.char('Name', size=64)
- }
-
-mailchimp_list()
-
-class marketing_campaign(osv.osv):
- _inherit = "marketing.campaign"
-
- _columns = {
- 'mailchimp_account_id': fields.many2one(
- 'mailchimp.account', 'Account'),
- 'mailchimp_campaign': fields.char('campaign', size=64),
- }
-marketing_campaign()
-
-
-class marketing_campaign_activity(osv.osv):
- _inherit = "marketing.campaign.activity"
-
- _columns = {
- 'mailchimp_account_id': fields.many2one(
- 'mailchimp.account', 'Account'),
- 'mailchimp_list': fields.char('List', size=64),
- }
-
- def onchange_mailchimp(self, cr, uid, ids, mailchimp_account_id):
- if mailchimp_account_id:
- return {'value':{'mailchimp_list':''}}
- return {'value':{}}
-
- def onchange_mailchimp_list(self, cr, uid, ids, mailchimp_account_id,
- mailchimp_list):
- if mailchimp_account_id and mailchimp_list:
- lists = self.pool.get('mailchimp.account').get_response(cr,
- uid, mailchimp_account_id, 'lists')
- list_names = [l['name'] for l in lists]
- if mailchimp_list not in list_names:
- raise osv.except_osv('Error!!!',"Lists doesn't exists")
- else :
- return {}
- return {'value':{}}
-
- def _process_wi_mailchimp(self, cr, uid, activity, workitem, context=None):
- mailchimp_account_id = activity.mailchimp_account_id.id
- list_name = activity.mailchimp_list
- mc_acc_obj = self.pool.get('mailchimp.account')
- lists = mc_acc_obj.get_response(cr, uid, mailchimp_account_id, 'lists')
- list_id = ''
- for l in lists :
- if l['name'] == list_name:
- list_id = l['id']
- break;
- res_model = workitem.object_id.model
- res_id = workitem.res_id
- model_obj = self.pool.get(res_model).browse(cr, uid, res_id)
- params ={}
- if res_model == 'res.partner' :
- params.update({
- 'email_address' : model_obj.email,
- 'merge_vars[FNAME]':model_obj.name and model_obj.name or '',
- 'merge_vars[website]' : model_obj.website,
- 'merge_vars[address][country]' : model_obj.country.code,
- })
- elif res_model == 'crm.lead' :
- params.update({
- 'email_address' : model_obj.email_from,
- 'merge_vars[FNAME]':model_obj.partner_name and \
- model_obj.partner_name or '',
- 'merge_vars[address][country]' : model_obj.country_id and \
- model_obj.country_id.code or ''
- })
- if params['email_address'] :
- user = mc_acc_obj.get_response(cr, uid, mailchimp_account_id,
- 'listMemberInfo', {
- 'id' : list_id,
- 'email_address': params['email_address']
- })
- # if there s no user with the specify email it will return error code
- # and thus we add that user otherwise user is alredy subscribe and there
- # is no need to subscribe user again
- if 'error' in user:
- params.update({
- 'id' : list_id,
- 'email_type':'text',
- 'double_optin':False,
- 'merge_vars[date]' : time.strftime('%Y-%m-%d'),
- 'merge_vars[address][city]' : model_obj.city and model_obj.city or '',
- 'merge_vars[phone]' : model_obj.phone and model_obj.phone or '',
- })
- mc_acc_obj.get_response(cr, uid, mailchimp_account_id, 'listSubscribe', params)
- # TODO handle mailchimp error
- return True
- else :
- return {'error_msg' : "Invalid Email Address"}
-
- def __init__(self, *args):
- super(marketing_campaign_activity, self).__init__(*args)
- self._action_types.append(('mailchimp', 'Mailchimp'))
-
-marketing_campaign_activity()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp_view.xml b/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp_view.xml
deleted file mode 100644
index a340c5c9d68..00000000000
--- a/addons/marketing_campaign_mailchimp/marketing_campaign_mailchimp_view.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
- marketing.campaign.activity.form.inherit
- marketing.campaign.activity
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- mailchimp.account.tree
- mailchimp.account
- tree
-
-
-
-
-
-
-
-
-
-
-
- mailchimp.account.form
- mailchimp.account
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Mailchimp Accounts
- ir.actions.act_window
- mailchimp.account
- form
- tree,form
-
-
-
-
-
-
-
diff --git a/addons/marketing_campaign_mailchimp/security/ir.model.access.csv b/addons/marketing_campaign_mailchimp/security/ir.model.access.csv
deleted file mode 100644
index 893cd2e9e2c..00000000000
--- a/addons/marketing_campaign_mailchimp/security/ir.model.access.csv
+++ /dev/null
@@ -1,4 +0,0 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_mailchimp_account_user","mailchimp.account.user","marketing_campaign_mailchimp.model_mailchimp_account","base.res_groups_email_template_admin",1,1,1,1
-"access_mailchimp_account_system","mailchimp.account.user","marketing_campaign_mailchimp.model_mailchimp_account","base.res_groups_email_template_admin",1,0,0,0
-"access_mailchimp_account_user","mailchimp_account_user","model_mailchimp_account","base.res_groups_email_template_admin",1,1,1,1
diff --git a/addons/marketing_campaign_mailchimp/security/marketing_security.xml b/addons/marketing_campaign_mailchimp/security/marketing_security.xml
deleted file mode 100644
index 59cbf65a63d..00000000000
--- a/addons/marketing_campaign_mailchimp/security/marketing_security.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
- Marketing / User
-
-
-
-
diff --git a/addons/marketing_campaign_mailchimp/wizard/__init__.py b/addons/marketing_campaign_mailchimp/wizard/__init__.py
deleted file mode 100755
index 713b0c1e773..00000000000
--- a/addons/marketing_campaign_mailchimp/wizard/__init__.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-import create_list
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/wizard/create_list.py b/addons/marketing_campaign_mailchimp/wizard/create_list.py
deleted file mode 100755
index 03a69a8ac89..00000000000
--- a/addons/marketing_campaign_mailchimp/wizard/create_list.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-from osv import fields, osv
-from tools.translate import _
-import netsvc
-
-class create_list(osv.osv_memory):
- _name = "create.list"
- _description = "Create List of mailchimp"
-# crm.lead remain
- _columns = {
- 'mailchimp_account_id': fields.many2one('mailchimp.account',
- 'Mailchimp Account', required=True),
- 'mailchimp_list_id': fields.many2one('mailchimp.list', 'List'),
- 'list_name': fields.char('Name',size = 64),
- 'partner_ids': fields.many2many('res.partner',
- 'create_list_partner_rel',
- 'cust_list_id', 'partner_id',
- 'Partner'),
-
- }
-
- def onchange_mailchimp_account_id(self, cr, uid, ids, mailchimp_account_id,
- action):
- return {'value':{}}
-
- def create_list(self, cr, uid, ids, context=None):
- create_list_obj = self.browse(cr, uid, ids[0])
- mailchimp_account_obj = self.pool.get('mailchimp.account')
- account_id = create_list_obj.mailchimp_account_id
- lists = mailchimp_account_obj.get_response(cr, uid, account_id.id, 'lists')
- lists = dict([(l['name'],l['id']) for l in lists])
- if create_list_obj.list_name not in lists.keys():
- raise osv.except_osv(_('UserError'),
- _('There is no list define in account %s') % (account_id.name))
- list_id = lists[create_list_obj.list_name]
- mailchimp_account_obj.add_partner_list(cr, uid, account_id.id, list_id,
- create_list_obj.partner_ids)
- return {}
-create_list()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign_mailchimp/wizard/create_list_view.xml b/addons/marketing_campaign_mailchimp/wizard/create_list_view.xml
deleted file mode 100755
index 6d8f8fe9296..00000000000
--- a/addons/marketing_campaign_mailchimp/wizard/create_list_view.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- create.list.form
- create.list
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Manual Mailchimp List Update
- ir.actions.act_window
- create.list
- form
-
- new
-
-
-
-
-
-
diff --git a/addons/membership/__openerp__.py b/addons/membership/__openerp__.py
index fa9052f884c..2a6ce2b7eb6 100644
--- a/addons/membership/__openerp__.py
+++ b/addons/membership/__openerp__.py
@@ -44,11 +44,10 @@ invoice and send propositions for membership renewal.
'wizard/membership_invoice_view.xml',
'membership_view.xml',
'report/report_membership_view.xml',
- 'wizard/membership_unpaid_invoice_view.xml',
'process/membership_process.xml'
],
'demo_xml': ['membership_demo.xml'],
- 'test': ['test/test_membership.yml'],
+ 'test': ['test/test_membership.yml'],
'installable': True,
'active': False,
'certificate': '0042907796381',
diff --git a/addons/membership/membership.py b/addons/membership/membership.py
index 7bb84ef9ebb..8f68149f9e3 100644
--- a/addons/membership/membership.py
+++ b/addons/membership/membership.py
@@ -19,12 +19,12 @@
#
##############################################################################
+import time
+
from osv import fields, osv
from tools import config
-import time
-from tools.translate import _
import decimal_precision as dp
-
+from tools.translate import _
STATE = [
('none', 'Non Member'),
@@ -49,6 +49,14 @@ STATE_PRIOR = {
class membership_line(osv.osv):
'''Member line'''
+ def _get_membership_lines(self, cr, uid, ids, context=None):
+ list_membership_line = []
+ member_line_obj = self.pool.get('membership.membership_line')
+ for invoice in self.pool.get('account.invoice').browse(cr, uid, ids, context=context):
+ if invoice.invoice_line:
+ list_membership_line += member_line_obj.search(cr, uid, [('account_invoice_line', 'in', [ l.id for l in invoice.invoice_line])], context=context)
+ return list_membership_line
+
def _check_membership_date(self, cr, uid, ids, context=None):
"""Check if membership product is not in the past
@param self: The object pointer
@@ -60,13 +68,13 @@ class membership_line(osv.osv):
cr.execute('''
SELECT MIN(ml.date_to - ai.date_invoice)
- FROM membership_membership_line ml
- JOIN account_invoice_line ail ON (
- ml.account_invoice_line = ail.id
- )
- JOIN account_invoice ai ON (
+ FROM membership_membership_line ml
+ JOIN account_invoice_line ail ON (
+ ml.account_invoice_line = ail.id
+ )
+ JOIN account_invoice ai ON (
ai.id = ail.invoice_id)
- WHERE ml.id IN %s''',(tuple(ids),))
+ WHERE ml.id IN %s''',(tuple(ids),))
res = cr.fetchall()
for r in res:
if r[0] and r[0] < 0:
@@ -84,7 +92,8 @@ class membership_line(osv.osv):
@param return: Dictionary of state Value
"""
res = {}
- for line in self.browse(cr, uid, ids):
+ inv_obj = self.pool.get('account.invoice')
+ for line in self.browse(cr, uid, ids, context=context):
cr.execute('''
SELECT i.state, i.id FROM
account_invoice i
@@ -111,7 +120,7 @@ class membership_line(osv.osv):
state = 'invoiced'
elif istate == 'paid':
state = 'paid'
- inv = self.pool.get('account.invoice').browse(cr, uid, fetched[1])
+ inv = inv_obj.browse(cr, uid, fetched[1], context=context)
for payment in inv.payment_ids:
if payment.invoice and payment.invoice.type == 'out_refund':
state = 'canceled'
@@ -125,7 +134,7 @@ class membership_line(osv.osv):
_name = 'membership.membership_line'
_columns = {
'partner': fields.many2one('res.partner', 'Partner', ondelete='cascade', select=1),
- 'membership_id': fields.many2one('product.product', string="Membership", required=True),
+ 'membership_id': fields.many2one('product.product', string="Membership Product", required=True),
'date_from': fields.date('From', readonly=True),
'date_to': fields.date('To', readonly=True),
'date_cancel' : fields.date('Cancel date'),
@@ -133,7 +142,13 @@ class membership_line(osv.osv):
'member_price':fields.float('Member Price', digits_compute= dp.get_precision('Sale Price'), required=True),
'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
- 'state': fields.function(_state, method=True, string='State', type='selection', selection=STATE),
+ 'state': fields.function(
+ _state, method=True,
+ string='Membership State', type='selection',
+ selection=STATE, store = {
+ 'account.invoice':(_get_membership_lines, ['state'], 10),
+ }),
+ 'company_id': fields.related('account_invoice_line', 'invoice_id', 'company_id', type="many2one", relation="res.company", string="Company", readonly=True, store=True)
}
_rec_name = 'partner'
_order = 'id desc'
@@ -151,7 +166,7 @@ class Partner(osv.osv):
def _get_partner_id(self, cr, uid, ids, context=None):
member_line_obj = self.pool.get('membership.membership_line')
res_obj = self.pool.get('res.partner')
- data_inv = member_line_obj.browse(cr, uid, ids, context)
+ data_inv = member_line_obj.browse(cr, uid, ids, context=context)
list_partner = []
for data in data_inv:
list_partner.append(data.partner.id)
@@ -164,7 +179,7 @@ class Partner(osv.osv):
def _get_invoice_partner(self, cr, uid, ids, context=None):
inv_obj = self.pool.get('account.invoice')
res_obj = self.pool.get('res.partner')
- data_inv = inv_obj.browse(cr, uid, ids, context)
+ data_inv = inv_obj.browse(cr, uid, ids, context=context)
list_partner = []
for data in data_inv:
list_partner.append(data.partner_id.id)
@@ -189,7 +204,7 @@ class Partner(osv.osv):
res[id] = 'none'
today = time.strftime('%Y-%m-%d')
for id in ids:
- partner_data = self.browse(cr, uid, id)
+ partner_data = self.browse(cr, uid, id, context=context)
if partner_data.membership_cancel and today > partner_data.membership_cancel:
res[id] = 'canceled'
continue
@@ -236,57 +251,51 @@ class Partner(osv.osv):
if partner_data.free_member and s!=0:
res[id] = 'free'
if partner_data.associate_member:
- res_state = self._membership_state(cr, uid, [partner_data.associate_member.id], name, args, context)
+ res_state = self._membership_state(cr, uid, [partner_data.associate_member.id], name, args, context=context)
res[id] = res_state[partner_data.associate_member.id]
return res
def _membership_date(self, cr, uid, ids, name, args, context=None):
-
"""Return date of membership"""
-
name = name[0]
res = {}
member_line_obj = self.pool.get('membership.membership_line')
-
- for partner in self.browse(cr, uid, ids):
-
+ for partner in self.browse(cr, uid, ids, context=context):
if partner.associate_member:
partner_id = partner.associate_member.id
else:
partner_id = partner.id
-
res[partner.id] = {
'membership_start': False,
'membership_stop': False,
'membership_cancel': False
}
-
if name == 'membership_start':
line_id = member_line_obj.search(cr, uid, [('partner', '=', partner_id)],
- limit=1, order='date_from')
+ limit=1, order='date_from', context=context)
if line_id:
res[partner.id]['membership_start'] = member_line_obj.read(cr, uid, line_id[0],
- ['date_from'])['date_from']
+ ['date_from'], context=context)['date_from']
if name == 'membership_stop':
line_id1 = member_line_obj.search(cr, uid, [('partner', '=', partner_id)],
- limit=1, order='date_to desc')
+ limit=1, order='date_to desc', context=context)
if line_id1:
res[partner.id]['membership_stop'] = member_line_obj.read(cr, uid, line_id1[0],
- ['date_to'])['date_to']
+ ['date_to'], context=context)['date_to']
+
if name == 'membership_cancel':
if partner.membership_state == 'canceled':
- line_id2 = member_line_obj.search(cr, uid, [('partner', '=', partner.id)],limit=1, order='date_cancel')
+ line_id2 = member_line_obj.search(cr, uid, [('partner', '=', partner.id)], limit=1, order='date_cancel', context=context)
if line_id2:
- res[partner.id]['membership_cancel'] = member_line_obj.read(cr, uid, line_id2[0],['date_cancel'])['date_cancel']
-
+ res[partner.id]['membership_cancel'] = member_line_obj.read(cr, uid, line_id2[0], ['date_cancel'], context=context)['date_cancel']
return res
- def _get_partners(self, cr, uid, ids, context={}):
+ def _get_partners(self, cr, uid, ids, context=None):
ids2 = ids
while ids2:
ids2 = self.search(cr, uid, [('associate_member','in',ids2)], context=context)
- ids+=ids2
+ ids += ids2
return ids
def __get_membership_state(self, *args, **kwargs):
@@ -298,48 +307,44 @@ class Partner(osv.osv):
'free_member': fields.boolean('Free member'),
'membership_amount': fields.float(
'Membership amount', digits=(16, 2),
- help='The price negociated by the partner'),
+ help = 'The price negociated by the partner'),
'membership_state': fields.function(
__get_membership_state, method = True,
string = 'Current Membership State', type = 'selection',
- selection = STATE ,store = {
- 'account.invoice':(_get_invoice_partner,['state'], 10),
- 'membership.membership_line':(_get_partner_id,['state'], 10),
- 'res.partner':(_get_partners, ['free_member', 'membership_state','associate_member'], 10)
- }
- ),
+ selection = STATE,
+ store = {
+ 'account.invoice': (_get_invoice_partner, ['state'], 10),
+ 'membership.membership_line': (_get_partner_id, ['state'], 10),
+ 'res.partner': (_get_partners, ['free_member', 'membership_state', 'associate_member'], 10)
+ }),
'membership_start': fields.function(
- _membership_date, method=True, multi='membeship_start',
+ _membership_date, method = True, multi = 'membeship_start',
string = 'Start membership date', type = 'date',
store = {
- 'account.invoice':(_get_invoice_partner,['state'], 10),
- 'membership.membership_line':(_get_partner_id,['state'], 10, ),
- 'res.partner':(lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)
- }
- ),
+ 'account.invoice': (_get_invoice_partner, ['state'], 10),
+ 'membership.membership_line': (_get_partner_id, ['state'], 10, ),
+ 'res.partner': (lambda self, cr, uid, ids, c={}: ids, ['free_member'], 10)
+ }),
'membership_stop': fields.function(
_membership_date, method = True,
string = 'Stop membership date', type = 'date', multi='membership_stop',
store = {
- 'account.invoice':(_get_invoice_partner,['state'], 10),
- 'membership.membership_line':(_get_partner_id,['state'], 10),
- 'res.partner':(lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)
- }
- ),
-
+ 'account.invoice': (_get_invoice_partner, ['state'], 10),
+ 'membership.membership_line': (_get_partner_id, ['state'], 10),
+ 'res.partner': (lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)
+ }),
'membership_cancel': fields.function(
_membership_date, method = True,
string = 'Cancel membership date', type='date', multi='membership_cancel',
store = {
- 'account.invoice':(_get_invoice_partner,['state'], 11),
- 'membership.membership_line':(_get_partner_id,['state'], 10),
- 'res.partner':(lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)
- }
- ),
+ 'account.invoice': (_get_invoice_partner, ['state'], 11),
+ 'membership.membership_line': (_get_partner_id, ['state'], 10),
+ 'res.partner': (lambda self,cr,uid,ids,c={}:ids, ['free_member'], 10)
+ }),
}
_defaults = {
- 'free_member': lambda *a: False,
- 'membership_cancel' : lambda *d : False,
+ 'free_member': False,
+ 'membership_cancel' : False,
}
def _check_recursion(self, cr, uid, ids):
@@ -347,7 +352,7 @@ class Partner(osv.osv):
"""
level = 100
while len(ids):
- cr.execute('select distinct associate_member from res_partner where id IN %s',(tuple(ids),))
+ cr.execute('SELECT DISTINCT associate_member FROM res_partner WHERE id IN %s', (tuple(ids),))
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
@@ -365,7 +370,7 @@ class Partner(osv.osv):
context = {}
default = default.copy()
default['member_lines'] = []
- return super(Partner, self).copy(cr, uid, id, default, context)
+ return super(Partner, self).copy(cr, uid, id, default, context=context)
def create_membership_invoice(self, cr, uid, ids, product_id=None, datas=None, context=None):
""" Create Customer Invoice of Membership for partners.
@@ -373,7 +378,6 @@ class Partner(osv.osv):
datas = {'membership_product_id': None, 'amount':None}
"""
invoice_obj = self.pool.get('account.invoice')
- product_obj = self.pool.get('product.product')
invoice_line_obj = self.pool.get('account.invoice.line')
invoice_tax_obj = self.pool.get('account.invoice.tax')
product_id = product_id or datas.get('membership_product_id',False)
@@ -395,7 +399,7 @@ class Partner(osv.osv):
_("Partner doesn't have an address to make the invoice."))
quantity = 1
line_value = {
- 'product_id' : product_id,
+ 'product_id': product_id,
}
line_dict = invoice_line_obj.product_id_change(cr, uid, {},
@@ -406,15 +410,14 @@ class Partner(osv.osv):
line_value['invoice_line_tax_id'] = tax_tab
invoice_id = invoice_obj.create(cr, uid, {
- 'partner_id' : partner.id,
+ 'partner_id': partner.id,
'address_invoice_id': addr.get('invoice', False),
'account_id': account_id,
'fiscal_position': fpos_id or False
- }
- )
+ }, context=context)
line_value['invoice_id'] = invoice_id
invoice_line_id = invoice_line_obj.create(cr, uid, line_value, context=context)
- invoice_obj.write(cr, uid, invoice_id, {'invoice_line':[(6,0,[invoice_line_id])]}, context=context)
+ invoice_obj.write(cr, uid, invoice_id, {'invoice_line': [(6, 0, [invoice_line_id])]}, context=context)
invoice_list.append(invoice_id)
if line_value['invoice_line_tax_id']:
tax_value = invoice_tax_obj.compute(cr, uid, invoice_id).values()
@@ -437,12 +440,12 @@ class Product(osv.osv):
model_obj = self.pool.get('ir.model.data')
if ('product' in context) and (context['product']=='membership_product'):
- model_data_ids_form = model_obj.search(cr,user,[('model','=','ir.ui.view'),('name','in',['membership_products_form','membership_products_tree'])])
- resource_id_form = model_obj.read(cr, user, model_data_ids_form, fields=['res_id','name'])
- dict_model={}
+ model_data_ids_form = model_obj.search(cr, user, [('model','=','ir.ui.view'), ('name','in',['membership_products_form', 'membership_products_tree'])], context=context)
+ resource_id_form = model_obj.read(cr, user, model_data_ids_form, fields=['res_id', 'name'], context=context)
+ dict_model = {}
for i in resource_id_form:
- dict_model[i['name']]=i['res_id']
- if view_type=='form':
+ dict_model[i['name']] = i['res_id']
+ if view_type == 'form':
view_id = dict_model['membership_products_form']
else:
view_id = dict_model['membership_products_tree']
@@ -457,28 +460,25 @@ class Product(osv.osv):
}
_defaults = {
- 'membership': lambda *args: False
+ 'membership': False
}
Product()
class Invoice(osv.osv):
'''Invoice'''
-
_inherit = 'account.invoice'
- def action_cancel(self, cr, uid, ids, context=None):
+ def action_cancel(self, cr, uid, ids, *args):
'''Create a 'date_cancel' on the membership_line object'''
- if context is None:
- context = {}
member_line_obj = self.pool.get('membership.membership_line')
today = time.strftime('%Y-%m-%d')
for invoice in self.browse(cr, uid, ids):
mlines = member_line_obj.search(cr, uid,
[('account_invoice_line','in',
- [ l.id for l in invoice.invoice_line])], context)
- member_line_obj.write(cr, uid, mlines, {'date_cancel':today}, context)
- return super(Invoice, self).action_cancel(cr, uid, ids, context)
+ [ l.id for l in invoice.invoice_line])])
+ member_line_obj.write(cr, uid, mlines, {'date_cancel': today})
+ return super(Invoice, self).action_cancel(cr, uid, ids)
Invoice()
class account_invoice_line(osv.osv):
@@ -491,9 +491,9 @@ class account_invoice_line(osv.osv):
context={}
res = super(account_invoice_line, self).write(cr, uid, ids, vals, context=context)
member_line_obj = self.pool.get('membership.membership_line')
- for line in self.browse(cr, uid, ids):
+ for line in self.browse(cr, uid, ids, context=context):
if line.invoice_id.type == 'out_invoice':
- ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)])
+ ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)], context=context)
if line.product_id and line.product_id.membership and not ml_ids:
# Product line has changed to a membership product
date_from = line.product_id.membership_date_from
@@ -508,7 +508,7 @@ class account_invoice_line(osv.osv):
'date_from': date_from,
'date_to': date_to,
'account_invoice_line': line.id,
- })
+ }, context=context)
if line.product_id and not line.product_id.membership and ml_ids:
# Product line has changed to a non membership product
member_line_obj.unlink(cr, uid, ml_ids, context=context)
@@ -521,19 +521,18 @@ class account_invoice_line(osv.osv):
context={}
member_line_obj = self.pool.get('membership.membership_line')
for id in ids:
- ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',id)])
+ ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',id)], context=context)
member_line_obj.unlink(cr, uid, ml_ids, context=context)
return super(account_invoice_line, self).unlink(cr, uid, ids, context=context)
- def create(self, cr, uid, vals, context={}):
+ def create(self, cr, uid, vals, context=None):
"""Overrides orm create method
"""
- result = super(account_invoice_line, self).create(cr, uid, vals, context)
- line = self.browse(cr, uid, result)
+ result = super(account_invoice_line, self).create(cr, uid, vals, context=context)
+ line = self.browse(cr, uid, result, context=context)
member_line_obj = self.pool.get('membership.membership_line')
if line.invoice_id.type == 'out_invoice':
-
- ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)])
+ ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)], context=context)
if line.product_id and line.product_id.membership and not ml_ids:
# Product line is a membership product
date_from = line.product_id.membership_date_from
@@ -548,7 +547,7 @@ class account_invoice_line(osv.osv):
'date_from': date_from,
'date_to': date_to,
'account_invoice_line': line.id,
- })
+ }, context=context)
return result
account_invoice_line()
diff --git a/addons/membership/membership_demo.xml b/addons/membership/membership_demo.xml
index fa8dda9e5cb..9479543305a 100644
--- a/addons/membership/membership_demo.xml
+++ b/addons/membership/membership_demo.xml
@@ -6,7 +6,7 @@
True
-
+ Golden Membership180
@@ -15,7 +15,7 @@
True
-
+ Silver Membership80
@@ -24,7 +24,7 @@
True
-
+ Basic Membership40
@@ -33,7 +33,7 @@
-
+
True
diff --git a/addons/membership/membership_view.xml b/addons/membership/membership_view.xml
index a4db3754cc4..ad9c3bcf772 100644
--- a/addons/membership/membership_view.xml
+++ b/addons/membership/membership_view.xml
@@ -8,6 +8,32 @@
+
+ membership.product.search.form
+ product.product
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Membership productsproduct.product
@@ -19,31 +45,59 @@
+
+
+
- Memberships
+ Membership Productsproduct.productform
+" colspan="4"/>
+
+
+
+
+
-
+
-
-
+ groups="base.group_extended"
+ id="action_view_purchase_order_group"/>
+
diff --git a/addons/resource/i18n/de.po b/addons/resource/i18n/de.po
index 951474e7385..60a08660213 100644
--- a/addons/resource/i18n/de.po
+++ b/addons/resource/i18n/de.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-18 06:50+0000\n"
-"PO-Revision-Date: 2010-08-23 06:41+0000\n"
-"Last-Translator: Ferdinand-chricar \n"
+"PO-Revision-Date: 2010-10-10 10:52+0000\n"
+"Last-Translator: Ferdinand @ ChriCar \n"
"Language-Team: German \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-11 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: resource
@@ -212,6 +212,8 @@ msgid ""
"If the active field is set to true, it will allow you to hide the resource "
"record without removing it."
msgstr ""
+"Wenn das Aktiv Feld auf Falsch gesetzt wird, wird die Ressource versteckt "
+"ohne sie zu löschen"
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
@@ -243,6 +245,7 @@ msgstr "Ressourcen Kalender"
#: help:resource.resource,user_id:0
msgid "Related user name for the resource to manage its access."
msgstr ""
+"Der mit der Ressource verbunden Benutzer für die Zugriffsberechtigung"
#. module: resource
#: help:resource.resource,calendar_id:0
diff --git a/addons/sale/board_sale_view.xml b/addons/sale/board_sale_view.xml
index 6da7f9e312b..0629ad041df 100644
--- a/addons/sale/board_sale_view.xml
+++ b/addons/sale/board_sale_view.xml
@@ -34,7 +34,7 @@
-
+
\ 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 b914e2b2d4b..751e74d52be 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -26,7 +26,7 @@
-
+
@@ -101,9 +101,9 @@
-
-
-
+
+
+
@@ -129,7 +129,7 @@
-
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index ad418a567bc..70313b03b24 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -75,7 +75,7 @@ class sale_order(osv.osv):
context = {}
val = 0.0
for c in self.pool.get('account.tax').compute_all(cr, uid, line.tax_id, line.price_unit * (1-(line.discount or 0.0)/100.0), line.product_uom_qty, line.order_id.partner_invoice_id.id, line.product_id, line.order_id.partner_id)['taxes']:
- val += c['amount']
+ val += c.get('amount', 0.0)
return val
def _amount_all(self, cr, uid, ids, field_name, arg, context=None):
@@ -250,7 +250,7 @@ class sale_order(osv.osv):
'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)]}),
'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."),
'picking_ids': fields.one2many('stock.picking', 'sale_id', 'Related Picking', readonly=True, help="This is the list of picking list that have been generated for this invoice"),
- 'shipped': fields.boolean('Picked', readonly=True, help="It indicates that a picking has been done. It will be set to True if the ordered quantities are available and the picking is done. If the ordered quantities are not available Procurement generates a Purchase/Manufacturing order. Unless its Picking and Purchase/Manufacturing order are not in the done state it wont be set to True"),
+ 'shipped': fields.boolean('Delivered', readonly=True, help="It indicates that the sale order has been delivered. This field is updated only after the scheduler have been launched !"),
'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'),
'invoiced_rate': fields.function(_invoiced_rate, method=True, string='Invoiced', type='float'),
'invoiced': fields.function(_invoiced, method=True, string='Paid',
@@ -507,6 +507,7 @@ class sale_order(osv.osv):
if order.order_policy == 'picking':
picking_obj.write(cr, uid, map(lambda x: x.id, order.picking_ids), {'invoice_state': 'invoiced'})
cr.execute('insert into sale_order_invoice_rel (order_id,invoice_id) values (%s,%s)', (order.id, res))
+
return res
def action_invoice_cancel(self, cr, uid, ids, context=None):
@@ -558,7 +559,7 @@ class sale_order(osv.osv):
#
if order.state == 'invoice_except':
self.write(cr, uid, [order.id], {'state' : 'progress'}, context=context)
-
+
return True
def action_cancel(self, cr, uid, ids, context=None):
@@ -730,7 +731,7 @@ class sale_order(osv.osv):
if picking_id:
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
-
+
if order.state == 'shipping_except':
val['state'] = 'progress'
@@ -911,7 +912,7 @@ class sale_order_line(osv.osv):
else:
a = self.pool.get('ir.property').get(cr, uid,
'property_account_income_categ', 'product.category',
- context=context)
+ context=context).id
uosqty = _get_line_qty(line)
uos_id = _get_line_uom(line)
pu = 0.0
@@ -1175,7 +1176,7 @@ class sale_config_picking_policy(osv.osv_memory):
'picking_policy': fields.selection([
('direct', 'Direct Delivery'),
('one', 'All at Once')
- ], 'Picking Default Policy', required=True, help="The Shipping Policy is used to synchronise invoices and delivery operations."),
+ ], 'Picking Default Policy', required=True, help="The Shipping Policy is used to configure per order if you want to deliver as soon as possible when one product is available or you wait that all products are available.."),
'order_policy': fields.selection([
('manual', 'Invoice Based on Sales Orders'),
('picking', 'Invoice Based on Deliveries'),
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 62bdd41f2ca..747414b7e8d 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -1,6 +1,7 @@
+
@@ -19,7 +20,7 @@
-
+
@@ -32,7 +33,7 @@
-
+
@@ -48,14 +49,14 @@
+ groups="base.group_extended,base.group_sale_manager"/>
sale.order.calendarsale.ordercalendar
-
+
@@ -66,7 +67,7 @@
sale.ordergraph
-
+
@@ -78,15 +79,15 @@
sale.ordertree
-
+
-
-
+
+
@@ -97,7 +98,7 @@
sale.orderform
-
-
+
@@ -199,17 +200,17 @@
-
-
+
-
+
+
@@ -293,7 +294,7 @@ orders, purchases, etc. It support several invoicing methods according
to your configuration: from the sales order, from the pickings, etc.
-
+ Sales in Exception
@@ -343,7 +344,7 @@ to your configuration: from the sales order, from the pickings, etc.
sale.order.linegraph
-
+
@@ -355,14 +356,14 @@ to your configuration: from the sales order, from the pickings, etc.
sale.order.linetree
-
+
-
+
@@ -451,7 +452,7 @@ to your configuration: from the sales order, from the pickings, etc.
name="sale order"
help="Confirmed Sale Order Lines"
/>
-
+
-
-
-
-
+
+
@@ -549,7 +551,6 @@ to your configuration: from the sales order, from the pickings, etc.
-
diff --git a/addons/sale/security/ir.model.access.csv b/addons/sale/security/ir.model.access.csv
index 89a2003698c..0d523202a10 100644
--- a/addons/sale/security/ir.model.access.csv
+++ b/addons/sale/security/ir.model.access.csv
@@ -1,19 +1,23 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_sale_shop","sale.shop","model_sale_shop","base.group_sale_salesman",1,1,1,1
-"access_sale_order","sale.order","model_sale_order","base.group_sale_salesman",1,1,1,1
-"access_sale_order_line","sale.order.line","model_sale_order_line","base.group_sale_salesman",1,1,1,0
+"access_sale_shop","sale.shop","model_sale_shop","base.group_sale_salesman",1,1,1,0
+"access_sale_order","sale.order","model_sale_order","base.group_sale_salesman",1,1,1,0
+"access_sale_order_line","sale.order.line","model_sale_order_line","base.group_sale_salesman",1,1,1,1
"access_sale_shop_admin","sale.shop","model_sale_shop","base.group_system",1,1,1,1
-"access_account_invoice_salesman","account_invoice salesman","account.model_account_invoice","base.group_sale_salesman",1,1,1,1
+"access_account_invoice_salesman","account_invoice salesman","account.model_account_invoice","base.group_sale_salesman",1,1,1,0
+"access_account_invoice_manager","account_invoice manager","account.model_account_invoice","base.group_sale_manager",1,1,1,1
"access_account_invoice_line_salesman","account_invoice.line salesman","account.model_account_invoice_line","base.group_sale_salesman",1,1,1,1
"access_account_payment_term_salesman","account_payment_term salesman","account.model_account_payment_term","base.group_sale_salesman",1,0,0,0
-"access_account_analytic_account_salesman","account_analytic_account salesman","analytic.model_account_analytic_account","base.group_sale_salesman",1,1,1,1
-"access_stock_picking_salesman","stock_picking salesman","stock.model_stock_picking","base.group_sale_salesman",1,1,1,1
+"access_account_analytic_account_salesman","account_analytic_account salesman","analytic.model_account_analytic_account","base.group_sale_salesman",1,1,1,0
+"access_stock_picking_salesman","stock_picking salesman","stock.model_stock_picking","base.group_sale_salesman",1,1,1,0
"access_stock_move_salesman","stock_move salesman","stock.model_stock_move","base.group_sale_salesman",1,1,1,0
-"access_procurement_salesman","procurement.order salesman","procurement.model_procurement_order","base.group_sale_salesman",1,1,1,1
+"access_stock_move_manager","stock_move manager","stock.model_stock_move","base.group_sale_manager",1,1,1,1
+"access_procurement_salesman","procurement.order salesman","procurement.model_procurement_order","base.group_sale_salesman",1,1,1,0
+"access_procurement_manager","procurement.order manager","procurement.model_procurement_order","base.group_sale_manager",1,1,1,1
"access_sale_order_stock_worker","sale.order stock worker","model_sale_order","stock.group_stock_user",1,1,0,0
"access_sale_order_line_stock_worker","sale.order.line stock worker","model_sale_order_line","stock.group_stock_user",1,1,0,0
-"access_sale_order_manager","sale.order.manager","model_sale_order","base.group_sale_manager",1,0,0,0
+"access_sale_order_manager","sale.order.manager","model_sale_order","base.group_sale_manager",1,1,1,1
"access_sale_order_line_manager","sale.order.line.manager","model_sale_order_line","base.group_sale_manager",1,0,0,0
+"access_sale_report_salesman","sale.report","model_sale_report","base.group_sale_salesman",1,1,1,0
"access_sale_report_manager","sale.report","model_sale_report","base.group_sale_manager",1,1,1,1
"access_ir_property_sales","ir.property.sales","base.model_ir_property","base.group_sale_salesman",1,1,1,1
"access_sale_account_journal","account.journal sale order.user","account.model_account_journal","base.group_sale_salesman",1,0,0,0
@@ -26,12 +30,12 @@
"access_product_product_sale_user","product.product sale use","product.model_product_product","base.group_sale_salesman",1,0,0,0
"access_product_template_sale","product.template sale manager","product.model_product_template","base.group_sale_manager",1,0,0,0
"access_product_product_sale","product.product sale manager","product.model_product_product","base.group_sale_manager",1,0,0,0
-"access_sale_shop_manager","account.journal sale order.user","model_sale_shop","base.group_sale_manager",1,0,0,0
+"access_sale_shop_manager","account.journal sale order.user","model_sale_shop","base.group_sale_manager",1,1,1,1
"access_account_fiscalyear_manager","account.fiscalyear.manager","account.model_account_fiscalyear","base.group_sale_manager",1,0,0,0
-"access_account_fiscalyear_user","account.fiscalyear.user","account.model_account_fiscalyear","base.group_sale_salesman",1,1,1,1
+"access_account_fiscalyear_user","account.fiscalyear.user","account.model_account_fiscalyear","base.group_sale_salesman",1,0,0,0
"access_res_partner_address_user","res.partner.address.user","base.model_res_partner_address","base.group_sale_salesman",1,0,0,0
-"access_account_tax_user","account.tax.user","account.model_account_tax","base.group_sale_salesman",1,1,1,1
-"access_product_packaging_user","product.packaging.user","product.model_product_packaging","base.group_sale_salesman",1,1,1,1
+"access_account_tax_user","account.tax.user","account.model_account_tax","base.group_sale_salesman",1,1,1,0
+"access_product_packaging_user","product.packaging.user","product.model_product_packaging","base.group_sale_salesman",1,1,1,0
"access_res_country_system","res.country system","base.model_res_country","base.group_system",1,1,1,1
"access_res_country_state_system","res.country.state system","base.model_res_country_state","base.group_system",1,1,1,1
"access_res_partner_title_system","res.partner.title system","base.model_res_partner_title","base.group_system",1,1,1,1
@@ -41,8 +45,8 @@
"access_stock_picking_system","stock.picking.system","stock.model_stock_picking","base.group_system",1,0,0,0
"access_sale_report_system","sale.report.system","model_sale_report","base.group_system",1,0,0,0
"access_ir_attachment_system","ir.attachment.system","base.model_ir_attachment","base.group_system",1,0,0,0
-"access_ir_attachment_sales","ir.attachment.sales","base.model_ir_attachment","base.group_sale_salesman",1,1,1,1
-"access_ir_attachment_manager","ir.attachment.manager","base.model_ir_attachment","base.group_sale_manager",1,0,0,0
+"access_ir_attachment_sales","ir.attachment.sales","base.model_ir_attachment","base.group_sale_salesman",1,1,1,0
+"access_ir_attachment_manager","ir.attachment.manager","base.model_ir_attachment","base.group_sale_manager",1,1,1,1
"access_res_partner_bank_type_system","res.partner.bank.type.system","base.model_res_partner_bank_type","base.group_system",1,0,0,0
"access_stock_warehouse_manager","stock.warehouse.manager","stock.model_stock_warehouse","base.group_sale_manager",1,0,0,0
"access_product_uom_manager","product.uom.manager","product.model_product_uom","base.group_sale_manager",1,0,0,0
diff --git a/addons/sale/security/sale_security.xml b/addons/sale/security/sale_security.xml
index 19da6a6f81f..36a8fc15118 100644
--- a/addons/sale/security/sale_security.xml
+++ b/addons/sale/security/sale_security.xml
@@ -12,6 +12,10 @@
+
+
+
+ Sale Order multi-company
diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml
index 391d4141969..bac0051e0d1 100644
--- a/addons/sale_crm/sale_crm_view.xml
+++ b/addons/sale_crm/sale_crm_view.xml
@@ -1,47 +1,47 @@
-
+
-
- CRM - Opportunities - Quote Inherit
- crm.lead
- form
-
-
-
-
-
-
-
+
+ CRM - Opportunities - Quote Inherit
+ crm.lead
+ form
+
+
+
+
+
+
+
-
- sale.order.inherit
- sale.order
- form
-
-
-
-
-
-
-
+
+ sale.order.inherit
+ sale.order
+ form
+
+
+
+
+
+
+
-
- sale.order.list.select
- sale.order
- search
-
-
-
-
-
-
-
-
-
+
+ sale.order.list.select
+ sale.order
+ search
+
+
+
+
+
+
+
+
+
-
-
\ No newline at end of file
+
+
diff --git a/addons/sale_crm/test/sale_crm.yml b/addons/sale_crm/test/sale_crm.yml
index 86095929691..cc75b9e415c 100644
--- a/addons/sale_crm/test/sale_crm.yml
+++ b/addons/sale_crm/test/sale_crm.yml
@@ -23,14 +23,6 @@
-
!record {model: crm.make.sale, id: crm_make_sale_0}:
partner_id: base.res_partner_4
- sale_order_line:
- - name: '[KEYA] Keyboard - AZERTY'
- price_unit: 7.0
- product_uom: product.product_uom_unit
- product_uom_qty: 50.0
- delay: 7.0
- product_id: product.product_product_24
- type: make_to_stock
shop_id: sale.shop
-
Then I click on the 'Ok' button of wizard
@@ -47,4 +39,4 @@
-
!python {model: crm.lead}: |
crm = self.browse(cr, uid, ref("crm_lead_opportunity0"))
- assert (crm.ref),("sale order has not been created")
\ No newline at end of file
+ assert (crm.ref),("sale order has not been created")
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index 089a2389703..057e8469431 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -54,10 +54,6 @@ class crm_make_sale(osv.osv_memory):
def view_init(self, cr, uid, fields_list, context=None):
if context is None:
context = {}
- if context.get('active_ids', False) and context['active_ids']:
- for line in self.pool.get('crm.lead').browse(cr, uid, context['active_ids']):
- if not line.section_id:
- raise osv.except_osv(_('Warning !'), _(' Sales Team is not specified.'))
return super(crm_make_sale, self).view_init(cr, uid, fields_list, context=context)
def makeOrder(self, cr, uid, ids, context=None):
@@ -76,7 +72,6 @@ class crm_make_sale(osv.osv_memory):
case_obj = self.pool.get('crm.lead')
sale_obj = self.pool.get('sale.order')
partner_obj = self.pool.get('res.partner')
- sale_line_obj = self.pool.get('sale.order.line')
data = context and context.get('active_ids', []) or []
@@ -115,30 +110,10 @@ class crm_make_sale(osv.osv_memory):
if partner.id:
vals['user_id'] = partner.user_id and partner.user_id.id or uid
- if make.analytic_account.id:
- vals['project_id'] = make.analytic_account.id
new_id = sale_obj.create(cr, uid, vals)
- for line in make.sale_order_line:
- value = {
- 'order_id': new_id,
- 'name': line.name,
- 'delay': line.delay,
- 'product_id': line.product_id and line.product_id.id or False,
- 'price_unit': line.price_unit,
- 'tax_id': line.tax_id and [(6, 0, map(lambda x: x.id, line.tax_id))] or False,
- 'type': line.type,
- 'product_uom_qty': line.product_uom_qty,
- 'product_uom': line.product_uom.id,
- 'product_uos_qty': line.product_uos_qty,
- 'product_uos': line.product_uos and line.product_uos.id or False,
- 'product_packaging': line.product_packaging and line.product_packaging.id or False,
- 'discount': line.discount,
- 'notes': line.notes
- }
- sale_line_obj.create(cr, uid, value, context=context)
case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
new_ids.append(new_id)
- message = _('Opportunity ') + " '" + case.name + "' "+ _("is converted to Sales Quotation.")
+ message = _('Opportunity ') + " '" + case.name + "' "+ _("is converted to Quotation.")
self.log(cr, uid, case.id, message)
if make.close:
@@ -178,8 +153,6 @@ class crm_make_sale(osv.osv_memory):
_columns = {
'shop_id': fields.many2one('sale.shop', 'Shop', required=True),
'partner_id': fields.many2one('res.partner', 'Customer', required=True),
- 'sale_order_line': fields.one2many('sale.order.make.line', 'opportunity_order_id', 'Product Line'),
- 'analytic_account': fields.many2one('account.analytic.account', 'Analytic Account'),
'close': fields.boolean('Close Opportunity', help='Check this to close the opportunity after having created the sale order.'),
}
_defaults = {
@@ -189,48 +162,3 @@ class crm_make_sale(osv.osv_memory):
}
crm_make_sale()
-
-class sale_order_make_line(osv.osv_memory):
-
- def product_id_change(self, cr, uid, ids, product, qty=0,
- uom=False, qty_uos=0, uos=False, name='', partner_id=False,
- lang=False, update_tax=True, packaging=False, flag=False):
- if not partner_id:
- raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.'))
- date_order = time.strftime('%Y-%m-%d')
- part = self.pool.get('res.partner').browse(cr, uid, partner_id)
- pricelist = part.property_product_pricelist and part.property_product_pricelist.id or False
- fiscal_position = part.property_account_position and part.property_account_position.id or False
- return self.pool.get('sale.order.line').product_id_change(cr, uid, ids, pricelist, product, qty, uom, qty_uos, uos, name, partner_id, lang, update_tax, date_order, packaging, fiscal_position, flag)
-
- _name = 'sale.order.make.line'
- _description = 'Opportunity Sale Order Line'
- _columns = {
- 'opportunity_order_id': fields.many2one('crm.make.sale', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True,),
- 'name': fields.char('Description', size=256, required=True, select=True,),
- 'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer"),
- 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price')),
- 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes'),
- 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True),
- 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True,),
- 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True,),
- 'product_uos_qty': fields.float('Quantity (UoS)'),
- 'product_uos': fields.many2one('product.uom', 'Product UoS'),
- 'product_packaging': fields.many2one('product.packaging', 'Packaging'),
- 'discount': fields.float('Discount (%)', digits=(16, 2)),
- 'notes': fields.text('Notes'),
- }
- _order = 'sequence, id'
- _defaults = {
- 'discount': 0.0,
- 'delay': 0.0,
- 'product_uom_qty': 1,
- 'product_uos_qty': 1,
- 'type': 'make_to_stock',
- 'product_packaging': False
- }
-
-sale_order_make_line()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/wizard/crm_make_sale_view.xml b/addons/sale_crm/wizard/crm_make_sale_view.xml
index 54550a08bf1..d73a2cee1ef 100644
--- a/addons/sale_crm/wizard/crm_make_sale_view.xml
+++ b/addons/sale_crm/wizard/crm_make_sale_view.xml
@@ -8,62 +8,18 @@
crm.make.saleform
-