bzr revid: fp@tinyerp.com-20080922055630-uqzvzyz8ws260omr
This commit is contained in:
Fabien Pinckaers 2008-09-22 07:56:30 +02:00
parent 40d93c5ec1
commit 4e634e7668
5 changed files with 52 additions and 47 deletions

View File

@ -86,8 +86,8 @@ class res_partner(osv.osv):
return [('id','in',map(lambda x:x[0], res))]
_columns = {
'credit': fields.function(_credit_debit_get, fnct_search=_credit_search, method=True, string='Total Receivable', multi='dc'),
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, method=True, string='Total Payable', multi='dc'),
'credit': fields.function(_credit_debit_get, fnct_search=_credit_search, method=True, string='Total Receivable', multi='dc', help="Total amount this customer owns you."),
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, method=True, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."),
'debit_limit': fields.float('Payable Limit'),
'property_account_payable': fields.property(
'account.account',

View File

@ -56,10 +56,10 @@ class price_type(osv.osv):
_name = "product.price.type"
_description = "Price type"
_columns = {
"name" : fields.char("Price Name", size=32, required=True, translate=True) ,
"name" : fields.char("Price Name", size=32, required=True, translate=True, help="Name of this kinf of price."),
"active" : fields.boolean("Active"),
"field" : fields.selection(_price_field_get, "Product Field", required=True),
"currency_id" : fields.many2one('res.currency', "Currency", required=True),
"field" : fields.selection(_price_field_get, "Product Field", required=True, help="Associated field in the product form."),
"currency_id" : fields.many2one('res.currency', "Currency", required=True, help="Associated currency."),
}
_defaults = {
"active": lambda *args: True,
@ -76,7 +76,7 @@ class product_pricelist_type(osv.osv):
_description = "Pricelist Type"
_columns = {
'name': fields.char('Name',size=64, required=True),
'key': fields.char('Key', size=64, required=True),
'key': fields.char('Key', size=64, required=True, help="Used in the code to select specific prices based on the context. Keep unchanged."),
}
product_pricelist_type()
@ -88,7 +88,7 @@ class product_pricelist(osv.osv):
_name = "product.pricelist"
_description = "Pricelist"
_columns = {
'name': fields.char('Name',size=64, required=True, translate=True),
'name': fields.char('Pricelist Name',size=64, required=True, translate=True),
'active': fields.boolean('Active'),
'type': fields.selection(_pricelist_type_get, 'Pricelist Type', required=True),
'version_id': fields.one2many('product.pricelist.version', 'pricelist_id', 'Pricelist Versions'),
@ -247,8 +247,8 @@ class product_pricelist_version(osv.osv):
'active': fields.boolean('Active'),
'items_id': fields.one2many('product.pricelist.item',
'price_version_id', 'Price List Items', required=True),
'date_start': fields.date('Start Date'),
'date_end': fields.date('End Date'),
'date_start': fields.date('Start Date', help="Starting date for validity of this pricelist version."),
'date_end': fields.date('End Date', help="Ending date for validity of this pricelist version."),
}
_defaults = {
'active': lambda *a: 1,
@ -320,22 +320,26 @@ class product_pricelist_item(osv.osv):
'price_discount': lambda *a: 0,
}
_columns = {
'name': fields.char('Name', size=64),
'name': fields.char('Rule Name', size=64, help="Explicit rule name for this pricelist line."),
'price_version_id': fields.many2one('product.pricelist.version', 'Price List Version', required=True, select=True),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', ondelete='cascade'),
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade'),
'categ_id': fields.many2one('product.category', 'Product Category', ondelete='cascade'),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', ondelete='cascade', help="Set a template if this rule only apply to a template of product. Keep empty for all products"),
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade', help="Set a product if this rule only apply to one product. Keep empty for all products"),
'categ_id': fields.many2one('product.category', 'Product Category', ondelete='cascade', help="Set a category of product if this rule only apply to products of a category and his childs. Keep empty for all products"),
'min_quantity': fields.integer('Min. Quantity', required=True),
'min_quantity': fields.integer('Min. Quantity', required=True, help="The rule only apply if the partner buys/sells more than this quantity."),
'sequence': fields.integer('Sequence', required=True),
'base': fields.selection(_price_field_get, 'Based on', required=True, size=-1),
'base': fields.selection(_price_field_get, 'Based on', required=True, size=-1, help="The mode of computation of the price for this rule."),
'base_pricelist_id': fields.many2one('product.pricelist', 'If Other Pricelist'),
'price_surcharge': fields.float('Price Surcharge',
digits=(16, int(config['price_accuracy']))),
'price_discount': fields.float('Price Discount', digits=(16,4)),
'price_round': fields.float('Price Rounding',
digits=(16, int(config['price_accuracy']))),
digits=(16, int(config['price_accuracy'])),
help="Sets the price so that it is a multiple of this value.\n" \
"Rounding is applied after the discount and before the surcharge.\n" \
"To have prices that ends by 9.99, set rounding 10, surcharge -0.01" \
),
'price_min_margin': fields.float('Price Min. Margin',
digits=(16, int(config['price_accuracy']))),
'price_max_margin': fields.float('Price Max. Margin',

View File

@ -250,20 +250,21 @@ class product_template(osv.osv):
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procure Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until refurnishing. 'Make to Order': When needed, purchase or produce for the procurement request."),
'rental': fields.boolean('Rentable product'),
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True),
'list_price': fields.float('Sale Price', digits=(16, int(config['price_accuracy']))),
'standard_price': fields.float('Cost Price', required=True, digits=(16, int(config['price_accuracy']))),
'list_price': fields.float('Sale Price', digits=(16, int(config['price_accuracy'])), help="Base price for computing the customer price. Sometimes called the catalog price."),
'standard_price': fields.float('Cost Price', required=True, digits=(16, int(config['price_accuracy'])), help="The cost of the product for accounting stock valorisation. It can serves as a base price for supplier price."),
'volume': fields.float('Volume', help="The weight in Kg."),
'weight': fields.float('Gross weight'),
'weight_net': fields.float('Net weight'),
'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True),
'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,
help="Standard Price: the cost price is fixed and recomputed periodically (usually at the end of the year), Average Price: the cost price is recomputed at each reception of products."),
'warranty': fields.float('Warranty (months)'),
'sale_ok': fields.boolean('Can be sold', help="Determine if the product can be visible in the list of product within a selection from a sale order line."),
'purchase_ok': fields.boolean('Can be Purchased', help="Determine if the product is visible in the list of products within a selection from a purchase order line."),
'uom_id': fields.many2one('product.uom', 'Default UoM', required=True, help="This is the default Unit of Measure used for all stock operation."),
'uom_po_id': fields.many2one('product.uom', 'Purchase UoM', required=True),
'uom_id': fields.many2one('product.uom', 'Default UoM', required=True, help="Default Unit of Measure used for all stock operation."),
'uom_po_id': fields.many2one('product.uom', 'Purchase UoM', required=True, help="Default Unit of Measure used for purchase orders. It must in the same category than the default unit of measure."),
'state': fields.selection([('',''),('draft', 'In Development'),('sellable','In Production'),('end','End of Lifecycle'),('obsolete','Obsolete')], 'Status', help="Tells the user if he can use the product or not."),
'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
help='Keep empty to use the default UOM'),
help='Used by companies that manages two unit of measure: invoicing and stock management. For example, in food industries, you will manage a stock of ham but invoice in Kg. Keep empty to use the default UOM.'),
'uos_coeff': fields.float('UOM -> UOS Coeff', digits=(16,4),
help='Coefficient to convert UOM to UOS\n'
' uom = uos * coeff'),
@ -412,7 +413,7 @@ class product_product(osv.osv):
'variants': fields.char('Variants', size=64),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True),
'ean13': fields.char('EAN13', size=13),
'packaging' : fields.one2many('product.packaging', 'product_id', 'Palettization', help="Gives the different ways to package the same product. This has no impact on the packing order and is mainly used if you use the EDI module."),
'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the packing order and is mainly used if you use the EDI module."),
'price_extra': fields.float('Variant Price Extra', digits=(16, int(config['price_accuracy']))),
'price_margin': fields.float('Variant Price Margin', digits=(16, int(config['price_accuracy']))),
}
@ -526,28 +527,28 @@ product_product()
class product_packaging(osv.osv):
_name = "product.packaging"
_description = "Conditionnement"
_description = "Packaging"
_rec_name = 'ean'
_columns = {
'name' : fields.char('Description', size=64),
'qty' : fields.float('Quantity by UL',
help="The total number of products you can put by UL."),
'ul' : fields.many2one('product.ul', 'Type of UL', required=True),
'ul_qty' : fields.integer('UL by layer'),
'rows' : fields.integer('Number of layer', required=True,
help='The number of layer on palette'),
'qty' : fields.float('Quantity by Package',
help="The total number of products you can put by palet or box."),
'ul' : fields.many2one('product.ul', 'Type of Package', required=True),
'ul_qty' : fields.integer('Package by layer'),
'rows' : fields.integer('Number of Layer', required=True,
help='The number of layer on a palet or box'),
'product_id' : fields.many2one('product.product', 'Product', select=1, ondelete='cascade', required=True),
'ean' : fields.char('EAN', size=14,
help="The EAN code of the transport unit."),
help="The EAN code of the package unit."),
'code' : fields.char('Code', size=14,
help="The code of the transport unit."),
'weight': fields.float('Palette Weight',
help='The weight of the empty palette'),
'weight_ul': fields.float('UL Weight',
'weight': fields.float('Total Package Weight',
help='The weight of a full of products palet or box.'),
'weight_ul': fields.float('Empty Package Weight',
help='The weight of the empty UL'),
'height': fields.float('Height', help='The height of the palette'),
'width': fields.float('Width', help='The width of the palette'),
'length': fields.float('Length', help='The length of the palette'),
'height': fields.float('Height', help='The height of the package'),
'width': fields.float('Width', help='The width of the package'),
'length': fields.float('Length', help='The length of the package'),
}
def _get_1st_ul(self, cr, uid, context={}):
@ -575,13 +576,13 @@ class product_supplierinfo(osv.osv):
_name = "product.supplierinfo"
_description = "Information about a product supplier"
_columns = {
'name' : fields.many2one('res.partner', 'Partner', required=True, ondelete='cascade'),
'product_name': fields.char('Partner product name', size=128),
'product_code': fields.char('Partner product reference', size=64),
'name' : fields.many2one('res.partner', 'Partner', required=True, ondelete='cascade', help="Supplier of this product"),
'product_name': fields.char('Partner Product Name', size=128, help="Name of the product for this partner, will be used when printing a request for quotation. Keep empty to use the internal one."),
'product_code': fields.char('Partner Product Code', size=64, help="Code of the product for this partner, will be used when printing a request for quotation. Keep empty to use the internal one."),
'sequence' : fields.integer('Priority'),
'qty' : fields.float('Minimal quantity', required=True),
'qty' : fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase for this supplier, expressed in the default unit of measure."),
'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),
'delay' : fields.integer('Delivery delay', required=True),
'delay' : fields.integer('Delivery Delay', required=True, help="Delay in days between the confirmation of the purchase order and the reception of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning."),
'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
}
_defaults = {

View File

@ -31,7 +31,7 @@
"version":"1.0",
"author":"Tiny",
"category":"Profile",
"depends":["mrp", "crm", "sale", "delivery","board_manufacturing"],
"depends":["mrp", "sale", "delivery","board_manufacturing"],
"demo_xml":[],
"update_xml":[
"security/ir.model.access.csv",

View File

@ -77,10 +77,10 @@ class product_product(osv.osv):
_product_outgoing_qty = _get_product_available_func(('confirmed','waiting','assigned'), ('out',))
_product_incoming_qty = _get_product_available_func(('confirmed','waiting','assigned'), ('in',))
_columns = {
'qty_available': fields.function(_product_qty_available, method=True, type='float', string='Real Stock'),
'virtual_available': fields.function(_product_virtual_available, method=True, type='float', string='Virtual Stock'),
'incoming_qty': fields.function(_product_incoming_qty, method=True, type='float', string='Incoming'),
'outgoing_qty': fields.function(_product_outgoing_qty, method=True, type='float', string='Outgoing'),
'qty_available': fields.function(_product_qty_available, method=True, type='float', string='Real Stock', help="Current quantities of products in selected locations or all internal if none have been selected."),
'virtual_available': fields.function(_product_virtual_available, method=True, type='float', string='Virtual Stock', help="Futur stock for this product according to the selected location or all internal if none have been selected. Computed as: Real Stock - Outgoing + Incoming."),
'incoming_qty': fields.function(_product_incoming_qty, method=True, type='float', string='Incoming', help="Quantities of products that are planned to arrive in selected locations or all internal if none have been selected."),
'outgoing_qty': fields.function(_product_outgoing_qty, method=True, type='float', string='Outgoing', help="Quantities of products that are planned to leave in selected locations or all internal if none have been selected."),
'track_production' : fields.boolean('Track Production Lots' , help="Force to use a Production Lot during production order"),
'track_incoming' : fields.boolean('Track Incomming Lots', help="Force to use a Production Lot during receptions"),
'track_outgoing' : fields.boolean('Track Outging Lots', help="Force to use a Production Lot during deliveries"),