diff --git a/addons/point_of_sale/__init__.py b/addons/point_of_sale/__init__.py
index ec5403212f4..bf0b86a0e9d 100644
--- a/addons/point_of_sale/__init__.py
+++ b/addons/point_of_sale/__init__.py
@@ -21,7 +21,6 @@
import point_of_sale
import account_bank_statement
-import product
import res_users
import wizard
import report
diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py
index 088e3ceeb3a..a1cc41b7411 100644
--- a/addons/point_of_sale/__openerp__.py
+++ b/addons/point_of_sale/__openerp__.py
@@ -66,7 +66,6 @@ Main features :
'point_of_sale_workflow.xml',
'account_statement_view.xml',
'account_statement_report.xml',
- 'product_view.xml',
'res_users_view.xml',
],
'demo_xml': [
diff --git a/addons/point_of_sale/account_statement_view.xml b/addons/point_of_sale/account_statement_view.xml
index 9bc039a1852..e309879100e 100644
--- a/addons/point_of_sale/account_statement_view.xml
+++ b/addons/point_of_sale/account_statement_view.xml
@@ -129,6 +129,7 @@
+
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index f40ff5a1bd2..db293bcc814 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -47,8 +47,8 @@ class pos_config(osv.osv):
'name' : fields.char('Name', size=32,
select=1,
required=True,
- readonly=True,
- states={'draft' : [('readonly', False)]}
+# readonly=True,
+# states={'draft' : [('readonly', False)]}
),
'journal_ids' : fields.many2many('account.journal',
'pos_config_journal_rel',
@@ -56,21 +56,21 @@ class pos_config(osv.osv):
'journal_id',
'Payment Methods',
domain="[('journal_user', '=', True )]",
- readonly=True,
- states={'draft' : [('readonly', False)]}
+# readonly=True,
+# states={'draft' : [('readonly', False)]}
),
'shop_id' : fields.many2one('sale.shop', 'Shop',
required=True,
select=1,
- readonly=True,
- states={'draft' : [('readonly', False)]}
+# readonly=True,
+# states={'draft' : [('readonly', False)]}
),
'journal_id' : fields.many2one('account.journal', 'Journal',
required=True,
select=1,
domain=[('type', '=', 'sale')],
- readonly=True,
- states={'draft' : [('readonly', False)]}
+# readonly=True,
+# states={'draft' : [('readonly', False)]}
),
'iface_self_checkout' : fields.boolean('Self Checkout Mode'),
'iface_websql' : fields.boolean('WebSQL (to store data)'),
@@ -88,8 +88,8 @@ class pos_config(osv.osv):
'sequence_id' : fields.many2one('ir.sequence', 'Sequence',
readonly=True),
'user_id' : fields.many2one('res.users', 'User',
- readonly=True,
- states={'draft' : [('readonly', False)]}
+# readonly=True,
+# states={'draft' : [('readonly', False)]}
),
}
@@ -180,34 +180,34 @@ class pos_session(osv.osv):
#"status [BUTTON TEXT]" -> utiliser
# "opening control (open) -> opened (cashbox control) -> closing control (close) -> closed & posted"
- POS_SESSION_STATE = [('new', 'New'),('opened', 'Opened'),('closed', 'Closed'),('posted', 'Posted')]
- #POS_SESSION_STATE = [
- # ('new', 'Opening Control'),
- # ('opened', 'Opened'),
- # ('closed', 'Closing Control'),
- # ('posted', 'Closed & Posted'),
- #]
+ #POS_SESSION_STATE = [('new', 'New'),('opened', 'Opened'),('closed', 'Closed'),('posted', 'Posted')]
+ POS_SESSION_STATE = [
+ ('opening_control', 'Opening Control'), # Signal open
+ ('opened', 'Opened'), # Signal closing
+ ('closing_control', 'Closing Control'), # Signal close
+ ('closed', 'Closed'),
+ ]
_columns = {
'config_id' : fields.many2one('pos.config', 'PoS',
required=True,
select=1,
domain="[('state', '=', 'active')]",
- readonly=True,
- states={'draft' : [('readonly', False)]}
+# readonly=True,
+# states={'draft' : [('readonly', False)]}
),
'name' : fields.char('Session Sequence', size=32,
required=True,
select=1,
- readonly=True,
- states={'draft' : [('readonly', False)]}
+# readonly=True,
+# states={'draft' : [('readonly', False)]}
),
'user_id' : fields.many2one('res.users', 'User',
required=True,
select=1,
- readonly=True,
- states={'draft' : [('readonly', False)]}
+# readonly=True,
+# states={'draft' : [('readonly', False)]}
),
'start_at' : fields.datetime('Opening Date'),
'stop_at' : fields.datetime('Closing Date'),
@@ -234,7 +234,7 @@ class pos_session(osv.osv):
_defaults = {
'name' : '/',
'user_id' : lambda obj, cr, uid, context: uid,
- 'state' : 'new',
+ 'state' : 'opening_control',
}
_sql_constraints = [
@@ -309,15 +309,15 @@ class pos_session(osv.osv):
return True
- def wkf_action_close(self, cr, uid, ids, context=None):
+ def wkf_action_closing_control(self, cr, uid, ids, context=None):
# Close CashBox
for record in self.browse(cr, uid, ids, context=context):
record.cash_register_id.button_confirm_cash(context=context)
- return self.write(cr, uid, ids, {'state' : 'closed', 'stop_at' : time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
+ return self.write(cr, uid, ids, {'state' : 'closing_control', 'stop_at' : time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
- def wkf_action_post(self, cr, uid, ids, context=None):
+ def wkf_action_close(self, cr, uid, ids, context=None):
self._confirm_orders(cr, uid, ids, context=context)
- return self.write(cr, uid, ids, {'state' : 'posted'}, context=context)
+ return self.write(cr, uid, ids, {'state' : 'closed'}, context=context)
def _confirm_orders(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
@@ -370,7 +370,7 @@ class pos_session(osv.osv):
session_id = self.create(cr, uid, values, context=context)
wkf_service = netsvc.LocalService('workflow')
- wkf_service.trg_validate(uid, 'pos.session', session_id, 'open', cr)
+ wkf_service.trg_validate(uid, 'pos.session', session_id, 'opening_control', cr)
return session_id
@@ -1112,6 +1112,11 @@ class pos_category(osv.osv):
'parent_id': fields.many2one('pos.category','Parent Category', select=True),
'child_id': fields.one2many('pos.category', 'parent_id', string='Children Categories'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
+ 'to_weight' : fields.boolean('To Weight'),
+ }
+
+ _defaults = {
+ 'to_weight' : False,
}
pos_category()
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index 062efd14fdc..f45cc786846 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -641,6 +641,7 @@
+
@@ -671,6 +672,7 @@
+
POS Sales Lines
@@ -894,10 +897,11 @@
-
-
-
-
+
+
+
+
+
diff --git a/addons/point_of_sale/point_of_sale_workflow.xml b/addons/point_of_sale/point_of_sale_workflow.xml
index fdb0d6883cf..d37e71014ed 100644
--- a/addons/point_of_sale/point_of_sale_workflow.xml
+++ b/addons/point_of_sale/point_of_sale_workflow.xml
@@ -86,51 +86,53 @@
-
+
True
- new
+ opening_control
- open
+ opened
wkf_action_open()
function
+
+
+ closing_control
+ wkf_action_closing_control()
+ function
+
+
- close
+ True
+ closed
wkf_action_close()
function
-
-
- True
- post
- wkf_action_post()
- function
-
-
-
-
-
+
+
+
+
+
open
-
-
-
- close
+
+
+
+ cashbox_control
-
-
-
- post
+
+
+
+ close
diff --git a/addons/point_of_sale/product.py b/addons/point_of_sale/product.py
deleted file mode 100644
index 0b1b8d19d33..00000000000
--- a/addons/point_of_sale/product.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-from osv import osv, fields
-
-class product_category(osv.osv):
- _inherit = 'product.category'
-
- _columns = {
- 'to_weight' : fields.boolean('To Weight'),
- }
-
- _defaults = {
- 'to_weight' : False,
- }
diff --git a/addons/point_of_sale/product_view.xml b/addons/point_of_sale/product_view.xml
deleted file mode 100644
index c693f37aa23..00000000000
--- a/addons/point_of_sale/product_view.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- product.category.form
- product.category
- form
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/addons/point_of_sale/wizard/pos_confirm.xml b/addons/point_of_sale/wizard/pos_confirm.xml
index 6a0819c06b0..395ccb9f057 100644
--- a/addons/point_of_sale/wizard/pos_confirm.xml
+++ b/addons/point_of_sale/wizard/pos_confirm.xml
@@ -23,7 +23,7 @@
-
+