Merge pull request #67 from akretion/10-add-purchase_order_line_views-change-sequence
[purchase_order_line_menu] change menu sequence
This commit is contained in:
30
purchase_order_line_menu/README.rst
Normal file
30
purchase_order_line_menu/README.rst
Normal file
@@ -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 <raphael.reverdy@akretion.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
Akretion
|
||||
2
purchase_order_line_menu/__init__.py
Normal file
2
purchase_order_line_menu/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import models
|
||||
19
purchase_order_line_menu/__manifest__.py
Normal file
19
purchase_order_line_menu/__manifest__.py
Normal file
@@ -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,
|
||||
}
|
||||
3
purchase_order_line_menu/models/__init__.py
Normal file
3
purchase_order_line_menu/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import purchase_order
|
||||
17
purchase_order_line_menu/models/purchase_order.py
Normal file
17
purchase_order_line_menu/models/purchase_order.py
Normal file
@@ -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
|
||||
BIN
purchase_order_line_menu/static/description/icon.png
Normal file
BIN
purchase_order_line_menu/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
35
purchase_order_line_menu/views/purchase_order_line.xml
Normal file
35
purchase_order_line_menu/views/purchase_order_line.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="purchase_order_line_tree" model="ir.ui.view">
|
||||
<field name="name">purchase.order.line.tree</field>
|
||||
<field name="model">purchase.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Purchase Order Lines" create="false">
|
||||
<field name="po_name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="name"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="price_subtotal" widget="monetary"/>
|
||||
<field name="date_planned" widget="date"/>
|
||||
<field name="state" />
|
||||
<field name="partner_id" string="Vendor" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="purchase_order_line_action" model="ir.actions.act_window">
|
||||
<field name="name">Purchase Order Lines</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">purchase.order.line</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="view_mode">tree,form,pivot</field>
|
||||
<field name="view_id" ref="purchase_order_line_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="purchase_order_line_action" id="purchase_order_line_action_id"
|
||||
parent="purchase.menu_procurement_management"
|
||||
sequence="8"/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user