Skip to content

Commit

Permalink
[ADD] sale_order_view_search_inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
unaiberis authored and anajuaristi committed Oct 15, 2024
1 parent 6b380f1 commit fa521bf
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 0 deletions.
74 changes: 74 additions & 0 deletions sale_order_view_search_inherit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: https://opensource.org/licenses/LGPL-3.0
:alt: License: LGPL-3

==============================
Sale Order View Search Inherit
==============================

Overview
========

The **Sale Order View Search Inherit** module enhances the search view for sale orders in Odoo by adding filters for commitment and expected dates. This improvement allows users to better manage their sales orders through more refined search capabilities.

Features
========

- **Commitment Date Filter**: Add a filter to search for sale orders based on the commitment date.
- **Enhanced Usability**: Improves the overall usability of the sale order search interface.

Usage
=====

1. **Install the Module**:

- Install the module through the Odoo apps interface or by placing it in your Odoo addons directory.

2. **Access Sale Orders**:

- Navigate to **Sales** > **Sales Orders**.

3. **Use Filters**:

- Use the added filters for **Commitment Date** and **Expected Date** to refine your search results.

Configuration
=============

- **User Permissions**:

- Ensure that users have the necessary permissions to access sale orders and modify filters.

Testing
=======

Test the following scenarios:

- **Filter Visibility**:

- Verify that the Commitment Date and Expected Date filters are correctly displayed in the sale order search view.

- **Filter Functionality**:

- Check that the filters return the expected results based on the selected dates.

Bug Tracker
===========

For bugs and issues, please visit `GitHub Issues <https://github.com/avanzosc/sale-order-addons/issues>`_ to report or track issues.

Credits
=======

Contributors
------------

* Unai Beristain <[email protected]>

* Ana Juaristi <[email protected]>

Please contact contributors for module-specific questions, but direct support requests should be made through the official channels.

License
=======
This project is licensed under the LGPL-3 License. For more details, please refer to the LICENSE file or visit <https://opensource.org/licenses/LGPL-3.0>.
Empty file.
15 changes: 15 additions & 0 deletions sale_order_view_search_inherit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Sale Order View Search Inherit",
"version": "16.0.1.0.0",
"author": "Avanzosc",
"summary": "Inherit search view for sale orders to\
add commitment and expected dates filters.",
"website": "https://github.com/avanzosc/sale-addons",
"license": "LGPL-3",
"depends": ["sale"],
"data": [
"views/sale_order_view.xml",
],
"installable": True,
"application": False,
}
48 changes: 48 additions & 0 deletions sale_order_view_search_inherit/views/sale_order_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="sale_order_view_search_inherit_quotation" model="ir.ui.view">
<field name="name">sale.order.view.search.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_sales_order_filter" />
<field name="arch" type="xml">
<xpath expr="//filter[@name='my_sale_orders_filter']" position="after">
<filter
string="Commitment Date"
name="filter_commitment_date"
date="commitment_date"
/>
</xpath>
<xpath expr="//group" position="inside">
<filter
string="Commitment Date"
name="filter_commitment_date"
date="commitment_date"
context="{'group_by': 'commitment_date'}"
/>
</xpath>
</field>
</record>

<record id="view_quotation_tree_with_onboarding_custom" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.origin</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree_with_onboarding" />
<field name="arch" type="xml">
<xpath expr="//tree" position="inside">
<field name="origin" optional="show" />
<field name="commitment_date" optional="show" />
</xpath>
</field>
</record>
<record id="view_quotation_tree_custom" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.origin</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree" />
<field name="arch" type="xml">
<xpath expr="//tree" position="inside">
<field name="origin" optional="show" />
<field name="commitment_date" optional="show" />
</xpath>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/sale_order_view_search_inherit/setup.py
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,
)

0 comments on commit fa521bf

Please sign in to comment.