[IMP] point_of_sale: more todos

bzr revid: fva@openerp.com-20120820093010-a2ymlgaa6z5ku53o
This commit is contained in:
Frédéric van der Essen 2012-08-20 11:30:10 +02:00
commit d0f762ab1f
21 changed files with 221 additions and 66 deletions

View File

@ -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-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-05-10 17:32+0000\n"
"Last-Translator: Michael Otcheskih <otma@mail.ru>\n"
"PO-Revision-Date: 2012-08-17 11:07+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-08-07 05:06+0000\n"
"X-Generator: Launchpad (build 15745)\n"
"X-Launchpad-Export-Date: 2012-08-18 04:58+0000\n"
"X-Generator: Launchpad (build 15810)\n"
#. module: account
#: view:account.invoice.report:0
@ -9872,7 +9872,7 @@ msgstr "Не определен счет доходов для ТМЦ: \"%s\" (i
#. module: account
#: constraint:account.move.line:0
msgid "You can not create journal items on closed account."
msgstr ""
msgstr "Нельзя создать элемент журнала по закрытому счету ."
#. module: account
#: field:account.account,unrealized_gain_loss:0

View File

@ -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-02-08 00:35+0000\n"
"PO-Revision-Date: 2010-12-23 13:10+0000\n"
"PO-Revision-Date: 2012-08-17 10:54+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-08-07 05:17+0000\n"
"X-Generator: Launchpad (build 15745)\n"
"X-Launchpad-Export-Date: 2012-08-18 04:58+0000\n"
"X-Generator: Launchpad (build 15810)\n"
#. module: account_analytic_default
#: help:account.analytic.default,partner_id:0
@ -133,7 +133,7 @@ msgstr "Аналитика по умолчанию"
#. module: account_analytic_default
#: sql_constraint:stock.picking:0
msgid "Reference must be unique per Company!"
msgstr ""
msgstr "Ссылка должна быть уникальна для каждой компании!"
#. module: account_analytic_default
#: view:account.analytic.default:0

View File

@ -1,3 +1,4 @@
import controllers
import auth_oauth
import res_users
import res_config

View File

@ -28,12 +28,13 @@
'author': 'Victor Tabuenca',
'maintainer': 'OpenERP s.a.',
'website': 'http://www.openerp.com',
'depends': ['base', 'web'],
'depends': ['base', 'web', 'base_setup'],
'data': [
'auth_oauth_data.xml'
'auth_oauth_data.xml',
],
'update_xml': [
'auth_oauth_view.xml'
'auth_oauth_view.xml',
'res_config.xml',
],
'js': [
'static/src/js/auth_oauth.js',

View File

@ -1,6 +1,6 @@
from openerp.osv import osv, fields
class auth_oauth_providers(osv.osv):
class auth_oauth_provider(osv.osv):
"""Class defining the configuration values of an OAuth2 provider"""
_name = 'auth.oauth.provider'
@ -8,15 +8,17 @@ class auth_oauth_providers(osv.osv):
_order = 'name'
_columns = {
'name' : fields.char('Provider name', required=True), # Name of the OAuth2 entity, Google, LinkedIn, etc
'client_id' : fields.char('Client ID', required=True), # Our identifier
'auth_endpoint' : fields.char('Authentication URL', required=True), # OAuth provider URL to authenticate users
'name' : fields.char('Provider name'), # Name of the OAuth2 entity, Google, LinkedIn, etc
'client_id' : fields.char('Client ID'), # Our identifier
'auth_endpoint' : fields.char('Authentication URL'), # OAuth provider URL to authenticate users
'scope' : fields.char('Scope'), # OAUth user data desired to access
'validation_endpoint' : fields.char('Validation URL'), # OAuth provider URL to validate tokens
'data_endpoint' : fields.char('Data URL'),
'enabled' : fields.boolean('Allowed'),
'css_class' : fields.char('CSS class'),
'body' : fields.char('Body'),
'active' : fields.boolean('Active'),
'sequence' : fields.integer(),
}
_defaults = {
'enabled' : False,
}

View File

@ -1,38 +1,34 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<data>
<record id="provider_facebook" model="auth.oauth.provider">
<field name="name">Facebook Graph</field>
<field name="client_id">facebook_client_id</field>
<field name="auth_endpoint">https://www.facebook.com/dialog/oauth</field>
<field name="scope"></field>
<field name="validation_endpoint">https://graph.facebook.com/me/permissions</field>
<field name="data_endpoint"></field>
<field name="css_class">zocial facebook</field>
<field name="body">Sign in with facebook</field>
<field name="active">True</field>
</record>
<record id="provider_google" model="auth.oauth.provider">
<field name="name">Google OAuth2</field>
<field name="client_id">108010644258-duuhmp6pu7li4tsmnqg7j9rvdeklg0ki.apps.googleusercontent.com</field>
<field name="auth_endpoint">https://accounts.google.com/o/oauth2/auth</field>
<field name="scope">https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile</field>
<field name="validation_endpoint">https://www.googleapis.com/oauth2/v1/tokeninfo</field>
<field name="data_endpoint">https://www.googleapis.com/oauth2/v1/userinfo</field>
<field name="css_class">zocial google</field>
<field name="body">Sign in with google</field>
<field name="active">True</field>
</record>
<record id="provider_twitter" model="auth.oauth.provider">
<field name="name">Twitter OAuth2</field>
<field name="client_id">108010644258-duuhmp6pu7li4tsmnqg7j9rvdeklg0ki.apps.twitterusercontent.com</field>
<!-- <record id="provider_twitter" model="auth.oauth.provider">
<field name="name">Twitter OAuth</field>
<field name="auth_endpoint">https://api.twitter.com/oauth/request_token</field>
<field name="scope"></field>
<field name="validation_endpoint">https://api.twitter.com/oauth/authorize</field>
<field name="data_endpoint"></field>
<field name="css_class">zocial twitter</field>
<field name="body">Sign in with twitter</field>
<field name="active">True</field>
</record>
</record> -->
</data>
</openerp>

View File

@ -11,7 +11,7 @@
<group>
<field name="name" />
<field name="client_id" />
<field name="active" />
<field name="enabled" />
</group>
<group>
<field name="auth_endpoint" />
@ -22,7 +22,7 @@
</sheet>
</form>
</field>
</record>
</record>
<record model="ir.ui.view" id="view_oauth_provider_list">
<field name="name">auth.oauth.provider.list</field>
<field name="model">auth.oauth.provider</field>
@ -31,7 +31,7 @@
<tree string="arch" version="7.0">
<field name="name" />
<field name="client_id" />
<field name="active" />
<field name="enabled" />
</tree>
</field>
</record>

View File

@ -18,7 +18,7 @@ class OAuthController(openerpweb.Controller):
registry = openerp.modules.registry.RegistryManager.get(dbname)
with registry.cursor() as cr:
providers = registry.get('auth.oauth.provider')
l = providers.read(cr, 1, providers.search(cr, 1, []))
l = providers.read(cr, 1, providers.search(cr, 1, [('enabled','=',True)]))
return l
@openerpweb.httprequest

View File

@ -0,0 +1,63 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
#
##############################################################################
from openerp.osv import osv, fields
import logging
_logger = logging.getLogger(__name__)
class base_config_settings(osv.TransientModel):
_inherit = 'base.config.settings'
_columns = {
'auth_oauth_google_enabled' : fields.boolean('Allow users to sign in with Google'),
'auth_oauth_google_client_id' : fields.char('Client ID'),
'auth_oauth_facebook_enabled' : fields.boolean('Allow users to sign in with Facebook'),
'auth_oauth_facebook_client_id' : fields.char('Client ID'),
}
def get_oauth_providers(self, cr, uid, fields, context=None):
google_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'auth_oauth', 'provider_google')[1]
facebook_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'auth_oauth', 'provider_facebook')[1]
rg = self.pool.get('auth.oauth.provider').read(cr, uid, [google_id], ['enabled','client_id'], context=context)
rf = self.pool.get('auth.oauth.provider').read(cr, uid, [facebook_id], ['enabled','client_id'], context=context)
return {
'auth_oauth_google_enabled': rg[0]['enabled'],
'auth_oauth_google_client_id': rg[0]['client_id'],
'auth_oauth_facebook_enabled': rf[0]['enabled'],
'auth_oauth_facebook_client_id': rf[0]['client_id'],
}
def set_oauth_providers(self, cr, uid, ids, context=None):
google_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'auth_oauth', 'provider_google')[1]
facebook_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'auth_oauth', 'provider_facebook')[1]
config = self.browse(cr, uid, ids[0], context=context)
rg = {
'enabled':config.auth_oauth_google_enabled,
'client_id':config.auth_oauth_google_client_id,
}
rf = {
'enabled':config.auth_oauth_facebook_enabled,
'client_id':config.auth_oauth_facebook_client_id,
}
self.pool.get('auth.oauth.provider').write(cr, uid, [google_id], rg)
self.pool.get('auth.oauth.provider').write(cr, uid, [facebook_id], rf)

View File

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_general_configuration">
<field name="name">base.config.settings.oauth</field>
<field name="model">base.config.settings</field>
<field name="inherit_id" ref="base_setup.view_general_configuration"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='module_auth_oauth']/.." position="after">
<div attrs="{'invisible':[('module_auth_oauth','=',False)]}">
<div name="google">
<div>
<field name="auth_oauth_google_enabled" class="oe_inline"/>
<label for="auth_oauth_google_enabled"/>
</div>
<div attrs="{'invisible':[('auth_oauth_google_enabled','=',False)]}">
<blockquote>
To setup the signin process with Google, first you have to perform the following steps:<br/>
<br/>
- Go to the <a href="https://code.google.com/apis/console/">Google APIs console</a><br/>
- Ceate a new project<br/>
- Go to Api Access<br/>
- Create an oauth client_id<br/>
- Edit settings and set both Authorized Redirect URIs and Authorized JavaScript Origins to your hostname.<br/>
<br/>
Now copy paste the client_id here: <field name="auth_oauth_google_client_id" class="oe_inline" placeholder="e.g. 1234-xyz.apps.googleusercontent.com"/>
</blockquote>
</div>
</div>
<div name="facebook">
<div>
<field name="auth_oauth_facebook_enabled" class="oe_inline"/>
<label for="auth_oauth_facebook_enabled"/>
</div>
<div attrs="{'invisible':[('auth_oauth_facebook_enabled','=',False)]}">
<blockquote>
To setup the signin process with Google, first you have to perform the following steps:<br/>
<br/>
Now copy paste the client_id here: <field name="auth_oauth_facebook_client_id" class="oe_inline" placeholder="e.g. 1234-xyz.apps.googleusercontent.com"/>
</blockquote>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -21,9 +21,7 @@ openerp.auth_oauth = function(instance) {
},
on_oauth_loaded: function(result) {
this.oauth_providers = result;
console.log(result);
var buttons = QWeb.render("auth_oauth.Login.button",{"widget":this});
console.log(buttons);
this.$(".oe_login_pane form ul").after(buttons);
},
on_oauth_sign_in: function(ev) {

View File

@ -25,7 +25,8 @@ class base_config_settings(osv.TransientModel):
_inherit = 'base.config.settings'
_columns = {
'auth_signup_template_user_id': fields.many2one('res.users', 'Template user for new users created through signup')
'auth_signup_uninvited': fields.boolean('allow public users to sign up', help="If unchecked only invited users may sign up"),
'auth_signup_template_user_id': fields.many2one('res.users', 'Template user for new users created through signup'),
}
def get_default_signup(self, cr, uid, fields, context=None):

View File

@ -7,16 +7,15 @@
<field name="model">base.config.settings</field>
<field name="inherit_id" ref="base_setup.view_general_configuration"/>
<field name="arch" type="xml">
<xpath expr="//group[last()]" position="after">
<group>
<label for="id" string="External Users"/>
<div>
<div>
<label for="auth_signup_template_user_id"/>
<field name="auth_signup_template_user_id" class="oe_inline"/>
</div>
</div>
</group>
<xpath expr="//field[@name='module_auth_anonymous']/.." position="after">
<div>
<field name="auth_signup_uninvited" class="oe_inline"/>
<label for="auth_signup_uninvited"/>
</div>
<div>
<label for="auth_signup_template_user_id"/>
<field name="auth_signup_template_user_id" class="oe_inline"/>
</div>
</xpath>
</field>
</record>

View File

@ -28,10 +28,13 @@ class base_config_settings(osv.osv_memory):
'module_multi_company': fields.boolean('manage multiple companies',
help="""Work in multi-company environments, with appropriate security access between companies.
This installs the module multi_company."""),
'module_portal': fields.boolean('activate customer portal',
help="""The portal will give access to a series of documents for your customers; his quotations, his invoices, his projects, etc."""),
'module_share': fields.boolean('allow documents sharing',
help="""As an example, you will be able to share a project or some tasks to your customers, or quotes/sales to several persons at your customer company, or your agenda availabilities to your contacts."""),
help="""Share or embbed any screen of openerp."""),
'module_portal': fields.boolean('activate the customer/supplier portal',
help="""Give access your customers and suppliers to their documents."""),
'module_auth_anonymous': fields.boolean('activate the public portal',
help="""Enable the public part of openerp, openerp becomes a public website."""),
'module_auth_oauth': fields.boolean('use external authentication providers, sign in with google, facebook, ...'),
}
def open_company(self, cr, uid, ids, context=None):

View File

@ -28,20 +28,34 @@
</div>
</group>
<group>
<label for="id" string="Share Data"/>
<div>
<label for="id" string="Email"/>
<div name="email">
<div>
<field name="module_share" class="oe_inline"/>
<label for="module_share"/>
<button type="action"
name="%(base.action_ir_mail_server_list)d"
string="Configure outgoing email servers" class="oe_link"/>
</div>
</div>
</group>
<group>
<label for="id" string="Portal access"/>
<div>
<div>
<field name="module_portal" class="oe_inline"/>
<label for="module_portal"/>
</div>
<div>
<button type="action"
name="%(base.action_ir_mail_server_list)d"
string="Configure outgoing email servers" class="oe_link"/>
<field name="module_auth_anonymous" class="oe_inline"/>
<label for="module_auth_anonymous"/>
</div>
</div>
</group>
<group>
<label for="id" string="Authentication"/>
<div>
<div>
<field name="module_auth_oauth" class="oe_inline"/>
<label for="module_auth_oauth"/>
</div>
</div>
</group>

View File

@ -6,9 +6,10 @@
<field name="model">base.config.settings</field>
<field name="inherit_id" ref="base_setup.view_general_configuration"/>
<field name="arch" type="xml">
<xpath expr="/form/group[last()]/div[last()]/div[last()]" position='after' version="7.0">
<xpath expr="//div[@name='email']" position='inside'>
<div>
<label for="alias_domain" class="oe_inline"/><field name="alias_domain" placeholder="mycompany.my.openerp.com" class="oe_inline"/>
<label for="alias_domain" class="oe_inline"/>
<field name="alias_domain" placeholder="mycompany.my.openerp.com" class="oe_inline"/>
</div>
</xpath>
</field>

View File

@ -838,13 +838,13 @@ openerp.mail = function(session) {
init: function() {
this._super.apply(this, arguments);
this.params = this.get_definition_options();
this.params = this.options;
this.params.thread_level = this.params.thread_level || 0;
this.thread = null;
this.ds = new session.web.DataSet(this, this.view.model);
this.ds_users = new session.web.DataSet(this, 'res.users');
},
start: function() {
// NB: all the widget should be modified to check the actual_mode property on view, not use
// any other method to know if the view is in create mode anymore

View File

@ -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: 2010-10-26 08:32+0000\n"
"PO-Revision-Date: 2012-08-17 11:09+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-08-07 05:25+0000\n"
"X-Generator: Launchpad (build 15745)\n"
"X-Launchpad-Export-Date: 2012-08-18 04:58+0000\n"
"X-Generator: Launchpad (build 15810)\n"
#. module: multi_company
#: model:res.company,overdue_msg:multi_company.res_company_odoo
@ -68,7 +68,7 @@ msgstr "Возвращаемое"
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_custom_multicompany
msgid "Multi-Companies"
msgstr ""
msgstr "Холдинги"
#. module: multi_company
#: view:multi_company.default:0

View File

@ -33,3 +33,29 @@ v différence de total. Methode d'arrondis
x générer les données de printing
x popups d'erreur certainement buggés
TODO AUG 20
-----------
* GREEN STATUS
- make it green !
* TRUNK
- Connection status tooltip
- Remove receipt screen
- Finish the receipt JSON generation
- Modifie le widget de liste course
- supprimer l'écran
- bloquer sur l'impression
* CLIENT
- create a new branch
- Self-checkout welcome screen
- removal of products for the root category
- Terminal de payement
- Code à barres
- Vidanges
- Design
- Backport
- CSS pour écran résistif
- Test sur matos

View File

@ -25,7 +25,7 @@
'depends' : [
'base',
'share',
'auth_anonymous'
'auth_signup',
],
'author' : 'OpenERP SA',
'category': 'Portal',

View File

@ -186,9 +186,9 @@
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_9">Tél. : [[ (o.partner_id.phone) or removeParentNode('para') ]]</para>
<para style="terp_default_9">Tel : [[ (o.partner_id.phone) or removeParentNode('para') ]]</para>
<para style="terp_default_9">Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]]</para>
<para style="terp_default_9">TVA : [[ (o.partner_id.vat) or removeParentNode('para') ]]</para>
<para style="terp_default_9">TIN : [[ (o.partner_id.vat) or removeParentNode('para') ]]</para>
</td>
</tr>
</blockTable>