Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] repair_order_partner_is_company: Add company filter in partner_id in repair_order #513

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions repair_order_partner_is_company/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: https://opensource.org/licenses/LGPL-3.0
:alt: License: LGPL-3

======================================
Repair Order Form Partner Only Company
======================================

Overview
========

The **Repair Order Form Partner Only Company** module restricts the selection of partners in the repair order form to only companies.

Features
========

- **Restricts Partner Selection**:

- The `partner_id` field in the repair order form will only display partners that are companies.

Usage
=====

1. **Install the Module**:

- Install the **Repair Order Form Partner Only Company** module from the Apps menu.

2. **Open Repair Orders**:

- Navigate to *Repairs* → *Repair Orders*.

- The `partner_id` field will only show partners marked as companies.

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

If you encounter any issues, please report them on the GitHub repository at `GitHub Issues <https://github.com/avanzosc/odoo-addons/issues>`_.

Credits
=======

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

* Ana Juaristi <anajuaristi@avanzosc.es>
* Unai Beristain <unaiberistain@avanzosc.es>

For specific questions or support, please contact the contributors.

License
=======

This project is licensed under the LGPL-3 License. For more details, refer to the LICENSE file or visit <https://opensource.org/licenses/LGPL-3.0>.
1 change: 1 addition & 0 deletions repair_order_partner_is_company/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# No necesita lógica Python, solo vistas XML
12 changes: 12 additions & 0 deletions repair_order_partner_is_company/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Repair Order Form Partner Only Company",
"version": "16.0.1.0.0",
"category": "Repair",
"author": "Avanzosc",
"license": "LGPL-3",
"depends": ["repair"],
"data": ["views/repair_order_view.xml"],
"installable": True,
"application": False,
"website": "https://github.com/avanzosc/mrp-addons",
}
15 changes: 15 additions & 0 deletions repair_order_partner_is_company/views/repair_order_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_repair_order_form_inherit" model="ir.ui.view">
<field name="name">repair.order.form.partner.only.company</field>
<field name="model">repair.order</field>
<field name="inherit_id" ref="repair.view_repair_order_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute
name="domain"
>[('is_company', '=', True), ('customer_rank', '&gt;', 0)]</attribute>
</xpath>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/repair_order_partner_is_company/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,
)
Loading