Skip to content

Commit

Permalink
[ADD] sale_properties: Add sale_properties module
Browse files Browse the repository at this point in the history
  • Loading branch information
rov-adhoc committed Aug 14, 2024
1 parent 25bf652 commit 83f75b5
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 0 deletions.
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>

0 comments on commit 83f75b5

Please sign in to comment.