Skip to content

Commit

Permalink
Merge pull request #11 from GlodoUK/feat-sale_pricelist_customer_ref
Browse files Browse the repository at this point in the history
Feat sale pricelist customer ref
  • Loading branch information
kobfolson authored Mar 22, 2024
2 parents 05a96a4 + 92011b0 commit 983bc54
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sale_pricelist_customer_ref/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
===========================
SALE PRICELIST CUSTOMER REF
===========================
1 change: 1 addition & 0 deletions sale_pricelist_customer_ref/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
13 changes: 13 additions & 0 deletions sale_pricelist_customer_ref/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "sale_pricelist_customer_ref",
"summary": "Adds customer ref field to pricelist item.",
"version": "15.0.1.0.0",
"category": "Sales",
"author": "Glo Networks",
"website": "https://github.com/GlodoUK/sale",
"depends": [
"product",
],
"data": ["views/product_pricelist.xml"],
"license": "LGPL-3",
}
1 change: 1 addition & 0 deletions sale_pricelist_customer_ref/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import product_pricelist_item
7 changes: 7 additions & 0 deletions sale_pricelist_customer_ref/models/product_pricelist_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from odoo import fields, models


class ProductPricelistItem(models.Model):
_inherit = "product.pricelist.item"

customer_ref = fields.Char(string="Customer Reference")
13 changes: 13 additions & 0 deletions sale_pricelist_customer_ref/views/product_pricelist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="product_pricelist_view" model="ir.ui.view">
<field name="name">product.pricelist.view</field>
<field name="model">product.pricelist</field>
<field name="inherit_id" ref="product.product_pricelist_view" />
<field name="arch" type="xml">
<xpath expr="//field[@name='date_end']" position="after">
<field name="customer_ref" />
</xpath>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/sale_pricelist_customer_ref/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 983bc54

Please sign in to comment.