From f638ce36cfc4d30fbfd6d36c6ea026a0b9cbe432 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 9 May 2012 10:39:40 +0200 Subject: [PATCH] [IMP] point_of_sale: Add the 'to_weight' field on the category for the weight bzr revid: stw@openerp.com-20120509083940-akzpgtwkre87rczr --- addons/point_of_sale/__init__.py | 1 + addons/point_of_sale/__openerp__.py | 1 + addons/point_of_sale/product.py | 13 +++++++++++++ addons/point_of_sale/product_view.xml | 16 ++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 addons/point_of_sale/product.py create mode 100644 addons/point_of_sale/product_view.xml diff --git a/addons/point_of_sale/__init__.py b/addons/point_of_sale/__init__.py index 4d35174ce6b..323eb4ccd7f 100644 --- a/addons/point_of_sale/__init__.py +++ b/addons/point_of_sale/__init__.py @@ -21,6 +21,7 @@ import point_of_sale import account_bank_statement +import product import wizard import report diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index c97ffedf046..91f5202536b 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -66,6 +66,7 @@ Main features : 'point_of_sale_workflow.xml', 'account_statement_view.xml', 'account_statement_report.xml', + 'product_view.xml', ], 'demo_xml': [ 'point_of_sale_demo.xml', diff --git a/addons/point_of_sale/product.py b/addons/point_of_sale/product.py new file mode 100644 index 00000000000..0b1b8d19d33 --- /dev/null +++ b/addons/point_of_sale/product.py @@ -0,0 +1,13 @@ +#!/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 new file mode 100644 index 00000000000..c693f37aa23 --- /dev/null +++ b/addons/point_of_sale/product_view.xml @@ -0,0 +1,16 @@ + + + + + product.category.form + product.category + form + + + + + + + + + \ No newline at end of file