[MERGE] point_of_sale: from stw

bzr revid: fva@openerp.com-20120529133230-5532hn68a4sa3yim
This commit is contained in:
Frédéric van der Essen
2012-05-29 15:32:30 +02:00
3 changed files with 18 additions and 6 deletions
+11
View File
@@ -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):
+6 -5
View File
@@ -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()
+1 -1
View File
@@ -613,6 +613,7 @@
<group colspan="2" col="2" name="pos">
<separator string="Point of Sale" colspan="2"/>
<field name="pos_categ_id"/>
<field name="to_weight" />
</group>
</group>
</field>
@@ -646,7 +647,6 @@
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
<field name="to_weight" />
</group>
</form>
</field>