-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] account_move_line_product_category
- Loading branch information
Showing
8 changed files
with
95 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,42 @@ | ||
.. 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 | ||
|
||
============================= | ||
Account Move Product Category | ||
============================= | ||
|
||
This module extends the invoice and sale order line models to include fields for the product's category and manufacturer. It also modifies the pivot views and tree views to show these fields. | ||
|
||
Features | ||
-------- | ||
|
||
- Adds `Product Category` and `Manufacturer` fields to the Account Move Line model. | ||
- Updates the Invoice Line pivot view to include `Product Category` and `Manufacturer` fields. | ||
- Updates the Invoice Line tree view to display `Product Category` and `Manufacturer` fields. | ||
|
||
Usage | ||
----- | ||
|
||
- Go to Accounting -> Invoices -> Invoice Lines in the backend. | ||
- You will see `Product Category` and `Manufacturer` columns in the invoice line view. | ||
|
||
License | ||
------- | ||
|
||
This module is licensed under the AGPL-3 License. See `License Information <http://www.gnu.org/licenses/agpl-3.0-standalone.html>`_ | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/avanzosc/odoo-addons/issues>`_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
* Ana Juaristi <anajuaristi@avanzosc.es> | ||
* Unai Beristain <unaiberistain@avanzosc.es> | ||
|
||
Do not contact contributors directly about support or help with technical issues. |
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 @@ | ||
from . import models |
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,18 @@ | ||
{ | ||
"name": "Account Move Product Category", | ||
"version": "14.0.1.0.0", | ||
"summary": "Adds product category and manufacturer fields" | ||
"to invoice lines pivot views.", | ||
"category": "Accounting", | ||
"author": "Avanzosc", | ||
"website": "https://github.com/avanzosc/odoo-addons", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"account", | ||
"product", | ||
], | ||
"data": [ | ||
"views/account_move_line_views.xml", | ||
], | ||
"installable": True, | ||
} |
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 @@ | ||
from . import account_move_line |
11 changes: 11 additions & 0 deletions
11
account_move_line_product_category/models/account_move_line.py
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,11 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class AccountMoveLine(models.Model): | ||
_inherit = "account.move.line" | ||
|
||
product_category_id = fields.Many2one( | ||
related="product_id.categ_id", | ||
string="Product Category", | ||
store=True, | ||
) |
15 changes: 15 additions & 0 deletions
15
account_move_line_product_category/views/account_move_line_views.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_move_line_tree_inherit" model="ir.ui.view"> | ||
<field | ||
name="name" | ||
>account.move.line.tree.inherit.product.category.manufacturer</field> | ||
<field name="model">account.move.line</field> | ||
<field name="inherit_id" ref="account.view_move_line_tree" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//tree" position="inside"> | ||
<field name="product_category_id" optional="show" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |
1 change: 1 addition & 0 deletions
1
setup/account_move_line_product_category/odoo/addons/account_move_line_product_category
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 @@ | ||
../../../../account_move_line_product_category |
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, | ||
) |