diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 23ad28dcb83..d0c767ba1be 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1345,7 +1345,7 @@ class account_invoice_line(osv.osv): _name = "account.invoice.line" _description = "Invoice Line" _columns = { - 'name': fields.char('Description', size=256, required=True), + 'name': fields.text('Description', required=True), 'origin': fields.char('Source', size=256, help="Reference of the document that produced this invoice."), 'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True), 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'), @@ -1357,7 +1357,6 @@ class account_invoice_line(osv.osv): 'quantity': fields.float('Quantity', required=True), 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Account')), 'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]), - 'note': fields.text('Notes'), 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True), 'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True) @@ -1430,7 +1429,8 @@ class account_invoice_line(osv.osv): domain = {} result['uos_id'] = res.uom_id.id or uom or False - result['note'] = res.description + if res.description: + result['name'] += '\n'+res.description if result['uos_id']: res2 = res.uom_id.category_id.id if res2: @@ -1524,7 +1524,7 @@ class account_invoice_line(osv.osv): def move_line_get_item(self, cr, uid, line, context=None): return { 'type':'src', - 'name': line.name[:64], + 'name': line.name.split('\n')[0][:64], 'price_unit':line.price_unit, 'quantity':line.quantity, 'price':line.price_subtotal, diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 9dcd0957145..86f6beaf3a6 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -50,24 +50,27 @@ form - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index a5b01ff5b3d..cc1c7084b64 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -265,7 +265,7 @@ class="oe_edit_only" attrs="{'invisible':['|',('carrier_id','=',False),('state','not in',('draft','sent'))]}"/> - diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py index bcae996a8ee..30edae72d9a 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -159,7 +159,7 @@ class account_analytic_line(osv.osv): details.append(line['name']) note.append(u' - '.join(map(lambda x: unicode(x) or '',details))) - curr_line['note'] = "\n".join(map(lambda x: unicode(x) or '',note)) + curr_line['name'] += "\n".join(map(lambda x: unicode(x) or '',note)) invoice_line_obj.create(cr, uid, curr_line, context=context) cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s", (last_invoice, account.id, tuple(ids))) diff --git a/addons/sale/edi/sale_order.py b/addons/sale/edi/sale_order.py index d1cbe3a98fa..b850922cbb2 100644 --- a/addons/sale/edi/sale_order.py +++ b/addons/sale/edi/sale_order.py @@ -36,7 +36,6 @@ SALE_ORDER_LINE_EDI_STRUCT = { 'price_unit': True, #custom: 'product_qty' 'discount': True, - 'notes': True, # fields used for web preview only - discarded on import 'price_subtotal': True, diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml index 31f823888d6..3a3bfc55042 100644 --- a/addons/sale/report/sale_order.rml +++ b/addons/sale/report/sale_order.rml @@ -257,7 +257,7 @@ - [[ line.name ]] + [[ format(line.name) ]] [[ ', '.join(map(lambda x: x.name, line.tax_id)) ]] @@ -275,36 +275,6 @@ [[ formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price'), currency_obj=o.pricelist_id.currency_id) ]] - - - [[ format(line.notes or removeParentNode('tr')) ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/sale/sale.py b/addons/sale/sale.py index dba32516624..eeb04cee4c6 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -831,7 +831,7 @@ class sale_order(osv.osv): def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, context=None): return { - 'name': line.name, + 'name': line.name.split('\n')[0], 'origin': order.name, 'date_planned': date_planned, 'product_id': line.product_id.id, @@ -845,7 +845,7 @@ class sale_order(osv.osv): 'procure_method': line.type, 'move_id': move_id, 'company_id': order.company_id.id, - 'note': line.notes, + 'note': '\n'.join(line.name.split('\n')[1:]), 'property_ids': [(6, 0, [x.id for x in line.property_ids])] } @@ -853,7 +853,7 @@ class sale_order(osv.osv): location_id = order.shop_id.warehouse_id.lot_stock_id.id output_id = order.shop_id.warehouse_id.lot_output_id.id return { - 'name': line.name[:250], + 'name': line.name.split('\n')[0][:250], 'picking_id': picking_id, 'product_id': line.product_id.id, 'date': date_planned, @@ -871,7 +871,7 @@ class sale_order(osv.osv): 'tracking_id': False, 'state': 'draft', #'state': 'waiting', - 'note': line.notes, + 'note': '\n'.join(line.name.split('\n')[1:]), 'company_id': order.company_id.id, 'price_unit': line.product_id.standard_price or 0.0 } @@ -887,7 +887,7 @@ class sale_order(osv.osv): 'move_type': order.picking_policy, 'sale_id': order.id, 'partner_id': order.partner_shipping_id.id, - 'note': order.note, + 'note': '\n'.join(line.name.split('\n')[1:]), 'invoice_state': (order.order_policy=='picking' and '2binvoiced') or 'none', 'company_id': order.company_id.id, } @@ -1129,7 +1129,6 @@ class sale_order_line(osv.osv): 'move_ids': fields.one2many('stock.move', 'sale_line_id', 'Inventory Moves', readonly=True), 'discount': fields.float('Discount', digits=(16, 2), readonly=True, states={'draft': [('readonly', False)]}), 'number_packages': fields.function(_number_packages, type='integer', string='Number Packages'), - 'notes': fields.text('Notes'), 'th_weight': fields.float('Weight', readonly=True, states={'draft': [('readonly', False)]}), 'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'Status', required=True, readonly=True, help='* The \'Draft\' state is set when the related sales order in draft state. \ @@ -1222,7 +1221,6 @@ class sale_order_line(osv.osv): 'uos_id': uos_id, 'product_id': line.product_id.id or False, 'invoice_line_tax_id': [(6, 0, [x.id for x in line.tax_id])], - 'note': line.notes, 'account_analytic_id': line.order_id.project_id and line.order_id.project_id.id or False, } diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 26d655a0e07..506dce0cdea 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -214,9 +214,9 @@ - - - %% + + + %% diff --git a/addons/sale/stock.py b/addons/sale/stock.py index 83cd8f89e11..c4e505a80e8 100644 --- a/addons/sale/stock.py +++ b/addons/sale/stock.py @@ -108,7 +108,6 @@ class stock_picking(osv.osv): 'invoiced': True, 'invoice_lines': [(4, invoice_line_id)], }) - invoice_line_obj.write(cursor, user, [invoice_line_id], {'note': move_line.sale_line_id.notes,}) return super(stock_picking, self)._invoice_line_hook(cursor, user, move_line, invoice_line_id) def _invoice_hook(self, cursor, user, picking, invoice_id):