diff --git a/account_usability/account_view.xml b/account_usability/account_view.xml
index 75d8f6b..98b4d86 100644
--- a/account_usability/account_view.xml
+++ b/account_usability/account_view.xml
@@ -145,9 +145,14 @@ module -->
{'journal_show_code_only': True}
+
+
200
+ {}
account.move.line
-
+
+
+
Name or Reference
diff --git a/intrastat_product_type/__manifest__.py b/intrastat_product_type/__manifest__.py
index 3cdc2a6..ad10637 100644
--- a/intrastat_product_type/__manifest__.py
+++ b/intrastat_product_type/__manifest__.py
@@ -1,30 +1,12 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Intrastat Product Type module for Odoo
-# Copyright (C) 2016 Akretion (http://www.akretion.com)
-# @author Alexis de Lattre
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
+# © 2016 Akretion (http://www.akretion.com)
+# @author Alexis de Lattre
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Intrastat Product Type',
- 'version': '0.1',
- 'category': 'Accounting & Finance',
+ 'version': '10.0.1.0.0',
+ 'category': 'Accounting',
'license': 'AGPL-3',
'summary': 'Adds a special field Intrastat Type on Products',
'description': """
@@ -42,5 +24,5 @@ This module has been written by Alexis de Lattre from Akretion
-from openerp import models, fields, api, _
-from openerp.exceptions import ValidationError
+from odoo import models, fields, api, _
+from odoo.exceptions import ValidationError
class ProductTemplate(models.Model):
@@ -34,16 +34,12 @@ class ProductTemplate(models.Model):
"(but you can set Product Type to 'Consumable' or "
"'Service').") % pt.name)
- @api.multi
- def onchange_type(self, type):
- res = super(ProductTemplate, self).onchange_type(type)
- if 'value' not in res:
- res['value'] = {}
- if type == 'product':
- res['value']['intrastat_type'] = 'product'
- elif type == 'service':
- res['value']['intrastat_type'] = 'service'
- return res
+ @api.onchange('type')
+ def intrastat_type_onchange(self):
+ if self.type in ('product', 'consu'):
+ self.intrastat_type = 'product'
+ elif self.type == 'service':
+ self.intrastat_type = 'service'
class L10nFrIntrastatServiceDeclaration(models.Model):
diff --git a/intrastat_product_type/post_install.py b/intrastat_product_type/post_install.py
index 5366b28..47ca51c 100644
--- a/intrastat_product_type/post_install.py
+++ b/intrastat_product_type/post_install.py
@@ -1,7 +1,9 @@
# -*- coding: utf-8 -*-
+# © 2016 Akretion (Alexis de Lattre )
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-def set_intrastat_type_on_products(cr, pool):
+def set_intrastat_type_on_products(cr, registry):
cr.execute(
"UPDATE product_template SET intrastat_type='service' "
"WHERE type='service'")
diff --git a/intrastat_product_type/product_view.xml b/intrastat_product_type/product_view.xml
index 38cb4e4..e6a926d 100644
--- a/intrastat_product_type/product_view.xml
+++ b/intrastat_product_type/product_view.xml
@@ -1,12 +1,11 @@
-
-
+
@@ -21,5 +20,4 @@
-
-
+
diff --git a/pos_config_single_user/__init__.py b/pos_config_single_user/__init__.py
new file mode 100644
index 0000000..cc89676
--- /dev/null
+++ b/pos_config_single_user/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+from . import pos
diff --git a/pos_config_single_user/__manifest__.py b/pos_config_single_user/__manifest__.py
new file mode 100644
index 0000000..7712ddb
--- /dev/null
+++ b/pos_config_single_user/__manifest__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+# © 2014-2016 Akretion (Alexis de Lattre )
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+{
+ 'name': 'POS Config Single User',
+ 'version': '10.0.1.0.0',
+ 'category': 'Point Of Sale',
+ 'license': 'AGPL-3',
+ 'summary': 'Configure on each pos.config a single user allowed to start it',
+ 'description': """
+POS Config Single User
+======================
+
+New parameter on pos.config: the (only) user allowed to start sessions of this pos.config.
+
+This module has been written by Alexis de Lattre from Akretion .
+ """,
+ 'author': 'Akretion',
+ 'website': 'http://www.akretion.com',
+ 'depends': ['point_of_sale'],
+ 'data': ['pos_view.xml'],
+ 'installable': True,
+}
diff --git a/pos_config_single_user/pos.py b/pos_config_single_user/pos.py
new file mode 100644
index 0000000..173e618
--- /dev/null
+++ b/pos_config_single_user/pos.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# © 2014-2016 Akretion (Alexis de Lattre )
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import models, fields, api, _
+from openerp.exceptions import UserError
+
+
+class PosConfig(models.Model):
+ _inherit = 'pos.config'
+
+ allowed_user_id = fields.Many2one(
+ 'res.users', string="Allowed User",
+ help="If you select a user, only this user will be allowed to start "
+ "sessions for this POS", ondelete='restrict')
+
+ @api.multi
+ def open_session_cb(self):
+ self.ensure_one()
+ if (
+ self.allowed_user_id and
+ self.allowed_user_id != self.env.user):
+ raise UserError(_(
+ "The POS '%s' can be used only by user '%s'.") % (
+ self.name,
+ self.allowed_user_id.name))
+ return super(PosConfig, self).open_session_cb()
diff --git a/pos_config_single_user/pos_view.xml b/pos_config_single_user/pos_view.xml
new file mode 100644
index 0000000..3cd2c43
--- /dev/null
+++ b/pos_config_single_user/pos_view.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+ pos_config_single_user.pos.config
+ pos.config
+
+
+
+
+
+
+
+
+
diff --git a/pos_config_single_user/static/description/icon.png b/pos_config_single_user/static/description/icon.png
new file mode 100644
index 0000000..1a60d0e
Binary files /dev/null and b/pos_config_single_user/static/description/icon.png differ
diff --git a/pos_usability/pos_view.xml b/pos_usability/pos_view.xml
index cad6a6d..be45b10 100644
--- a/pos_usability/pos_view.xml
+++ b/pos_usability/pos_view.xml
@@ -27,9 +27,11 @@
Total Transactions
+ monetary
Total Balance Finale
+ monetary
diff --git a/product_usability/product.py b/product_usability/product.py
index fde3829..709fe01 100644
--- a/product_usability/product.py
+++ b/product_usability/product.py
@@ -21,3 +21,10 @@ class ProductProduct(models.Model):
'default_code_uniq',
'unique(default_code)',
'This internal reference already exists!')]
+
+
+class ProductSupplierinfo(models.Model):
+ _inherit = 'product.supplierinfo'
+
+ name = fields.Many2one(
+ domain=[('supplier', '=', True), ('parent_id', '=', False)])
diff --git a/purchase_usability/purchase_view.xml b/purchase_usability/purchase_view.xml
index 5af068e..b5e5b43 100644
--- a/purchase_usability/purchase_view.xml
+++ b/purchase_usability/purchase_view.xml
@@ -43,6 +43,7 @@
+
diff --git a/sale_usability/sale_view.xml b/sale_usability/sale_view.xml
index 7509c3d..ee1e314 100644
--- a/sale_usability/sale_view.xml
+++ b/sale_usability/sale_view.xml
@@ -34,6 +34,7 @@
+
@@ -45,6 +46,7 @@
+
1