Skip to content

Commit

Permalink
[REL] sale_exception_print to V11.
Browse files Browse the repository at this point in the history
[ADD] Models folder
[FIX] Create diferent files for classes
[FIX] File & folder names
[FIX] Update sale.exception model to exception.rule
  • Loading branch information
Valentino committed Aug 2, 2018
1 parent 9175dfb commit 567704e
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 52 deletions.
41 changes: 17 additions & 24 deletions sale_exception_print/README.rst
@@ -1,5 +1,13 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
.. |company| replace:: ADHOC SA

.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
:alt: ADHOC SA
:target: https://www.adhoc.com.ar

.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png

.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

====================
Expand All @@ -13,16 +21,14 @@ Installation

To install this module, you need to:

#. No install needed

#. Only need to install the module

Configuration
=============

To configure this module, you need to:

#. No configuration needed

#. Nothing to configure

Usage
=====
Expand All @@ -31,19 +37,9 @@ To use this module, you need to:

#. Before printing a quotation, it checks that the partner limit not exceeded.


.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.adhoc.com.ar/


.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
.. branch is "8.0" for example
Known issues / Roadmap
======================

* ...
:target: http://runbot.adhoc.com.ar/

Bug Tracker
===========
Expand All @@ -59,19 +55,16 @@ Credits
Images
------

* ADHOC SA: `Icon <http://fotos.subefotos.com/83fed853c1e15a8023b86b2b22d6145bo.png>`_.
* |company| |icon|

Contributors
------------


Maintainer
----------

.. image:: http://fotos.subefotos.com/83fed853c1e15a8023b86b2b22d6145bo.png
:alt: Odoo Community Association
:target: https://www.adhoc.com.ar
|company_logo|

This module is maintained by the ADHOC SA.
This module is maintained by the |company|.

To contribute to this module, please visit https://www.adhoc.com.ar.
To contribute to this module, please visit https://www.adhoc.com.ar.
4 changes: 2 additions & 2 deletions sale_exception_print/__init__.py 100755 → 100644
Expand Up @@ -2,5 +2,5 @@
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from . import sale
from . import wizard
from . import wizard
from . import models
6 changes: 3 additions & 3 deletions sale_exception_print/__manifest__.py
Expand Up @@ -19,19 +19,19 @@
##############################################################################
{
'name': 'Sale Exception Print',
'version': '9.0.1.2.0',
'version': '11.0.1.0.0',
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
'depends': [
'sale_exception',
],
'data': [
'view/sale_exception_view.xml'
'views/exception_rule_views.xml'
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
6 changes: 6 additions & 0 deletions sale_exception_print/models/__init__.py
@@ -0,0 +1,6 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from . import sale_order
from . import exception_rule
13 changes: 13 additions & 0 deletions sale_exception_print/models/exception_rule.py
@@ -0,0 +1,13 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import models, fields


class ExceptionRule(models.Model):
_inherit = "exception.rule"

block_print = fields.Boolean(
'Block Print',
)
10 changes: 2 additions & 8 deletions sale_exception_print/sale.py → sale_exception_print/models/sale_order.py 100755 → 100644
Expand Up @@ -10,7 +10,7 @@ class SaleOrder(models.Model):

ignore_exception_print = fields.Boolean(
'Ignore Exceptions Print',
copy=False
copy=False,
)

@api.multi
Expand All @@ -35,7 +35,7 @@ def detect_print_exceptions(self):
as a side effect, the sale order's exception_ids column is updated with
the list of exceptions related to the SO
"""
exception_obj = self.env['sale.exception']
exception_obj = self.env['exception.rule']
order_exceptions = exception_obj.search(
[('model', '=', 'sale.order'), ('block_print', '=', True)])
line_exceptions = exception_obj.search(
Expand Down Expand Up @@ -66,9 +66,3 @@ def _popup_exceptions(self):
'context': ctx
})
return action


class SaleException(models.Model):
_inherit = "sale.exception"

block_print = fields.Boolean('Block Print')
15 changes: 0 additions & 15 deletions sale_exception_print/view/sale_exception_view.xml

This file was deleted.

13 changes: 13 additions & 0 deletions sale_exception_print/views/exception_rule_views.xml
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<odoo>
<record id="view_exception_rule_form" model="ir.ui.view">
<field name="name">exception.rule.form</field>
<field name="model">exception.rule</field>
<field name="inherit_id" ref="base_exception.view_exception_rule_form"/>
<field name="arch" type="xml">
<field name="description" position="after">
<field name="block_print"/>
</field>
</field>
</record>
</odoo>

0 comments on commit 567704e

Please sign in to comment.