diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py
index d0474887594..bea48528f63 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -306,10 +306,21 @@ account_cash_statement()
class account_journal(osv.osv):
_inherit = 'account.journal'
+ def _default_cashbox_line_ids(self, cr, uid, context=None):
+ # Return a list of coins in Euros.
+ result = [
+ dict(pieces=value) for value in [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500]
+ ]
+ return result
+
_columns = {
'cashbox_line_ids' : fields.one2many('account.journal.cashbox.line', 'journal_id', 'CashBox'),
}
+ _defaults = {
+ 'cashbox_line_ids' : _default_cashbox_line_ids,
+ }
+
account_journal()
class account_journal_cashbox_line(osv.osv):
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 637f6bd5a2f..75eba71b18b 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -1140,10 +1140,6 @@ 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', help="This category contains products that should be weighted, mainly used for the self-checkout interface"),
- }
- _defaults = {
- 'to_weight' : False,
}
pos_category()
@@ -1174,8 +1170,13 @@ class product_product(osv.osv):
'product_image_small': fields.function(_get_small_image, string='Small Image', type="binary",
store = {
'product.product': (lambda self, cr, uid, ids, c={}: ids, ['product_image'], 10),
- })
+ }),
+ 'to_weight' : fields.boolean('To Weight', help="This category contains products that should be weighted, mainly used for the self-checkout interface"),
}
+ _defaults = {
+ 'to_weight' : False,
+ }
+
product_product()
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index b65a662196c..cc718aea45d 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -613,6 +613,7 @@
+
@@ -646,7 +647,6 @@
-