Skip to content

Commit

Permalink
code cleanup following review by sandy carter and leonardo pistone
Browse files Browse the repository at this point in the history
  • Loading branch information
gurneyalex committed Feb 6, 2014
1 parent fe62d80 commit 6f927c7
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 79 deletions.
2 changes: 1 addition & 1 deletion account_invoice_reorder_lines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
Expand All @@ -18,6 +19,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
from . import invoice

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * invoice_sequence
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-09-30 12:00+0000\n"
"PO-Revision-Date: 2014-02-06 11:39+0100\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_invoice_reorder_lines
#: model:ir.model,name:account_invoice_reorder_lines.model_account_invoice_line
msgid "Invoice Line"
msgstr ""


4 changes: 2 additions & 2 deletions account_invoice_reorder_lines/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-09-30 12:00+0000\n"
"PO-Revision-Date: 2013-09-30 12:00+0000\n"
"PO-Revision-Date: 2014-02-06 11:37+0100\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand All @@ -17,5 +17,5 @@ msgstr ""
#. module: account_invoice_reorder_lines
#: model:ir.model,name:account_invoice_reorder_lines.model_account_invoice_line
msgid "Invoice Line"
msgstr "Ligne de Facturation"
msgstr "Ligne de facturation"

38 changes: 0 additions & 38 deletions account_invoice_reorder_lines/i18n/invoice_sequence.pot

This file was deleted.

2 changes: 2 additions & 0 deletions account_invoice_reorder_lines/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
Expand All @@ -20,6 +21,7 @@
##############################################################################
from openerp.osv import orm


class account_invoice_line(orm.Model):
_inherit = 'account.invoice.line'
_order = 'invoice_id desc, sequence, id'
12 changes: 0 additions & 12 deletions account_invoice_reorder_lines/invoice_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,10 @@
<openerp>
<data>

<!--record model="ir.ui.view" id="view_invoice_line_form">
<field name="name">Invoice Line</field>
<field name="model">account.invoice.line</field>
<field name="inherit_id" ref="account.view_invoice_line_form"/>
<field name="arch" type="xml">
<field name="invoice_line_tax_id" position="after">
<field name="sequence" />
</field>
</field>
</record-->

<record id="invoice_supplier_form" model="ir.ui.view">
<field name="name">account.invoice.supplier.form2</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form" />
<!--field name="priority">2</field-->
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_line']/tree[@string='Invoice lines']/field[@name='product_id']" position="before">
<field name="sequence" widget="handle"/>
Expand Down
24 changes: 11 additions & 13 deletions purchase_order_reorder_lines/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,19 @@
#
##############################################################################
{
'name' : 'Purchase order lines with sequence number',
'version' : '0.1',
'category' : 'Purchase Management',
'name': 'Purchase order lines with sequence number',
'version': '0.1',
'category': 'Purchase Management',
'description': '''
Provide a new field on the purchase order form, allowing to manage the lines order.
''',
'author' : 'Camptocamp',
'website' : 'http://www.camptocamp.com',
'depends' : ['purchase', 'stock_picking_reorder_lines', 'account_invoice_reorder_lines'],
'data' : ['purchase_view.xml'],
'demo' : [],
'test' : [],
'author': 'Camptocamp',
'website': 'http://www.camptocamp.com',
'depends': ['purchase', 'stock_picking_reorder_lines', 'account_invoice_reorder_lines'],
'data': ['purchase_view.xml'],
'demo': [],
'test': [],
'installable': True,
'auto_install' : False,
'application' : False,
'auto_install': False,
'application': False,
}

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
24 changes: 11 additions & 13 deletions stock_picking_reorder_lines/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,19 @@
#
##############################################################################
{
'name' : 'Stock picking lines with sequence number',
'version' : '0.1',
'category' : 'Warehouse Management',
'name': 'Stock picking lines with sequence number',
'version': '0.1',
'category': 'Warehouse Management',
'description': '''
Provide a new field on stock moves, allowing to manage the orders of moves in a picking.
''',
'author' : 'Camptocamp',
'website' : 'http://www.camptocamp.com',
'depends' : ['stock', 'sale', 'sale_stock'],
'data' : ['stock_view.xml'],
'demo' : [],
'test' : [],
'author': 'Camptocamp',
'website': 'http://www.camptocamp.com',
'depends': ['stock', 'sale', 'sale_stock'],
'data': ['stock_view.xml'],
'demo': [],
'test': [],
'installable': True,
'auto_install' : False,
'application' : False,
'auto_install': False,
'application': False,
}

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3 changes: 3 additions & 0 deletions stock_picking_reorder_lines/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

from openerp.osv import orm, fields


class stock_move(orm.Model):
_inherit = 'stock.move'
_columns = {
Expand All @@ -30,6 +31,7 @@ class stock_move(orm.Model):
_defaults = {'sequence': 10,
}


class stock_picking(orm.Model):
_inherit = 'stock.picking'

Expand All @@ -40,6 +42,7 @@ def _prepare_invoice_line(self, cr, uid, group, picking, move_line, invoice_id,
res['sequence'] = move_line.sequence
return res


class sale_order(orm.Model):
_inherit = 'sale.order'

Expand Down

0 comments on commit 6f927c7

Please sign in to comment.