Skip to content

Commit d26254f

Browse files
committed
[IMP] fieldservice_sale: Pricelist on branch
1 parent 46af96f commit d26254f

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed

fieldservice_sale/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Copyright (C) 2018 Open Source Integrators
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3-
43
{
54
'name': 'Field Service - Sales',
65
'version': '12.0.2.4.0',
@@ -15,6 +14,7 @@
1514
],
1615
'data': [
1716
'security/ir.model.access.csv',
17+
'views/fsm_branch.xml',
1818
'views/fsm_location.xml',
1919
'views/fsm_order.xml',
2020
'views/product_template.xml',

fieldservice_sale/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
33

44
from . import (
5+
fsm_branch,
56
fsm_location,
67
fsm_order,
78
product_template,
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (C) 2020 Open Source Integrators
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
from odoo import fields, models
4+
5+
6+
class FSMBranch(models.Model):
7+
_inherit = 'fsm.branch'
8+
9+
pricelist_id = fields.Many2one(
10+
'product.pricelist', string='Default Pricelist',
11+
help="Default pricelist for new customers of this branch.")

fieldservice_sale/readme/ROADMAP.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
The roadmap of the Field Service application is documented on
2-
`Github <https://github.com/OCA/field-service/issues/1>`_.
1+
* Provide a mapping between an address and the branch and use it to set the
2+
pricelist of a new partner
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<odoo>
2+
3+
<record id="fsm_branch_form_view_pricelist" model="ir.ui.view">
4+
<field name="name">fsm.branch.form.pricelist</field>
5+
<field name="model">fsm.branch</field>
6+
<field name="inherit_id" ref="fieldservice.fsm_branch_form_view"/>
7+
<field name="arch" type="xml">
8+
<field name="partner_id" position="after">
9+
<field name="pricelist_id" groups="product.group_sale_pricelist" />
10+
</field>
11+
</field>
12+
</record>
13+
14+
</odoo>

0 commit comments

Comments
 (0)