Merge lp:~openerp-dev/openobject-addons/7.0-bug-1205717-msh into lp:openobject-addons/7.0

Proposed by Mohammed Shekha(Open ERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 9842
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-bug-1205717-msh
Merge into: lp:openobject-addons/7.0
Diff against target: 52 lines (+13/-6)
2 files modified
account/account_invoice.py (+5/-3)
product/product.py (+8/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-bug-1205717-msh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Vinay Rana (OpenERP) Pending
Martin Trigaux (OpenERP) Pending
Review via email: mp+206481@code.launchpad.net

Description of the change

Hello,

Fixed the issue of description in product_id_change, description_sale should be copied to customer invoice line and description_purchase should be copied to supplier invoice line.

Demo: Account -> Customer Invoice/Supplier Invoice -> Add Invoice line, Description field will having value of product.description field(product.code + product.name + product.description), it should be product.description_sale for customer invoice line and product.description_purchase for supplier invoice line.

Back-ported from trunk.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Schema changes in stable will not be merged. This has already been improved in trunk at 8743 with revision info:<email address hidden>. So I would close this merge proposal.

Thanks,

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

sorry my bad its not schema changes but however the sales and purchase order should be improved too to get the related sales and purchase description.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

I mean the product.description

Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Needs Information
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Ok there is already a merge proposal available for my last comment
https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-603905-dhs/+merge/206345

So this seems good and can be merged.

Thanks,

review: Approve

Unmerged revisions

9842. By Mohammed Shekha(OpenERP)<email address hidden>

[FIX]Account: Fixed the issue of description in product_id_change, description_sale should be copied to customer invoice line and description_purchase should be copied to supplier invoice line.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_invoice.py'
2--- account/account_invoice.py 2014-02-05 10:03:24 +0000
3+++ account/account_invoice.py 2014-02-14 13:02:58 +0000
4@@ -1495,21 +1495,23 @@
5 if a:
6 result['account_id'] = a
7
8+ result['name'] = res.partner_ref
9 if type in ('out_invoice', 'out_refund'):
10 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)
11+ if res.description_sale:
12+ result['name'] += '\n'+res.description_sale
13 else:
14 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)
15+ if res.description_purchase:
16+ result['name'] += '\n'+res.description_purchase
17 tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
18
19 if type in ('in_invoice', 'in_refund'):
20 result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
21 else:
22 result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
23- result['name'] = res.partner_ref
24
25 result['uos_id'] = uom_id or res.uom_id.id
26- if res.description:
27- result['name'] += '\n'+res.description
28
29 domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}
30
31
32=== modified file 'product/product.py'
33--- product/product.py 2013-09-09 14:04:14 +0000
34+++ product/product.py 2014-02-14 13:02:58 +0000
35@@ -296,9 +296,14 @@
36 _columns = {
37 'name': fields.char('Name', size=128, required=True, translate=True, select=True),
38 'product_manager': fields.many2one('res.users','Product Manager'),
39- 'description': fields.text('Description',translate=True),
40- 'description_purchase': fields.text('Purchase Description',translate=True),
41- 'description_sale': fields.text('Sale Description',translate=True),
42+ 'description': fields.text('Description',translate=True,
43+ help="A precise description of the Product, used only for internal information purposes."),
44+ 'description_purchase': fields.text('Purchase Description',translate=True,
45+ help="A description of the Product that you want to communicate to your customers. "
46+ "This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"),
47+ 'description_sale': fields.text('Sale Description',translate=True,
48+ help="A description of the Product that you want to communicate to your suppliers. "
49+ "This description will be copied to every Purchase Order, Reception and Supplier Invoice/Refund."),
50 '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."),
51 '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."),
52 'rental': fields.boolean('Can be Rent'),