~openerp-chinese-team/openerp-china/openerp-china

« back to all changes in this revision

Viewing changes to oecn_sale_hidecost/product.py

  • Committer: Jeff Wang
  • Date: 2012-03-21 03:58:32 UTC
  • Revision ID: jeff@openerp.cn-20120321035832-3z8dc86hyz7b5fl2
Only sales manager can view the cost

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- encoding:utf-8 -*-
 
2
# __author__ = jeff@openerp.cn
 
3
 
 
4
from osv import osv, fields
 
5
from tools.translate import _
 
6
 
 
7
#-------------------------------------------
 
8
# Products
 
9
#-------------------------------------------
 
10
class product_template(osv.osv):
 
11
    _inherit = "product.template"
 
12
    _columns = {
 
13
        'standard_price': fields.float('Cost Price', required=True, \
 
14
                          read='base.group_sale_manager',                                  
 
15
                          digits_compute=dp.get_precision('Purchase Price'), \
 
16
                          help="Product's cost for accounting stock valuation. It is the base price for the supplier price."),
 
17
    }
 
18
class product_template()
 
19