Merge lp:~openerp-community/stock-logistic-flows/improve-relative-imports into lp:stock-logistic-flows/6.1

Proposed by Niels Huylebroeck
Status: Merged
Merged at revision: 26
Proposed branch: lp:~openerp-community/stock-logistic-flows/improve-relative-imports
Merge into: lp:stock-logistic-flows/6.1
Diff against target: 118 lines (+15/-15)
8 files modified
picking_dispatch/picking_dispatch.py (+1/-1)
product_serial/company.py (+1/-1)
product_serial/prodlot_wizard.py (+2/-2)
product_serial/product.py (+1/-1)
product_serial/stock.py (+2/-2)
stock_move_on_hold/invoice.py (+2/-2)
stock_move_on_hold/product.py (+3/-3)
stock_move_on_hold/stock.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-community/stock-logistic-flows/improve-relative-imports
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza code review, no test Approve
Omar (Pexego) code review no test Approve
Review via email: mp+188285@code.launchpad.net

Description of the change

Minor cleaning of the imports

To post a comment you must log in.
Revision history for this message
Omar (Pexego) (omar7r) wrote :

LGTM

review: Approve (code review no test)
Revision history for this message
David BEAL (ak) (davidbeal) wrote :

Good idea to clean code but why not replace

class company(osv.osv):

by

class company(orm.Model):

with this import :

from openerp.osv import fields, orm

thanks

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM.

Well, this kind of refactorings are being more focused on v7, but, hey, it's also good for v6.1.

review: Approve (code review, no test)
Revision history for this message
Niels Huylebroeck (red15) wrote :

The idea is that I want to keep this merge small enough so everyone can
understand what's going on.

I will try to get around doing another cleanup round to replace such class
inheritance as well, but combining both becomes a bigger commit with more
chances to introduce bugs.

2013/9/30 Pedro Manuel Baeza <email address hidden>

> Review: Approve code review, no test
>
> LGTM.
>
> Well, this kind of refactorings are being more focused on v7, but, hey,
> it's also good for v6.1.
> --
>
> https://code.launchpad.net/~openerp-community/stock-logistic-flows/improve-relative-imports/+merge/188285
> Your team Stock and Logistic Core Editors is subscribed to branch
> lp:stock-logistic-flows.
>
> --
> Mailing list: https://launchpad.net/~openerp-community-reviewer
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~openerp-community-reviewer
> More help : https://help.launchpad.net/ListHelp
>

--
Niels Huylebroeck
Lead Architect -- Agaplan
Tel. : +32 (0) 93 95 98 90
Web : http://www.agaplan.eu

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'picking_dispatch/picking_dispatch.py'
2--- picking_dispatch/picking_dispatch.py 2012-12-10 10:51:23 +0000
3+++ picking_dispatch/picking_dispatch.py 2013-09-30 09:57:03 +0000
4@@ -23,7 +23,7 @@
5 from openerp.osv.orm import Model
6 from openerp.osv import osv, fields
7 from openerp.osv.osv import except_osv
8-from tools.translate import _
9+from openerp.tools.translate import _
10
11 _logger = logging.getLogger(__name__)
12
13
14=== modified file 'product_serial/company.py'
15--- product_serial/company.py 2011-10-25 13:57:35 +0000
16+++ product_serial/company.py 2013-09-30 09:57:03 +0000
17@@ -20,7 +20,7 @@
18 #
19 ##############################################################################
20
21-from osv import osv, fields
22+from openerp.osv import osv, fields
23
24 class company(osv.osv):
25 _inherit = 'res.company'
26
27=== modified file 'product_serial/prodlot_wizard.py'
28--- product_serial/prodlot_wizard.py 2011-10-25 13:57:35 +0000
29+++ product_serial/prodlot_wizard.py 2013-09-30 09:57:03 +0000
30@@ -20,8 +20,8 @@
31 #
32 ##############################################################################
33
34-from osv import osv, fields
35-from tools.translate import _
36+from openerp.osv import osv, fields
37+from openerp.tools.translate import _
38
39 def is_integer(value):
40 try:
41
42=== modified file 'product_serial/product.py'
43--- product_serial/product.py 2011-10-25 13:57:35 +0000
44+++ product_serial/product.py 2013-09-30 09:57:03 +0000
45@@ -19,7 +19,7 @@
46 #
47 ##############################################################################
48
49-from osv import fields, osv
50+from openerp.osv import fields, osv
51
52 class product_product(osv.osv):
53 _inherit = "product.product"
54
55=== modified file 'product_serial/stock.py'
56--- product_serial/stock.py 2013-05-14 16:34:57 +0000
57+++ product_serial/stock.py 2013-09-30 09:57:03 +0000
58@@ -23,9 +23,9 @@
59 #
60 ##############################################################################
61
62-from osv import fields, osv
63+from openerp.osv import fields, osv
64+from openerp.tools.translate import _
65 import hashlib
66-from tools.translate import _
67
68
69 class stock_move(osv.osv):
70
71=== modified file 'stock_move_on_hold/invoice.py'
72--- stock_move_on_hold/invoice.py 2012-03-07 12:56:37 +0000
73+++ stock_move_on_hold/invoice.py 2013-09-30 09:57:03 +0000
74@@ -19,8 +19,8 @@
75 #
76 #################################################################################
77
78-from osv import fields, osv
79-from tools.translate import _
80+from openerp.osv import fields, osv
81+from openerp.tools.translate import _
82
83 class account_invoice(osv.osv):
84
85
86=== modified file 'stock_move_on_hold/product.py'
87--- stock_move_on_hold/product.py 2013-05-14 16:34:57 +0000
88+++ stock_move_on_hold/product.py 2013-09-30 09:57:03 +0000
89@@ -19,9 +19,9 @@
90 #
91 #################################################################################
92
93-from osv import fields, osv
94-from tools.translate import _
95-import decimal_precision as dp
96+from openerp.osv import fields, osv
97+from openerp.tools.translate import _
98+import openerp.addons.decimal_precision as dp
99
100 class product_product(osv.osv):
101
102
103=== modified file 'stock_move_on_hold/stock.py'
104--- stock_move_on_hold/stock.py 2012-03-07 12:56:37 +0000
105+++ stock_move_on_hold/stock.py 2013-09-30 09:57:03 +0000
106@@ -20,9 +20,9 @@
107 #################################################################################
108
109 from datetime import datetime
110-from osv import fields, osv
111-from tools.translate import _
112-import netsvc
113+from openerp.osv import fields, osv
114+from openerp.tools.translate import _
115+from openerp import netsvc
116
117 # ----------------------------------------------------
118 # Move

Subscribers

People subscribed via source and target branches