forked from OCA/product-attribute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.py
35 lines (29 loc) · 1.16 KB
/
profile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# coding: utf-8
# © 2015 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields
class ProductProfile(models.Model):
_inherit = 'product.profile'
def _get_types(self):
return [('product', 'Stockable Product'),
('consu', 'Consumable'),
('service', 'Service')]
sale_ok = fields.Boolean(
string='Can be Sold',
help="Specify if the product can be selected in a sales order line.")
purchase_ok = fields.Boolean(
string='Can be Purchased')
available_in_pos = fields.Boolean()
profile_default_route_ids = fields.Many2many(
'stock.location.route',
string='Routes',
domain="[('product_selectable', '=', True)]",
help="Depending on the modules installed, this will allow "
"you to define the route of the product: "
"whether it will be bought, manufactured, MTO/MTS,...")
profile_default_categ_id = fields.Many2one(
'product.category',
string='Default category')
product_manager = fields.Many2one(
'res.users',
string='Product Manager')