-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] repair_order_partner_is_company: Add company filter in partner_…
…id in repair_order
- Loading branch information
Showing
6 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# No necesita lógica Python, solo vistas XML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/odoo-addons", | ||
} |
15 changes: 15 additions & 0 deletions
15
repair_order_partner_is_company/views/repair_order_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', '>', 0)]</attribute> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |
1 change: 1 addition & 0 deletions
1
setup/repair_order_partner_is_company/odoo/addons/repair_order_partner_is_company
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../repair_order_partner_is_company |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |