forked from OCA/purchase-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] purchase_cancel_reason: black, isort, prettier
- Loading branch information
1 parent
d64ea8d
commit ac00d5c
Showing
15 changed files
with
118 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2013 Guewen Baconnier, Camptocamp SA | ||
# Copyright 2017 Okia SPRL | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{'name': 'Purchase Cancel Reason', | ||
'version': '10.0.1.0.0', | ||
'author': "Camptocamp,Odoo Community Association (OCA), Okia SPRL", | ||
'category': 'Purchase', | ||
'license': 'AGPL-3', | ||
'complexity': 'normal', | ||
'website': "https://github.com/OCA/purchase-workflow", | ||
'depends': [ | ||
'purchase'], | ||
'data': ['wizard/purchase_cancel_reason_view.xml', | ||
'views/purchase_order.xml', | ||
'security/ir.model.access.csv', | ||
'data/purchase_order_cancel_reason.xml', | ||
], | ||
'auto_install': False, | ||
'installable': True, | ||
} | ||
{ | ||
"name": "Purchase Cancel Reason", | ||
"version": "10.0.1.0.0", | ||
"author": "Camptocamp,Odoo Community Association (OCA), Okia SPRL", | ||
"category": "Purchase", | ||
"license": "AGPL-3", | ||
"complexity": "normal", | ||
"website": "https://github.com/OCA/purchase-workflow", | ||
"depends": ["purchase"], | ||
"data": [ | ||
"wizard/purchase_cancel_reason_view.xml", | ||
"views/purchase_order.xml", | ||
"security/ir.model.access.csv", | ||
"data/purchase_order_cancel_reason.xml", | ||
], | ||
"auto_install": False, | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2013 Guewen Baconnier, Camptocamp SA | ||
# Copyright 2017 Okia SPRL | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo import fields, models | ||
|
||
|
||
class PurchaseOrder(models.Model): | ||
_inherit = 'purchase.order' | ||
_inherit = "purchase.order" | ||
|
||
cancel_reason_id = fields.Many2one( | ||
'purchase.order.cancel.reason', | ||
"purchase.order.cancel.reason", | ||
string="Reason for cancellation", | ||
readonly=True, | ||
ondelete="restrict") | ||
ondelete="restrict", | ||
) | ||
|
||
|
||
class PurchaseOrderCancelReason(models.Model): | ||
_name = 'purchase.order.cancel.reason' | ||
_description = 'Purchase Order Cancel Reason' | ||
_name = "purchase.order.cancel.reason" | ||
_description = "Purchase Order Cancel Reason" | ||
|
||
name = fields.Char('Reason', required=True, translate=True) | ||
name = fields.Char("Reason", required=True, translate=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__import__('pkg_resources').declare_namespace(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__import__('pkg_resources').declare_namespace(__name__) |
1 change: 1 addition & 0 deletions
1
setup/purchase_cancel_reason/odoo/addons/purchase_cancel_reason
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../purchase_cancel_reason |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |