[IMP]stock_*: Improvement in model description
Purpose of this commit is to give description more "business oriented" because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers. Related Task ID : 37311
This commit is contained in:
committed by
Yannick Tivisse
parent
53e8aba1ab
commit
e13efbd8b4
@@ -11,7 +11,7 @@ _logger = logging.getLogger(__name__)
|
||||
|
||||
class DeliveryCarrier(models.Model):
|
||||
_name = 'delivery.carrier'
|
||||
_description = "Carrier"
|
||||
_description = "Delivery Methods"
|
||||
_order = 'sequence, id'
|
||||
|
||||
''' A Shipping Provider
|
||||
|
||||
@@ -49,6 +49,7 @@ class PutAwayStrategy(models.Model):
|
||||
class FixedPutAwayStrategy(models.Model):
|
||||
_name = 'stock.fixed.putaway.strat'
|
||||
_order = 'sequence'
|
||||
_description = 'Fixed Putaway Strategy on Location'
|
||||
|
||||
product_id = fields.Many2one('product.product', 'Product')
|
||||
putaway_id = fields.Many2one('product.putaway', 'Put Away Method', required=True)
|
||||
|
||||
@@ -12,7 +12,7 @@ from odoo.tools.float_utils import float_round, float_compare, float_is_zero
|
||||
|
||||
class StockMoveLine(models.Model):
|
||||
_name = "stock.move.line"
|
||||
_description = "Packing Operation"
|
||||
_description = "Product Moves (Stock Move Line)"
|
||||
_rec_name = "product_id"
|
||||
_order = "result_package_id desc, id"
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ from operator import itemgetter
|
||||
|
||||
class StockPackageLevel(models.Model):
|
||||
_name = 'stock.package_level'
|
||||
_description = 'Stock Package Level'
|
||||
|
||||
package_id = fields.Many2one('stock.quant.package', 'Package', required=True)
|
||||
picking_id = fields.Many2one('stock.picking', 'Picking')
|
||||
|
||||
@@ -16,7 +16,7 @@ from operator import itemgetter
|
||||
|
||||
class PickingType(models.Model):
|
||||
_name = "stock.picking.type"
|
||||
_description = "The operation type determines the picking view"
|
||||
_description = "Picking Type"
|
||||
_order = 'sequence, id'
|
||||
|
||||
name = fields.Char('Operation Type', required=True, translate=True)
|
||||
|
||||
@@ -340,7 +340,7 @@ class StockQuant(models.Model):
|
||||
class QuantPackage(models.Model):
|
||||
""" Packages containing quants and/or other packages """
|
||||
_name = "stock.quant.package"
|
||||
_description = "Physical Packages"
|
||||
_description = "Packages"
|
||||
_order = 'name'
|
||||
|
||||
name = fields.Char(
|
||||
|
||||
@@ -277,7 +277,7 @@ class ProcurementGroup(models.Model):
|
||||
sequence computed if created manually.
|
||||
"""
|
||||
_name = 'procurement.group'
|
||||
_description = 'Procurement Requisition'
|
||||
_description = 'Procurement Group'
|
||||
_order = "id desc"
|
||||
|
||||
partner_id = fields.Many2one('res.partner', 'Partner')
|
||||
|
||||
@@ -9,6 +9,7 @@ from odoo.tools import float_compare
|
||||
class StockScrap(models.Model):
|
||||
_name = 'stock.scrap'
|
||||
_order = 'id desc'
|
||||
_description = 'Scrap'
|
||||
|
||||
def _get_default_scrap_location_id(self):
|
||||
return self.env['stock.location'].search([('scrap_location', '=', True), ('company_id', 'in', [self.env.user.company_id.id, False])], limit=1).id
|
||||
|
||||
@@ -18,6 +18,7 @@ def autoIncrement():
|
||||
|
||||
class MrpStockReport(models.TransientModel):
|
||||
_name = 'stock.traceability.report'
|
||||
_description = 'Traceability Report'
|
||||
|
||||
@api.model
|
||||
def _get_move_lines(self, move_lines):
|
||||
|
||||
@@ -6,6 +6,7 @@ from odoo import api, fields, models, tools
|
||||
class ReportStockForecat(models.Model):
|
||||
_name = 'report.stock.forecast'
|
||||
_auto = False
|
||||
_description = 'Stock Forecast Report'
|
||||
|
||||
date = fields.Date(string='Date')
|
||||
product_id = fields.Many2one('product.product', string='Product', readonly=True)
|
||||
|
||||
@@ -7,6 +7,7 @@ from odoo.exceptions import UserError
|
||||
|
||||
class ReportStockRule(models.AbstractModel):
|
||||
_name = 'report.stock.report_stock_rule'
|
||||
_description = 'Stock rule report'
|
||||
|
||||
@api.model
|
||||
def _get_report_values(self, docids, data=None):
|
||||
|
||||
@@ -8,6 +8,7 @@ from odoo.exceptions import UserError
|
||||
|
||||
class ProductReplenish(models.TransientModel):
|
||||
_name = 'product.replenish'
|
||||
_description = 'Product Replenish'
|
||||
|
||||
product_id = fields.Many2one('product.product', string='Product', required=True)
|
||||
product_tmpl_id = fields.Many2one('product.template', String='Product Template', required=True)
|
||||
|
||||
@@ -7,6 +7,7 @@ from odoo.exceptions import UserError
|
||||
|
||||
class StockOverProcessedTransfer(models.TransientModel):
|
||||
_name = 'stock.overprocessed.transfer'
|
||||
_description = 'Transfer Over Processed Stock'
|
||||
|
||||
picking_id = fields.Many2one('stock.picking')
|
||||
overprocessed_product_name = fields.Char(compute='_compute_overprocessed_product_name',
|
||||
|
||||
@@ -10,6 +10,7 @@ from odoo.tools.float_utils import float_round
|
||||
class ReturnPickingLine(models.TransientModel):
|
||||
_name = "stock.return.picking.line"
|
||||
_rec_name = 'product_id'
|
||||
_description = 'Return Picking Line'
|
||||
|
||||
product_id = fields.Many2one('product.product', string="Product", required=True, domain="[('id', '=', product_id)]")
|
||||
quantity = fields.Float("Quantity", digits=dp.get_precision('Product Unit of Measure'), required=True)
|
||||
|
||||
@@ -6,6 +6,7 @@ from odoo import api, fields, models
|
||||
|
||||
class StockRulesReport(models.TransientModel):
|
||||
_name = 'stock.rules.report'
|
||||
_description = 'Stock Rules report'
|
||||
|
||||
product_id = fields.Many2one('product.product', string='Product', required=True)
|
||||
product_tmpl_id = fields.Many2one('product.template', String='Product Template', required=True)
|
||||
|
||||
@@ -6,6 +6,7 @@ from odoo import api, models, fields, tools
|
||||
|
||||
class StockTrackConfirmation(models.TransientModel):
|
||||
_name = 'stock.track.confirmation'
|
||||
_description = 'Stock Track Confirmation'
|
||||
|
||||
tracking_line_ids = fields.One2many('stock.track.line', 'wizard_id')
|
||||
inventory_id = fields.Many2one('stock.inventory', 'Inventory')
|
||||
@@ -16,6 +17,7 @@ class StockTrackConfirmation(models.TransientModel):
|
||||
|
||||
class StockTrackingLines(models.TransientModel):
|
||||
_name = 'stock.track.line'
|
||||
_description = 'Stock Track Line'
|
||||
|
||||
product_id = fields.Many2one('product.product', 'Product', readonly=True)
|
||||
tracking = fields.Selection([('lot', 'Tracked by lot'), ('serial', 'Tracked by serial number')], readonly=True)
|
||||
|
||||
@@ -7,6 +7,7 @@ from odoo.tools import float_compare
|
||||
|
||||
class StockWarnInsufficientQty(models.AbstractModel):
|
||||
_name = 'stock.warn.insufficient.qty'
|
||||
_description = 'Warn Insufficient Quantity'
|
||||
|
||||
product_id = fields.Many2one('product.product', 'Product', required=True)
|
||||
location_id = fields.Many2one( 'stock.location', 'Location', domain="[('usage', '=', 'internal')]", required=True)
|
||||
@@ -27,6 +28,7 @@ class StockWarnInsufficientQty(models.AbstractModel):
|
||||
class StockWarnInsufficientQtyScrap(models.TransientModel):
|
||||
_name = 'stock.warn.insufficient.qty.scrap'
|
||||
_inherit = 'stock.warn.insufficient.qty'
|
||||
_description = 'Warn Insufficient Scrap Quantity'
|
||||
|
||||
scrap_id = fields.Many2one('stock.scrap', 'Scrap')
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ class LandedCost(models.Model):
|
||||
|
||||
class LandedCostLine(models.Model):
|
||||
_name = 'stock.landed.cost.lines'
|
||||
_description = 'Stock Landed Cost Lines'
|
||||
_description = 'Stock Landed Cost Line'
|
||||
|
||||
name = fields.Char('Description')
|
||||
cost_id = fields.Many2one(
|
||||
@@ -253,7 +253,7 @@ class LandedCostLine(models.Model):
|
||||
|
||||
class AdjustmentLines(models.Model):
|
||||
_name = 'stock.valuation.adjustment.lines'
|
||||
_description = 'Stock Valuation Adjustment Lines'
|
||||
_description = 'Valuation Adjustment Lines'
|
||||
|
||||
name = fields.Char(
|
||||
'Description', compute='_compute_name', store=True)
|
||||
|
||||
@@ -6,7 +6,7 @@ from odoo import api, fields, models
|
||||
|
||||
class StockPickingToBatch(models.TransientModel):
|
||||
_name = 'stock.picking.to.batch'
|
||||
_description = 'Add pickings to a batch picking'
|
||||
_description = 'Batch Picking Lines'
|
||||
|
||||
batch_id = fields.Many2one('stock.picking.batch', string='Batch Picking', required=True, oldname="wave_id")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user