[['.....'*(o['level']) ]] [[ o['type']=='view' and setTag('para','para',{'fontName':'Helvetica-Bold','fontSize':'10.5'}) ]] ( )[[ o['name'] ]] ([[ o['code'] ]])
diff --git a/addons/account_report/wizard/account_report_print_indicators_view.xml b/addons/account_report/wizard/account_report_print_indicators_view.xml
index 9add8c9a616..e5a0ec30c76 100644
--- a/addons/account_report/wizard/account_report_print_indicators_view.xml
+++ b/addons/account_report/wizard/account_report_print_indicators_view.xml
@@ -8,14 +8,14 @@
form
@@ -31,9 +31,11 @@
new
-
+
account.report.print.indicators.relation.form
@@ -41,10 +43,10 @@
form
diff --git a/addons/account_report_india/wizard/account_pl_report_view.xml b/addons/account_report_india/wizard/account_pl_report_view.xml
index e4ef4c5434e..7e05200b220 100644
--- a/addons/account_report_india/wizard/account_pl_report_view.xml
+++ b/addons/account_report_india/wizard/account_pl_report_view.xml
@@ -8,32 +8,30 @@
form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -73,9 +71,9 @@
{'record_id':active_id}
new
-
-
diff --git a/addons/account_reporting/account_view.xml b/addons/account_reporting/account_view.xml
index 6c8c0db8a5b..448d0229f35 100644
--- a/addons/account_reporting/account_view.xml
+++ b/addons/account_reporting/account_view.xml
@@ -9,21 +9,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account_reporting/wizard/account_reporting_balance_report_view.xml b/addons/account_reporting/wizard/account_reporting_balance_report_view.xml
index b554152c19d..07db4156af9 100644
--- a/addons/account_reporting/wizard/account_reporting_balance_report_view.xml
+++ b/addons/account_reporting/wizard/account_reporting_balance_report_view.xml
@@ -8,13 +8,16 @@
form
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 69a5aba09e0..5d1d1f95553 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -51,7 +51,7 @@ ir_sequence_type()
class account_journal(osv.osv):
_inherit = "account.journal"
_columns = {
- 'max_amount': fields.float('Verify Transection', digits=(16, int(config['price_accuracy'])), help="Validate voucher entry twice before posting it, if transection amount more then entered here"),
+ 'max_amount': fields.float('Verify Transaction', digits=(16, int(config['price_accuracy'])), help="Validate voucher entry twice before posting it, if transection amount more then entered here"),
}
account_journal()
@@ -60,7 +60,7 @@ class account_voucher(osv.osv):
def _get_period(self, cr, uid, context={}):
if context.get('period_id', False):
return context.get('period_id')
-
+
periods = self.pool.get('account.period').find(cr, uid)
if periods:
return periods[0]
@@ -76,12 +76,12 @@ class account_voucher(osv.osv):
def _get_journal(self, cr, uid, context={}):
journal_pool = self.pool.get('account.journal')
-
+
if context.get('journal_id', False):
return context.get('journal_id')
-
+
type_inv = context.get('type', 'rec_voucher')
-
+
ttype = type2journal.get(type_inv, type_inv)
res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
@@ -131,7 +131,7 @@ class account_voucher(osv.osv):
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \
\n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \
\n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \
- \n* The \'Cancelled\' state is used when user cancel voucher.'),
+ \n* The \'Cancelled\' state is used when user cancel voucher.'),
'amount':fields.float('Amount', readonly=True),
'number':fields.char('Number', size=32, readonly=True),
'reference': fields.char('Voucher Reference', size=64),
@@ -147,7 +147,7 @@ class account_voucher(osv.osv):
'type': _get_type,
'journal_id':_get_journal,
'currency_id': _get_currency,
-
+
'state': lambda *a: 'draft',
'date' : lambda *a: time.strftime('%Y-%m-%d'),
'reference_type': lambda *a: "none",
@@ -159,7 +159,7 @@ class account_voucher(osv.osv):
# cur_obj = self.pool.get('res.currency')
def onchange_account(self, cr, uid, ids, account_id):
-
+
if not account_id:
return {
'value':{'amount':False}
@@ -176,9 +176,9 @@ class account_voucher(osv.osv):
return {
'value':{'account_id':False}
}
-
+
journal = self.pool.get('account.journal')
-
+
if journal_id and (type in ('rec_voucher','bank_rec_voucher','journal_pur_voucher','journal_voucher')):
account_id = journal.browse(cr, uid, journal_id).default_debit_account_id
return {
@@ -221,7 +221,7 @@ class account_voucher(osv.osv):
self.write(cr, uid, ids, {'state':'draft'})
return True
- def unlink(self, cr, uid, ids, context={}):
+ def unlink(self, cr, uid, ids, context=None):
vouchers = self.read(cr, uid, ids, ['state'])
unlink_ids = []
for t in vouchers:
@@ -229,7 +229,7 @@ class account_voucher(osv.osv):
unlink_ids.append(t['id'])
else:
raise osv.except_osv('Invalid action !', 'Cannot delete Voucher(s) which are already opened or paid !')
- return super(account_voucher, self).unlink(self, cr, uid, unlink_ids)
+ return super(account_voucher, self).unlink(cr, uid, unlink_ids, context=context)
def _get_analytic_lines(self, cr, uid, id):
inv = self.browse(cr, uid, [id])[0]
@@ -262,12 +262,12 @@ class account_voucher(osv.osv):
return iml
def action_move_line_create(self, cr, uid, ids, *args):
-
+
for inv in self.browse(cr, uid, ids):
-
+
if inv.move_id:
continue
-
+
company_currency = inv.company_id.currency_id.id
line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids']
@@ -386,7 +386,7 @@ class account_voucher(osv.osv):
elif line.type == 'cr':
move_line['credit'] = line.amount or False
amount=line.amount * (-1)
-
+
move_line['analytic_account_id'] = line.account_analytic_id.id or False
ml_id=self.pool.get('account.move.line').create(cr, uid, move_line)
@@ -433,7 +433,7 @@ class account_voucher(osv.osv):
'tax_amount': x.get('tax_amount', False),
'ref':x.get('ref',False)
}
-
+
def _convert_ref(self, cr, uid, ref):
return (ref or '').replace('/','')
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index aed57a283aa..9d506b1de0d 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -49,12 +49,16 @@
+
-
-
+
+
+
+
-
-
+
+
+
diff --git a/addons/analytic/__init__.py b/addons/analytic/__init__.py
index dc48b6f4001..d0175cf1424 100644
--- a/addons/analytic/__init__.py
+++ b/addons/analytic/__init__.py
@@ -19,7 +19,7 @@
#
##############################################################################
-import project
+import analytic
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/analytic/project.py b/addons/analytic/analytic.py
similarity index 100%
rename from addons/analytic/project.py
rename to addons/analytic/analytic.py
diff --git a/addons/analytic/i18n/analytic.pot b/addons/analytic/i18n/analytic.pot
new file mode 100644
index 00000000000..170243cf16e
--- /dev/null
+++ b/addons/analytic/i18n/analytic.pot
@@ -0,0 +1,251 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * analytic
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0dev\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2010-06-18 10:59:19+0000\n"
+"PO-Revision-Date: 2010-06-18 10:59:19+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: analytic
+#: field:account.analytic.account,child_ids:0
+msgid "Child Accounts"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,amount_currency:0
+msgid "The amount expressed in the related account currency if not equal to the company one."
+msgstr ""
+
+#. module: analytic
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,name:0
+msgid "Account Name"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,unit_amount:0
+msgid "Specifies the amount of quantity to count."
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,currency_id:0
+msgid "The related account currency if not equal to the company one."
+msgstr ""
+
+#. module: analytic
+#: model:ir.module.module,description:analytic.module_meta_information
+msgid "Module for defining analytic accounting object.\n"
+" "
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,state:0
+msgid "State"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,user_id:0
+msgid "Account Manager"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Closed"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,debit:0
+msgid "Debit"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.account,state:0
+msgid "* When an account is created its in 'Draft' state. \n"
+"* If any associated partner is there, it can be in 'Open' state. \n"
+"* If any pending balance is there it can be in 'Pending'. \n"
+"* And finally when all the transactions are over, it can be in 'Close' state. \n"
+"* The project can be in either if the states 'Template' and 'Running'.\n"
+" If it is template then we can make projects based on the template projects. If its in 'Running' state it is a normal project. \n"
+" If it is to be reviewed then the state is 'Pending'.\n"
+" When the project is completed the state is set to 'Done'."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,type:0
+msgid "Account Type"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Template"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Pending"
+msgstr ""
+
+#. module: analytic
+#: model:ir.model,name:analytic.model_account_analytic_line
+msgid "Analytic Line"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,description:0
+#: field:account.analytic.line,name:0
+msgid "Description"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,amount:0
+msgid "Calculated by multiplying the quantity and the price given in the Product's cost price."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,company_id:0
+#: field:account.analytic.line,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,quantity_max:0
+msgid "Maximum Quantity"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,parent_id:0
+msgid "Parent Analytic Account"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,date:0
+msgid "Date"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,currency_id:0
+#: field:account.analytic.line,currency_id:0
+msgid "Account currency"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,type:0
+msgid "View"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.account,quantity_max:0
+msgid "Sets the higher limit of quantity of hours."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,credit:0
+msgid "Credit"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,amount:0
+msgid "Amount"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,contact_id:0
+msgid "Contact"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,balance:0
+msgid "Balance"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,date_start:0
+msgid "Date Start"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,quantity:0
+#: field:account.analytic.line,unit_amount:0
+msgid "Quantity"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,date:0
+msgid "Date End"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,code:0
+msgid "Account Code"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,type:0
+msgid "Normal"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,complete_name:0
+msgid "Full Account Name"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,account_id:0
+#: model:ir.model,name:analytic.model_account_analytic_account
+#: model:ir.module.module,shortdesc:analytic.module_meta_information
+msgid "Analytic Account"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,company_currency_id:0
+msgid "Currency"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,amount_currency:0
+msgid "Amount currency"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,partner_id:0
+msgid "Associated Partner"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Open"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,line_ids:0
+msgid "Analytic Entries"
+msgstr ""
+
diff --git a/addons/analytic/i18n/en_US.po b/addons/analytic/i18n/en_US.po
new file mode 100644
index 00000000000..65db82b92be
--- /dev/null
+++ b/addons/analytic/i18n/en_US.po
@@ -0,0 +1,251 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * analytic
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0dev\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2010-06-18 11:01:12+0000\n"
+"PO-Revision-Date: 2010-06-18 11:01:12+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: analytic
+#: field:account.analytic.account,child_ids:0
+msgid "Child Accounts"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,amount_currency:0
+msgid "The amount expressed in the related account currency if not equal to the company one."
+msgstr ""
+
+#. module: analytic
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,name:0
+msgid "Account Name"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,unit_amount:0
+msgid "Specifies the amount of quantity to count."
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,currency_id:0
+msgid "The related account currency if not equal to the company one."
+msgstr ""
+
+#. module: analytic
+#: model:ir.module.module,description:analytic.module_meta_information
+msgid "Module for defining analytic accounting object.\n"
+" "
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,state:0
+msgid "State"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,user_id:0
+msgid "Account Manager"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Closed"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,debit:0
+msgid "Debit"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.account,state:0
+msgid "* When an account is created its in 'Draft' state. \n"
+"* If any associated partner is there, it can be in 'Open' state. \n"
+"* If any pending balance is there it can be in 'Pending'. \n"
+"* And finally when all the transactions are over, it can be in 'Close' state. \n"
+"* The project can be in either if the states 'Template' and 'Running'.\n"
+" If it is template then we can make projects based on the template projects. If its in 'Running' state it is a normal project. \n"
+" If it is to be reviewed then the state is 'Pending'.\n"
+" When the project is completed the state is set to 'Done'."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,type:0
+msgid "Account Type"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Template"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Pending"
+msgstr ""
+
+#. module: analytic
+#: model:ir.model,name:analytic.model_account_analytic_line
+msgid "Analytic Line"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,description:0
+#: field:account.analytic.line,name:0
+msgid "Description"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.line,amount:0
+msgid "Calculated by multiplying the quantity and the price given in the Product's cost price."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,company_id:0
+#: field:account.analytic.line,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,quantity_max:0
+msgid "Maximum Quantity"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,parent_id:0
+msgid "Parent Analytic Account"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,date:0
+msgid "Date"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,currency_id:0
+#: field:account.analytic.line,currency_id:0
+msgid "Account currency"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,type:0
+msgid "View"
+msgstr ""
+
+#. module: analytic
+#: help:account.analytic.account,quantity_max:0
+msgid "Sets the higher limit of quantity of hours."
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,credit:0
+msgid "Credit"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,amount:0
+msgid "Amount"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,contact_id:0
+msgid "Contact"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,balance:0
+msgid "Balance"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,date_start:0
+msgid "Date Start"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,quantity:0
+#: field:account.analytic.line,unit_amount:0
+msgid "Quantity"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,date:0
+msgid "Date End"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,code:0
+msgid "Account Code"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,type:0
+msgid "Normal"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,complete_name:0
+msgid "Full Account Name"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,account_id:0
+#: model:ir.model,name:analytic.model_account_analytic_account
+#: model:ir.module.module,shortdesc:analytic.module_meta_information
+msgid "Analytic Account"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,company_currency_id:0
+msgid "Currency"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.line,amount_currency:0
+msgid "Amount currency"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,partner_id:0
+msgid "Associated Partner"
+msgstr ""
+
+#. module: analytic
+#: selection:account.analytic.account,state:0
+msgid "Open"
+msgstr ""
+
+#. module: analytic
+#: field:account.analytic.account,line_ids:0
+msgid "Analytic Entries"
+msgstr ""
+
diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py
index 8bc63f2f1a1..3588371984b 100644
--- a/addons/crm/wizard/crm_send_email.py
+++ b/addons/crm/wizard/crm_send_email.py
@@ -177,7 +177,7 @@ class crm_send_new_email(osv.osv_memory):
"%s <%s>" % (case.user_id.name, case.user_id.address_id.email)) or \
tools.config.get('email_from',False)})
if 'subject' in fields:
- res.update({'subject': '[%s] %s' %(str(case.id), case.name or '')})
+ res.update({'subject': '[%s] %s' % (str(case.id), context.get('subject', case.name) or '')})
if 'email_cc' in fields:
res.update({'email_cc': case.email_cc or ''})
if 'text' in fields:
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml
index bab9e1ff8e5..cf23ae129cd 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_analytic_cost_ledger_view.xml
@@ -30,7 +30,7 @@
new
-
+
\ No newline at end of file
diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml
index d24ad041fee..0f69931ca43 100644
--- a/addons/idea/idea_view.xml
+++ b/addons/idea/idea_view.xml
@@ -247,6 +247,7 @@
+
@@ -372,7 +373,7 @@
-
+
diff --git a/addons/idea/wizard/idea_post_vote.py b/addons/idea/wizard/idea_post_vote.py
index e723d0a4505..c4ba6f331dc 100644
--- a/addons/idea/wizard/idea_post_vote.py
+++ b/addons/idea/wizard/idea_post_vote.py
@@ -101,6 +101,7 @@ class idea_post_vote(osv.osv_memory):
"""
vote_ids = context and context.get('active_ids', []) or []
+ vote_id = context['active_ids'][0]
vote_pool = self.pool.get('idea.vote')
idea_pool = self.pool.get('idea.idea')
comment_pool = self.pool.get('idea.comment')
diff --git a/addons/l10n_be/wizard/l10_be_partner_vat_listing.py b/addons/l10n_be/wizard/l10_be_partner_vat_listing.py
index 415db0ba067..51267636403 100644
--- a/addons/l10n_be/wizard/l10_be_partner_vat_listing.py
+++ b/addons/l10n_be/wizard/l10_be_partner_vat_listing.py
@@ -62,6 +62,7 @@ class partner_vat(osv.osv_memory):
obj_vat_lclient = self.pool.get('vat.listing.clients')
obj_model_data = self.pool.get('ir.model.data')
data = self.read(cursor, user, ids)[0]
+ context['test_xml'] = data['test_xml']
period = obj_period.search(cursor, user, [('fiscalyear_id', '=', data['fyear'])], context=context)
p_id_list = obj_partner.search(cursor, user, [('vat_subjected', '!=', False)], context=context)
if not p_id_list:
@@ -196,7 +197,7 @@ class partner_vat_list(osv.osv_memory):
data_file = '\n'
data_file += '\n\n\t\n\t\t'+str(company_vat)+' \n\t\t'+tools.ustr(obj_cmpny.name)+' \n\t\t'+ tools.ustr(street) +' \n\t\t'+ tools.ustr(zip_city) +' '
@@ -225,7 +226,7 @@ class partner_vat_list(osv.osv_memory):
seq +=1
sum_tax +=line['amount']
sum_turnover +=line['turnover']
- data_clientinfo +='\n\n\t\n\t\t'+line['vat'] +' \n\t\t'+tools.ustr(line['country']) +' \n\t \n\t'+str(int(line['amount'] * 100)) +' \n\t'+str(int(line['turnover'] * 100)) +' \n '
+ data_clientinfo +='\n\n\t\n\t\t'+str(line['vat']) +' \n\t\t'+tools.ustr(line['country']) +' \n\t \n\t'+str(int(line['amount'] * 100)) +' \n\t'+str(int(line['turnover'] * 100)) +' \n '
data_decl ='\n '
data_file += tools.ustr(data_decl) + tools.ustr(data_comp) + tools.ustr(data_period) + tools.ustr(data_clientinfo) + '\n '
diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml
index aec0d877c18..5eea9a13d4a 100644
--- a/addons/lunch/lunch_view.xml
+++ b/addons/lunch/lunch_view.xml
@@ -53,16 +53,51 @@
+
+
+
+
+
+ lunch.order.list.select
+ lunch.order
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lunch Orders
lunch.order
tree,form
+
+ {"search_default_Today":1}
tree
+
-
-
+
+
+
+
+ lunch.cashmove.list.select
+ lunch.cashmove
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
CashMove
lunch.cashmove
+
+ {"search_default_Today":1}
-
-
+
+
@@ -95,8 +95,8 @@
-
-
+
+
diff --git a/addons/point_of_sale/report/pos_invoice.py b/addons/point_of_sale/report/pos_invoice.py
index ee905ed74bf..eb59548758c 100644
--- a/addons/point_of_sale/report/pos_invoice.py
+++ b/addons/point_of_sale/report/pos_invoice.py
@@ -35,19 +35,19 @@ class pos_invoice(report_sxw.rml_parse):
})
- def set_context(self, objects, data, ids, report_type=None):
- super(pos_invoice, self).set_context(objects, data, ids, report_type)
+ def set_context(self, order, data, ids, report_type=None):
+ super(pos_invoice, self).set_context(order, data, ids, report_type)
iids = []
nids = []
- for order in objects:
- order.write({'nb_print': order.nb_print + 1})
- if order.invoice_id and order.invoice_id not in iids:
- if not order.invoice_id:
- raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.'))
- iids.append(order.invoice_id)
- nids.append(order.invoice_id.id)
+ order.write({'nb_print': order.nb_print + 1})
+
+ if order.invoice_id and order.invoice_id not in iids:
+ if not order.invoice_id:
+ raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.'))
+ iids.append(order.invoice_id)
+ nids.append(order.invoice_id.id)
self.cr.commit()
data['ids'] = nids
self.datas = data
diff --git a/addons/point_of_sale/statement_view.xml b/addons/point_of_sale/statement_view.xml
index 65b5fb419d6..cb9a7a9ce03 100644
--- a/addons/point_of_sale/statement_view.xml
+++ b/addons/point_of_sale/statement_view.xml
@@ -34,7 +34,7 @@
-
+
@@ -109,10 +109,10 @@
-
-
-
-
+
+
+
+
@@ -172,10 +172,10 @@
-
-
-
-
+
+
+
+
@@ -301,10 +301,11 @@
-
-
-
-
+
+
+
+
+
diff --git a/addons/product_manufacturer/product_manufacturer.py b/addons/product_manufacturer/product_manufacturer.py
index d77ab518efe..78e951bf448 100644
--- a/addons/product_manufacturer/product_manufacturer.py
+++ b/addons/product_manufacturer/product_manufacturer.py
@@ -1,5 +1,5 @@
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -14,7 +14,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 .
#
##############################################################################
@@ -39,7 +39,7 @@ class res_partner_manufacturer(osv.osv):
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade'),
}
_defaults = {
- 'authorized': lambda *a: True,
+ 'authorized': True,
}
res_partner_manufacturer()
diff --git a/addons/product_margin/product_margin.py b/addons/product_margin/product_margin.py
index b70733ee992..b5421d3798c 100644
--- a/addons/product_margin/product_margin.py
+++ b/addons/product_margin/product_margin.py
@@ -42,7 +42,7 @@ class product_product(osv.osv):
invoice_types=()
states=()
if invoice_state=='paid':
- states=('paid')
+ states=('paid',)
elif invoice_state=='open_paid':
states=('open','paid')
elif invoice_state=='draft_open_paid':
diff --git a/addons/product_visible_discount/product.py b/addons/product_visible_discount/product.py
index e81dac8668e..53c6446c57e 100644
--- a/addons/product_visible_discount/product.py
+++ b/addons/product_visible_discount/product.py
@@ -46,6 +46,25 @@ class sale_order_line(osv.osv):
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
lang=False, update_tax=True,date_order=False,packaging=False,fiscal_position=False, flag=False):
+ def get_real_price(res_dict, product_id, pricelist):
+ item_obj = self.pool.get('product.pricelist.item')
+ price_type_obj = self.pool.get('product.price.type')
+ product_obj = self.pool.get('product.product')
+ template_obj = self.pool.get('product.template')
+ field_name = 'list_price'
+
+ if res_dict.get('item_id',False) and res_dict['item_id'].get(pricelist,False):
+ item = res_dict['item_id'].get(pricelist,False)
+ item_base = item_obj.read(cr, uid, [item], ['base'])[0]['base']
+ if item_base > 0:
+ field_name = price_type_obj.browse(cr, uid, item_base).field
+
+ product_tmpl_id = product_obj.browse(cr, uid, product_id, context).product_tmpl_id.id
+
+ product_read = template_obj.read(cr, uid, product_tmpl_id, [field_name], context)
+ return product_read[field_name]
+
+
res=super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty,
uom, qty_uos, uos, name, partner_id,
lang, update_tax,date_order,fiscal_position=fiscal_position,flag=flag)
@@ -68,15 +87,16 @@ class sale_order_line(osv.osv):
# product_read = self.pool.get('product.template').read(cr, uid, product_tmpl_id, [field_name], context)
# list_price = product_read[field_name]
list_price = pricelist_obj.price_get(cr, uid, [pricelist],
- product.id, qty or 1.0, partner_id, {'uom': uom,'date': date_order })[pricelist]
+ product.id, qty or 1.0, partner_id, {'uom': uom,'date': date_order })
- pricelists=pricelist_obj.read(cr,uid,[pricelist],['visible_discount'])
+ pricelists = pricelist_obj.read(cr,uid,[pricelist],['visible_discount'])
old_uom = product.uos_id or product.uom_id
- new_list_price = product_uom_obj._compute_price(cr,
- uid, old_uom.id, list_price, uom)
- if(len(pricelists)>0 and pricelists[0]['visible_discount'] and list_price != 0):
- discount=(new_list_price-price) / new_list_price * 100
+# new_list_price = product_uom_obj._compute_price(cr,
+# uid, old_uom.id, list_price, uom)
+ new_list_price = get_real_price(list_price, product.id, pricelist)
+ if(len(pricelists)>0 and pricelists[0]['visible_discount'] and list_price[pricelist] != 0):
+ discount = (new_list_price - price) / new_list_price * 100
result['price_unit'] = new_list_price
result['discount'] = discount
else:
diff --git a/addons/stock/product.py b/addons/stock/product.py
index df34b9b86a1..7db85d95f1a 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -349,7 +349,8 @@ class product_product(osv.osv):
if location_info.usage == 'inventory':
if fields.get('virtual_available'):
res['fields']['virtual_available']['string'] = _('Future P&L')
- res['fields']['qty_available']['string'] = _('P&L Qty')
+ if fields.get('qty_available'):
+ res['fields']['qty_available']['string'] = _('P&L Qty')
if location_info.usage == 'procurement':
if fields.get('virtual_available'):
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index b86a46ac1f0..2e411f1afce 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -559,7 +559,7 @@ class stock_picking(osv.osv):
}
new_id = super(stock_picking, self).create(cr, user, vals, context)
if not vals.get('auto_picking', False):
- message = type_list.get(vals.get('type', False), _('Picking')) + " '" + (vals['name'] or "n/a") + _(" with origin")+" '" + (vals['origin'] or "n/a") + "' "+ _("is created.")
+ message = type_list.get(vals.get('type', False), _('Picking')) + " '" + (vals['name'] or "n/a") + _(" with origin")+" '" + (vals.get('origin') or "n/a") + "' "+ _("is created.")
self.log(cr, user, new_id, message)
return new_id
@@ -687,6 +687,8 @@ class stock_picking(osv.osv):
"""
wf_service = netsvc.LocalService("workflow")
for pick in self.browse(cr, uid, ids):
+ if not pick.move_lines:
+ raise osv.except_osv(_('Error !'),_('You can not process picking without stock moves'))
wf_service.trg_validate(uid, 'stock.picking', pick.id,
'button_confirm', cr)
#move_ids = [x.id for x in pick.move_lines]
@@ -1385,9 +1387,9 @@ class stock_move(osv.osv):
'price_unit': fields.float('Unit Price',
digits_compute= dp.get_precision('Account')),
'company_id': fields.many2one('res.company', 'Company', required=True, select=1),
- 'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner"),
+ 'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner", store=True),
'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order"),
- 'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"),
+ 'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin",store=True),
'scraped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scraped'),
}
_constraints = [
@@ -1701,7 +1703,7 @@ class stock_move(osv.osv):
tracking_id = tracking_obj.search(cr, uid, ['name','=', tracking])
if prodlot_id:
update_val['prodlot_id'] = prodlot_id
- else:
+ else:
tracking_id = tracking_obj.create(cr, uid, {'name': tracking}, {'product_id': self.browse(cr, uid, ids)[0].product_id.id})
update_val['tracking_id'] = tracking_id
else:
@@ -2191,17 +2193,17 @@ class stock_move(osv.osv):
for move in complete:
self.action_done(cr, uid, [move.id], context)
-
- # TOCHECK : Done picking if all moves are done
- cr.execute("""
- SELECT move.id FROM stock_picking pick
- RIGHT JOIN stock_move move ON move.picking_id = pick.id AND move.state = %s
- WHERE pick.id = %s""",
- ('done', move.picking_id.id))
- res = cr.fetchall()
- if len(res) == len(move.picking_id.move_lines):
- picking_obj.action_move(cr, uid, [move.picking_id.id])
- wf_service.trg_validate(uid, 'stock.picking', move.picking_id.id, 'button_done', cr)
+ if move.picking_id.id :
+ # TOCHECK : Done picking if all moves are done
+ cr.execute("""
+ SELECT move.id FROM stock_picking pick
+ RIGHT JOIN stock_move move ON move.picking_id = pick.id AND move.state = %s
+ WHERE pick.id = %s""",
+ ('done', move.picking_id.id))
+ res = cr.fetchall()
+ if len(res) == len(move.picking_id.move_lines):
+ picking_obj.action_move(cr, uid, [move.picking_id.id])
+ wf_service.trg_validate(uid, 'stock.picking', move.picking_id.id, 'button_done', cr)
ref = {}
done_move_ids = []
diff --git a/addons/stock/stock_report.xml b/addons/stock/stock_report.xml
index 547ed785cd1..3084e8527a7 100644
--- a/addons/stock/stock_report.xml
+++ b/addons/stock/stock_report.xml
@@ -3,7 +3,6 @@
-
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index e8ffe0a577a..31579978ba8 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1254,12 +1254,9 @@
-
-
-
-
+
@@ -1354,7 +1351,6 @@
-
diff --git a/addons/stock/stock_workflow.xml b/addons/stock/stock_workflow.xml
index 3d51b11025e..1c82eac49c3 100644
--- a/addons/stock/stock_workflow.xml
+++ b/addons/stock/stock_workflow.xml
@@ -41,7 +41,7 @@
cancel
True
function
- action_cancel_inventary()
+ action_cancel()
diff --git a/addons/stock/wizard/stock_inventory_merge_view.xml b/addons/stock/wizard/stock_inventory_merge_view.xml
index e8af34c0c71..5ae2987b59a 100644
--- a/addons/stock/wizard/stock_inventory_merge_view.xml
+++ b/addons/stock/wizard/stock_inventory_merge_view.xml
@@ -7,11 +7,14 @@
stock.inventory.merge
form
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py
index d66972fd36b..0666413e0f9 100644
--- a/addons/stock/wizard/stock_move.py
+++ b/addons/stock/wizard/stock_move.py
@@ -176,15 +176,16 @@ class split_in_production_lot(osv.osv_memory):
"""
res = super(split_in_production_lot, self).default_get(cr, uid, fields, context=context)
- move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context)
- if 'product_id' in fields:
- res.update({'product_id': move.product_id.id})
- if 'product_uom' in fields:
- res.update({'product_uom': move.product_uom.id})
- if 'qty' in fields:
- res.update({'qty': move.product_qty})
- if 'use_exist' in fields:
- res.update({'use_exist': (move.picking_id and move.picking_id.type=='out' and True) or False})
+ if context.get('active_id'):
+ move = self.pool.get('stock.move').browse(cr, uid, context['active_id'], context=context)
+ if 'product_id' in fields:
+ res.update({'product_id': move.product_id.id})
+ if 'product_uom' in fields:
+ res.update({'product_uom': move.product_uom.id})
+ if 'qty' in fields:
+ res.update({'qty': move.product_qty})
+ if 'use_exist' in fields:
+ res.update({'use_exist': (move.picking_id and move.picking_id.type=='out' and True) or False})
return res
_columns = {
diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py
index 8f283ebee62..d9c97a5b885 100644
--- a/addons/stock/wizard/stock_partial_move.py
+++ b/addons/stock/wizard/stock_partial_move.py
@@ -44,7 +44,9 @@ class stock_partial_move(osv.osv_memory):
moveids = []
for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
if m.state in ('done', 'cancel'):
- continue
+ raise osv.except_osv(_('Invalid action !'), _('Cannot delivery products which are already delivered !'))
+
+
if 'move%s_product_id'%(m.id) not in self._columns:
self._columns['move%s_product_id'%(m.id)] = fields.many2one('product.product',string="Product")
if 'move%s_product_qty'%(m.id) not in self._columns:
@@ -66,7 +68,8 @@ class stock_partial_move(osv.osv_memory):
move_ids = move_obj.search(cr, uid, [('id','in',move_ids)])
_moves_arch_lst = """
-
+
+
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index c81e8bbf2eb..40bffae7654 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -62,7 +62,8 @@ class stock_partial_picking(osv.osv_memory):
picking_ids = context.get('active_ids', False)
_moves_arch_lst = """
-
+
+
"""
_moves_fields = result['fields']
diff --git a/addons/stock_location/mrp_pull.py b/addons/stock_location/mrp_pull.py
index a8a5026bf4c..b4a68ca1b74 100644
--- a/addons/stock_location/mrp_pull.py
+++ b/addons/stock_location/mrp_pull.py
@@ -32,7 +32,7 @@ class procurement_order(osv.osv):
def check_buy(self, cr, uid, ids, context=None):
for procurement in self.browse(cr, uid, ids):
for line in procurement.product_id.flow_pull_ids:
- print line.location_src_id.name, line.location_id.name, line.type_proc
+
if line.location_id==procurement.location_id:
return line.type_proc=='buy'
return super(procurement_order, self).check_buy(cr, uid, ids)
@@ -58,7 +58,6 @@ class procurement_order(osv.osv):
move_obj = self.pool.get('stock.move')
location_obj = self.pool.get('stock.location')
wf_service = netsvc.LocalService("workflow")
-
for proc in proc_obj.browse(cr, uid, ids, context=context):
line = None
for line in proc.product_id.flow_pull_ids:
@@ -79,7 +78,7 @@ class procurement_order(osv.osv):
move_id = self.pool.get('stock.move').create(cr, uid, {
'name': line.name,
'picking_id': picking_id,
- 'company_id': line.company_id and line.company_id.id or False,
+ 'company_id': line.company_id and line.company_id.id or False,
'product_id': proc.product_id.id,
'date_planned': proc.date_planned,
'product_qty': proc.product_qty,
@@ -104,7 +103,7 @@ class procurement_order(osv.osv):
proc_id = self.pool.get('procurement.order').create(cr, uid, {
'name': line.name,
'origin': origin,
- 'company_id': line.company_id and line.company_id.id or False,
+ 'company_id': line.company_id and line.company_id.id or False,
'date_planned': proc.date_planned,
'product_id': proc.product_id.id,
'product_qty': proc.product_qty,
diff --git a/addons/stock_location/stock.py b/addons/stock_location/stock.py
index 561cdbbecda..5404946e3ee 100644
--- a/addons/stock_location/stock.py
+++ b/addons/stock_location/stock.py
@@ -80,18 +80,19 @@ class product_pulled_flow(osv.osv):
required=True,),
}
_defaults = {
- 'cancel_cascade': lambda *arg: False,
- 'procure_method': lambda *args: 'make_to_stock',
- 'type_proc': lambda *args: 'move',
- 'picking_type':lambda *args:'out',
- 'invoice_state': lambda *args: 'none',
+ 'cancel_cascade': False,
+ 'procure_method': 'make_to_stock',
+ 'type_proc': 'move',
+ 'picking_type': 'out',
+ 'invoice_state': 'none',
+ 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'product.pulled.flow', context=c),
}
product_pulled_flow()
class product_product(osv.osv):
_inherit = 'product.product'
_columns = {
- 'flow_pull_ids': fields.one2many('product.pulled.flow', 'product_id', 'Pulled Flows'),
+ 'flow_pull_ids': fields.one2many('product.pulled.flow', 'product_id', 'Pulled Flows'),
'path_ids': fields.one2many('stock.location.path', 'product_id',
'Pushed Flow',
help="These rules set the right path of the product in the "\
diff --git a/addons/stock_no_autopicking/stock_no_autopicking.py b/addons/stock_no_autopicking/stock_no_autopicking.py
index e0bf3cffec2..17d16328d20 100644
--- a/addons/stock_no_autopicking/stock_no_autopicking.py
+++ b/addons/stock_no_autopicking/stock_no_autopicking.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 .
#
##############################################################################
@@ -28,7 +28,7 @@ class product(osv.osv):
'auto_pick': fields.boolean('Auto Picking', help="Auto picking for raw materials of production orders.")
}
_defaults = {
- 'auto_pick': lambda *args: True
+ 'auto_pick': True
}
product()
diff --git a/addons/stock_planning/stock_planning.py b/addons/stock_planning/stock_planning.py
index 0c957d8b72e..ef9fa7e65dd 100644
--- a/addons/stock_planning/stock_planning.py
+++ b/addons/stock_planning/stock_planning.py
@@ -346,12 +346,13 @@ class stock_sale_forecast(osv.osv):
def product_amt_change(self, cr, uid, ids, product_amt = 0.0, product_uom=False):
ret={}
+ round_value = 1
if product_amt:
coeff_def2uom = 1
val1 = self.browse(cr, uid, ids)
val = val1[0]
if (product_uom != val.product_id.uom_id.id):
- coeff_def2uom, rounding = self._from_default_uom_factor( cr, uid, val, product_uom, {})
+ coeff_def2uom, round_value = self._from_default_uom_factor( cr, uid, val, product_uom, {})
ret['product_qty'] = rounding(coeff_def2uom * product_amt/(val.product_id.product_tmpl_id.list_price), round_value)
res = {'value': ret}
return res
diff --git a/addons/stock_planning/stock_planning_view.xml b/addons/stock_planning/stock_planning_view.xml
index a575f677661..e4200cb3d7b 100644
--- a/addons/stock_planning/stock_planning_view.xml
+++ b/addons/stock_planning/stock_planning_view.xml
@@ -105,7 +105,7 @@
-
+
@@ -152,7 +152,7 @@
-
+
@@ -209,11 +209,13 @@
+
+
@@ -238,14 +240,20 @@
search
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
@@ -351,7 +359,7 @@
-
+
@@ -362,10 +370,10 @@
-
+
-
+
@@ -382,14 +390,18 @@
search
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/subscription/subscription_view.xml b/addons/subscription/subscription_view.xml
index 478bb4a4f67..695f9b00895 100644
--- a/addons/subscription/subscription_view.xml
+++ b/addons/subscription/subscription_view.xml
@@ -152,6 +152,9 @@
form
-
+
+
+
diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml
index e2643b127b7..2da132de509 100644
--- a/addons/survey/survey_view.xml
+++ b/addons/survey/survey_view.xml
@@ -3,7 +3,7 @@
-
-
-
+
+
+
@@ -170,6 +171,7 @@
+
@@ -230,11 +232,11 @@
survey
tree
-
+
-
+
@@ -267,6 +269,12 @@
+
+
+
+
+
+
@@ -457,6 +465,22 @@
+
+ survey.page.list.select
+ survey.page
+ search
+
+
+
+
+
+
+
+
+
+
+
+
Survey Pages
survey.page
@@ -668,9 +692,9 @@
-
+
+
+
survey_question_wizard_test
diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py
index 002faa6f431..beb0fe6571f 100644
--- a/addons/survey/wizard/survey_selection.py
+++ b/addons/survey/wizard/survey_selection.py
@@ -62,15 +62,17 @@ class survey_name_wiz(osv.osv_memory):
for sur in surv_obj.browse(cr, uid, [context.get('survey_id',False)]):
result.append((sur.id, sur.title))
return result
- group_id = self.pool.get('res.groups').search(cr, uid, [('name', '=', 'Survey / Manager')])
+ group_id = self.pool.get('res.groups').search(cr, uid, [('name', 'in', ('Survey / Manager','Survey / User'))])
user_obj = self.pool.get('res.users')
user_rec = user_obj.read(cr, uid, uid)
for sur in surv_obj.browse(cr, uid, surv_obj.search(cr, uid, [])):
if sur.state == 'open':
- if group_id[0] in user_rec['groups_id']:
- result.append((sur.id, sur.title))
- elif sur.id in user_rec['survey_id']:
- result.append((sur.id, sur.title))
+# if group_id[0] in user_rec['groups_id']:
+ for i in group_id:
+ if i in user_rec['groups_id']:
+ result.append((sur.id, sur.title))
+ elif sur.id in user_rec['survey_id']:
+ result.append((sur.id, sur.title))
return result
_columns = {