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

[ADD] sale_properties: Add sale_properties module #204

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
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
Empty file added okr_management/__manifest__.py
Empty file.
1 change: 1 addition & 0 deletions sale_properties/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions sale_properties/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
'name': 'Sale Properties',
'version': "17.0.1.0.0",
'summary': '',
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
'images': [
],
'depends': [
'crm',
'sale_management'
],
'data': [
'views/sale_order_views.xml',
],
'installable': True,
'auto_install': False,
'application': False,
}
2 changes: 2 additions & 0 deletions sale_properties/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import crm_team
from . import sale_order
6 changes: 6 additions & 0 deletions sale_properties/models/crm_team.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from odoo import fields, models

class CrmTeam(models.Model):
_inherit = 'crm.team'

so_properties_definition = fields.PropertiesDefinition('Properties Definition')
9 changes: 9 additions & 0 deletions sale_properties/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from odoo import fields, models

class SaleOrder(models.Model):
_inherit = 'sale.order'

sale_properties = fields.Properties(
string='Sale Properties',
definition='team_id.so_properties_definition'
)
25 changes: 25 additions & 0 deletions sale_properties/views/sale_order_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sale_order_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.website.sale</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.sale_order_tree"/>
<field name="arch" type="xml">
<field name="invoice_status" position="after">
<field name="sale_properties"/>
</field>
</field>
</record>


<record id="sale_order_form_properties" model="ir.ui.view">
<field name="name">sale.order.inherited.form.properties</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="sale_order_template_id" position="after">
<field name="sale_properties" columns="2"/>
</field>
</field>
</record>
</odoo>