[MERGE][IMP]merge with mail-cleaning-fp and improve code

bzr revid: sgo@tinyerp.com-20120905093255-gs4vbp3gxav6iutt
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-09-05 15:02:55 +05:30
commit 9d871c5036
30 changed files with 790 additions and 332 deletions

View File

@ -1361,10 +1361,16 @@ class account_invoice_line(osv.osv):
'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True)
}
def _default_account_id(self, cr, uid, ids, context=None):
prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context)
return prop and prop.id or False
_defaults = {
'quantity': 1,
'discount': 0.0,
'price_unit': _price_unit_default,
'account_id': _default_account_id,
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
@ -1473,10 +1479,11 @@ class account_invoice_line(osv.osv):
prod = self.pool.get('product.product').browse(cr, uid, product, context=context)
prod_uom = self.pool.get('product.uom').browse(cr, uid, uom, context=context)
if prod.uom_id.category_id.id != prod_uom.category_id.id:
warning = {
warning = {
'title': _('Warning!'),
'message': _('The selected unit of measure is not compatible with the unit of measure of the product.')
}
}
res['value'].update({'uos_id': prod.uom_id.id})
return {'value': res['value'], 'warning': warning}
return res

View File

@ -191,17 +191,23 @@
<page string="Invoice">
<field context="{'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False, 'type': type}" name="invoice_line">
<tree string="Invoice lines" editable="bottom">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)" groups="base.group_account_user"/>
<field name="invoice_line_tax_id" view_mode="2" context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="product_id"
on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]"/>
<field name="quantity"/>
<field name="uos_id" groups="product.group_uom"
on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="invoice_line_tax_id" widget="many2many_tags" context="{'type':parent.type}"
domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)" invisible="1"/>
<!-- Removed if subtotal is set -->
<field name="name" invisible="1"/>
<field name="uos_id" invisible="1"/>
</tree>
</field>
<group class="oe_subtotal_footer oe_right">
@ -342,17 +348,22 @@
<page string="Invoice Lines">
<field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}">
<tree string="Invoice Lines" editable="bottom">
<field name="invoice_line_tax_id" invisible="1"/>
<field name="product_id" />
<field name="product_id"
on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]"/>
<field name="quantity"/>
<field name="uos_id" groups="product.group_uom"
on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="invoice_line_tax_id" widget="many2many_tags" context="{'type':parent.type}"
domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal"/>
</tree>
</field>

View File

@ -0,0 +1,271 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
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: 2012-09-04 13:40+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@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-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,category:0
msgid "Category"
msgstr "Kategori"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
msgid "Information"
msgstr "Informasjon"
#. module: base_module_record
#: model:ir.model,name:base_module_record.model_ir_module_record
msgid "ir.module.record"
msgstr "ir.modul.opptak"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_data,info,end:0
#: wizard_button:base_module_record.module_record_data,save_yaml,end:0
msgid "End"
msgstr "Slutt"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,init:0
#: wizard_view:base_module_record.module_record_objects,init:0
msgid "Choose objects to record"
msgstr "Velg objekter til opptak"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,author:0
msgid "Author"
msgstr "Forfatter"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,directory_name:0
msgid "Directory Name"
msgstr "Navn på katalog"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,init,filter_cond:0
#: wizard_field:base_module_record.module_record_objects,init,filter_cond:0
msgid "Records only"
msgstr "Bare opptak"
#. module: base_module_record
#: selection:base_module_record.module_record_objects,info,data_kind:0
msgid "Demo Data"
msgstr "Demo data"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,save,module_filename:0
msgid "Filename"
msgstr "Filnavn"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,version:0
msgid "Version"
msgstr "Versjon"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,info:0
#: wizard_view:base_module_record.module_record_data,init:0
#: wizard_view:base_module_record.module_record_data,save_yaml:0
#: wizard_view:base_module_record.module_record_objects,init:0
msgid "Objects Recording"
msgstr "objekter Innspilling"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
msgid ""
"If you think your module could interest other people, we'd like you to "
"publish it on http://www.openerp.com, in the 'Modules' section. You can do "
"it through the website or using features of the 'base_module_publish' module."
msgstr ""
"Hvis du tror din modul kan interessere andre mennesker, vil vi gjerne at du "
"publisere den på http://www.openerp.com, i 'Moduler-delen. Du kan gjøre det "
"gjennom nettstedet eller bruke funksjonene i «base_module_publish»-modulen."
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,init,check_date:0
#: wizard_field:base_module_record.module_record_objects,init,check_date:0
msgid "Record from Date"
msgstr "Dato fra opptak"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,end:0
#: wizard_view:base_module_record.module_record_objects,end:0
#: wizard_view:base_module_record.module_record_objects,info:0
#: wizard_view:base_module_record.module_record_objects,save:0
#: wizard_view:base_module_record.module_record_objects,save_yaml:0
msgid "Module Recording"
msgstr "Modul innspilling"
#. module: base_module_record
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_record_objects
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_module_record_objects
msgid "Export Customizations As a Module"
msgstr "Eksporter Tilpasninger som en modul"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
msgid "Thanks in advance for your contribution."
msgstr "Takk på forhånd for ditt bidrag."
#. module: base_module_record
#: help:base_module_record.module_record_data,init,objects:0
#: help:base_module_record.module_record_objects,init,objects:0
msgid "List of objects to be recorded"
msgstr "Liste over objekter som skal spilles inn"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,description:0
msgid "Full Description"
msgstr "Full beskrivelse"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,name:0
msgid "Module Name"
msgstr "Modulnavn"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,init,objects:0
#: wizard_field:base_module_record.module_record_objects,init,objects:0
msgid "Objects"
msgstr "Objekter"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,save,module_file:0
#: wizard_field:base_module_record.module_record_objects,save_yaml,yaml_file:0
msgid "Module .zip File"
msgstr "Modul .zip fil"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
msgid "Module successfully created!"
msgstr ""
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save_yaml:0
msgid "YAML file successfully created !"
msgstr "YAML fil opprettet!"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,info:0
#: wizard_view:base_module_record.module_record_data,save_yaml:0
msgid "Result, paste this to your module's xml"
msgstr "Resultatet, lim denne til modulen xml"
#. module: base_module_record
#: selection:base_module_record.module_record_data,init,filter_cond:0
#: selection:base_module_record.module_record_objects,init,filter_cond:0
msgid "Created"
msgstr "Opprettet"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,end:0
#: wizard_view:base_module_record.module_record_objects,end:0
msgid "Thanks For using Module Recorder"
msgstr "Takk for at du brukte Modul opptaker."
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,website:0
msgid "Documentation URL"
msgstr "Dokumentasjon URL"
#. module: base_module_record
#: selection:base_module_record.module_record_data,init,filter_cond:0
#: selection:base_module_record.module_record_objects,init,filter_cond:0
msgid "Modified"
msgstr "Modifisert"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_data,init,record:0
#: wizard_button:base_module_record.module_record_objects,init,record:0
msgid "Record"
msgstr "Opptak"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_objects,info,save:0
msgid "Continue"
msgstr "Fortsett"
#. module: base_module_record
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_record_data
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_module_record_data
msgid "Export Customizations As Data File"
msgstr "Eksport Tilpasninger Som datafil"
#. module: base_module_record
#: code:addons/base_module_record/wizard/base_module_save.py:129
#, python-format
msgid "Error"
msgstr "Feil"
#. module: base_module_record
#: selection:base_module_record.module_record_objects,info,data_kind:0
msgid "Normal Data"
msgstr "Normal data"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_data,end,end:0
#: wizard_button:base_module_record.module_record_objects,end,end:0
msgid "OK"
msgstr "Ok"
#. module: base_module_record
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_mod_rec
msgid "Module Creation"
msgstr "modul Skapelsen"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,data_kind:0
msgid "Type of Data"
msgstr "Type data"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,info:0
msgid "Module Information"
msgstr "Modul informasjon"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,init,info_yaml:0
#: wizard_field:base_module_record.module_record_objects,init,info_yaml:0
msgid "YAML"
msgstr "YAML"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,info,res_text:0
#: wizard_field:base_module_record.module_record_data,save_yaml,res_text:0
msgid "Result"
msgstr "Resultat"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_data,init,end:0
#: wizard_button:base_module_record.module_record_objects,info,end:0
#: wizard_button:base_module_record.module_record_objects,init,end:0
msgid "Cancel"
msgstr "Kanseller"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_objects,save,end:0
#: wizard_button:base_module_record.module_record_objects,save_yaml,end:0
msgid "Close"
msgstr "Lukke"
#. module: base_module_record
#: selection:base_module_record.module_record_data,init,filter_cond:0
#: selection:base_module_record.module_record_objects,init,filter_cond:0
msgid "Created & Modified"
msgstr "Laget & Modifisert"
#~ msgid "Module successfully created !"
#~ msgstr "Modulen opprettet!"

View File

@ -0,0 +1,204 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
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: 2012-09-04 13:59+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@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-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_base_report_sxw
msgid "base.report.sxw"
msgstr "basen.rapport.sxw"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "OpenERP Report Designer Configuration"
msgstr "OpenERP Rapport Designer Konfigurasjon"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid ""
"This plug-in allows you to create/modify OpenERP Reports into OpenOffice "
"Writer."
msgstr ""
"Denne plug-in tillater deg å lage / endre OpenERP rapporter i OpenOffice "
"Writer."
#. module: base_report_designer
#: view:base.report.file.sxw:0
msgid "Upload the modified report"
msgstr "Laste opp den endrede rapporten"
#. module: base_report_designer
#: view:base.report.file.sxw:0
msgid "The .SXW report"
msgstr ".SXW rapport"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_base_report_designer_installer
msgid "base_report_designer.installer"
msgstr "basen.rapport.designer.installatør"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "_Close"
msgstr "_Lukk"
#. module: base_report_designer
#: view:base.report.rml.save:0
msgid "The RML Report"
msgstr ""
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "Configure"
msgstr "Konfigurer"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "title"
msgstr "tittel"
#. module: base_report_designer
#: field:base.report.file.sxw,report_id:0
#: field:base.report.sxw,report_id:0
msgid "Report"
msgstr "Rapport"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_base_report_rml_save
msgid "base.report.rml.save"
msgstr "Basen.rapport.rml.lagre"
#. module: base_report_designer
#: model:ir.ui.menu,name:base_report_designer.menu_action_report_designer_wizard
msgid "Report Designer"
msgstr "Rapportdesigner"
#. module: base_report_designer
#: field:base_report_designer.installer,name:0
msgid "File name"
msgstr "Filnavn"
#. module: base_report_designer
#: view:base.report.file.sxw:0
#: view:base.report.sxw:0
msgid "Get a report"
msgstr "Få en rapport"
#. module: base_report_designer
#: view:base_report_designer.installer:0
#: model:ir.actions.act_window,name:base_report_designer.action_report_designer_wizard
msgid "OpenERP Report Designer"
msgstr "OpenERP Rapport designer"
#. module: base_report_designer
#: view:base.report.sxw:0
msgid "Continue"
msgstr "Fortsett"
#. module: base_report_designer
#: field:base.report.rml.save,file_rml:0
msgid "Save As"
msgstr "Lagre som"
#. module: base_report_designer
#: help:base_report_designer.installer,plugin_file:0
msgid ""
"OpenObject Report Designer plug-in file. Save as this file and install this "
"plug-in in OpenOffice."
msgstr ""
"OpenObject Report Designer plug-in-filen. Lagre som denne filen og "
"installere denne plugin-modulen i OpenOffice."
#. module: base_report_designer
#: view:base.report.rml.save:0
msgid "Save RML FIle"
msgstr "Lagre RML fil"
#. module: base_report_designer
#: field:base.report.file.sxw,file_sxw:0
#: field:base.report.file.sxw,file_sxw_upload:0
msgid "Your .SXW file"
msgstr "Din .SXW fil"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "Installation and Configuration Steps"
msgstr "Installasjon og Konfigurasjon trinn"
#. module: base_report_designer
#: field:base_report_designer.installer,description:0
msgid "Description"
msgstr "Beskrivelse:"
#. module: base_report_designer
#: view:base.report.file.sxw:0
msgid ""
"This is the template of your requested report.\n"
"Save it as a .SXW file and open it with OpenOffice.\n"
"Don't forget to install the OpenERP SA OpenOffice package to modify it.\n"
"Once it is modified, re-upload it in OpenERP using this wizard."
msgstr ""
"Dette er malen for den forespurte rapporten.\n"
"Lagre det som en. Sxw fil og åpne den med OpenOffice.\n"
"Ikke glem å installere OpenERP SA OpenOffice-pakken til å endre det.\n"
"Når den er modifisert, laste opp det i OpenERP bruke denne veiviseren."
#. module: base_report_designer
#: field:base_report_designer.installer,config_logo:0
msgid "Image"
msgstr "Bilde"
#. module: base_report_designer
#: model:ir.actions.act_window,name:base_report_designer.action_view_base_report_sxw
msgid "Base Report sxw"
msgstr "Basen rapport sxw"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_base_report_file_sxw
msgid "base.report.file.sxw"
msgstr "basen.rapport.fil.sxw"
#. module: base_report_designer
#: field:base_report_designer.installer,plugin_file:0
msgid "OpenObject Report Designer Plug-in"
msgstr "OpenObject Rapport Designer Plug-in"
#. module: base_report_designer
#: model:ir.actions.act_window,name:base_report_designer.action_report_designer_installer
msgid "OpenERP Report Designer Installation"
msgstr "OpenERP Rapport Designer Installasjon"
#. module: base_report_designer
#: view:base.report.file.sxw:0
#: view:base.report.rml.save:0
#: view:base.report.sxw:0
#: view:base_report_designer.installer:0
msgid "Cancel"
msgstr "Kanseller"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_ir_actions_report_xml
msgid "ir.actions.report.xml"
msgstr "ir.handlinger.rapport.xml"
#. module: base_report_designer
#: view:base.report.sxw:0
msgid "Select your report"
msgstr "Velg din rapport"
#~ msgid "The RML report"
#~ msgstr "RML rapport"

View File

@ -23,7 +23,7 @@
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">1</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Hello,
I am Jason from Le Club SARL,
@ -47,7 +47,7 @@ Can you send details,</field>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">4</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
</record>
@ -108,7 +108,7 @@ Can you send details,</field>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">3</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Hi, Can you send a quotation for 20 Computers with speakers?
Regards,
@ -135,7 +135,7 @@ Contact: +1 813 494 5005</field>
<field name="channel_id" ref=""/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
</record>
@ -194,7 +194,7 @@ Contact: +1 813 494 5005</field>
<field name="channel_id" ref="crm_case_channel_phone"/>
<field name="priority">2</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
</record>
@ -297,7 +297,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-12')" name="date_action"/>
<field name="title_action">Meeting for pricing information.</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
</record>
@ -342,7 +342,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Call to ask system requirement</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
</record>
@ -411,7 +411,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-4')" name="date_action"/>
<field name="title_action">Call to define real needs about training</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
</record>
@ -434,7 +434,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-5')" name="date_action"/>
<field name="title_action">Ask for the good receprion of the proposition</field>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
</record>
@ -466,7 +466,7 @@ Andrew</field>
<field name="channel_id" ref="crm_case_channel_phone"/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead8"/>
<field eval="1" name="active"/>
</record>
@ -484,7 +484,7 @@ Andrew</field>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead8"/>
<field eval="1" name="active"/>
</record>
@ -519,7 +519,7 @@ Andrew</field>
<field name="priority">5</field>
<field eval="time.strftime('%Y-%m-6')" name="date_deadline"/>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
</record>
@ -542,7 +542,7 @@ Andrew</field>
<field name="priority">2</field>
<field name="title_action">Conf call with technical service</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
</record>

View File

@ -0,0 +1,33 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
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: 2012-09-04 14:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@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-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: crm_caldav
#: model:ir.actions.act_window,name:crm_caldav.action_caldav_browse
msgid "Caldav Browse"
msgstr "CalDAV Bla"
#. module: crm_caldav
#: model:ir.ui.menu,name:crm_caldav.menu_caldav_browse
msgid "Synchronize This Calendar"
msgstr "Synkroniser denne kalenderen"
#. module: crm_caldav
#: model:ir.model,name:crm_caldav.model_crm_meeting
msgid "Meeting"
msgstr "Møte"

View File

@ -0,0 +1,95 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
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: 2012-09-04 14:07+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@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-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: crm_todo
#: model:ir.model,name:crm_todo.model_project_task
msgid "Task"
msgstr "Oppgave"
#. module: crm_todo
#: view:crm.lead:0
msgid "Timebox"
msgstr "Timeboks"
#. module: crm_todo
#: view:crm.lead:0
msgid "For cancelling the task"
msgstr "For å avbryte oppgaven"
#. module: crm_todo
#: constraint:project.task:0
msgid "Error ! Task end-date must be greater then task start-date"
msgstr "Feil! Oppgave sluttdato må være større enn oppgave startdato"
#. module: crm_todo
#: model:ir.model,name:crm_todo.model_crm_lead
msgid "crm.lead"
msgstr "crm.lead"
#. module: crm_todo
#: view:crm.lead:0
msgid "Next"
msgstr "Neste"
#. module: crm_todo
#: model:ir.actions.act_window,name:crm_todo.crm_todo_action
#: model:ir.ui.menu,name:crm_todo.menu_crm_todo
msgid "My Tasks"
msgstr "Mine oppgaver"
#. module: crm_todo
#: view:crm.lead:0
#: field:crm.lead,task_ids:0
msgid "Tasks"
msgstr "Oppgaver"
#. module: crm_todo
#: view:crm.lead:0
msgid "Done"
msgstr "Utført"
#. module: crm_todo
#: constraint:project.task:0
msgid "Error ! You cannot create recursive tasks."
msgstr "Feil! Du kan ikke lage en rekursive oppgaver."
#. module: crm_todo
#: view:crm.lead:0
msgid "Cancel"
msgstr "Kanseller"
#. module: crm_todo
#: view:crm.lead:0
msgid "Extra Info"
msgstr "Ekstra informasjon"
#. module: crm_todo
#: field:project.task,lead_id:0
msgid "Lead / Opportunity"
msgstr "Lede / mulighet"
#. module: crm_todo
#: view:crm.lead:0
msgid "For changing to done state"
msgstr "For å bytte til ferdig tilstand"
#. module: crm_todo
#: view:crm.lead:0
msgid "Previous"
msgstr "Tidligere"

View File

@ -1,7 +1,3 @@
.oe_form_readonly .oe_notebook {
display: none;
}
.oe_document_page ul, .oe_document_page li {
padding: 2px 8px;
margin: 2px 8px;

File diff suppressed because one or more lines are too long

View File

@ -256,6 +256,10 @@ class hr_expense_line(osv.osv):
res = dict(cr.fetchall())
return res
def _get_uom_id(self, cr, uid, context=None):
result = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'product_uom_unit')
return result and result[1] or False
_columns = {
'name': fields.char('Expense Note', size=128, required=True),
'date_value': fields.date('Date', required=True),
@ -264,7 +268,7 @@ class hr_expense_line(osv.osv):
'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Product Price')),
'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Product Unit of Measure')),
'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
'uom_id': fields.many2one('product.uom', 'Unit of Measure'),
'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),
'description': fields.text('Description'),
'analytic_account': fields.many2one('account.analytic.account','Analytic account'),
'ref': fields.char('Reference', size=32),
@ -273,20 +277,31 @@ class hr_expense_line(osv.osv):
_defaults = {
'unit_quantity': 1,
'date_value': lambda *a: time.strftime('%Y-%m-%d'),
'uom_id': _get_uom_id,
}
_order = "sequence, date_value desc"
def onchange_product_id(self, cr, uid, ids, product_id, uom_id, employee_id, context=None):
def onchange_product_id(self, cr, uid, ids, product_id, context=None):
res = {}
if product_id:
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
res['name'] = product.name
amount_unit = product.price_get('standard_price')[product.id]
res['unit_amount'] = amount_unit
if not uom_id:
res['uom_id'] = product.uom_id.id
res['uom_id'] = product.uom_id.id
return {'value': res}
def onchange_uom(self, cr, uid, ids, product_id, uom_id, context=None):
res = {'value':{}}
if not uom_id or not product_id:
return res
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
uom = self.pool.get('product.uom').browse(cr, uid, uom_id, context=context)
if uom.category_id.id != product.uom_id.category_id.id:
res['warning'] = {'title': _('Warning'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure')}
res['value'].update({'uom_id': product.uom_id.id})
return res
hr_expense_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

File diff suppressed because one or more lines are too long

View File

@ -89,7 +89,7 @@
<form string="Expense Lines" version="7.0">
<group>
<group>
<field name="product_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)" context="{'default_hr_expense_ok':1}"/>
<field name="product_id" on_change="onchange_product_id(product_id, context)" context="{'default_hr_expense_ok':1}"/>
<field name="name"/>
<field name="ref"/>
<field domain="[('type','=','normal')]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
@ -99,12 +99,24 @@
<label for="unit_quantity"/>
<div>
<field name="unit_quantity" class="oe_inline"/>
<field name="uom_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)" class="oe_inline"/>
<field name="uom_id" on_change="onchange_uom(product_id, uom_id, context)" class="oe_inline"/>
</div>
<field name="date_value" />
</group>
</group>
</form>
<tree string="Expense Lines" editable="bottom">
<field name="sequence" invisible="1"/>
<field name="product_id" on_change="onchange_product_id(product_id, context)" context="{'default_hr_expense_ok':1}"/>
<field name="date_value" string="Expense Date"/>
<field name="name"/>
<field name="ref"/>
<field domain="[('type','in',['normal','contract']), ('parent_id','!=',False)]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
<field name="uom_id" on_change="onchange_uom(product_id, uom_id, context)"/>
<field name="unit_amount"/>
<field name="unit_quantity"/>
<field name="total_amount" sum="Total"/>
</tree>
</field>
<group>
<div>

View File

@ -69,7 +69,7 @@
- account_id: account.analytic_agrolait
date: !eval time.strftime('%Y-%m-%d')
name: 'Develop yaml for hr module'
user_id: base.user_qdp
user_id: base.user_demo
unit_amount: 6.00
amount: -90.00
product_id: product.product_product_consultant
@ -97,7 +97,7 @@
date: !eval time.strftime('%Y-%m-%d')
name: 'Develop yaml for hr module'
unit_amount: 2.00
user_id: base.user_qdp
user_id: base.user_demo
amount: -90.00
product_id: product.product_product_consultant
general_account_id: account.a_expense

View File

@ -28,8 +28,7 @@ class mail_message_subtype(osv.osv):
_description = 'mail_message_subtype'
_columns = {
'name': fields.char(' Message Subtype ', size = 128,
required = True, select = 1,
help = 'Subtype Of Message'),
required = True, help = 'Subtype Of Message'),
'model_ids': fields.many2many('ir.model',
'mail_message_subtyp_message_rel',
'message_subtype_id', 'model_id', 'Model',

View File

@ -52,47 +52,12 @@
<!-- User -->
<record id="res_users_editor_demo" model="res.users">
<field name="password">editor_demo</field>
<field name="name">OpenERP Editor</field>
<field name="login">editor_demo</field>
<field name="company_id" ref="res_company_oerp_editor"/>
<field name="company_ids" eval="[(4, ref('res_company_oerp_editor'))]"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'),ref('base.group_sale_manager'),ref('project.group_project_user'),ref('account.group_account_invoice')])]"/>
<record id="base.user_root" model="res.users">
<field name="company_ids" eval="[(4, ref('res_company_oerp_editor')),(4, ref('res_company_oerp_us')),(4, ref('res_company_oerp_be'))]"/>
</record>
<record id="res_users_sales_demo_us" model="res.users">
<field name="password">sales_demo_us</field>
<field name="name">OpenERP Salesman US</field>
<field name="login">sales_demo_us</field>
<field name="company_id" ref="res_company_oerp_us"/>
<field name="company_ids" eval="[(4, ref('res_company_oerp_us'))]"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'),ref('base.group_sale_manager'),ref('project.group_project_user'),ref('account.group_account_invoice')])]"/>
<record id="base.user_demo" model="res.users">
<field name="company_ids" eval="[(4, ref('res_company_oerp_us')),(4, ref('res_company_oerp_be')),(4, ref('res_company_odoo'))]"/>
</record>
<record id="res_users_sales_demo_be" model="res.users">
<field name="password">sales_demo_be</field>
<field name="name">OpenERP Salesman BE</field>
<field name="login">sales_demo_be</field>
<field name="company_id" ref="res_company_oerp_be"/>
<field name="company_ids" eval="[(4, ref('res_company_oerp_be'))]"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'),ref('base.group_sale_manager'),ref('project.group_project_user'),ref('account.group_account_invoice')])]"/>
</record>
<record id="res_users_sales_demo_in" model="res.users">
<field name="password">sales_demo_in</field>
<field name="name">OpenERP Salesman IN</field>
<field name="login">sales_demo_in</field>
<field name="company_id" ref="res_company_oerp_in"/>
<field name="company_ids" eval="[(4, ref('res_company_oerp_in'))]"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'),ref('base.group_sale_manager'),ref('project.group_project_user'),ref('account.group_account_invoice')])]"/>
</record>
<record id="res_users_odoo_demo" model="res.users">
<field name="password">odoo_demo</field>
<field name="name">Odoo</field>
<field name="login">odoo_demo</field>
<field name="company_id" ref="res_company_odoo"/>
<field name="company_ids" eval="[(4, ref('res_company_odoo'))]"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'),ref('base.group_sale_manager'),ref('project.group_project_user'),ref('account.group_account_invoice')])]"/>
</record>
<!--
Resource: product.product

View File

@ -47,7 +47,7 @@
<field name="name">note.note.kanban</field>
<field name="model">note.note</field>
<field name="arch" type="xml">
<kanban default_group_by="stage_id">
<kanban default_group_by="stage_id" class="oe_notes" version="7.0">
<field name="color"/>
<field name="sequence"/>
<field name="name"/>

View File

@ -1,6 +1,4 @@
.openerp .oe_fold_column .oe_kanban_card {
.openerp .oe_notes .oe_fold_column .oe_kanban_card {
text-decoration:none;
color:#000;
display:block;
@ -13,63 +11,62 @@
box-shadow: 5px 5px 7px rgba(33,33,33,.7);
}
.oe_kanban_record .oe_kanban_card {
.openerp .oe_notes .oe_kanban_record .oe_kanban_card {
-webkit-transform: rotate(-2deg);
-o-transform: rotate(-2deg);
-moz-transform:rotate(-2deg);
}
.oe_kanban_record:nth-of-type(even) .oe_kanban_card {
.openerp .oe_notes .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
-webkit-transform: rotate(1deg);
-o-transform: rotate(1deg);
-moz-transform:rotate(1deg);
}
.oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
.openerp .oe_notes .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
-webkit-transform: rotate(4deg);
-o-transform: rotate(4deg);
-moz-transform:rotate(4deg);
}
.oe_kanban_column:nth-of-type(even) .oe_kanban_record .oe_kanban_card {
.openerp .oe_notes .oe_kanban_column:nth-of-type(even) .oe_kanban_record .oe_kanban_card {
-webkit-transform: rotate(2deg);
-o-transform: rotate(2deg);
-moz-transform:rotate(2deg);
}
.oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
.openerp .oe_notes .oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
-webkit-transform: rotate(-3deg);
-o-transform: rotate(-3deg);
-moz-transform:rotate(-3deg);
}
.oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
.openerp .oe_notes .oe_kanban_column:nth-of-type(even) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
-webkit-transform: rotate(1deg);
-o-transform: rotate(1deg);
-moz-transform:rotate(1deg);
}
.oe_kanban_column:nth-of-type(3n) .oe_kanban_record .oe_kanban_card {
.openerp .oe_notes .oe_kanban_column:nth-of-type(3n) .oe_kanban_record .oe_kanban_card {
-webkit-transform: rotate(-2deg);
-o-transform: rotate(-2deg);
-moz-transform:rotate(-2deg);
}
.oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
.openerp .oe_notes .oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(even) .oe_kanban_card {
-webkit-transform: rotate(1deg);
-o-transform: rotate(1deg);
-moz-transform:rotate(1deg);
}
.oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
.openerp .oe_notes .oe_kanban_column:nth-of-type(3n) .oe_kanban_record:nth-of-type(3n) .oe_kanban_card {
-webkit-transform: rotate(-1deg);
-o-transform: rotate(-1deg);
-moz-transform:rotate(-1deg);
}
.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:hover,
.openerp .oe_kanban_column .oe_fold_column .oe_kanban_card:focus
{
.openerp .oe_notes .oe_kanban_column .oe_fold_column .oe_kanban_card:hover,
.openerp .oe_notes .oe_kanban_column .oe_fold_column .oe_kanban_card:focus {
box-shadow:10px 10px 7px rgba(0,0,0,.7);
-moz-box-shadow:10px 10px 7px rgba(0,0,0,.7);
-webkit-box-shadow: 10px 10px 7px rgba(0,0,0,.7);

View File

@ -11,30 +11,14 @@
<record id="account.cash_journal" model="account.journal">
<field eval="True" name="journal_user"/>
</record>
<record id="base.user_jsmith" model="res.users">
<field name="name">John Smith (Cashier)</field>
<field name="login">jsmith</field>
<record id="base.user_root" model="res.users">
<field name="ean13">0410300000004</field>
<field name="groups_id" eval="[(4,ref('group_pos_manager'))]"/>
</record>
<record id="base.user_jdoe" model="res.users">
<field name="name">John Doe (Cashier)</field>
<field name="login">jdoe</field>
<record id="base.user_demo" model="res.users">
<field name="ean13">0410400000003</field>
<field name="groups_id" eval="[(4,ref('group_pos_manager'))]"/>
</record>
<record id="base.user_jbloggs" model="res.users">
<field name="name">Joe Bloggs (Client)</field>
<field name="login">jbloggs</field>
<field name="ean13">0420100000005</field>
<field name="groups_id" eval="[(4,ref('group_pos_user'))]"/>
</record>
<record id="base.user_bsoap" model="res.users">
<field name="name">Bob Soap (Client)</field>
<field name="login">bsoap</field>
<field name="ean13">0420200000004</field>
<field name="groups_id" eval="[(4,ref('group_pos_user'))]"/>
</record>
<record model="pos.config" id="pos_config_main">
<field name="journal_ids" eval="[(6, 0, [ref('account.cash_journal'), ref('account.bank_journal')])]" />

View File

@ -916,7 +916,7 @@
</field>
</group>
<div attrs="{'invisible': [('state', '=', 'closed')]}">
<div attrs="{'invisible': [('state', '!=', 'closed')]}">
<group class="oe_subtotal_footer oe_right">
<field name="cash_register_balance_start" readonly="1" string="Opening Balance" class="oe_subtotal_footer_separator"/>
<field name="cash_register_total_entry_encoding" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="+ Transactions"/>
@ -933,7 +933,7 @@
</div>
<group class="oe_subtotal_footer oe_right" attrs="{'invisible' : [('state', 'in', ('opening_control', 'closed'))]}">
<group class="oe_subtotal_footer oe_right" attrs="{'invisible' : [('state', '!=', 'closed')]}">
<field name="cash_register_balance_end_real" class="oe_subtotal_footer_separator"/>
<field name="cash_register_difference" class="oe_subtotal_footer_separator"/>
</group>

View File

@ -6,14 +6,18 @@ import netsvc
from openerp.addons.point_of_sale.point_of_sale import pos_session
class pos_session_opening(osv.osv_memory):
_name = 'pos.session.opening'
_columns = {
'pos_config_id' : fields.many2one('pos.config', 'Point of Sale', required=True),
'pos_session_id' : fields.many2one('pos.session', 'PoS Session'),
'pos_state' : fields.selection(pos_session.POS_SESSION_STATE,
'Session State', readonly=True),
'pos_state' : fields.related('pos_session_id', 'state',
type='selection',
selection=pos_session.POS_SESSION_STATE,
string='Session State', readonly=True),
'pos_state_str' : fields.char('State', 32, readonly=True),
'show_config' : fields.boolean('Show Config', readonly=True),
'pos_session_name' : fields.related('pos_session_id', 'name',
type='char', size=64, readonly=True),
@ -71,22 +75,25 @@ class pos_session_opening(osv.osv_memory):
result = {
'pos_session_id': False,
'pos_state': False,
'pos_state_str' : '',
'pos_session_username' : False,
'pos_session_name' : False,
}
if not config_id:
return {'value': result}
return {'value' : result}
proxy = self.pool.get('pos.session')
session_ids = proxy.search(cr, uid, [
('state', '<>', 'closed'),
('state', '!=', 'closed'),
('config_id', '=', config_id),
], context=context)
if session_ids:
session = proxy.browse(cr, uid, session_ids[0], context=context)
result['pos_state'] = session.state
result['pos_state'] = str(session.state)
result['pos_state_str'] = dict(pos_session.POS_SESSION_STATE).get(session.state, '')
result['pos_session_id'] = session.id
result['pos_session_name'] = session.name
result['pos_session_username'] = session.user_id.name
return {'value' : result}
def default_get(self, cr, uid, fieldnames, context=None):

View File

@ -12,7 +12,7 @@
<field name="pos_config_id" on_change="on_change_config(pos_config_id)"
widget="selection" domain="[('state','=','active')]"
class="oe_inline"/>
<field name="pos_state" class="oe_inline" attrs="{'invisible' : [('pos_state', '=', False)]}" />
<field name="pos_state" invisible="1" />
</group>
<field name="pos_session_id" invisible="1"/>
<button name="open_ui" type="object" string="Start Selling"
@ -49,8 +49,8 @@
Click to continue the session.
</p>
<p>
The session <field name="pos_session_name" class="oe_inline" /> (<field name="pos_session_username" class="oe_inline" />) is "<b><field name="pos_state" class="oe_inline" /></b>"<br/>
You can continue sales from the touchscreen interface by clicking on "<b>Settings</b>" or close the cash register session ?
The session <field name="pos_session_name" class="oe_inline" /> (<field name="pos_session_username" class="oe_inline" />) is "<b><field name="pos_state_str" class="oe_inline" /></b>"<br/>
You can continue sales from the touchscreen interface by clicking on "<b>Sellings</b>" or close the cash register session ?
</p>
</div>

View File

@ -7,49 +7,6 @@
<field name="groups_id" eval="[(4, ref('base.group_sale_salesman')),(4, ref('group_project_user'))]"/>
</record>
<record id="base.user_niv" model="res.users">
<field name="name">Nicolas</field>
<field name="groups_id" eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_manager')])]"/>
<field name="login">niv</field>
<field name="password">niv</field>
</record>
<record id="base.user_al" model="res.users">
<field name="name">Antony</field>
<field name="groups_id" eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_manager')])]"/>
<field name="login">al</field>
<field name="password">al</field>
</record>
<record id="base.user_qdp" model="res.users">
<field name="name">Quentin</field>
<field name="groups_id" eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]"/>
<field name="login">qdp</field>
<field name="password">qdp</field>
</record>
<record id="base.user_fpi" model="res.users">
<field name="name">Francois</field>
<field name="groups_id" eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]"/>
<field name="login">fpi</field>
<field name="password">fpi</field>
</record>
<record id="base.user_jth" model="res.users">
<field name="name">Julien</field>
<field name="groups_id" eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]"/>
<field name="login">jth</field>
<field name="password">jth</field>
</record>
<record id="base.user_mit" model="res.users">
<field name="name">Minh</field>
<field name="groups_id" eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]"/>
<field name="login">mit</field>
<field name="password">mit</field>
</record>
<record id="base.user_vad" model="res.users">
<field name="name">Valérie</field>
<field name="groups_id" eval="[(6, 0, [ref('base.group_user')])]"/>
<field name="login">vad</field>
<field name="password">vad</field>
</record>
<!-- Categories -->
<record id="project_category_01" model="project.category">
<field name="name">Contact's suggestion</field>
@ -90,10 +47,9 @@
<field name="parent_id" ref="all_projects_account"/>
<field name="privacy_visibility">followers</field>
<field name="members" eval="[(6, 0, [
ref('base.user_niv'),
ref('base.user_al'),
ref('base.user_qdp')])]"/>
<field name="user_id" ref="base.user_al"/>
ref('base.user_root'),
ref('base.user_demo')])]"/>
<field name="user_id" ref="base.user_demo"/>
<field name="description">Implement new website for Sale and Warehouse Management for a customer.</field>
<field name="alias_model">project.task</field>
<field name="type_ids" eval="[(6, 0, [ref('project_tt_analysis'),ref('project_tt_specification'),ref('project_tt_negotiation'),ref('project_tt_development'),ref('project_tt_testing'),ref('project_tt_deployment')])]"/>
@ -102,7 +58,7 @@
<record id="project_project_2" model="project.project">
<field name="name">Research &amp; Development</field>
<field name="parent_id" ref="all_projects_account"/>
<field name="user_id" ref="base.user_al"/>
<field name="user_id" ref="base.user_demo"/>
<field name="alias_model">project.task</field>
<field name="type_ids" eval="[(6, 0, [ref('project_tt_specification'),ref('project_tt_development'),ref('project_tt_testing'),ref('project_tt_merge'),ref('project_tt_deployment')])]"/>
</record>
@ -114,9 +70,8 @@
<field name="user_id" ref="base.user_demo"/>
<field name="alias_model">project.task</field>
<field name="members" eval="[(6, 0, [
ref('base.user_fpi'),
ref('base.user_jth'),
ref('base.user_mit')])]"/>
ref('base.user_root'),
ref('base.user_demo')])]"/>
<field name="type_ids" eval="[(6, 0, [ref('project_tt_specification'),ref('project_tt_development'),ref('project_tt_testing'),ref('project_tt_merge'),ref('project_tt_deployment')])]"/>
</record>
@ -128,8 +83,8 @@
<field name="alias_model">project.task</field>
<field name="type_ids" eval="[(6, 0, [ref('project_tt_design'),ref('project_tt_development'),ref('project_tt_testing')])]"/>
<field name="members" eval="[(6, 0, [
ref('base.user_niv'),
ref('base.user_mit')])]"/>
ref('base.user_root'),
ref('base.user_demo')])]"/>
</record>
<record id="project_project_5" model="project.project">
@ -141,7 +96,7 @@
<field name="type_ids" eval="[(6, 0, [ref('project_tt_development')])]"/>
<field name="members" eval="[(6, 0, [
ref('base.user_root'),
ref('base.user_qdp')])]"/>
ref('base.user_demo')])]"/>
</record>
@ -149,7 +104,7 @@
<record id="project_task_1" model="project.task">
<field name="planned_hours" eval="40.0"/>
<field name="remaining_hours" eval="40.0"/>
<field name="user_id" ref="base.user_niv"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">4</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Prepare Requirements Document</field>
@ -159,7 +114,7 @@
<record id="project_task_2" model="project.task">
<field name="planned_hours" eval="32.0"/>
<field name="remaining_hours" eval="32.0"/>
<field name="user_id" ref="base.user_niv"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">4</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Make SRS</field>
@ -168,7 +123,7 @@
<record id="project_task_3" model="project.task">
<field name="planned_hours" eval="10.0"/>
<field name="remaining_hours" eval="10.0"/>
<field name="user_id" ref="base.user_al"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">4</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Budget Planning</field>
@ -179,7 +134,7 @@
<record id="project_task_4" model="project.task">
<field name="planned_hours" eval="60.0"/>
<field name="remaining_hours" eval="60.0"/>
<field name="user_id" ref="base.user_al"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">4</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Develop module for Sale Management</field>
@ -193,7 +148,7 @@
<record id="project_task_5" model="project.task">
<field name="planned_hours" eval="76.0"/>
<field name="remaining_hours" eval="76.0"/>
<field name="user_id" ref="base.user_al"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Develop module for Warehouse</field>
@ -207,7 +162,7 @@
<record id="project_task_6" model="project.task">
<field name="planned_hours" eval="24.0"/>
<field name="remaining_hours" eval="24.0"/>
<field name="user_id" ref="base.user_al"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Integrate Modules</field>
@ -216,7 +171,7 @@
<record id="project_task_7" model="project.task">
<field name="planned_hours" eval="15.0"/>
<field name="remaining_hours" eval="5.0"/>
<field name="user_id" ref="base.user_al"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Internal testing + Software Install</field>
@ -225,7 +180,7 @@
<record id="project_task_8" model="project.task">
<field name="planned_hours" eval="22.0"/>
<field name="remaining_hours" eval="22.0"/>
<field name="user_id" ref="base.user_al"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_2"/>
<field name="name">New portal system</field>
@ -237,7 +192,7 @@
<record id="project_task_9" model="project.task">
<field name="planned_hours" eval="18.0"/>
<field name="remaining_hours" eval="18.0"/>
<field name="user_id" ref="base.user_al"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_2"/>
<field name="name">Document history management</field>
@ -246,7 +201,7 @@
<record id="project_task_10" model="project.task">
<field name="planned_hours" eval="38.0"/>
<field name="remaining_hours" eval="38.0"/>
<field name="user_id" ref="base.user_fpi"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_2"/>
<field name="name">Social network integration</field>
@ -256,7 +211,7 @@
<record id="project_task_11" model="project.task">
<field name="planned_hours" eval="16.0"/>
<field name="remaining_hours" eval="16.0"/>
<field name="user_id" ref="base.user_fpi"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_2"/>
<field name="name">User interface improvements</field>
@ -270,7 +225,7 @@
<record id="project_task_12" model="project.task">
<field name="planned_hours" eval="40.0"/>
<field name="remaining_hours" eval="40.0"/>
<field name="user_id" ref="base.user_fpi"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_2"/>
<field name="name">Improve+clean code and functionality</field>
@ -282,7 +237,7 @@
<record id="project_task_13" model="project.task">
<field name="planned_hours" eval="12.0"/>
<field name="remaining_hours" eval="12.0"/>
<field name="user_id" ref="base.user_mit"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_3"/>
<field name="name">Design Use Cases</field>
@ -293,7 +248,7 @@
<record id="project_task_14" model="project.task">
<field name="planned_hours" eval="12.0"/>
<field name="remaining_hours" eval="12.0"/>
<field name="user_id" ref="base.user_mit"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_3"/>
<field name="name">Dataflow Design</field>
@ -302,7 +257,7 @@
<record id="project_task_15" model="project.task">
<field name="planned_hours" eval="55.0"/>
<field name="remaining_hours" eval="55.0"/>
<field name="user_id" ref="base.user_fpi"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_3"/>
<field name="name">User Interface design</field>
@ -316,7 +271,7 @@
<field name="sequence" eval="10"/>
<field name="planned_hours" eval="80.0"/>
<field name="remaining_hours" eval="80.0"/>
<field name="user_id" ref="base.user_mit"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_3"/>
<field name="name">Set target for all deparments</field>
@ -327,7 +282,7 @@
<record id="project_task_17" model="project.task">
<field name="planned_hours" eval="34.0"/>
<field name="remaining_hours" eval="34.0"/>
<field name="user_id" ref="base.user_niv"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_3"/>
<field name="name">Integration of core components</field>
@ -338,7 +293,7 @@
<record id="project_task_18" model="project.task">
<field name="planned_hours" eval="16.0"/>
<field name="remaining_hours" eval="16.0"/>
<field name="user_id" ref="base.user_niv"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">2</field>
<field name="project_id" ref="project.project_project_3"/>
<field name="name">Deploy and review on live system</field>

View File

@ -445,12 +445,10 @@
</group>
<group>
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="categ_ids" widget="many2many_tags"/>
<field name="progress" widget="progressbar"
groups="project.group_time_work_estimation_tasks"/>
</group>
<group>
<field name="categ_ids" widget="many2many_tags"/>
</group>
</group>
<notebook>
<page string="Description">

View File

@ -11,7 +11,7 @@
- state == "pending"
-
!record {model: project.task.delegate, id: delegate_id}:
user_id: base.user_niv
user_id: base.user_demo
planned_hours: 12.0
planned_hours_me: 2.0
-

View File

@ -3,13 +3,11 @@
<data noupdate="1">
<!-- Example employee -->
<record id="hr.employee_qdp" model="hr.employee">
<field name="user_id" ref="base.user_qdp"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>
<record id="hr.employee_al" model="hr.employee">
<field name="user_id" ref="base.user_al"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
</record>
@ -17,7 +15,6 @@
<record id="hr.employee_phu" model="hr.employee">
<field name="name">Phuong</field>
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_phu"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.employee_category_4')])]"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
@ -26,7 +23,6 @@
<record id="hr.employee_fpi" model="hr.employee">
<field name="name">Francois</field>
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_fpi"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.employee_category_4')])]"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
@ -34,7 +30,6 @@
<record id="hr.employee_jth" model="hr.employee">
<field name="name">Julien</field>
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_jth"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.employee_category_4')])]"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>
@ -42,7 +37,6 @@
<record id="hr.employee7" model="hr.employee">
<field name="name">Aline</field>
<field name="calendar_id" ref="resource.timesheet_group1"/>
<field name="user_id" ref="base.user_apr"/>
<field name="category_ids" eval="[(6, 0, [ref('hr.employee_category_4')])]"/>
<field name="product_id" ref="product.product_product_consultant"/>
<field name="journal_id" ref="hr_timesheet.analytic_journal"/>

View File

@ -6,7 +6,7 @@
name: Test Timesheet records
task_id: project.project_task_10
hours: 20.0
user_id: base.user_fpi
user_id: base.user_demo
company_id: base.main_company
-
I check Timesheet line for employee in current Timesheet
@ -16,6 +16,7 @@
start = (datetime.date.today().strftime('%Y-%m-%d'))
task_work = self.search(cr, uid, [("name","=","Social network integration: Test Timesheet records")],context)[0]
task_ids = self.browse(cr, uid, task_work, context)
assert task_ids.user_id.id == ref("base.user_fpi"), 'Error, The User in Timesheet is not Correct'
assert task_ids.user_id.id == ref("base.user_demo"), 'Error, The User in Timesheet is not Correct'
assert task_ids.date == start, 'Error, The Date in Timesheet is not ok'
assert task_ids.product_uom_id.name == "Hour", 'Error, The Hour in Timesheet is not ok'

View File

@ -214,12 +214,16 @@
<notebook>
<page string="Purchase Order">
<field name="order_line">
<tree string="Purchase Order Lines">
<field name="date_planned"/>
<tree string="Purchase Order Lines" editable="bottom">
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<field name="name"/>
<field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="date_planned"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="account_analytic_id" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
<field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<field name="product_uom" groups="product.group_uom" on_change="onchange_product_uom(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<field name="price_unit"/>
<field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
<field name="price_subtotal"/>
</tree>
</field>

View File

@ -262,8 +262,6 @@
<field name="sequence" widget="handle"/>
<field name="state" invisible="1"/>
<field name="delay" invisible="1"/>
<field name="tax_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="th_weight" invisible="1"/>
<field name="product_packaging" invisible="1"/>
<field name="product_id"
@ -271,6 +269,7 @@
groups="base.group_user"
on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
<field name="name"/>
<field name="type"/>
<field name="product_uom_qty"
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
@ -281,6 +280,7 @@
<field name="product_uos" string="UoS" groups="product.group_uos"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="price_unit"/>
<field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
<field name="price_subtotal"/>
</tree>
</field>
@ -357,6 +357,20 @@
</field>
</record>
<!-- inherited view to make the order lines list in the form non-editable
for the members of some usability groups -->
<record id="view_order_form_editable_list" model="ir.ui.view">
<field name="name">sale.order.form.editable.list</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="groups_id" eval="[(6, 0, [ref('product.group_uos'), ref('product.group_stock_packaging'), ref('sale.group_mrp_properties')])]"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree" position="attributes">
<attribute name="editable"/>
</xpath>
</field>
</record>
<record id="view_sales_order_filter" model="ir.ui.view">
<field name="name">sale.order.list.select</field>
<field name="model">sale.order</field>

View File

@ -22,6 +22,11 @@
</field>
</record>
<!-- the presence of 'analytics_id' makes the order lines non-editable -->
<record id="sale.view_order_form_editable_list" model="ir.ui.view">
<field name="groups_id" eval="[(4, ref('analytic.group_analytic_accounting'))]"/>
</record>
<record model="ir.ui.view" id="view_order_line_form2_inherit">
<field name="name">sale.order.line.form2.inherit</field>
<field name="model">sale.order.line</field>

View File

@ -9,8 +9,8 @@
}
.oe_product_img {
width: 150px;
height: 150px;
width: 80px;
height: 80px;
text-align: center;
overflow: hidden;
-moz-border-radius: 3px;
@ -25,15 +25,15 @@
}
.oe_product_photo {
width: 150px;
width: 80px;
height: auto;
clip: rect(5px, 100px, 105px, 0px);
clip: rect(5px, 70px, 75px, 0px);
}
.oe_product_photo_wide {
height: 150px;
height: 80px;
width: auto;
clip: rect(0px, 110px, 100px, 10px);
clip: rect(0px, 80px, 70px, 10px);
}
.oe_product_desc {