[MERGE] Merged with addons/trunk.
bzr revid: tde@openerp.com-20121024093211-gu2d17wbp5cdthap
This commit is contained in:
commit
f42c927992
|
@ -185,6 +185,7 @@ class account_invoice(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'supplier_invoice_number': fields.char('Supplier Invoice Number', size=64, help="The reference of this invoice as provided by the supplier.", readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'type': fields.selection([
|
||||
('out_invoice','Customer Invoice'),
|
||||
('in_invoice','Supplier Invoice'),
|
||||
|
|
|
@ -168,12 +168,15 @@
|
|||
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
|
||||
domain="[('supplier', '=', True)]"/>
|
||||
<field name="fiscal_position" widget="selection"/>
|
||||
<field name="origin"/>
|
||||
<label for="reference_type"/>
|
||||
<div>
|
||||
<group>
|
||||
<field name="origin"/>
|
||||
<field name="supplier_invoice_number"/>
|
||||
</group>
|
||||
<label for="reference_type"/>
|
||||
<div>
|
||||
<field name="reference_type" class="oe_inline oe_edit_only"/>
|
||||
<field name="reference" class="oe_inline"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_invoice"/>
|
||||
|
@ -445,7 +448,7 @@
|
|||
<field name="model">account.invoice</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Invoice">
|
||||
<field name="number" string="Invoice" filter_domain="['|', ('number','ilike',self),('origin','ilike',self)]"/>
|
||||
<field name="number" string="Invoice" filter_domain="['|','|', ('number','ilike',self), ('origin','ilike',self), ('supplier_invoice_number', 'ilike', self)]"/>
|
||||
<filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
|
||||
<filter name="proforma" icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/>
|
||||
<filter name="invoices" icon="terp-dolar" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>
|
||||
|
|
|
@ -2414,32 +2414,6 @@
|
|||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record id="ir_actions_server_action_wizard_multi_chart" model="ir.actions.server">
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="state">code</field>
|
||||
<field name="model_id" ref="base.model_ir_actions_todo"/>
|
||||
<field eval="5" name="sequence"/>
|
||||
<field name="code">
|
||||
# check for unconfigured companies
|
||||
account_installer_obj = self.pool.get('account.installer')
|
||||
account_installer_obj.check_unconfigured_cmp(cr, uid, context=context)
|
||||
action_ids = []
|
||||
# fetch the act_window actions related to chart of account configuration
|
||||
# we use ir.actions.todo to enable the possibility for other modules to insert their own
|
||||
# wizards during the configuration process
|
||||
ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_wizard_multi_chart')
|
||||
if ref:
|
||||
action_ids += [ref[1]]
|
||||
ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_account_configuration_installer')
|
||||
if ref:
|
||||
action_ids += [ref[1]]
|
||||
todo_ids = pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', action_ids)], context=context)
|
||||
pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context)
|
||||
action = pool.get('res.config').next(cr, uid, [], context)
|
||||
</field>
|
||||
<field name="name">New Company Financial Setting</field>
|
||||
</record>
|
||||
|
||||
<record id="account_account_graph" model="ir.ui.view">
|
||||
<field name="name">account.account.graph</field>
|
||||
|
|
|
@ -119,15 +119,6 @@ class account_installer(osv.osv_memory):
|
|||
self.execute_simple(cr, uid, ids, context)
|
||||
super(account_installer, self).execute(cr, uid, ids, context=context)
|
||||
|
||||
def action_next(self, cr, uid, ids, context=None):
|
||||
next = self.execute(cr, uid, ids, context=context)
|
||||
for installer in self.browse(cr, uid, ids, context=context):
|
||||
if installer.charts == 'l10n_be':
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
else :
|
||||
if next : return next
|
||||
return self.next(cr, uid, ids, context=context)
|
||||
|
||||
def execute_simple(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
|
|
@ -255,27 +255,27 @@ class account_analytic_account(osv.osv):
|
|||
if context is None:
|
||||
context={}
|
||||
if context.get('current_model') == 'project.project':
|
||||
cr.execute("select analytic_account_id from project_project")
|
||||
project_ids = [x[0] for x in cr.fetchall()]
|
||||
project_obj = self.pool.get("account.analytic.account")
|
||||
project_ids = project_obj.search(cr, uid, args)
|
||||
return self.name_get(cr, uid, project_ids, context=context)
|
||||
if name:
|
||||
account = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context)
|
||||
if not account:
|
||||
account_ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context)
|
||||
if not account_ids:
|
||||
names=map(lambda i : i.strip(),name.split('/'))
|
||||
for i in range(len(names)):
|
||||
dom=[('name', operator, names[i])]
|
||||
if i>0:
|
||||
dom+=[('id','child_of',account)]
|
||||
account = self.search(cr, uid, dom, limit=limit, context=context)
|
||||
newacc = account
|
||||
dom+=[('id','child_of',account_ids)]
|
||||
account_ids = self.search(cr, uid, dom, limit=limit, context=context)
|
||||
newacc = account_ids
|
||||
while newacc:
|
||||
newacc = self.search(cr, uid, [('parent_id', 'in', newacc)], limit=limit, context=context)
|
||||
account += newacc
|
||||
account_ids += newacc
|
||||
if args:
|
||||
account = self.search(cr, uid, [('id', 'in', account)] + args, limit=limit, context=context)
|
||||
account_ids = self.search(cr, uid, [('id', 'in', account_ids)] + args, limit=limit, context=context)
|
||||
else:
|
||||
account = self.search(cr, uid, args, limit=limit, context=context)
|
||||
return self.name_get(cr, uid, account, context=context)
|
||||
account_ids = self.search(cr, uid, args, limit=limit, context=context)
|
||||
return self.name_get(cr, uid, account_ids, context=context)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
contract = super(account_analytic_account, self).create(cr, uid, vals, context=context)
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2011-03-16 00:04+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2012-10-24 04:51+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-19 05:33+0000\n"
|
||||
"X-Generator: Launchpad (build 16165)\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-24 04:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16179)\n"
|
||||
|
||||
#. module: crm_claim
|
||||
#: field:crm.claim.report,nbr:0
|
||||
|
@ -85,12 +85,12 @@ msgstr ""
|
|||
#: code:addons/crm_claim/crm_claim.py:132
|
||||
#, python-format
|
||||
msgid "The claim '%s' has been opened."
|
||||
msgstr ""
|
||||
msgstr "Претензия '%s' была открыта"
|
||||
|
||||
#. module: crm_claim
|
||||
#: view:crm.claim:0
|
||||
msgid "Date Closed"
|
||||
msgstr ""
|
||||
msgstr "Дата закрытия"
|
||||
|
||||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
|
@ -151,12 +151,12 @@ msgstr "Ссылка"
|
|||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
msgid "Date of claim"
|
||||
msgstr ""
|
||||
msgstr "Дата претензии"
|
||||
|
||||
#. module: crm_claim
|
||||
#: view:crm.claim:0
|
||||
msgid "All pending Claims"
|
||||
msgstr ""
|
||||
msgstr "Все ожидающие претензии"
|
||||
|
||||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
|
@ -187,7 +187,7 @@ msgstr "Контрагент"
|
|||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
msgid "Month of claim"
|
||||
msgstr ""
|
||||
msgstr "Месяц претензии"
|
||||
|
||||
#. module: crm_claim
|
||||
#: selection:crm.claim,type_action:0
|
||||
|
@ -227,7 +227,7 @@ msgstr "Отправить новое эл. письмо"
|
|||
#: selection:crm.claim,state:0
|
||||
#: view:crm.claim.report:0
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
msgstr "Новый"
|
||||
|
||||
#. module: crm_claim
|
||||
#: view:crm.claim:0
|
||||
|
@ -254,7 +254,7 @@ msgstr "Следующее действие"
|
|||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
msgid "My Sales Team(s)"
|
||||
msgstr ""
|
||||
msgstr "Мои отделы продаж"
|
||||
|
||||
#. module: crm_claim
|
||||
#: model:crm.case.stage,name:crm_claim.stage_claim3
|
||||
|
@ -321,7 +321,7 @@ msgstr "Контакт"
|
|||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
msgid "Month-1"
|
||||
msgstr ""
|
||||
msgstr "Месяц-1"
|
||||
|
||||
#. module: crm_claim
|
||||
#: model:ir.actions.act_window,name:crm_claim.action_report_crm_claim
|
||||
|
@ -380,7 +380,7 @@ msgstr "Дата изменения"
|
|||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
msgid "Year of claim"
|
||||
msgstr ""
|
||||
msgstr "Год претензи"
|
||||
|
||||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
|
@ -402,7 +402,7 @@ msgstr "Значение претензии"
|
|||
#. module: crm_claim
|
||||
#: view:crm.claim:0
|
||||
msgid "Responsible User"
|
||||
msgstr ""
|
||||
msgstr "Ответственный пользователь"
|
||||
|
||||
#. module: crm_claim
|
||||
#: help:crm.claim,email_cc:0
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
-
|
||||
!record {model: ir.actions.todo, id: config_call_account_template}:
|
||||
action_id: account.action_wizard_multi_chart
|
||||
type: automatic
|
||||
-
|
||||
!python {model: ir.actions.todo}: |
|
||||
install_todo = self.browse(cr, uid, ref('l10n_be.config_call_account_template'))
|
||||
install_todo = self.browse(cr, uid, ref('account.action_wizard_multi_chart_todo'))
|
||||
if install_todo.state == 'open':
|
||||
wiz = self.pool.get('wizard.multi.charts.accounts')
|
||||
values = {
|
||||
|
|
|
@ -14,7 +14,7 @@ msgstr ""
|
|||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-23 04:48+0000\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-24 04:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16179)\n"
|
||||
|
||||
#. module: l10n_mx
|
||||
|
|
|
@ -668,7 +668,7 @@
|
|||
<page string="Consumed Products">
|
||||
<group>
|
||||
<group string="Products to Consume">
|
||||
<field name="move_lines" nolabel="1">
|
||||
<field name="move_lines" nolabel="1" options="{'reload_on_button': true}">
|
||||
<tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" string="Quantity"/>
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:37+0000\n"
|
||||
"PO-Revision-Date: 2012-05-10 18:26+0000\n"
|
||||
"PO-Revision-Date: 2012-10-23 18:55+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-19 05:30+0000\n"
|
||||
"X-Generator: Launchpad (build 16165)\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-24 04:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16179)\n"
|
||||
|
||||
#. module: resource
|
||||
#: help:resource.calendar.leaves,resource_id:0
|
||||
|
@ -107,7 +107,7 @@ msgstr "Рабочее время начнется с"
|
|||
#. module: resource
|
||||
#: constraint:resource.calendar.leaves:0
|
||||
msgid "Error! leave start-date must be lower then leave end-date."
|
||||
msgstr ""
|
||||
msgstr "Ошибка! Дата начала отгула должна быть раньше даты завершения."
|
||||
|
||||
#. module: resource
|
||||
#: model:ir.model,name:resource.model_resource_calendar
|
||||
|
@ -324,7 +324,7 @@ msgstr "(отпуск)"
|
|||
#: code:addons/resource/resource.py:392
|
||||
#, python-format
|
||||
msgid "Configuration Error!"
|
||||
msgstr ""
|
||||
msgstr "Ошибка конфигурации!"
|
||||
|
||||
#. module: resource
|
||||
#: selection:resource.resource,resource_type:0
|
||||
|
|
|
@ -7,14 +7,14 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-09-20 07:29+0000\n"
|
||||
"PO-Revision-Date: 2012-09-10 14:56+0000\n"
|
||||
"PO-Revision-Date: 2012-10-23 18:53+0000\n"
|
||||
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-19 05:12+0000\n"
|
||||
"X-Generator: Launchpad (build 16165)\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-24 04:55+0000\n"
|
||||
"X-Generator: Launchpad (build 16179)\n"
|
||||
|
||||
#. module: sale
|
||||
#: code:addons/sale/wizard/sale_make_invoice_advance.py:215
|
||||
|
@ -235,7 +235,7 @@ msgstr "В счет"
|
|||
#: view:sale.order.line:0
|
||||
#: field:sale.report,product_uom:0
|
||||
msgid "Unit of Measure"
|
||||
msgstr ""
|
||||
msgstr "Единицы измерения"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,date_confirm:0
|
||||
|
@ -264,7 +264,7 @@ msgstr ""
|
|||
#. module: sale
|
||||
#: selection:sale.advance.payment.inv,advance_payment_method:0
|
||||
msgid "Invoice the whole sale order"
|
||||
msgstr ""
|
||||
msgstr "Выставить счет на весь заказ продажи"
|
||||
|
||||
#. module: sale
|
||||
#: field:sale.order,project_id:0
|
||||
|
@ -304,12 +304,12 @@ msgstr "Исключение счета"
|
|||
#. module: sale
|
||||
#: view:account.config.settings:0
|
||||
msgid "0"
|
||||
msgstr ""
|
||||
msgstr "0"
|
||||
|
||||
#. module: sale
|
||||
#: selection:sale.order,state:0
|
||||
msgid "Draft Quotation"
|
||||
msgstr ""
|
||||
msgstr "Черновик предложения"
|
||||
|
||||
#. module: sale
|
||||
#: code:addons/sale/wizard/sale_make_invoice_advance.py:124
|
||||
|
@ -359,23 +359,23 @@ msgstr "Вес"
|
|||
#. module: sale
|
||||
#: view:sale.config.settings:0
|
||||
msgid "Warehouse Features"
|
||||
msgstr ""
|
||||
msgstr "Особенности склада"
|
||||
|
||||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
msgid "Quotation "
|
||||
msgstr ""
|
||||
msgstr "Предложение "
|
||||
|
||||
#. module: sale
|
||||
#: field:sale.order.line,product_uom:0
|
||||
msgid "Unit of Measure "
|
||||
msgstr ""
|
||||
msgstr "Единица измерения "
|
||||
|
||||
#. module: sale
|
||||
#: code:addons/sale/wizard/sale_make_invoice_advance.py:148
|
||||
#, python-format
|
||||
msgid "Incorrect Data"
|
||||
msgstr ""
|
||||
msgstr "Неверные данные"
|
||||
|
||||
#. module: sale
|
||||
#: code:addons/sale/wizard/sale_make_invoice_advance.py:149
|
||||
|
@ -401,7 +401,7 @@ msgstr "Заказ"
|
|||
#. module: sale
|
||||
#: field:sale.order,message_ids:0
|
||||
msgid "Messages"
|
||||
msgstr ""
|
||||
msgstr "Сообщения"
|
||||
|
||||
#. module: sale
|
||||
#: selection:sale.report,month:0
|
||||
|
@ -422,7 +422,7 @@ msgstr "Сумма до налогов"
|
|||
#. module: sale
|
||||
#: field:sale.config.settings,module_project:0
|
||||
msgid "Project"
|
||||
msgstr ""
|
||||
msgstr "Проект"
|
||||
|
||||
#. module: sale
|
||||
#: code:addons/sale/sale.py:319
|
||||
|
@ -433,7 +433,7 @@ msgstr ""
|
|||
#: code:addons/sale/wizard/sale_make_invoice_advance.py:123
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
msgstr "Ошибка!"
|
||||
|
||||
#. module: sale
|
||||
#: report:sale.order:0
|
||||
|
@ -467,7 +467,7 @@ msgstr "Позиции заказа продаж относящиеся к мо
|
|||
#. module: sale
|
||||
#: selection:sale.order,state:0
|
||||
msgid "Quotation Sent"
|
||||
msgstr ""
|
||||
msgstr "Предложение отправлено"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.order,message_unread:0
|
||||
|
@ -528,12 +528,12 @@ msgstr "Налог"
|
|||
#: code:addons/sale/sale.py:986
|
||||
#, python-format
|
||||
msgid "Invalid Action!"
|
||||
msgstr ""
|
||||
msgstr "Неверное действие!"
|
||||
|
||||
#. module: sale
|
||||
#: view:sale.report:0
|
||||
msgid "Reference Unit of Measure"
|
||||
msgstr ""
|
||||
msgstr "Базовая единица измерения"
|
||||
|
||||
#. module: sale
|
||||
#: field:sale.report,date_confirm:0
|
||||
|
@ -572,7 +572,7 @@ msgstr "Факс :"
|
|||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
msgid "(update)"
|
||||
msgstr ""
|
||||
msgstr "(обновление)"
|
||||
|
||||
#. module: sale
|
||||
#: help:sale.config.settings,group_discount_per_so_line:0
|
||||
|
@ -635,7 +635,7 @@ msgstr "Подтвердить"
|
|||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
msgid "Unread messages"
|
||||
msgstr ""
|
||||
msgstr "Непрочитанные сообщения"
|
||||
|
||||
#. module: sale
|
||||
#: field:sale.order,partner_shipping_id:0
|
||||
|
@ -673,12 +673,12 @@ msgstr "Заказы продаж, которые еще не были подт
|
|||
#. module: sale
|
||||
#: field:sale.order,message_unread:0
|
||||
msgid "Unread Messages"
|
||||
msgstr ""
|
||||
msgstr "Непрочитанные сообщения"
|
||||
|
||||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
msgstr "Печать"
|
||||
|
||||
#. module: sale
|
||||
#: report:sale.order:0
|
||||
|
@ -793,12 +793,12 @@ msgstr "Год заказа в заказе продаж"
|
|||
#. module: sale
|
||||
#: field:sale.config.settings,module_sale_stock:0
|
||||
msgid "Sale and Warehouse Management"
|
||||
msgstr ""
|
||||
msgstr "Управление продажами и складом"
|
||||
|
||||
#. module: sale
|
||||
#: model:ir.model,name:sale.model_sale_config_settings
|
||||
msgid "sale.config.settings"
|
||||
msgstr ""
|
||||
msgstr "sale.config.settings"
|
||||
|
||||
#. module: sale
|
||||
#: field:sale.advance.payment.inv,qtty:0
|
||||
|
@ -842,7 +842,7 @@ msgstr ""
|
|||
#. module: sale
|
||||
#: view:sale.config.settings:0
|
||||
msgid "Default Options"
|
||||
msgstr ""
|
||||
msgstr "Параметры по умолчанию"
|
||||
|
||||
#. module: sale
|
||||
#: code:addons/sale/sale.py:963
|
||||
|
@ -850,12 +850,12 @@ msgstr ""
|
|||
#: code:addons/sale/wizard/sale_make_invoice_advance.py:142
|
||||
#, python-format
|
||||
msgid "Configuration Error!"
|
||||
msgstr ""
|
||||
msgstr "Ошибка конфигурации!"
|
||||
|
||||
#. module: sale
|
||||
#: field:account.config.settings,group_analytic_account_for_sales:0
|
||||
msgid "Analytic accounting for sales"
|
||||
msgstr ""
|
||||
msgstr "Аналитический учет для продаж"
|
||||
|
||||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
|
|
|
@ -77,6 +77,7 @@ class survey(osv.osv):
|
|||
'tot_comp_survey': lambda * a: 0,
|
||||
'send_response': lambda * a: 1,
|
||||
'response_user': lambda * a:1,
|
||||
'date_open': fields.datetime.now,
|
||||
}
|
||||
|
||||
def survey_open(self, cr, uid, ids, arg):
|
||||
|
@ -151,8 +152,7 @@ class survey(osv.osv):
|
|||
pages = sur['page_ids']
|
||||
if not pages:
|
||||
raise osv.except_osv(_('Warning!'), _('This survey has no question defined. Please define the questions and answers first.'))
|
||||
else:
|
||||
context.update({'active':False,'survey_id': ids[0]})
|
||||
context.update({'active':False,'survey_id': ids[0]})
|
||||
return {
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
|
@ -163,9 +163,12 @@ class survey(osv.osv):
|
|||
'context': context
|
||||
}
|
||||
def test_survey(self, cr, uid, ids, context=None):
|
||||
sur_obj = self.read(cr, uid, ids,['title'], context=context)
|
||||
sur_obj = self.read(cr, uid, ids,['title','page_ids'], context=context)
|
||||
for sur in sur_obj:
|
||||
name = sur['title']
|
||||
pages = sur['page_ids']
|
||||
if not pages:
|
||||
raise osv.except_osv(_('Warning!'), _('This survey has no pages defined. Please define pages first.'))
|
||||
context.update({'active':True,'survey_id': ids[0]})
|
||||
return {
|
||||
'view_type': 'form',
|
||||
|
|
|
@ -38,24 +38,24 @@
|
|||
<div class="oe_title">
|
||||
<label for="title" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="title"/>
|
||||
<field name="title" attrs="{'readonly':[('state','=','close')]}"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="responsible_id" class="oe_inline"/>
|
||||
<field name="send_response"/>
|
||||
<field name="type"/>
|
||||
<field name="responsible_id" class="oe_inline" attrs="{'readonly':[('state','=','close')]}"/>
|
||||
<field name="send_response" attrs="{'readonly':[('state','=','close')]}"/>
|
||||
<field name="type" attrs="{'readonly':[('state','=','close')]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="max_response_limit" attrs="{'readonly':[('state','in',('open','close'))]}"/>
|
||||
<field name="response_user" attrs="{'readonly':[('state','in',('open','close'))]}"/>
|
||||
<field name="max_response_limit" attrs="{'readonly':[('state','=','close')]}"/>
|
||||
<field name="response_user" attrs="{'readonly':[('state','=','close')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Survey Details">
|
||||
<field name="page_ids" colspan="4" mode="tree">
|
||||
<field name="page_ids" colspan="4" mode="tree" attrs="{'readonly':[('state','=','close')]}">
|
||||
<form string="Survey Page" version="7.0">
|
||||
<sheet>
|
||||
<label for="title" class="oe_edit_only"/>
|
||||
|
@ -212,7 +212,7 @@
|
|||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
<field name="note" placeholder="Survey description..."/>
|
||||
<field name="note" placeholder="Survey description..." attrs="{'readonly':[('state','=','close')]}"/>
|
||||
</page>
|
||||
<page string="Invited User">
|
||||
<field name="invited_user_ids" readonly="1"/>
|
||||
|
|
|
@ -134,6 +134,8 @@ class survey_question_wiz(osv.osv_memory):
|
|||
page_number += 1
|
||||
if sur_name_rec.page_no > - 1:
|
||||
pre_button = True
|
||||
else:
|
||||
flag = True
|
||||
else:
|
||||
if sur_name_rec.page_no != 0:
|
||||
p_id = p_id[sur_name_rec.page_no - 1]
|
||||
|
@ -146,7 +148,15 @@ class survey_question_wiz(osv.osv_memory):
|
|||
pre_button = True
|
||||
if flag:
|
||||
pag_rec = page_obj.browse(cr, uid, p_id, context=context)
|
||||
xml_form = etree.Element('form', {'string': tools.ustr(pag_rec.title or sur_rec.title)})
|
||||
note = False
|
||||
question_ids = []
|
||||
if pag_rec:
|
||||
title = pag_rec.title
|
||||
note = pag_rec.note
|
||||
question_ids = pag_rec.question_ids
|
||||
else:
|
||||
title = sur_rec.title
|
||||
xml_form = etree.Element('form', {'string': tools.ustr(title)})
|
||||
if context.has_key('active') and context.get('active',False) and context.has_key('edit'):
|
||||
context.update({'page_id' : tools.ustr(p_id),'page_number' : sur_name_rec.page_no , 'transfer' : sur_name_read.transfer})
|
||||
xml_group3 = etree.SubElement(xml_form, 'group', {'col': '4', 'colspan': '4'})
|
||||
|
@ -174,10 +184,10 @@ class survey_question_wiz(osv.osv_memory):
|
|||
fields["wizardid_" + str(wiz_id)] = {'type':'char', 'size' : 255, 'string':"", 'views':{}}
|
||||
etree.SubElement(xml_form, 'field', {'invisible':'1','name': "wizardid_" + str(wiz_id),'default':str(lambda *a: 0),'modifiers':'{"invisible":true}'})
|
||||
|
||||
if pag_rec.note:
|
||||
for que_test in pag_rec.note.split('\n'):
|
||||
if note:
|
||||
for que_test in note.split('\n'):
|
||||
etree.SubElement(xml_form, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"})
|
||||
que_ids = pag_rec.question_ids
|
||||
que_ids = question_ids
|
||||
qu_no = 0
|
||||
|
||||
for que in que_ids:
|
||||
|
@ -429,13 +439,13 @@ class survey_question_wiz(osv.osv_memory):
|
|||
vals['attachment_ids'] = [(0,0,{'name': a_name,
|
||||
'datas_fname': a_name,
|
||||
'datas': str(a_content).encode('base64')})
|
||||
for a_name, a_content in attachments]
|
||||
for a_name, a_content in attachments.items()]
|
||||
self.pool.get('mail.mail').create(cr, uid, vals, context=context)
|
||||
|
||||
xml_form = etree.Element('form', {'string': _('Complete Survey Answer')})
|
||||
xml_footer = etree.SubElement(xml_form, 'footer', {'col': '6', 'colspan': '4' ,'class': 'oe_survey_title_height'})
|
||||
|
||||
etree.SubElement(xml_form, 'separator', {'string': 'Complete Survey', 'colspan': "4"})
|
||||
etree.SubElement(xml_form, 'separator', {'string': 'Survey Completed', 'colspan': "4"})
|
||||
etree.SubElement(xml_form, 'label', {'string': 'Thanks for your Answer'})
|
||||
etree.SubElement(xml_form, 'newline')
|
||||
etree.SubElement(xml_footer, 'button', {'special':"cancel",'string':"OK",'colspan':"2",'class':'oe_highlight'})
|
||||
|
|
|
@ -50,9 +50,6 @@ class survey_send_invitation(osv.osv_memory):
|
|||
_defaults = {
|
||||
'send_mail': lambda *a: 1,
|
||||
'send_mail_existing': lambda *a: 1,
|
||||
'mail_subject': lambda *a: "Invitation",
|
||||
'mail_subject_existing': lambda *a: "Invitation",
|
||||
'mail_from': lambda *a: tools.config['email_from']
|
||||
}
|
||||
|
||||
def genpasswd(self):
|
||||
|
@ -67,14 +64,23 @@ class survey_send_invitation(osv.osv_memory):
|
|||
msg = ""
|
||||
name = ""
|
||||
for sur in survey_obj.browse(cr, uid, context.get('active_ids', []), context=context):
|
||||
name += "\t --> " + sur.title + "\n"
|
||||
name += "\n --> " + sur.title + "\n"
|
||||
if sur.state != 'open':
|
||||
msg += sur.title + "\n"
|
||||
data['mail_subject'] = _("Invitation for %s") % (sur.title)
|
||||
data['mail_subject_existing'] = _("Invitation for %s") % (sur.title)
|
||||
data['mail_from'] = sur.responsible_id.email
|
||||
if msg:
|
||||
raise osv.except_osv(_('Warning!'), _('%sSurvey is not in open state') % msg)
|
||||
data['mail'] = '''Hello %(name)s, \n\n We are inviting you for following survey. \
|
||||
\n ''' + name + '''\n Your login ID: %(login)s, Your password: %(passwd)s
|
||||
\n link :- http://'''+ str(socket.gethostname()) + ''':8080 \n\n Thanks,'''
|
||||
raise osv.except_osv(_('Warning!'), _('The following surveys are not in open state: %s') % msg)
|
||||
data['mail'] = _('''
|
||||
Hello %%(name)s, \n\n
|
||||
Would you please spent some of your time to fill-in our survey: \n%s\n
|
||||
You can access this survey with the following parameters:
|
||||
URL: %s
|
||||
Your login ID: %%(login)s\n
|
||||
Your password: %%(passwd)s\n
|
||||
\n\n
|
||||
Thanks,''') % (name, self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url', default='http://localhost:8069', context=context))
|
||||
return data
|
||||
|
||||
def create_report(self, cr, uid, res_ids, report_name=False, file_name=False):
|
||||
|
@ -176,7 +182,7 @@ class survey_send_invitation(osv.osv_memory):
|
|||
vals['attachment_ids'] = [(0,0,{'name': a_name,
|
||||
'datas_fname': a_name,
|
||||
'datas': str(a_content).encode('base64')})
|
||||
for a_name, a_content in attachments]
|
||||
for a_name, a_content in attachments.items()]
|
||||
ans = self.pool.get('mail.mail').create(cr, uid, vals, context=context)
|
||||
if ans:
|
||||
res_data = {'name': partner.name or _('Unknown'),
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</header>
|
||||
<group col="4">
|
||||
<separator string="Select Partner" colspan="4"/>
|
||||
<field name="partner_ids" nolabel="1" colspan="4"/>
|
||||
<field name="partner_ids" nolabel="1" colspan="4" widget="many2many_tags"/>
|
||||
<separator colspan="4" string="Send Mail for New User"/>
|
||||
<field name="send_mail" nolabel="1"/>
|
||||
<field name="mail_subject" colspan="3"/>
|
||||
|
|
Loading…
Reference in New Issue