[IMP] point_of_sale, product: change model 'pos.category' of the pos into product.public.category in product. product.public.category is used for eg by pos and website_sale. Add some demo data for this category. Add a domain in pos 'model.js' to select non empty categories
bzr revid: chm@openerp.com-20130828151658-3isgyl93c3hwp1pc
This commit is contained in:
parent
189dabab53
commit
2fab26a2d2
|
@ -48,15 +48,15 @@ class PointOfSaleController(http.Controller):
|
|||
load_css_img(imgdir,'/point_of_sale/static/src/img')
|
||||
|
||||
products = request.registry.get('product.product')
|
||||
for p in products.search_read(request.cr, request.uid, [('pos_categ_id','!=',False)], ['name']):
|
||||
for p in products.search_read(request.cr, request.uid, [('public_categ_id','!=',False)], ['name']):
|
||||
product_id = p['id']
|
||||
url = "/web/binary/image?session_id=%s&model=product.product&field=image&id=%s" % (request.session_id, product_id)
|
||||
ml.append(url)
|
||||
|
||||
categories = request.registry.get('pos.category')
|
||||
categories = request.registry.get('product.public.category')
|
||||
for c in categories.search_read(request.cr, request.uid, [], ['name']):
|
||||
category_id = c['id']
|
||||
url = "/web/binary/image?session_id=%s&model=pos.category&field=image&id=%s" % (request.session_id, category_id)
|
||||
url = "/web/binary/image?session_id=%s&model=product.public.category&field=image&id=%s" % (request.session_id, category_id)
|
||||
ml.append(url)
|
||||
|
||||
ml += ["NETWORK:","*"]
|
||||
|
|
|
@ -1238,80 +1238,6 @@ class pos_order_line(osv.osv):
|
|||
})
|
||||
return super(pos_order_line, self).copy_data(cr, uid, id, default, context=context)
|
||||
|
||||
class pos_category(osv.osv):
|
||||
_name = 'pos.category'
|
||||
_description = "Point of Sale Category"
|
||||
_order = "sequence, name"
|
||||
def _check_recursion(self, cr, uid, ids, context=None):
|
||||
level = 100
|
||||
while len(ids):
|
||||
cr.execute('select distinct parent_id from pos_category where id IN %s',(tuple(ids),))
|
||||
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
|
||||
if not level:
|
||||
return False
|
||||
level -= 1
|
||||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You cannot create recursive categories.', ['parent_id'])
|
||||
]
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = record['name']
|
||||
if record['parent_id']:
|
||||
name = record['parent_id'][1]+' / '+name
|
||||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
|
||||
res = self.name_get(cr, uid, ids, context=context)
|
||||
return dict(res)
|
||||
|
||||
def _get_image(self, cr, uid, ids, name, args, context=None):
|
||||
result = dict.fromkeys(ids, False)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
result[obj.id] = tools.image_get_resized_images(obj.image)
|
||||
return result
|
||||
|
||||
def _set_image(self, cr, uid, id, name, value, args, context=None):
|
||||
return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True, translate=True),
|
||||
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
|
||||
'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."),
|
||||
|
||||
# NOTE: there is no 'default image', because by default we don't show thumbnails for categories. However if we have a thumbnail
|
||||
# for at least one category, then we display a default image on the other, so that the buttons have consistent styling.
|
||||
# In this case, the default image is set by the js code.
|
||||
# NOTE2: image: all image fields are base64 encoded and PIL-supported
|
||||
'image': fields.binary("Image",
|
||||
help="This field holds the image used as image for the cateogry, limited to 1024x1024px."),
|
||||
'image_medium': fields.function(_get_image, fnct_inv=_set_image,
|
||||
string="Medium-sized image", type="binary", multi="_get_image",
|
||||
store={
|
||||
'pos.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
|
||||
},
|
||||
help="Medium-sized image of the category. It is automatically "\
|
||||
"resized as a 128x128px image, with aspect ratio preserved. "\
|
||||
"Use this field in form views or some kanban views."),
|
||||
'image_small': fields.function(_get_image, fnct_inv=_set_image,
|
||||
string="Smal-sized image", type="binary", multi="_get_image",
|
||||
store={
|
||||
'pos.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
|
||||
},
|
||||
help="Small-sized image of the category. It is automatically "\
|
||||
"resized as a 64x64px image, with aspect ratio preserved. "\
|
||||
"Use this field anywhere a small image is required."),
|
||||
}
|
||||
|
||||
import io, StringIO
|
||||
|
||||
class ean_wizard(osv.osv_memory):
|
||||
|
@ -1350,25 +1276,23 @@ class product_product(osv.osv):
|
|||
'income_pdt': fields.boolean('Point of Sale Cash In', help="Check if, this is a product you can use to put cash into a statement for the point of sale backend."),
|
||||
'expense_pdt': fields.boolean('Point of Sale Cash Out', help="Check if, this is a product you can use to take cash from a statement for the point of sale backend, example: money lost, transfer to bank, etc."),
|
||||
'available_in_pos': fields.boolean('Available in the Point of Sale', help='Check if you want this product to appear in the Point of Sale'),
|
||||
'pos_categ_id': fields.many2one('pos.category','Point of Sale Category',
|
||||
help="The Point of Sale Category this products belongs to. Those categories are used to group similar products and are specific to the Point of Sale."),
|
||||
'to_weight' : fields.boolean('To Weight', help="Check if the product should be weighted (mainly used with self check-out interface)."),
|
||||
}
|
||||
|
||||
def _default_pos_categ_id(self, cr, uid, context=None):
|
||||
def _default_public_categ_id(self, cr, uid, context=None):
|
||||
proxy = self.pool.get('ir.model.data')
|
||||
|
||||
try:
|
||||
category_id = proxy.get_object_reference(cr, uid, 'point_of_sale', 'categ_others')[1]
|
||||
category_id = proxy.get_object_reference(cr, uid, 'product', 'categ_others')[1]
|
||||
except ValueError:
|
||||
values = {
|
||||
'name' : 'Others',
|
||||
}
|
||||
category_id = self.pool.get('pos.category').create(cr, uid, values, context=context)
|
||||
category_id = self.pool.get('product.public.category').create(cr, uid, values, context=context)
|
||||
values = {
|
||||
'name' : 'categ_others',
|
||||
'model' : 'pos.category',
|
||||
'module' : 'point_of_sale',
|
||||
'model' : 'product.public.category',
|
||||
'module' : 'product',
|
||||
'res_id' : category_id,
|
||||
}
|
||||
proxy.create(cr, uid, values, context=context)
|
||||
|
@ -1378,7 +1302,7 @@ class product_product(osv.osv):
|
|||
_defaults = {
|
||||
'to_weight' : False,
|
||||
'available_in_pos': True,
|
||||
'pos_categ_id' : _default_pos_categ_id,
|
||||
'public_categ_id' : _default_public_categ_id,
|
||||
}
|
||||
|
||||
def edit_ean(self, cr, uid, ids, context):
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<record id="unreferenced_product" model="product.product">
|
||||
<field name="list_price">1.00</field>
|
||||
<field name="name">Unreferenced Products</field>
|
||||
<field name="pos_categ_id" ref="categ_others"/>
|
||||
<field name="public_categ_id" ref="product.categ_others"/>
|
||||
<field name="image">iVBORw0KGgoAAAANSUhEUgAAAFUAAABQCAYAAABoODnpAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC
|
||||
AkDAfcUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dE
|
||||
AP4A/gD+6xjUggAAAAlwSFlzAAAXEgAAFxIBZ5/SUgAAAAl2cEFnAAAAVQAAAFAA8yp5GQAAJFFJ
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,9 +8,6 @@
|
|||
groups="group_pos_manager,group_pos_user"
|
||||
sequence="30"/>
|
||||
|
||||
<record id="categ_others" model="pos.category">
|
||||
<field name="name">Others</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_pos_pos_form">
|
||||
<field name="name">pos.order</field>
|
||||
|
@ -177,8 +174,8 @@
|
|||
<field name="res_model">product.product</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,kanban</field>
|
||||
<field name="context" eval="{'default_pos_categ_id': ref('point_of_sale.categ_others')}"/>
|
||||
<field name="domain" eval="[('pos_categ_id','<>',False)]"/>
|
||||
<field name="context" eval="{'default_public_categ_id': ref('product.categ_others')}"/>
|
||||
<field name="domain" eval="[('public_categ_id','<>',False)]"/>
|
||||
<field name="view_id" ref="product.product_product_tree_view"/>
|
||||
<field name="search_view_id" ref="product.product_search_form_view"/>
|
||||
<field name="help" type="html">
|
||||
|
@ -619,7 +616,6 @@
|
|||
<group name="sale" position="inside">
|
||||
<group name="pos" string="Point of Sale">
|
||||
<field name="available_in_pos"/>
|
||||
<field name="pos_categ_id"/>
|
||||
<field name="to_weight" />
|
||||
<field name="income_pdt"/>
|
||||
<field name="expense_pdt"/>
|
||||
|
@ -632,56 +628,7 @@
|
|||
</record>
|
||||
|
||||
<!-- Categories tree view -->
|
||||
<record id="pos_category_form_view" model="ir.ui.view">
|
||||
<field name="name">pos.category.form</field>
|
||||
<field name="model">pos.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Product PoS Categories" version="7.0">
|
||||
<sheet>
|
||||
<field name="image_medium" widget='image' class="oe_avatar oe_right"/>
|
||||
<div class="oe_left">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="pos_category_tree_view" model="ir.ui.view">
|
||||
<field name="name">pos.category.tree</field>
|
||||
<field name="model">pos.category</field>
|
||||
<field name="field_parent" eval="False"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product PoS Categories">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="complete_name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="pos_category_action" model="ir.actions.act_window">
|
||||
<field name="name">Product Categories</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.category</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to define a new category.
|
||||
</p><p>
|
||||
Categories are used to browse your products through the
|
||||
touchscreen interface.
|
||||
</p><p>
|
||||
If you put a photo on the category, the layout of the
|
||||
touchscreen interface will automatically. We suggest not to put
|
||||
a photo on categories for small (1024x768) screens.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="pos_category_action" id="menu_pos_category" parent="menu_point_of_sale_product" sequence="0" />
|
||||
<menuitem action="product.product_public_category_action" id="menu_product_public_category" parent="menu_point_of_sale_product" sequence="0" />
|
||||
<!-- END -->
|
||||
|
||||
<menuitem name="Configuration" parent="menu_point_root"
|
||||
|
|
|
@ -56,8 +56,8 @@ access_product_uom_manager,product.uom manager,product.model_product_uom,group_p
|
|||
access_res_partner_manager,res.partner manager,base.model_res_partner,group_pos_manager,1,0,0,0
|
||||
access_product_category_manager,product.category manager,product.model_product_category,group_pos_manager,1,1,1,1
|
||||
access_product_pricelist_manager,product.pricelist manager,product.model_product_pricelist,group_pos_manager,1,0,0,0
|
||||
access_product_category_pos_manager,pos.category manager,model_pos_category,group_pos_manager,1,1,1,1
|
||||
access_product_category_pos_user,pos.category user,model_pos_category,group_pos_user,1,0,0,0
|
||||
access_pos_session_user,pos.session user,model_pos_session,group_pos_user,1,1,1,0
|
||||
access_pos_config_user,pos.config user,model_pos_config,group_pos_user,1,1,1,0
|
||||
access_ir_sequence_manager,ir.sequence manager,base.model_ir_sequence,group_pos_manager,1,1,1,1
|
||||
access_product_category_pos_manager,product.public.category manager,product.model_product_public_category,group_pos_manager,1,1,1,1
|
||||
access_product_category_pos_user,product.public.category user,product.model_product_public_category,group_pos_user,1,0,0,0
|
||||
|
|
|
|
@ -165,7 +165,7 @@ function openerp_pos_db(instance, module){
|
|||
for(var i = 0, len = products.length; i < len; i++){
|
||||
var product = products[i];
|
||||
var search_string = this._product_search_string(product);
|
||||
var categ_id = product.pos_categ_id ? product.pos_categ_id[0] : this.root_category_id;
|
||||
var categ_id = product.public_categ_id ? product.public_categ_id[0] : this.root_category_id;
|
||||
if(!stored_categories[categ_id]){
|
||||
stored_categories[categ_id] = [];
|
||||
}
|
||||
|
|
|
@ -165,19 +165,25 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
|||
}).then(function(packagings){
|
||||
self.db.add_packagings(packagings);
|
||||
|
||||
return self.fetch('pos.category', ['id','name','parent_id','child_id','image'])
|
||||
}).then(function(categories){
|
||||
self.db.add_categories(categories);
|
||||
|
||||
return self.fetch(
|
||||
'product.product',
|
||||
['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13',
|
||||
['name', 'list_price','price','public_categ_id', 'taxes_id', 'ean13',
|
||||
'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description'],
|
||||
[['sale_ok','=',true],['available_in_pos','=',true]],
|
||||
{pricelist: self.get('pos_config').pricelist_id[0]} // context for price
|
||||
);
|
||||
}).then(function(products){
|
||||
self.db.add_products(products);
|
||||
self.tmp_products = products;
|
||||
|
||||
var category_ids = _.without(_.uniq(_.map(products, function (product) {return product.public_categ_id[0] || 0;})), 0);
|
||||
return self.fetch(
|
||||
'product.public.category',
|
||||
['id','name','parent_id','child_id','image'],
|
||||
['|', ['id','=',category_ids], ['child_id','=',category_ids]]
|
||||
);
|
||||
}).then(function(categories){
|
||||
self.db.add_categories(categories);
|
||||
self.db.add_products(self.tmp_products);
|
||||
|
||||
return self.fetch(
|
||||
'account.bank.statement',
|
||||
|
|
|
@ -508,7 +508,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
},
|
||||
|
||||
get_image_url: function(category){
|
||||
return instance.session.url('/web/binary/image', {model: 'pos.category', field: 'image_medium', id: category.id});
|
||||
return instance.session.url('/web/binary/image', {model: 'product.public.category', field: 'image_medium', id: category.id});
|
||||
},
|
||||
|
||||
renderElement: function(){
|
||||
|
|
|
@ -281,6 +281,80 @@ class product_category(osv.osv):
|
|||
return [ids]
|
||||
|
||||
|
||||
class product_public_category(osv.osv):
|
||||
_name = "product.public.category"
|
||||
_description = "Public Category"
|
||||
_order = "sequence, name"
|
||||
def _check_recursion(self, cr, uid, ids, context=None):
|
||||
level = 100
|
||||
while len(ids):
|
||||
cr.execute('select distinct parent_id from product_public_category where id IN %s',(tuple(ids),))
|
||||
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
|
||||
if not level:
|
||||
return False
|
||||
level -= 1
|
||||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You cannot create recursive categories.', ['parent_id'])
|
||||
]
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = record['name']
|
||||
if record['parent_id']:
|
||||
name = record['parent_id'][1]+' / '+name
|
||||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
|
||||
res = self.name_get(cr, uid, ids, context=context)
|
||||
return dict(res)
|
||||
|
||||
def _get_image(self, cr, uid, ids, name, args, context=None):
|
||||
result = dict.fromkeys(ids, False)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
result[obj.id] = tools.image_get_resized_images(obj.image)
|
||||
return result
|
||||
|
||||
def _set_image(self, cr, uid, id, name, value, args, context=None):
|
||||
return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True, translate=True),
|
||||
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
|
||||
'parent_id': fields.many2one('product.public.category','Parent Category', select=True),
|
||||
'child_id': fields.one2many('product.public.category', 'parent_id', string='Children Categories'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
|
||||
|
||||
# NOTE: there is no 'default image', because by default we don't show thumbnails for categories. However if we have a thumbnail
|
||||
# for at least one category, then we display a default image on the other, so that the buttons have consistent styling.
|
||||
# In this case, the default image is set by the js code.
|
||||
# NOTE2: image: all image fields are base64 encoded and PIL-supported
|
||||
'image': fields.binary("Image",
|
||||
help="This field holds the image used as image for the cateogry, limited to 1024x1024px."),
|
||||
'image_medium': fields.function(_get_image, fnct_inv=_set_image,
|
||||
string="Medium-sized image", type="binary", multi="_get_image",
|
||||
store={
|
||||
'product.public.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
|
||||
},
|
||||
help="Medium-sized image of the category. It is automatically "\
|
||||
"resized as a 128x128px image, with aspect ratio preserved. "\
|
||||
"Use this field in form views or some kanban views."),
|
||||
'image_small': fields.function(_get_image, fnct_inv=_set_image,
|
||||
string="Smal-sized image", type="binary", multi="_get_image",
|
||||
store={
|
||||
'product.public.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
|
||||
},
|
||||
help="Small-sized image of the category. It is automatically "\
|
||||
"resized as a 64x64px image, with aspect ratio preserved. "\
|
||||
"Use this field anywhere a small image is required."),
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Products
|
||||
|
@ -313,6 +387,7 @@ class product_template(osv.osv):
|
|||
'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."),
|
||||
'rental': fields.boolean('Can be Rent'),
|
||||
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
|
||||
'public_categ_id': fields.many2one('product.public.category','Public Category', help="Those categories are used to group similar products for public sales (eg.: point of sale, e-commerce)."),
|
||||
'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price."),
|
||||
'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user"),
|
||||
'volume': fields.float('Volume', help="The volume in m3."),
|
||||
|
|
|
@ -198,5 +198,10 @@ parameter) will see those record just disappear.
|
|||
<field name="categ_id" ref="product.product_category_all"/>
|
||||
<field name="type">service</field>
|
||||
</record>
|
||||
|
||||
<!-- Product Public Categories -->
|
||||
<record id="categ_others" model="product.public.category">
|
||||
<field name="name">Others</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -56,6 +56,127 @@
|
|||
<field name="type">box</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- product.public.category -->
|
||||
|
||||
<record id="computers" model="product.public.category">
|
||||
<field name="name">Computers</field>
|
||||
</record>
|
||||
|
||||
<record id="Components" model="product.public.category">
|
||||
<field name="parent_id" ref="computers"/>
|
||||
<field name="name">Components</field>
|
||||
</record>
|
||||
|
||||
<record id="case" model="product.public.category">
|
||||
<field name="parent_id" ref="Components"/>
|
||||
<field name="name">Case</field>
|
||||
</record>
|
||||
<record id="HDD" model="product.public.category">
|
||||
<field name="parent_id" ref="Components"/>
|
||||
<field name="name">Hard Drive</field>
|
||||
</record>
|
||||
<record id="motherboard" model="product.public.category">
|
||||
<field name="parent_id" ref="Components"/>
|
||||
<field name="name">Motherboard</field>
|
||||
</record>
|
||||
<record id="graphics_card" model="product.public.category">
|
||||
<field name="parent_id" ref="Components"/>
|
||||
<field name="name">Graphics Card</field>
|
||||
</record>
|
||||
<record id="Memory" model="product.public.category">
|
||||
<field name="parent_id" ref="Components"/>
|
||||
<field name="name">Memory</field>
|
||||
</record>
|
||||
<record id="processor" model="product.public.category">
|
||||
<field name="parent_id" ref="Components"/>
|
||||
<field name="name">Processor</field>
|
||||
</record>
|
||||
<record id="video_acquisition" model="product.public.category">
|
||||
<field name="parent_id" ref="Components"/>
|
||||
<field name="name">Video Acquisition</field>
|
||||
</record>
|
||||
|
||||
<record id="devices" model="product.public.category">
|
||||
<field name="parent_id" ref="computers"/>
|
||||
<field name="name">Devices</field>
|
||||
</record>
|
||||
|
||||
<record id="Screen" model="product.public.category">
|
||||
<field name="parent_id" ref="devices"/>
|
||||
<field name="name">Screen</field>
|
||||
</record>
|
||||
<record id="Pen_Drive" model="product.public.category">
|
||||
<field name="parent_id" ref="devices"/>
|
||||
<field name="name">Pen Drive</field>
|
||||
</record>
|
||||
<record id="External_Hard_Drive" model="product.public.category">
|
||||
<field name="parent_id" ref="devices"/>
|
||||
<field name="name">External Hard Drive</field>
|
||||
</record>
|
||||
<record id="Keyboard_Mouse" model="product.public.category">
|
||||
<field name="parent_id" ref="devices"/>
|
||||
<field name="name">Keyboard / Mouse</field>
|
||||
</record>
|
||||
<record id="printer" model="product.public.category">
|
||||
<field name="parent_id" ref="devices"/>
|
||||
<field name="name">Printer</field>
|
||||
</record>
|
||||
<record id="Speakers" model="product.public.category">
|
||||
<field name="parent_id" ref="devices"/>
|
||||
<field name="name">Speakers</field>
|
||||
</record>
|
||||
<record id="Headset" model="product.public.category">
|
||||
<field name="parent_id" ref="devices"/>
|
||||
<field name="name">Headset</field>
|
||||
</record>
|
||||
<record id="Softwares" model="product.public.category">
|
||||
<field name="parent_id" ref="devices"/>
|
||||
<field name="name">Softwares</field>
|
||||
</record>
|
||||
|
||||
<record id="laptops" model="product.public.category">
|
||||
<field name="parent_id" ref="computers"/>
|
||||
<field name="name">Laptops</field>
|
||||
</record>
|
||||
|
||||
<record id="sub_computers" model="product.public.category">
|
||||
<field name="parent_id" ref="computers"/>
|
||||
<field name="name">Computers</field>
|
||||
</record>
|
||||
|
||||
<record id="Computer_all_in_one" model="product.public.category">
|
||||
<field name="parent_id" ref="sub_computers"/>
|
||||
<field name="name">Computer all-in-one</field>
|
||||
</record>
|
||||
<record id="server" model="product.public.category">
|
||||
<field name="parent_id" ref="sub_computers"/>
|
||||
<field name="name">Server</field>
|
||||
</record>
|
||||
|
||||
<record id="network" model="product.public.category">
|
||||
<field name="parent_id" ref="computers"/>
|
||||
<field name="name">Network</field>
|
||||
</record>
|
||||
|
||||
<record id="Switch" model="product.public.category">
|
||||
<field name="parent_id" ref="network"/>
|
||||
<field name="name">Switch</field>
|
||||
</record>
|
||||
<record id="Modem_Router" model="product.public.category">
|
||||
<field name="parent_id" ref="network"/>
|
||||
<field name="name">Modem & Router</field>
|
||||
</record>
|
||||
<record id="Switch" model="product.public.category">
|
||||
<field name="parent_id" ref="network"/>
|
||||
<field name="name">Switch</field>
|
||||
</record>
|
||||
|
||||
<record id="services" model="product.public.category">
|
||||
<field name="parent_id" ref="computers"/>
|
||||
<field name="name">Services</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: product.product
|
||||
-->
|
||||
|
@ -67,6 +188,7 @@
|
|||
<record id="product_product_1" model="product.product">
|
||||
<field name="name">On Site Monitoring</field>
|
||||
<field name="categ_id" ref="product_category_5"/>
|
||||
<field name="public_categ_id" ref="services"/>
|
||||
<field name="standard_price">20.5</field>
|
||||
<field name="list_price">30.75</field>
|
||||
<field name="type">service</field>
|
||||
|
@ -79,6 +201,7 @@
|
|||
<record id="product_product_2" model="product.product">
|
||||
<field name="name">On Site Assistance</field>
|
||||
<field name="categ_id" ref="product_category_5"/>
|
||||
<field name="public_categ_id" ref="services"/>
|
||||
<field name="standard_price">25.5</field>
|
||||
<field name="list_price">38.25</field>
|
||||
<field name="type">service</field>
|
||||
|
@ -91,6 +214,7 @@
|
|||
<field name="name">PC Assemble SC234</field>
|
||||
<field name="default_code">PCSC234</field>
|
||||
<field name="categ_id" ref="product_category_4"/>
|
||||
<field name="public_categ_id" ref="Computer_all_in_one"/>
|
||||
<field name="list_price">450.0</field>
|
||||
<field name="standard_price">300.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -106,10 +230,10 @@ HDD SH-1</field>
|
|||
<field name="name">PC Assemble SC349</field>
|
||||
<field name="default_code">PCSC349</field>
|
||||
<field name="categ_id" ref="product_category_4"/>
|
||||
<field name="public_categ_id" ref="Computer_all_in_one"/>
|
||||
<field name="standard_price">500.0</field>
|
||||
<field name="list_price">750.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="description_sale">19" LCD Monitor
|
||||
|
@ -122,6 +246,7 @@ HDD SH-1</field>
|
|||
<field name="name">PC Assemble + Custom (PC on Demand)</field>
|
||||
<field name="default_code">PC-DEM</field>
|
||||
<field name="categ_id" ref="product_category_4"/>
|
||||
<field name="public_categ_id" ref="services"/>
|
||||
<field name="standard_price">600.0</field>
|
||||
<field name="list_price">900.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -134,6 +259,7 @@ HDD SH-1</field>
|
|||
<field name="name">15” LCD Monitor</field>
|
||||
<field name="default_code">LCD15</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Screen"/>
|
||||
<field name="standard_price">800.0</field>
|
||||
<field name="list_price">1200.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -144,6 +270,7 @@ HDD SH-1</field>
|
|||
<field name="name">17” LCD Monitor</field>
|
||||
<field name="default_code">LCD17</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Screen"/>
|
||||
<field name="standard_price">880.0</field>
|
||||
<field name="list_price">1350.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -154,6 +281,7 @@ HDD SH-1</field>
|
|||
<field name="name">USB Keyboard, QWERTY</field>
|
||||
<field name="default_code">KeyQ</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Keyboard_Mouse"/>
|
||||
<field name="standard_price">10.0</field>
|
||||
<field name="list_price">13.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -164,6 +292,7 @@ HDD SH-1</field>
|
|||
<field name="name">USB Keyboard, AZERTY</field>
|
||||
<field name="default_code">KeyA</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Keyboard_Mouse"/>
|
||||
<field name="standard_price">10.0</field>
|
||||
<field name="list_price">13.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -174,6 +303,7 @@ HDD SH-1</field>
|
|||
<field name="name">Mouse, Optical</field>
|
||||
<field name="default_code">M-Opt</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Keyboard_Mouse"/>
|
||||
<field name="standard_price">12.50</field>
|
||||
<field name="list_price">14</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -184,6 +314,7 @@ HDD SH-1</field>
|
|||
<field name="name">Mouse, Laser</field>
|
||||
<field name="default_code">M-Las</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Keyboard_Mouse"/>
|
||||
<field name="standard_price">14</field>
|
||||
<field name="list_price">16.50</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -194,6 +325,7 @@ HDD SH-1</field>
|
|||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="default_code">M-Wir</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Keyboard_Mouse"/>
|
||||
<field name="standard_price">18</field>
|
||||
<field name="list_price">12.50</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -204,6 +336,7 @@ HDD SH-1</field>
|
|||
<field name="name">RAM SR5</field>
|
||||
<field name="default_code">RAM-SR5</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Memory"/>
|
||||
<field name="standard_price">78.0</field>
|
||||
<field name="list_price">85.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -214,6 +347,7 @@ HDD SH-1</field>
|
|||
<field name="name">RAM SR2</field>
|
||||
<field name="default_code">RAM-SR2</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Memory"/>
|
||||
<field name="standard_price">87.0</field>
|
||||
<field name="list_price">95.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -224,6 +358,7 @@ HDD SH-1</field>
|
|||
<field name="name">RAM SR3</field>
|
||||
<field name="default_code">RAM-SR3</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="Memory"/>
|
||||
<field name="standard_price">80.0</field>
|
||||
<field name="list_price">85.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -234,6 +369,7 @@ HDD SH-1</field>
|
|||
<field name="name">Computer Case</field>
|
||||
<field name="default_code">C-Case</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="case"/>
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="list_price">25.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -244,6 +380,7 @@ HDD SH-1</field>
|
|||
<field name="name">HDD SH-1</field>
|
||||
<field name="default_code">HDD-SH1</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="HDD"/>
|
||||
<field name="standard_price">860.0</field>
|
||||
<field name="list_price">975.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -254,6 +391,7 @@ HDD SH-1</field>
|
|||
<field name="name">HDD SH-2</field>
|
||||
<field name="default_code">HDD-SH2</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="HDD"/>
|
||||
<field name="standard_price">1020.0</field>
|
||||
<field name="list_price">1150.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -264,6 +402,7 @@ HDD SH-1</field>
|
|||
<field name="name">HDD on Demand</field>
|
||||
<field name="default_code">HDD-DEM</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="HDD"/>
|
||||
<field name="standard_price">1100.0</field>
|
||||
<field name="list_price">1250.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -275,6 +414,7 @@ HDD SH-1</field>
|
|||
<field name="name">Motherboard I9P57</field>
|
||||
<field name="default_code">MBi9</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="motherboard"/>
|
||||
<field name="standard_price">1700.0</field>
|
||||
<field name="list_price">1950.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -285,6 +425,7 @@ HDD SH-1</field>
|
|||
<field name="name">Motherboard A20Z7</field>
|
||||
<field name="default_code">MBa20</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="motherboard"/>
|
||||
<field name="standard_price">1790.0</field>
|
||||
<field name="list_price">2000.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -295,6 +436,7 @@ HDD SH-1</field>
|
|||
<field name="name">Processor Core i5 2.70 Ghz</field>
|
||||
<field name="default_code">CPUi5</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="processor"/>
|
||||
<field name="standard_price">2010.0</field>
|
||||
<field name="list_price">2100.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -305,6 +447,7 @@ HDD SH-1</field>
|
|||
<field name="name">Processor AMD 8-Core</field>
|
||||
<field name="default_code">CPUa8</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="processor"/>
|
||||
<field name="standard_price">1910.0</field>
|
||||
<field name="list_price">1980.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -315,6 +458,7 @@ HDD SH-1</field>
|
|||
<field name="name">Graphics Card</field>
|
||||
<field name="default_code">CARD</field>
|
||||
<field name="categ_id" ref="product_category_8"/>
|
||||
<field name="public_categ_id" ref="graphics_card"/>
|
||||
<field name="standard_price">876.0</field>
|
||||
<field name="list_price">885.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -325,6 +469,7 @@ HDD SH-1</field>
|
|||
<field name="name">Laptop E5023</field>
|
||||
<field name="default_code">LAP-E5</field>
|
||||
<field name="categ_id" ref="product_category_4"/>
|
||||
<field name="public_categ_id" ref="laptops"/>
|
||||
<field name="standard_price">2870.0</field>
|
||||
<field name="list_price">2950.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -339,6 +484,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Laptop S3450</field>
|
||||
<field name="default_code">LAP-S3</field>
|
||||
<field name="categ_id" ref="product_category_4"/>
|
||||
<field name="public_categ_id" ref="laptops"/>
|
||||
<field name="standard_price">3000.0</field>
|
||||
<field name="list_price">3245.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -353,6 +499,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Laptop Customized</field>
|
||||
<field name="default_code">LAP-CUS</field>
|
||||
<field name="categ_id" ref="product_category_4"/>
|
||||
<field name="public_categ_id" ref="laptops"/>
|
||||
<field name="standard_price">3300.0</field>
|
||||
<field name="list_price">3645.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -364,6 +511,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">External Hard disk</field>
|
||||
<field name="default_code">EXT-HDD</field>
|
||||
<field name="categ_id" ref="product_category_6"/>
|
||||
<field name="public_categ_id" ref="External_Hard_Drive"/>
|
||||
<field name="standard_price">390.0</field>
|
||||
<field name="list_price">405.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -375,6 +523,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Pen drive, SP-2</field>
|
||||
<field name="default_code">PD-SP2</field>
|
||||
<field name="categ_id" ref="product_category_7"/>
|
||||
<field name="public_categ_id" ref="Pen_Drive"/>
|
||||
<field name="standard_price">90.0</field>
|
||||
<field name="list_price">100.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -386,6 +535,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Pen drive, SP-4</field>
|
||||
<field name="default_code">PD-SP4</field>
|
||||
<field name="categ_id" ref="product_category_7"/>
|
||||
<field name="public_categ_id" ref="Pen_Drive"/>
|
||||
<field name="standard_price">126.0</field>
|
||||
<field name="list_price">145.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -396,6 +546,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Multimedia Speakers</field>
|
||||
<field name="default_code">MM-SPK</field>
|
||||
<field name="categ_id" ref="product_category_7"/>
|
||||
<field name="public_categ_id" ref="Speakers"/>
|
||||
<field name="standard_price">134.0</field>
|
||||
<field name="list_price">150.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -407,6 +558,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Headset standard</field>
|
||||
<field name="default_code">HEAD</field>
|
||||
<field name="categ_id" ref="product_category_7"/>
|
||||
<field name="public_categ_id" ref="Headset"/>
|
||||
<field name="standard_price">57.0</field>
|
||||
<field name="list_price">62.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -418,6 +570,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Headset USB</field>
|
||||
<field name="default_code">HEAD-USB</field>
|
||||
<field name="categ_id" ref="product_category_7"/>
|
||||
<field name="public_categ_id" ref="Headset"/>
|
||||
<field name="standard_price">60.0</field>
|
||||
<field name="list_price">65.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -430,6 +583,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Webcam</field>
|
||||
<field name="default_code">WCAM</field>
|
||||
<field name="categ_id" ref="product_category_7"/>
|
||||
<field name="public_categ_id" ref="video_acquisition"/>
|
||||
<field name="standard_price">38.0</field>
|
||||
<field name="list_price">45.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -463,6 +617,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Printer, All-in-one</field>
|
||||
<field name="default_code">PRINT</field>
|
||||
<field name="categ_id" ref="product_category_6"/>
|
||||
<field name="public_categ_id" ref="printer"/>
|
||||
<field name="standard_price">4258.0</field>
|
||||
<field name="list_price">4410.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -475,6 +630,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Ink Cartridge</field>
|
||||
<field name="default_code">INK</field>
|
||||
<field name="categ_id" ref="product_category_6"/>
|
||||
<field name="public_categ_id" ref="printer"/>
|
||||
<field name="standard_price">60.0</field>
|
||||
<field name="list_price">65.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -486,6 +642,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Toner Cartridge</field>
|
||||
<field name="default_code">TONER</field>
|
||||
<field name="categ_id" ref="product_category_6"/>
|
||||
<field name="public_categ_id" ref="printer"/>
|
||||
<field name="standard_price">66.0</field>
|
||||
<field name="list_price">70.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -497,6 +654,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Windows 7 Professional</field>
|
||||
<field name="default_code">Win7</field>
|
||||
<field name="categ_id" ref="product_category_9"/>
|
||||
<field name="public_categ_id" ref="Softwares"/>
|
||||
<field name="standard_price">330.0</field>
|
||||
<field name="list_price">470.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -508,6 +666,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Windows Home Server 2011</field>
|
||||
<field name="default_code">WServer</field>
|
||||
<field name="categ_id" ref="product_category_9"/>
|
||||
<field name="public_categ_id" ref="Softwares"/>
|
||||
<field name="standard_price">540.0</field>
|
||||
<field name="list_price">620.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -519,6 +678,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Office Suite</field>
|
||||
<field name="default_code">OSuite</field>
|
||||
<field name="categ_id" ref="product_category_9"/>
|
||||
<field name="public_categ_id" ref="Softwares"/>
|
||||
<field name="standard_price">110.0</field>
|
||||
<field name="list_price">170.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -531,6 +691,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Zed+ Antivirus</field>
|
||||
<field name="default_code">Zplus</field>
|
||||
<field name="categ_id" ref="product_category_9"/>
|
||||
<field name="public_categ_id" ref="Softwares"/>
|
||||
<field name="standard_price">235.0</field>
|
||||
<field name="list_price">280.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -542,6 +703,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">GrapWorks Software</field>
|
||||
<field name="default_code">GRAPs/w</field>
|
||||
<field name="categ_id" ref="product_category_9"/>
|
||||
<field name="public_categ_id" ref="Softwares"/>
|
||||
<field name="standard_price">155.0</field>
|
||||
<field name="list_price">173.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -554,6 +716,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Router R430</field>
|
||||
<field name="default_code">ROUT_430</field>
|
||||
<field name="categ_id" ref="product_category_6"/>
|
||||
<field name="public_categ_id" ref="Modem_Router"/>
|
||||
<field name="standard_price">55.0</field>
|
||||
<field name="list_price">60.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -565,6 +728,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Datacard</field>
|
||||
<field name="default_code">DC</field>
|
||||
<field name="categ_id" ref="product_category_6"/>
|
||||
<field name="public_categ_id" ref="Pen_Drive"/>
|
||||
<field name="standard_price">35.0</field>
|
||||
<field name="list_price">40.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -576,6 +740,7 @@ QWERTY keyboard</field>
|
|||
<field name="name">Switch, 24 ports</field>
|
||||
<field name="default_code">SW24</field>
|
||||
<field name="categ_id" ref="product_category_6"/>
|
||||
<field name="public_categ_id" ref="Switch"/>
|
||||
<field name="standard_price">55.0</field>
|
||||
<field name="list_price">70.0</field>
|
||||
<field name="type">consu</field>
|
||||
|
@ -920,6 +1085,5 @@ QWERTY keyboard</field>
|
|||
<field name="min_qty">0</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -67,6 +67,8 @@
|
|||
</h1>
|
||||
<label for="categ_id" class="oe_edit_only"/>
|
||||
<h2><field name="categ_id"/></h2>
|
||||
<label for="public_categ_id" class="oe_edit_only"/>
|
||||
<h3><field name="public_categ_id"/></h3>
|
||||
<div name="options" groups="base.group_user">
|
||||
<field name="sale_ok"/>
|
||||
<label for="sale_ok"/>
|
||||
|
@ -393,6 +395,59 @@
|
|||
</record>
|
||||
|
||||
|
||||
<!-- Product Public Categories -->
|
||||
<record id="product_public_category_form_view" model="ir.ui.view">
|
||||
<field name="name">product.public.category.form</field>
|
||||
<field name="model">product.public.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Product Categories" version="7.0">
|
||||
<sheet>
|
||||
<field name="image_medium" widget='image' class="oe_avatar oe_right"/>
|
||||
<div class="oe_left">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_public_category_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.public.category.tree</field>
|
||||
<field name="model">product.public.category</field>
|
||||
<field name="field_parent" eval="False"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product Product Categories">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="complete_name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_public_category_action" model="ir.actions.act_window">
|
||||
<field name="name">Public Categories</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.public.category</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to define a new category.
|
||||
</p><p>
|
||||
Categories are used to browse your products through the
|
||||
touchscreen interface.
|
||||
</p><p>
|
||||
If you put a photo on the category, the layout of the
|
||||
touchscreen interface will automatically. We suggest not to put
|
||||
a photo on categories for small (1024x768) screens.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="product_public_category_action" id="menu_product_public_category" parent="base.menu_product" sequence="10" />
|
||||
<!-- END -->
|
||||
|
||||
<!-- Unit of Measure -->
|
||||
|
||||
<record id="product_uom_tree_view" model="ir.ui.view">
|
||||
|
|
|
@ -18,3 +18,5 @@ access_product_product_employee,product.product employee,model_product_product,b
|
|||
access_product_template_sale_manager,product.template salemanager,model_product_template,base.group_sale_manager,1,1,1,1
|
||||
access_product_product_sale_manager,product.product salemanager,model_product_product,base.group_sale_manager,1,1,1,1
|
||||
access_product_category_sale_manager,product.category salemanager,product.model_product_category,base.group_sale_manager,1,1,1,1
|
||||
access_product_category_pos_manager,product.public.category manager,model_product_public_category,base.group_sale_manager,1,1,1,1
|
||||
access_product_category_pos_user,product.public.category user,model_product_public_category,base.group_user,1,0,0,0
|
|
|
@ -9,7 +9,7 @@ OpenERP E-Commerce
|
|||
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['website', 'sale', 'point_of_sale'],
|
||||
'depends': ['website', 'sale', 'product'],
|
||||
'data': [
|
||||
'website_sale_data.xml',
|
||||
'views/website_sale.xml',
|
||||
|
|
|
@ -53,7 +53,7 @@ class website(osv.osv):
|
|||
class Ecommerce(http.Controller):
|
||||
|
||||
def get_categories(self):
|
||||
category_obj = request.registry.get('pos.category')
|
||||
category_obj = request.registry.get('product.public.category')
|
||||
category_ids = category_obj.search(request.cr, SUPERUSER_ID, [('parent_id', '=', False)])
|
||||
categories = category_obj.browse(request.cr, SUPERUSER_ID, category_ids)
|
||||
return categories
|
||||
|
@ -76,10 +76,10 @@ class Ecommerce(http.Controller):
|
|||
('name', 'ilike', "%%%s%%" % post.get("search")),
|
||||
('description', 'ilike', "%%%s%%" % post.get("search")),
|
||||
('website_description', 'ilike', "%%%s%%" % post.get("search")),
|
||||
('product_variant_ids.pos_categ_id.name', 'ilike', "%%%s%%" % post.get("search"))]
|
||||
('product_variant_ids.public_categ_id.name', 'ilike', "%%%s%%" % post.get("search"))]
|
||||
if cat_id:
|
||||
cat_id = int(cat_id)
|
||||
domain += [('product_variant_ids.pos_categ_id.id', 'child_of', cat_id)] + domain
|
||||
domain += [('product_variant_ids.public_categ_id.id', 'child_of', cat_id)] + domain
|
||||
|
||||
step = 20
|
||||
product_count = len(product_obj.search(request.cr, request.uid, domain))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_product_product_public,product.product.public,product.model_product_product,base.group_public,1,0,0,0
|
||||
access_product_template_public,product.template.public,product.model_product_template,base.group_public,1,0,0,0
|
||||
access_point_of_sale_category_public,point_of_sale.category.public,point_of_sale.model_pos_category,base.group_public,1,0,0,0
|
||||
access_point_of_sale_category_public,product.category.public,product.model_product_public_category,base.group_public,1,0,0,0
|
|
|
@ -33,10 +33,10 @@
|
|||
<record id="product_normal_form_view" model="ir.ui.view">
|
||||
<field name="name">product.normal.form.inherit</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="sale" position="before">
|
||||
<group name="pos" string="Website">
|
||||
<group name="sale" position="inside">
|
||||
<group name="website" string="Website">
|
||||
<field name="website_published"/>
|
||||
<field name="suggested_product_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue