Merge lp:~pedro.baeza/c2c-rd-addons/7.0-mrp_no_gap_imp into lp:c2c-rd-addons/7.0

Proposed by Pedro Manuel Baeza
Status: Needs review
Proposed branch: lp:~pedro.baeza/c2c-rd-addons/7.0-mrp_no_gap_imp
Merge into: lp:c2c-rd-addons/7.0
Diff against target: 82 lines (+16/-23)
3 files modified
mrp_no_gap/__init__.py (+1/-4)
mrp_no_gap/__openerp__.py (+8/-7)
mrp_no_gap/mrp.py (+7/-12)
To merge this branch: bzr merge lp:~pedro.baeza/c2c-rd-addons/7.0-mrp_no_gap_imp
Reviewer Review Type Date Requested Status
Camptocamp Pending
Review via email: mp+212335@code.launchpad.net

Description of the change

Module mrp_no_gap adapted to community conventions.

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

Hello Pedro. If you care about this module, could you port it to OCA?

Our goal is to migrate interesting addons from c2c-rd-addons, in order to avoid the bunch of unsorted stuff we have in this repository.

Unmerged revisions

969. By Pedro Manuel Baeza on 2014-03-23

[IMP] mrp_no_gap: Adapted to community standards.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp_no_gap/__init__.py'
2--- mrp_no_gap/__init__.py 2012-07-03 19:06:22 +0000
3+++ mrp_no_gap/__init__.py 2014-03-23 21:41:41 +0000
4@@ -19,7 +19,4 @@
5 # along with this program. If not, see <http://www.gnu.org/licenses/>.
6 #
7 ##############################################################################
8-
9-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
10-
11-import mrp
12+from . import mrp
13
14=== modified file 'mrp_no_gap/__openerp__.py'
15--- mrp_no_gap/__openerp__.py 2012-11-11 20:49:09 +0000
16+++ mrp_no_gap/__openerp__.py 2014-03-23 21:41:41 +0000
17@@ -20,23 +20,24 @@
18 ##############################################################################
19
20 {
21- "name" : "Production Order No Gap",
22+ "name" : "Production order no gap",
23 "version" : "1.1",
24 "author" : "Camptocamp Austria",
25 "category": 'Manufacturing',
26 'complexity': "easy",
27 "description": """
28-Sale orders no gap
29-=====================================
30+Production order no gap
31+=======================
32
33+Allows to assign production order number at the record creation, not when user
34+clicks on create button.
35 """,
36 'website': 'http://www.camptocamp.com',
37+ 'contributors': [
38+ 'Pedro M. Baeza <pedro.baeza@serviciosbaeza.com',
39+ ],
40 "depends" : ["mrp"],
41- 'init_xml': [],
42- 'update_xml': [],
43- 'demo_xml': [],
44 'installable': True,
45- 'auto_install': False,
46 }
47
48 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
49
50=== modified file 'mrp_no_gap/mrp.py'
51--- mrp_no_gap/mrp.py 2012-08-13 21:14:02 +0000
52+++ mrp_no_gap/mrp.py 2014-03-23 21:41:41 +0000
53@@ -19,12 +19,9 @@
54 # along with this program. If not, see <http://www.gnu.org/licenses/>.
55 #
56 ##############################################################################
57-
58-
59-from osv import fields, osv
60-import logging
61-
62-class mrp_production(osv.osv):
63+from openerp.osv import fields, orm
64+
65+class mrp_production(orm.Model):
66 _inherit = "mrp.production"
67
68 _defaults = {
69@@ -33,9 +30,7 @@
70
71 def create(self, cr, uid, vals, context=None):
72 if vals.get('name', '/') == '/':
73- vals.update({'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.production')})
74- return super(mrp_production, self).create(cr, uid, vals, context=context)
75-
76-mrp_production()
77-
78-
79+ vals['name'] = self.pool['ir.sequence'].get(cr, uid,
80+ 'mrp.production')
81+ return super(mrp_production, self).create(cr, uid, vals,
82+ context=context)

Subscribers

People subscribed via source and target branches