changeset 777d5e34c6af in modules/stock:default details: https://hg.tryton.org/modules/stock?cmd=changeset;node=777d5e34c6af description: Add help text
issue6401 review34861002 diffstat: configuration.py | 26 +++++-- inventory.py | 43 ++++++++---- location.py | 52 +++++++++----- move.py | 36 +++++++--- period.py | 9 +- product.py | 36 ++++++---- shipment.py | 188 ++++++++++++++++++++++++++++++++++++------------------ 7 files changed, 258 insertions(+), 132 deletions(-) diffs (1037 lines): diff -r 9872e817351e -r 777d5e34c6af configuration.py --- a/configuration.py Wed Oct 31 18:17:35 2018 +0100 +++ b/configuration.py Tue Dec 04 12:25:45 2018 +0100 @@ -17,7 +17,9 @@ 'stock.location', "Internal Shipment Transit", required=True, domain=[ ('type', '=', 'storage'), - ]) + ], + help="The default location used for stock that is in transit between " + "warehouses.") def default_func(field_name): @@ -51,42 +53,52 @@ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.in'), - ])) + ], + help="Used to generate the number given to supplier shipments.")) shipment_in_return_sequence = fields.MultiValue(fields.Many2One( 'ir.sequence', "Supplier Return Shipment Sequence", required=True, domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.in.return'), - ])) + ], + help="Used to generate the number given to supplier return " + "shipments.")) shipment_out_sequence = fields.MultiValue(fields.Many2One( 'ir.sequence', "Customer Shipment Sequence", required=True, domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.out'), - ])) + ], + help="Used to generate the number given to customer " + "shipments.")) shipment_out_return_sequence = fields.MultiValue(fields.Many2One( 'ir.sequence', "Customer Return Shipment Sequence", required=True, domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.out.return'), - ])) + ], + help="Used to generate the number given to customer return " + "shipments.")) shipment_internal_sequence = fields.MultiValue(fields.Many2One( 'ir.sequence', "Internal Shipment Sequence", required=True, domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.internal'), - ])) + ], + help="Used to generate the number given to internal " + "shipments.")) inventory_sequence = fields.MultiValue(fields.Many2One( 'ir.sequence', "Inventory Sequence", required=True, domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.inventory'), - ])) + ], + help="Used to generate the number given to inventories.")) shipment_internal_transit = fields.MultiValue(shipment_internal_transit) @classmethod diff -r 9872e817351e -r 777d5e34c6af inventory.py --- a/inventory.py Wed Oct 31 18:17:35 2018 +0100 +++ b/inventory.py Tue Dec 04 12:25:45 2018 +0100 @@ -26,20 +26,25 @@ 'Stock Inventory' __name__ = 'stock.inventory' _rec_name = 'number' - number = fields.Char('Number', readonly=True) + number = fields.Char('Number', readonly=True, + help="The main identifier for the inventory.") location = fields.Many2One( 'stock.location', 'Location', required=True, domain=[('type', '=', 'storage')], states={ 'readonly': (Eval('state') != 'draft') | Eval('lines', [0]), }, - depends=['state']) + depends=['state'], + help="The location inventoried.") date = fields.Date('Date', required=True, states={ 'readonly': (Eval('state') != 'draft') | Eval('lines', [0]), }, - depends=['state']) + depends=['state'], + help="The date of the stock count.") lost_found = fields.Many2One( 'stock.location', 'Lost and Found', required=True, - domain=[('type', '=', 'lost_found')], states=STATES, depends=DEPENDS) + domain=[('type', '=', 'lost_found')], states=STATES, depends=DEPENDS, + help="Used for the balancing entries needed when the stock is " + "corrected.") lines = fields.One2Many( 'stock.inventory.line', 'inventory', 'Lines', states={ @@ -57,9 +62,11 @@ states={ 'readonly': (Eval('state') != 'draft') | Eval('lines', [0]), }, - depends=['state']) + depends=['state'], + help="The company the inventory is associated with.") state = fields.Selection( - INVENTORY_STATES, 'State', readonly=True, select=True) + INVENTORY_STATES, 'State', readonly=True, select=True, + help="The current state of the inventory.") @classmethod def __setup__(cls): @@ -290,7 +297,8 @@ ('type', '=', 'goods'), ('consumable', '=', False), ], states=_states, depends=_depends) - uom = fields.Function(fields.Many2One('product.uom', 'UOM'), 'get_uom') + uom = fields.Function(fields.Many2One('product.uom', 'UOM', + help="The unit in which the quantity is specified."), 'get_uom') unit_digits = fields.Function(fields.Integer('Unit Digits'), 'get_unit_digits') expected_quantity = fields.Float('Expected Quantity', required=True, @@ -298,17 +306,20 @@ states={ 'invisible': Eval('id', -1) < 0, }, - depends=['unit_digits']) + depends=['unit_digits'], + help="The quantity the system calculated should be in the location.") quantity = fields.Float('Quantity', digits=(16, Eval('unit_digits', 2)), - states=_states, depends=['unit_digits'] + _depends) + states=_states, depends=['unit_digits'] + _depends, + help="The actual quantity found in the location.") moves = fields.One2Many('stock.move', 'origin', 'Moves', readonly=True) inventory = fields.Many2One('stock.inventory', 'Inventory', required=True, ondelete='CASCADE', states={ 'readonly': _states['readonly'] & Bool(Eval('inventory')), }, - depends=_depends) + depends=_depends, + help="The inventory the line belongs to.") inventory_state = fields.Function( fields.Selection(INVENTORY_STATES, 'Inventory State'), 'on_change_with_inventory_state') @@ -574,7 +585,8 @@ ('consumable', '=', False), ], [])], - depends=['search_model']) + depends=['search_model'], + help="The item that's counted.") search_model = fields.Function(fields.Selection( 'get_search_models', "Search Model"), 'on_change_with_search_model') @@ -600,14 +612,17 @@ line = fields.Many2One( 'stock.inventory.line', "Line", readonly=True, required=True) product = fields.Many2One('product.product', "Product", readonly=True) - uom = fields.Many2One('product.uom', "UOM", readonly=True) + uom = fields.Many2One('product.uom', "UOM", readonly=True, + help="The unit in which the quantities are specified.") quantity_resulting = fields.Float( "Resulting Quantity", digits=(16, Eval('unit_digits', 2)), - readonly=True, depends=['unit_digits']) + readonly=True, depends=['unit_digits'], + help="The total amount of the line counted so far.") quantity_added = fields.Float( "Added Quantity", digits=(16, Eval('unit_digits', 2)), required=True, - depends=['unit_digits']) + depends=['unit_digits'], + help="The quantity to add to the existing count.") unit_digits = fields.Integer("Unit Digits", readonly=True) diff -r 9872e817351e -r 777d5e34c6af location.py --- a/location.py Wed Oct 31 18:17:35 2018 +0100 +++ b/location.py Tue Dec 04 12:25:45 2018 +0100 @@ -29,7 +29,8 @@ name = fields.Char("Name", size=None, required=True, states=STATES, depends=DEPENDS, translate=True) code = fields.Char("Code", size=None, states=STATES, depends=DEPENDS, - select=True) + select=True, + help="The internal identifier used for the location.") address = fields.Many2One("party.address", "Address", states={ 'invisible': Eval('type') != 'warehouse', @@ -51,13 +52,16 @@ states={ 'invisible': Eval('type') == 'warehouse', }, - depends=['type']) + depends=['type'], + help="Used to add structure above the location.") left = fields.Integer('Left', required=True, select=True) right = fields.Integer('Right', required=True, select=True) - childs = fields.One2Many("stock.location", "parent", "Children") + childs = fields.One2Many("stock.location", "parent", "Children", + help="Used to add structure below the location.") flat_childs = fields.Boolean( "Flat Children", - help="Check to restrict to one level of children.") + help="Check to enforce a single level of children with no " + "grandchildren.") warehouse = fields.Function(fields.Many2One('stock.location', 'Warehouse'), 'get_warehouse') input_location = fields.Many2One( @@ -73,7 +77,8 @@ ('parent', '=', None), ], ], - depends=['type', 'active', 'id']) + depends=['type', 'active', 'id'], + help="Where incoming stock is received.") output_location = fields.Many2One( "stock.location", "Output", states={ 'invisible': Eval('type') != 'warehouse', @@ -85,7 +90,8 @@ ['OR', ('parent', 'child_of', [Eval('id')]), ('parent', '=', None)]], - depends=['type', 'active', 'id']) + depends=['type', 'active', 'id'], + help="Where outgoing stock is sent from.") storage_location = fields.Many2One( "stock.location", "Storage", states={ 'invisible': Eval('type') != 'warehouse', @@ -97,7 +103,8 @@ ['OR', ('parent', 'child_of', [Eval('id')]), ('parent', '=', None)]], - depends=['type', 'active', 'id']) + depends=['type', 'active', 'id'], + help="The top level location where stock is stored.") picking_location = fields.Many2One( 'stock.location', 'Picking', states={ 'invisible': Eval('type') != 'warehouse', @@ -108,13 +115,18 @@ ('parent', 'child_of', [Eval('storage_location', -1)]), ], depends=['type', 'active', 'storage_location'], - help='If empty the Storage is used') + help="Where stock is picked from.\n" + "Leave empty to use the storage location.") quantity = fields.Function( - fields.Float('Quantity'), 'get_quantity', searcher='search_quantity') + fields.Float('Quantity', + help="The amount of stock in the location."), + 'get_quantity', searcher='search_quantity') forecast_quantity = fields.Function( - fields.Float('Forecast Quantity'), 'get_quantity', - searcher='search_quantity') - cost_value = fields.Function(fields.Numeric('Cost Value'), + fields.Float('Forecast Quantity', + help="The amount of stock expected to be in the location."), + 'get_quantity', searcher='search_quantity') + cost_value = fields.Function(fields.Numeric('Cost Value', + help="The value of the stock in the location."), 'get_cost_value') @classmethod @@ -512,11 +524,10 @@ supplier_location = fields.Many2One( 'stock.location', "Supplier Location", domain=[('type', '=', 'supplier')], - help='The default source location when receiving products from the party.') + help="The default source location for stock received from the party.") customer_location = fields.Many2One( 'stock.location', "Customer Location", domain=[('type', '=', 'customer')], - help='The default destination location when sending products to the party.' - ) + help="The default destination location for stock sent to the party.") class Party(metaclass=PoolMeta): @@ -593,10 +604,10 @@ 'Products by Locations' __name__ = 'stock.products_by_locations.context' forecast_date = fields.Date( - 'At Date', help=('Allow to compute expected ' - 'stock quantities for this date.\n' - '* An empty value is an infinite date in the future.\n' - '* A date in the past will provide historical values.')) + 'At Date', + help="The date for which the stock quantity is calculated.\n" + "* An empty value calculates as far ahead as possible.\n" + "* A date in the past will provide historical values.") stock_date_end = fields.Function(fields.Date('At Date'), 'on_change_with_stock_date_end') @@ -626,7 +637,8 @@ domain=[ ('type', '=', 'warehouse'), ]) - lead_time = fields.TimeDelta('Lead Time') + lead_time = fields.TimeDelta('Lead Time', + help="The time it takes to move stock between the warehouses.") @classmethod def get_lead_time(cls, pattern): diff -r 9872e817351e -r 777d5e34c6af move.py --- a/move.py Wed Oct 31 18:17:35 2018 +0100 +++ b/move.py Tue Dec 04 12:25:45 2018 +0100 @@ -161,7 +161,8 @@ ('default_uom_category', '=', Eval('product_uom_category')), ()) ], - depends=DEPENDS + ['product_uom_category']) + depends=DEPENDS + ['product_uom_category'], + help="The product that the move is associated with.") product_uom_category = fields.Function( fields.Many2One('product.uom.category', 'Product Uom Category'), 'on_change_with_product_uom_category') @@ -169,46 +170,55 @@ domain=[ ('category', '=', Eval('product_uom_category')), ], - depends=['state', 'product_uom_category']) + depends=['state', 'product_uom_category'], + help="The unit in which the quantity is specified.") unit_digits = fields.Function(fields.Integer('Unit Digits'), 'on_change_with_unit_digits') quantity = fields.Float("Quantity", required=True, digits=(16, Eval('unit_digits', 2)), states=STATES, - depends=['state', 'unit_digits']) + depends=['state', 'unit_digits'], + help="The amount of stock moved.") internal_quantity = fields.Float('Internal Quantity', readonly=True, required=True) from_location = fields.Many2One("stock.location", "From Location", select=True, required=True, states=STATES, - depends=DEPENDS + LOCATION_DEPENDS, domain=LOCATION_DOMAIN) + depends=DEPENDS + LOCATION_DEPENDS, domain=LOCATION_DOMAIN, + help="Where the stock is moved from.") to_location = fields.Many2One("stock.location", "To Location", select=True, required=True, states=STATES, - depends=DEPENDS + LOCATION_DEPENDS, domain=LOCATION_DOMAIN) + depends=DEPENDS + LOCATION_DEPENDS, domain=LOCATION_DOMAIN, + help="Where the stock is moved to.") shipment = fields.Reference('Shipment', selection='get_shipment', - readonly=True, select=True) + readonly=True, select=True, + help="Used to group several stock moves together.") origin = fields.Reference('Origin', selection='get_origin', select=True, states={ 'readonly': Eval('state') != 'draft', }, - depends=['state']) + depends=['state'], + help="The source of the stock move.") planned_date = fields.Date("Planned Date", states={ 'readonly': (Eval('state').in_(['cancel', 'assigned', 'done']) | Eval('shipment')) }, depends=['state', 'shipment'], - select=True) + select=True, + help="When the stock is expected to be moved.") effective_date = fields.Date("Effective Date", select=True, states={ 'required': Eval('state') == 'done', 'readonly': (Eval('state').in_(['cancel', 'done']) | Eval('shipment')), }, - depends=['state', 'shipment']) + depends=['state', 'shipment'], + help="When the stock was actually moved.") state = fields.Selection([ ('staging', 'Staging'), ('draft', 'Draft'), ('assigned', 'Assigned'), ('done', 'Done'), ('cancel', 'Canceled'), - ], 'State', select=True, readonly=True) + ], 'State', select=True, readonly=True, + help="The current state of the stock move.") company = fields.Many2One('company.company', 'Company', required=True, states={ 'readonly': Eval('state') != 'draft', @@ -217,7 +227,8 @@ ('id', If(Eval('context', {}).contains('company'), '=', '!='), Eval('context', {}).get('company', -1)), ], - depends=['state']) + depends=['state'], + help="The company the stock move is associated with.") unit_price = fields.Numeric('Unit Price', digits=price_digits, states={ 'invisible': ~Eval('unit_price_required'), @@ -233,7 +244,8 @@ 'required': Bool(Eval('unit_price_required')), 'readonly': Eval('state') != 'draft', }, - depends=['unit_price_required', 'state']) + depends=['unit_price_required', 'state'], + help="The currency in which the unit price is specified.") unit_price_required = fields.Function( fields.Boolean('Unit Price Required'), 'on_change_with_unit_price_required') diff -r 9872e817351e -r 777d5e34c6af period.py --- a/period.py Wed Oct 31 18:17:35 2018 +0100 +++ b/period.py Tue Dec 04 12:25:45 2018 +0100 @@ -18,18 +18,21 @@ __name__ = 'stock.period' date = fields.Date('Date', required=True, states={ 'readonly': Eval('state') == 'closed', - }, depends=['state']) + }, depends=['state'], + help="When the stock period ends.") company = fields.Many2One('company.company', 'Company', required=True, domain=[ ('id', If(Eval('context', {}).contains('company'), '=', '!='), Eval('context', {}).get('company', -1)), - ]) + ], + help="The company the stock period is associated with.") caches = fields.One2Many('stock.period.cache', 'period', 'Caches', readonly=True) state = fields.Selection([ ('draft', 'Draft'), ('closed', 'Closed'), - ], 'State', select=True, readonly=True) + ], 'State', select=True, readonly=True, + help="The current state of the stock period.") @classmethod def __setup__(cls): diff -r 9872e817351e -r 777d5e34c6af product.py --- a/product.py Wed Oct 31 18:17:35 2018 +0100 +++ b/product.py Tue Dec 04 12:25:45 2018 +0100 @@ -65,10 +65,14 @@ class Template(metaclass=PoolMeta): __name__ = "product.template" - quantity = fields.Function(fields.Float('Quantity'), 'sum_product') - forecast_quantity = fields.Function(fields.Float('Forecast Quantity'), - 'sum_product') - cost_value = fields.Function(fields.Numeric('Cost Value'), + quantity = fields.Function(fields.Float('Quantity', + help="The amount of stock in the location."), + 'sum_product') + forecast_quantity = fields.Function(fields.Float('Forecast Quantity', + help="The amount of stock expected to be in the location."), + 'sum_product') + cost_value = fields.Function(fields.Numeric('Cost Value', + help="The value of the stock in the location."), 'sum_product') def sum_product(self, name): @@ -113,11 +117,14 @@ class Product(StockMixin, object, metaclass=PoolMeta): __name__ = "product.product" - quantity = fields.Function(fields.Float('Quantity'), 'get_quantity', - searcher='search_quantity') - forecast_quantity = fields.Function(fields.Float('Forecast Quantity'), - 'get_quantity', searcher='search_quantity') - cost_value = fields.Function(fields.Numeric('Cost Value'), + quantity = fields.Function(fields.Float('Quantity', + help="The amount of stock in the location."), + 'get_quantity', searcher='search_quantity') + forecast_quantity = fields.Function(fields.Float('Forecast Quantity', + help="The amount of stock expected to be in the location."), + 'get_quantity', searcher='search_quantity') + cost_value = fields.Function(fields.Numeric('Cost Value', + help="The value of the stock in the location."), 'get_cost_value') @classmethod @@ -293,10 +300,10 @@ 'Product by Location' __name__ = 'product.by_location.context' forecast_date = fields.Date( - 'At Date', help=('Allow to compute expected ' - 'stock quantities for this date.\n' - '* An empty value is an infinite date in the future.\n' - '* A date in the past will provide historical values.')) + 'At Date', + help="The date for which the stock quantity is calculated.\n" + "* An empty value calculates as far ahead as possible.\n" + "* A date in the past will provide historical values.") stock_date_end = fields.Function(fields.Date('At Date'), 'on_change_with_stock_date_end') @@ -414,7 +421,8 @@ warehouse = fields.Many2One('stock.location', 'Warehouse', required=True, domain=[ ('type', '=', 'warehouse'), - ]) + ], + help="The warehouse for which the quantities will be calculated.") @staticmethod def default_warehouse(): diff -r 9872e817351e -r 777d5e34c6af shipment.py --- a/shipment.py Wed Oct 31 18:17:35 2018 +0100 +++ b/shipment.py Tue Dec 04 12:25:45 2018 +0100 @@ -66,10 +66,12 @@ states={ 'readonly': Eval('state').in_(['cancel', 'done']), }, - depends=['state']) + depends=['state'], + help="When the stock was actually received.") planned_date = fields.Date('Planned Date', states={ 'readonly': Eval('state') != 'draft', - }, depends=['state']) + }, depends=['state'], + help="When the stock is expected to be received.") company = fields.Many2One('company.company', 'Company', required=True, states={ 'readonly': Eval('state') != 'draft', @@ -78,18 +80,21 @@ ('id', If(Eval('context', {}).contains('company'), '=', '!='), Eval('context', {}).get('company', -1)), ], - depends=['state']) + depends=['state'], + help="The company the shipment is associated with.") reference = fields.Char("Reference", size=None, select=True, states={ 'readonly': Eval('state') != 'draft', - }, depends=['state']) + }, depends=['state'], + help="The supplier's identifier for the shipment.") supplier = fields.Many2One('party.party', 'Supplier', states={ 'readonly': (((Eval('state') != 'draft') | Eval('incoming_moves', [0])) & Eval('supplier')), }, required=True, - depends=['state', 'supplier']) + depends=['state', 'supplier'], + help="The party that supplied the stock.") supplier_location = fields.Function(fields.Many2One('stock.location', 'Supplier Location'), 'on_change_with_supplier_location') @@ -97,13 +102,15 @@ states={ 'readonly': Eval('state') != 'draft', }, domain=[('party', '=', Eval('supplier'))], - depends=['state', 'supplier']) + depends=['state', 'supplier'], + help="The address at which the supplier can be contacted.") warehouse = fields.Many2One('stock.location', "Warehouse", required=True, domain=[('type', '=', 'warehouse')], states={ 'readonly': (Eval('state').in_(['cancel', 'done']) | Eval('incoming_moves', [0]) | Eval('inventory_moves', [0])), - }, depends=['state']) + }, depends=['state'], + help="Where the stock is received.") warehouse_input = fields.Function(fields.Many2One('stock.location', 'Warehouse Input'), 'on_change_with_warehouse_input') @@ -134,7 +141,8 @@ | ~Eval('warehouse') | ~Eval('supplier')), }, depends=['state', 'warehouse', 'supplier_location', - 'warehouse_input', 'warehouse_storage', 'company']), + 'warehouse_input', 'warehouse_storage', 'company'], + help="The moves that bring the stock into the warehouse."), 'get_incoming_moves', setter='set_incoming_moves') inventory_moves = fields.Function(fields.One2Many('stock.move', 'shipment', 'Inventory Moves', @@ -152,13 +160,15 @@ Eval('warehouse_input') == Eval('warehouse_storage')), }, depends=['state', 'warehouse', 'warehouse_input', - 'warehouse_storage', 'company']), + 'warehouse_storage', 'company'], + help="The moves that put the stock away into the storage area."), 'get_inventory_moves', setter='set_inventory_moves') moves = fields.One2Many('stock.move', 'shipment', 'Moves', domain=[('company', '=', Eval('company'))], readonly=True, depends=['company']) origins = fields.Function(fields.Char('Origins'), 'get_origins') - number = fields.Char('Number', size=None, select=True, readonly=True) + number = fields.Char('Number', size=None, select=True, readonly=True, + help="The main identifier for the shipment.") received_by = employee_field("Received By") done_by = employee_field("Done By") state = fields.Selection([ @@ -166,7 +176,8 @@ ('done', 'Done'), ('cancel', 'Canceled'), ('received', 'Received'), - ], 'State', readonly=True) + ], 'State', readonly=True, + help="The current state of the shipment.") @classmethod def __setup__(cls): @@ -474,11 +485,13 @@ states={ 'readonly': Eval('state').in_(['cancel', 'done']), }, - depends=['state']) + depends=['state'], + help="When the stock was actually returned.") planned_date = fields.Date('Planned Date', states={ 'readonly': Eval('state') != 'draft', - }, depends=['state']) + }, depends=['state'], + help="When the stock is expected to be returned.") company = fields.Many2One('company.company', 'Company', required=True, states={ 'readonly': Eval('state') != 'draft', @@ -487,19 +500,23 @@ ('id', If(Eval('context', {}).contains('company'), '=', '!='), Eval('context', {}).get('company', -1)), ], - depends=['state']) - number = fields.Char('Number', size=None, select=True, readonly=True) + depends=['state'], + help="The company the shipment is associated with.") + number = fields.Char('Number', size=None, select=True, readonly=True, + help="The main identifier for the shipment.") reference = fields.Char("Reference", size=None, select=True, states={ 'readonly': Eval('state') != 'draft', - }, depends=['state']) + }, depends=['state'], + help="The supplier's identifier for the shipment.") supplier = fields.Many2One('party.party', 'Supplier', states={ 'readonly': (((Eval('state') != 'draft') | Eval('moves', [0])) & Eval('supplier', 0)), }, required=True, - depends=['state', 'supplier']) + depends=['state', 'supplier'], + help="The party that supplied the stock.") delivery_address = fields.Many2One('party.address', 'Delivery Address', states={ 'readonly': Eval('state') != 'draft', @@ -507,17 +524,20 @@ domain=[ ('party', '=', Eval('supplier')) ], - depends=['state', 'supplier']) + depends=['state', 'supplier'], + help="Where the stock is sent to.") from_location = fields.Many2One('stock.location', "From Location", required=True, states={ 'readonly': (Eval('state') != 'draft') | Eval('moves', [0]), }, domain=[('type', 'in', ['storage', 'view'])], - depends=['state']) + depends=['state'], + help="Where the stock is moved from.") to_location = fields.Many2One('stock.location', "To Location", required=True, states={ 'readonly': (Eval('state') != 'draft') | Eval('moves', [0]), }, domain=[('type', '=', 'supplier')], - depends=['state']) + depends=['state'], + help="Where the stock is moved to.") moves = fields.One2Many('stock.move', 'shipment', 'Moves', states={ 'readonly': (((Eval('state') != 'draft') | ~Eval('from_location')) @@ -537,7 +557,8 @@ [])), ('company', '=', Eval('company')), ], - depends=['state', 'from_location', 'to_location', 'company']) + depends=['state', 'from_location', 'to_location', 'company'], + help="The moves that return the stock to the supplier.") origins = fields.Function(fields.Char('Origins'), 'get_origins') assigned_by = employee_field("Assigned By") done_by = employee_field("Done By") @@ -547,7 +568,8 @@ ('assigned', 'Assigned'), ('waiting', 'Waiting'), ('done', 'Done'), - ], 'State', readonly=True) + ], 'State', readonly=True, + help="The current state of the shipment.") @classmethod def __setup__(cls): @@ -791,11 +813,13 @@ states={ 'readonly': Eval('state').in_(['cancel', 'done']), }, - depends=['state']) + depends=['state'], + help="When the stock was actually sent.") planned_date = fields.Date('Planned Date', states={ 'readonly': Eval('state') != 'draft', - }, depends=['state']) + }, depends=['state'], + help="When the stock is expected to be sent.") company = fields.Many2One('company.company', 'Company', required=True, states={ 'readonly': Eval('state') != 'draft', @@ -804,13 +828,15 @@ ('id', If(Eval('context', {}).contains('company'), '=', '!='), Eval('context', {}).get('company', -1)), ], - depends=['state']) + depends=['state'], + help="The company the shipment is associated with.") customer = fields.Many2One('party.party', 'Customer', required=True, states={ 'readonly': ((Eval('state') != 'draft') | Eval('outgoing_moves', [0])), }, - depends=['state']) + depends=['state'], + help="The party that purchased the stock.") customer_location = fields.Function(fields.Many2One('stock.location', 'Customer Location'), 'on_change_with_customer_location') delivery_address = fields.Many2One('party.address', @@ -818,17 +844,20 @@ states={ 'readonly': Eval('state') != 'draft', }, domain=[('party', '=', Eval('customer'))], - depends=['state', 'customer']) + depends=['state', 'customer'], + help="Where the stock is sent to.") reference = fields.Char("Reference", size=None, select=True, states={ 'readonly': Eval('state') != 'draft', - }, depends=['state']) + }, depends=['state'], + help="The customer's identifier for the shipment.") warehouse = fields.Many2One('stock.location', "Warehouse", required=True, states={ 'readonly': ((Eval('state') != 'draft') | Eval('outgoing_moves', [0]) | Eval('inventory_moves', [0])), }, domain=[('type', '=', 'warehouse')], - depends=['state']) + depends=['state'], + help="Where the stock is sent from.") warehouse_storage = fields.Function(fields.Many2One('stock.location', 'Warehouse Storage'), 'on_change_with_warehouse_storage') warehouse_output = fields.Function(fields.Many2One('stock.location', @@ -846,7 +875,8 @@ | ~Eval('warehouse') | ~Eval('customer')), }, depends=['state', 'warehouse', 'customer', 'warehouse_output', - 'customer_location', 'company']), + 'customer_location', 'company'], + help="The moves that send the stock to the customer."), 'get_outgoing_moves', setter='set_outgoing_moves') inventory_moves = fields.Function(fields.One2Many('stock.move', 'shipment', 'Inventory Moves', @@ -865,13 +895,15 @@ Eval('warehouse_storage') == Eval('warehouse_output')), }, depends=['state', 'warehouse', 'warehouse_storage', - 'warehouse_output', 'company']), + 'warehouse_output', 'company'], + help="The moves that pick the stock from the storage area."), 'get_inventory_moves', setter='set_inventory_moves') moves = fields.One2Many('stock.move', 'shipment', 'Moves', domain=[('company', '=', Eval('company'))], depends=['company'], readonly=True) origins = fields.Function(fields.Char('Origins'), 'get_origins') - number = fields.Char('Number', size=None, select=True, readonly=True) + number = fields.Char('Number', size=None, select=True, readonly=True, + help="The main identifier for the shipment.") assigned_by = employee_field("Assigned By") packed_by = employee_field("Packed By") done_by = employee_field("Done By") @@ -882,7 +914,8 @@ ('assigned', 'Assigned'), ('packed', 'Packed'), ('waiting', 'Waiting'), - ], 'State', readonly=True) + ], 'State', readonly=True, + help="The current state of the shipment.") @classmethod def __setup__(cls): @@ -1355,11 +1388,13 @@ states={ 'readonly': Eval('state').in_(['cancel', 'done']), }, - depends=['state']) + depends=['state'], + help="When the stock was returned.") planned_date = fields.Date('Planned Date', states={ 'readonly': Eval('state') != 'draft', - }, depends=['state']) + }, depends=['state'], + help="When the stock is expected to be returned.") company = fields.Many2One('company.company', 'Company', required=True, states={ 'readonly': Eval('state') != 'draft', @@ -1368,13 +1403,15 @@ ('id', If(Eval('context', {}).contains('company'), '=', '!='), Eval('context', {}).get('company', -1)), ], - depends=['state']) + depends=['state'], + help="The company the shipment is associated with.") customer = fields.Many2One('party.party', 'Customer', required=True, states={ 'readonly': ((Eval('state') != 'draft') | Eval('incoming_moves', [0])), }, - depends=['state']) + depends=['state'], + help="The party that purchased the stock.") customer_location = fields.Function(fields.Many2One('stock.location', 'Customer Location'), 'on_change_with_customer_location') delivery_address = fields.Many2One('party.address', @@ -1382,17 +1419,20 @@ states={ 'readonly': Eval('state') != 'draft', }, domain=[('party', '=', Eval('customer'))], - depends=['state', 'customer']) + depends=['state', 'customer'], + help="The address the customer can be contacted at.") reference = fields.Char("Reference", size=None, select=True, states={ 'readonly': Eval('state') != 'draft', - }, depends=['state']) + }, depends=['state'], + help="The customer's identifier for the shipment.") warehouse = fields.Many2One('stock.location', "Warehouse", required=True, states={ 'readonly': ((Eval('state') != 'draft') | Eval('incoming_moves', [0]) | Eval('inventory_moves', [0])), }, domain=[('type', '=', 'warehouse')], - depends=['state']) + depends=['state'], + help="Where the stock is returned.") warehouse_storage = fields.Function(fields.Many2One('stock.location', 'Warehouse Storage'), 'on_change_with_warehouse_storage') warehouse_input = fields.Function(fields.Many2One('stock.location', @@ -1412,7 +1452,8 @@ | ~Eval('warehouse') | ~Eval('customer')), }, depends=['state', 'warehouse', 'customer', 'customer_location', - 'warehouse_input', 'warehouse_storage', 'company']), + 'warehouse_input', 'warehouse_storage', 'company'], + help="The moves that bring the stock into the warehouse."), 'get_incoming_moves', setter='set_incoming_moves') inventory_moves = fields.Function(fields.One2Many('stock.move', 'shipment', 'Inventory Moves', @@ -1430,13 +1471,15 @@ Eval('warehouse_input') == Eval('warehouse_storage')), }, depends=['state', 'warehouse', 'warehouse_input', - 'warehouse_storage', 'warehouse_input', 'company']), + 'warehouse_storage', 'warehouse_input', 'company'], + help="The moves that put the stock away into the storage area."), 'get_inventory_moves', setter='set_inventory_moves') moves = fields.One2Many('stock.move', 'shipment', 'Moves', domain=[('company', '=', Eval('company'))], depends=['company'], readonly=True) origins = fields.Function(fields.Char('Origins'), 'get_origins') - number = fields.Char('Number', size=None, select=True, readonly=True) + number = fields.Char('Number', size=None, select=True, readonly=True, + help="The main identifier for the shipment.") received_by = employee_field("Received By") done_by = employee_field("Done By") state = fields.Selection([ @@ -1444,7 +1487,8 @@ ('done', 'Done'), ('cancel', 'Canceled'), ('received', 'Received'), - ], 'State', readonly=True) + ], 'State', readonly=True, + help="The current state of the shipment.") @classmethod def __setup__(cls): @@ -1736,7 +1780,8 @@ 'Assign Customer Shipment' __name__ = 'stock.shipment.out.assign.failed' inventory_moves = fields.Many2Many('stock.move', None, None, - 'Inventory Moves', readonly=True) + 'Inventory Moves', readonly=True, + help="The inventory moves that were not assigned.") @staticmethod def default_inventory_moves(): @@ -1788,22 +1833,26 @@ states={ 'readonly': Eval('state').in_(['cancel', 'done']), }, - depends=['state']) + depends=['state'], + help="When the shipment was actually completed.") planned_date = fields.Date('Planned Date', states={ 'readonly': ~Eval('state').in_(['request', 'draft']), - }, depends=['state']) + }, depends=['state'], + help="When the shipment is expected to be completed.") effective_start_date = fields.Date('Effective Start Date', states={ 'readonly': Eval('state').in_(['cancel', 'shipped', 'done']), }, - depends=['state']) + depends=['state'], + help="When the stock was actually sent.") planned_start_date = fields.Date('Planned Start Date', states={ 'readonly': ~Eval('state').in_(['request', 'draft']), 'required': Bool(Eval('planned_date')), }, - depends=['state']) + depends=['state'], + help="When the stock is expected to be sent.") company = fields.Many2One('company.company', 'Company', required=True, states={ 'readonly': ~Eval('state').in_(['request', 'draft']), @@ -1812,12 +1861,15 @@ ('id', If(Eval('context', {}).contains('company'), '=', '!='), Eval('context', {}).get('company', -1)), ], - depends=['state']) - number = fields.Char('Number', size=None, select=True, readonly=True) + depends=['state'], + help="The company the shipment is associated with.") + number = fields.Char('Number', size=None, select=True, readonly=True, + help="The main identifier for the shipment.") reference = fields.Char("Reference", size=None, select=True, states={ 'readonly': ~Eval('state').in_(['request', 'draft']), - }, depends=['state']) + }, depends=['state'], + help="The external identifiers for the shipment.") from_location = fields.Many2One('stock.location', "From Location", required=True, states={ 'readonly': (~Eval('state').in_(['request', 'draft']) @@ -1825,16 +1877,21 @@ }, domain=[ ('type', 'in', ['view', 'storage', 'lost_found']), - ], depends=['state']) + ], depends=['state'], + help="Where the stock is moved from.") to_location = fields.Many2One('stock.location', "To Location", required=True, states={ 'readonly': (~Eval('state').in_(['request', 'draft']) | Eval('moves', [0])), }, domain=[ ('type', 'in', ['view', 'storage', 'lost_found']), - ], depends=['state']) + ], depends=['state'], + help="Where the stock is moved to.") transit_location = fields.Function(fields.Many2One('stock.location', - 'Transit Location'), 'on_change_with_transit_location') + 'Transit Location', + help="Where the stock is located while it is in transit between " + "the warehouses."), + 'on_change_with_transit_location') moves = fields.One2Many('stock.move', 'shipment', 'Moves', states={ 'readonly': (Eval('state').in_(['cancel', 'assigned', 'done']) @@ -1872,7 +1929,8 @@ ('company', '=', Eval('company')), ], depends=['state', 'from_location', 'to_location', 'transit_location', - 'company']) + 'company'], + help="The moves that perform the shipment.") outgoing_moves = fields.Function(fields.One2Many('stock.move', 'shipment', 'Outgoing Moves', domain=[ @@ -1893,7 +1951,8 @@ | Eval('state').in_(['request', 'draft'])), }, depends=['from_location', 'to_location', 'transit_location', - 'state']), + 'state'], + help="The moves that send the stock out."), 'get_outgoing_moves', setter='set_moves') incoming_moves = fields.Function(fields.One2Many('stock.move', 'shipment', 'Incoming Moves', @@ -1914,7 +1973,8 @@ | Eval('state').in_(['request', 'draft'])), }, depends=['from_location', 'to_location', 'transit_location', - 'state']), + 'state'], + help="The moves that receive the stock in."), 'get_incoming_moves', setter='set_moves') assigned_by = employee_field("Received By") shipped_by = employee_field("Shipped By") @@ -1927,7 +1987,8 @@ ('assigned', 'Assigned'), ('shipped', 'Shipped'), ('done', 'Done'), - ], 'State', readonly=True) + ], 'State', readonly=True, + help="The current state of the shipment.") @classmethod def __setup__(cls): @@ -2311,14 +2372,16 @@ class Address(metaclass=PoolMeta): __name__ = 'party.address' - delivery = fields.Boolean('Delivery') + delivery = fields.Boolean('Delivery', + help="Check to send deliveries to the address.") class AssignShipmentInternalAssignFailed(ModelView): 'Assign Shipment Internal' __name__ = 'stock.shipment.internal.assign.failed' moves = fields.Many2Many('stock.move', None, None, 'Moves', - readonly=True) + readonly=True, + help="The moves that were not assigned.") @staticmethod def default_moves(): @@ -2366,7 +2429,8 @@ 'Assign Supplier Return Shipment' __name__ = 'stock.shipment.in.return.assign.failed' moves = fields.Many2Many('stock.move', None, None, 'Moves', - readonly=True) + readonly=True, + help="The moves that were not assigned.") @staticmethod def default_moves():