diff --git a/purchase_order_line_menu/README.rst b/purchase_order_line_menu/README.rst new file mode 100644 index 0000000..4f1ccdd --- /dev/null +++ b/purchase_order_line_menu/README.rst @@ -0,0 +1,30 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================== +Purchase Order line view +======================== + +This module allows purchase users to view, compare, group purchase order lines. + + +Usage +===== + +To use this module, you need to go to Purchase > Purchase Order lines + + +Credits +======= + + +Contributors +------------ + +* Raphaƫl Reverdy + +Maintainer +---------- + +Akretion \ No newline at end of file diff --git a/purchase_order_line_menu/__init__.py b/purchase_order_line_menu/__init__.py new file mode 100644 index 0000000..a0fdc10 --- /dev/null +++ b/purchase_order_line_menu/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import models diff --git a/purchase_order_line_menu/__manifest__.py b/purchase_order_line_menu/__manifest__.py new file mode 100644 index 0000000..32189cb --- /dev/null +++ b/purchase_order_line_menu/__manifest__.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Akretion (https://akretion.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Purchase Order Line menu", + "summary": "Adds a menu to see purchase order lines", + "version": "10.0.1.1.0", + "author": "Akretion", + "website": "https://github.com/akretion/odoo-usability", + "category": "Purchases", + "depends": ["purchase"], + "data": [ + 'views/purchase_order_line.xml', + ], + "license": "AGPL-3", + "installable": True, + "application": False, +} diff --git a/purchase_order_line_menu/models/__init__.py b/purchase_order_line_menu/models/__init__.py new file mode 100644 index 0000000..16dca48 --- /dev/null +++ b/purchase_order_line_menu/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import purchase_order diff --git a/purchase_order_line_menu/models/purchase_order.py b/purchase_order_line_menu/models/purchase_order.py new file mode 100644 index 0000000..eddc1fa --- /dev/null +++ b/purchase_order_line_menu/models/purchase_order.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Raphael Reverdy https://akretion.com +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models +import odoo.addons.decimal_precision as dp + + +class PurchaseOrderLine(models.Model): + _inherit = 'purchase.order.line' + + po_name = fields.Char(string="Order", related='order_id.name', store=True) + + +class PurchaseOrder(models.Model): + _inherit = 'purchase.order' + pass \ No newline at end of file diff --git a/purchase_order_line_menu/static/description/icon.png b/purchase_order_line_menu/static/description/icon.png new file mode 100644 index 0000000..c91da79 Binary files /dev/null and b/purchase_order_line_menu/static/description/icon.png differ diff --git a/purchase_order_line_menu/views/purchase_order_line.xml b/purchase_order_line_menu/views/purchase_order_line.xml new file mode 100644 index 0000000..342dec1 --- /dev/null +++ b/purchase_order_line_menu/views/purchase_order_line.xml @@ -0,0 +1,35 @@ + + + + + purchase.order.line.tree + purchase.order.line + + + + + + + + + + + + + + + + + + Purchase Order Lines + ir.actions.act_window + purchase.order.line + [] + tree,form,pivot + + + + +