Add traking on some import product fields
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Product Usability module for Odoo
|
# Product Usability module for Odoo
|
||||||
@@ -29,3 +29,20 @@ class ProductTemplate(models.Model):
|
|||||||
price_history_ids = fields.One2many(
|
price_history_ids = fields.One2many(
|
||||||
'product.price.history', 'product_template_id',
|
'product.price.history', 'product_template_id',
|
||||||
string='Product Price History')
|
string='Product Price History')
|
||||||
|
name = fields.Char(track_visibility='onchange')
|
||||||
|
type = fields.Selection(track_visibility='onchange')
|
||||||
|
categ_id = fields.Many2one(track_visibility='onchange')
|
||||||
|
list_price = fields.Float(track_visibility='onchange')
|
||||||
|
sale_ok = fields.Boolean(track_visibility='onchange')
|
||||||
|
active = fields.Boolean(track_visibility='onchange')
|
||||||
|
state = fields.Selection(track_visibility='onchange')
|
||||||
|
weight = fields.Float(track_visibility='onchange')
|
||||||
|
weight_net = fields.Float(track_visibility='onchange')
|
||||||
|
|
||||||
|
|
||||||
|
class ProductProduct(models.Model):
|
||||||
|
_inherit = 'product.product'
|
||||||
|
|
||||||
|
default_code = fields.Char(track_visibility='onchange')
|
||||||
|
ean13 = fields.Char(track_visibility='onchange')
|
||||||
|
active = fields.Boolean(track_visibility='onchange')
|
||||||
|
|||||||
@@ -55,3 +55,9 @@ class ResPartner(models.Model):
|
|||||||
compute='_purchase_stats', string='# of Purchase Order')
|
compute='_purchase_stats', string='# of Purchase Order')
|
||||||
supplier_invoice_count = fields.Integer(
|
supplier_invoice_count = fields.Integer(
|
||||||
compute='_purchase_stats', string='# Supplier Invoices')
|
compute='_purchase_stats', string='# Supplier Invoices')
|
||||||
|
|
||||||
|
|
||||||
|
class ProductTemplate(models.Model):
|
||||||
|
_inherit = 'product.template'
|
||||||
|
|
||||||
|
purchase_ok = fields.Boolean(track_visibility='onchange')
|
||||||
|
|||||||
@@ -2,3 +2,4 @@
|
|||||||
|
|
||||||
from . import stock
|
from . import stock
|
||||||
from . import procurement
|
from . import procurement
|
||||||
|
from . import product
|
||||||
|
|||||||
14
stock_usability/product.py
Normal file
14
stock_usability/product.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from openerp import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class ProductTemplate(models.Model):
|
||||||
|
_inherit = 'product.template'
|
||||||
|
|
||||||
|
track_all = fields.Boolean(track_visibility='onchange')
|
||||||
|
track_incoming = fields.Boolean(track_visibility='onchange')
|
||||||
|
track_outgoing = fields.Boolean(track_visibility='onchange')
|
||||||
|
sale_delay = fields.Float(track_visibility='onchange')
|
||||||
Reference in New Issue
Block a user