[IMP] Document the description fields on Products, and assume that invoices must get either the Purchase Description or the Sale Description.
lp bug: https://launchpad.net/bugs/1101146 fixed bzr revid: ls@numerigraphe.fr-20130118113309-vpq65omrvges1th8
This commit is contained in:
parent
5542fcfb58
commit
2590541607
|
@ -1454,8 +1454,13 @@ class account_invoice_line(osv.osv):
|
|||
|
||||
if type in ('out_invoice', 'out_refund'):
|
||||
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
|
||||
if res.description_sale:
|
||||
result['name'] += '\n'+res.description_sale
|
||||
else:
|
||||
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
|
||||
if res.description_purchase:
|
||||
result['name'] += '\n'+res.description_purchase
|
||||
|
||||
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
|
||||
|
||||
if type in ('in_invoice', 'in_refund'):
|
||||
|
@ -1465,8 +1470,6 @@ class account_invoice_line(osv.osv):
|
|||
result['name'] = res.partner_ref
|
||||
|
||||
result['uos_id'] = uom_id or res.uom_id.id
|
||||
if res.description:
|
||||
result['name'] += '\n'+res.description
|
||||
|
||||
domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}
|
||||
|
||||
|
|
|
@ -296,9 +296,14 @@ class product_template(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Name', size=128, required=True, translate=True, select=True),
|
||||
'product_manager': fields.many2one('res.users','Product Manager'),
|
||||
'description': fields.text('Description',translate=True),
|
||||
'description_purchase': fields.text('Purchase Description',translate=True),
|
||||
'description_sale': fields.text('Sale Description',translate=True),
|
||||
'description': fields.text('Description',translate=True,
|
||||
help="A precise description of the Product, used only for internal information purposes."),
|
||||
'description_purchase': fields.text('Purchase Description',translate=True,
|
||||
help="A description of the Product that you want to communicate to your customers. "
|
||||
"This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"),
|
||||
'description_sale': fields.text('Sale Description',translate=True,
|
||||
help="A description of the Product that you want to communicate to your suppliers. "
|
||||
"This description will be copied to every Purchase Order, Reception and Supplier Invoice/Refund."),
|
||||
'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."),
|
||||
'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'),
|
||||
|
|
Loading…
Reference in New Issue