From 00334b38c802b055bf032d5f1653390199aba737 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Fri, 19 Jun 2026 10:02:31 +0700 Subject: [PATCH] first commit --- .gitignore | 5 +++++ README.md | 19 +++++++++++++++++++ __init__.py | 1 + __manifest__.py | 22 ++++++++++++++++++++++ views/purchase_order_views.xml | 20 ++++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 __init__.py create mode 100644 __manifest__.py create mode 100644 views/purchase_order_views.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..23a5e4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +__pycache__/ +*.pyc +*.pyo +*.pyd +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..4afe83a --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +Purchase Create Bill Button +=========================== + +This module restores the Odoo 17 behavior on the Purchase Order form view: + +* Adds "Create Bill" buttons in the header of the Purchase Order form view. +* Ensures the "Vendor Bills" smart button is visible even when there are no associated bills yet. + +Features +-------- + +* Adds a primary "Create Bill" button (highlighted) when there are items ready to be billed. +* Adds a secondary "Create Bill" button when there are no items to bill yet (allowing manual billing). +* Shows the "Vendor Bills" smart button as soon as the purchase order is confirmed. + +Usage +----- + +Install the module. Navigate to Purchase -> Orders -> Purchase Orders. Confirmed purchase orders will now feature the "Create Bill" buttons, and the smart button for "Vendor Bills" will be visible. diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..40a96af --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/__manifest__.py b/__manifest__.py new file mode 100644 index 0000000..c037b27 --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,22 @@ +{ + 'name': 'Purchase Create Bill Button', + 'version': '19.0.1.0.0', + 'category': 'Inventory/Purchase', + 'summary': 'Add Create Bill buttons and restore smart button visibility on Purchase Order form view like Odoo 17', + 'description': """ +Purchase Create Bill Button +=========================== +This module restores the Odoo 17 behaviors: +1. Adds "Create Bill" buttons in the header of the Purchase Order form view. +2. Ensures the "Vendor Bills" smart button is visible even when there are no associated bills yet. + """, + 'author': 'Suherdy Yacob', + 'depends': ['purchase'], + 'data': [ + 'views/purchase_order_views.xml', + ], + 'installable': True, + 'application': False, + 'auto_install': False, + 'license': 'LGPL-3', +} diff --git a/views/purchase_order_views.xml b/views/purchase_order_views.xml new file mode 100644 index 0000000..c5ddf04 --- /dev/null +++ b/views/purchase_order_views.xml @@ -0,0 +1,20 @@ + + + + purchase.order.form.inherit.create.bill + purchase.order + + + + +