Browse Source

style fixes

pull/1025/head
Jordi Ballester 7 years ago
committed by Mourad
parent
commit
49fbb3b1b6
  1. 17
      base_exception/README.rst
  2. 5
      base_exception/__init__.py
  3. 7
      base_exception/__manifest__.py
  4. 3
      base_exception/models/__init__.py
  5. 7
      base_exception/models/base_exception.py
  6. 1
      base_exception/tests/__init__.py
  7. 5
      base_exception/tests/test_base_exception.py
  8. 3
      base_exception/tests/test_tmp_model.py
  9. 3
      base_exception/wizard/__init__.py
  10. 7
      base_exception/wizard/base_exception_confirm.py
  11. 8
      base_exception/wizard/base_exception_confirm_view.xml

17
base_exception/README.rst

@ -1,19 +1,24 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
==============
Base Exception
==============
This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...). It is not usefull for itself. You can see an example of implementation in the 'sale_exception' module. (sale-workflow repository).
This module provide an abstract model to manage customizable
exceptions to be applied on different models (sale order, invoice, ...).
It is not useful for itself. You can see an example of implementation
in the 'sale_exception' module. (sale-workflow repository) or
'purchase_exception' module (purchase-workflow repository).
Usage
=====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/10.0
:target: https://runbot.odoo-community.org/runbot/149/11.0
Bug Tracker
@ -22,11 +27,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/
server-tools/issues/new?body=module:%20
base_exception%0Aversion:%20
10.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
help us smash it by providing detailed and welcomed feedback.
Images
------

5
base_exception/__init__.py

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# © 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Copyright 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import wizard, models
from .tests import test_tmp_model

7
base_exception/__manifest__.py

@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# © 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# © 2017 Akretion (http://www.akretion.com)
# Copyright 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# Copyright 2017 Akretion (http://www.akretion.com)
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': 'Exception Rule',

3
base_exception/models/__init__.py

@ -1,5 +1,2 @@
# -*- coding: utf-8 -*-
# © 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import base_exception

7
base_exception/models/base_exception.py

@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# © 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# © 2017 Akretion (http://www.akretion.com)
# Copyright 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# Copyright 2017 Akretion (http://www.akretion.com)
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import time
from functools import wraps

1
base_exception/tests/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from . import test_tmp_model
from . import test_base_exception

5
base_exception/tests/test_base_exception.py

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# © 2016 Akretion Mourad EL HADJ MIMOUNE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Copyright 2016 Akretion Mourad EL HADJ MIMOUNE
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests import common

3
base_exception/tests/test_tmp_model.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# Copyright 2017 Akretion (http://www.akretion.com)
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
from odoo import fields, models, api

3
base_exception/wizard/__init__.py

@ -1,5 +1,2 @@
# -*- coding: utf-8 -*-
# © 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import base_exception_confirm

7
base_exception/wizard/base_exception_confirm.py

@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# © 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# © 2017 Akretion (http://www.akretion.com)
# Copyright 2011 Raphaël Valyi, Renato Lima, Guewen Baconnier, Sodexis
# Copyright 2017 Akretion (http://www.akretion.com)
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models

8
base_exception/wizard/base_exception_confirm_view.xml

@ -4,7 +4,7 @@
<field name="name">Exceptions Rules</field>
<field name="model">exception.rule.confirm</field>
<field name="arch" type="xml">
<form string="Blocked in draft due to exceptions" version="7.0">
<form string="Outstanding exceptions to manager" version="7.0">
<group>
<field name="exception_ids" nolabel="1" colspan="4">
<tree string="Exceptions Rules">
@ -13,18 +13,20 @@
</tree>
</field>
<newline/>
</group>
<group>
<field name="ignore" groups='base_exception.group_exception_rule_manager'/>
</group>
<footer>
<button name="action_confirm" string="_Close"
colspan="1" type="object" icon="gtk-ok" />
colspan="1" type="object" class="btn-primary"/>
</footer>
</form>
</field>
</record>
<record id="action_exception_rule_confirm" model="ir.actions.act_window">
<field name="name">Blocked in draft due to exceptions</field>
<field name="name">Outstanding exceptions to manage</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">exception.rule.confirm</field>
<field name="view_type">form</field>

Loading…
Cancel
Save