Skip to content

Commit

Permalink
[MIG] Migrated printer_zpl2 to v10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien LANGE authored and Sylvain GARANCHER committed May 1, 2017
1 parent d39d4c4 commit 0328f57
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion printer_zpl2/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You can also use the generic label printing wizard, if added on some models.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/144/9.0
:target: https://runbot.odoo-community.org/runbot/144/10.0

Known issues / Roadmap
======================
Expand Down
4 changes: 2 additions & 2 deletions printer_zpl2/__openerp__.py → printer_zpl2/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

{
'name': 'Printer ZPL II',
'version': '9.0.1.0.0',
'version': '10.0.1.0.0',
'category': 'Printer',
'author': 'SYLEAM, Odoo Community Association (OCA)',
'website': 'http://www.syleam.fr/',
'license': 'AGPL-3',
'external_dependancies': {
'external_dependencies': {
'python': ['zpl2'],
},
'depends': [
Expand Down
8 changes: 4 additions & 4 deletions printer_zpl2/models/printing_label_zpl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import time
import datetime
import logging
from openerp import api, exceptions, fields, models
from openerp.tools.translate import _
from openerp.tools.safe_eval import safe_eval
from odoo import api, exceptions, fields, models
from odoo.tools.translate import _
from odoo.tools.safe_eval import safe_eval

_logger = logging.getLogger(__name__)

Expand All @@ -34,7 +34,7 @@ class PrintingLabelZpl2(models.Model):
help='Origin point of the contents in the label, Y coordinate.')
width = fields.Integer(
required=True, default=480,
help='With of the label, will be set on the printer before printing.')
help='Width of the label, will be set on the printer before printing.')
component_ids = fields.One2many(
comodel_name='printing.label.zpl2.component', inverse_name='label_id',
string='Label Components',
Expand Down
2 changes: 1 addition & 1 deletion printer_zpl2/models/printing_label_zpl2_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import logging
from openerp import fields, models
from odoo import fields, models

_logger = logging.getLogger(__name__)

Expand Down
6 changes: 3 additions & 3 deletions printer_zpl2/tests/test_printing_label_zpl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

import mock

from openerp import exceptions
from openerp.tests.common import TransactionCase
from odoo import exceptions
from odoo.tests.common import TransactionCase


model = 'openerp.addons.base_report_to_printer.models.printing_server'
model = 'odoo.addons.base_report_to_printer.models.printing_server'


class TestPrintingLabelZpl2(TransactionCase):
Expand Down
4 changes: 2 additions & 2 deletions printer_zpl2/tests/test_wizard_print_record_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import mock

from openerp.tests.common import TransactionCase
from odoo.tests.common import TransactionCase


model = 'openerp.addons.base_report_to_printer.models.printing_server'
model = 'odoo.addons.base_report_to_printer.models.printing_server'


class TestWizardPrintRecordLabel(TransactionCase):
Expand Down
6 changes: 2 additions & 4 deletions printer_zpl2/views/printing_label_zpl2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<menuitem id="base_report_to_printer.printing_menu_label" parent="base_report_to_printer.printing_menu" name="Labels" sequence="50"/>

<record id="view_printing_label_zpl2_tree" model="ir.ui.view">
<field name="name">printing.label.zpl2.tree</field>
<field name="model">printing.label.zpl2</field>
Expand Down Expand Up @@ -119,7 +117,7 @@
</field>
</record>
<record model="ir.actions.act_window" id="act_open_printing_label_zpl2_view">
<field name="name">ZPL II</field>
<field name="name">ZPL II Labels</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">printing.label.zpl2</field>
<field name="view_type">form</field>
Expand All @@ -140,5 +138,5 @@
<field name="view_mode">tree</field>
<field name="view_id" ref="view_printing_label_zpl2_tree"/>
</record>
<menuitem id="menu_printing_label_zpl2" parent="base_report_to_printer.printing_menu_label" sequence="20" action="act_open_printing_label_zpl2_view"/>
<menuitem id="menu_printing_label_zpl2" parent="base_report_to_printer.printing_menu" sequence="20" action="act_open_printing_label_zpl2_view"/>
</odoo>
2 changes: 1 addition & 1 deletion printer_zpl2/wizard/print_record_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2016 SYLEAM (<http://www.syleam.fr>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import models, api, fields
from odoo import models, api, fields


class PrintRecordLabel(models.TransientModel):
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zpl2==1.0

0 comments on commit 0328f57

Please sign in to comment.