2014-05-09 19:07 GMT+02:00 Cédric Krier <cedric.kr...@b2ck.com>: > On 09 May 18:36, Albert Cervera i Areny wrote: > > 2014-05-09 18:13 GMT+02:00 Cédric Krier <cedric.kr...@b2ck.com>: > > > On 04 May 10:53, Albert Cervera i Areny wrote: > > >> Again, probably do not understand. Let's define the model. > > >> > > >> Do you want to add what your model would look like in the wiki and > > >> continue the discussion from there? > > > > > > I did not edit the wiki, I let you the authority. > > > Here is the design I have: > > > > Looks good to me in general. However I'd like to re-introduce the > > OperationType concept. Design and reason below: > > Ok so my answer is: > > > > > > > > > > class BOM: > > > operations = fields.One2Many() > > > > > > > > > class OperationTemplate: > > > bom = fields.Many2One() > > > sequence = fields.Integer() > > > time = fields.Float() > > > operator = fields.Selection(['linear', 'constant']) > > > asset_resources = fields.One2Many() > > > employee_resources = fields.One2Many() >
There is a problem with this design and it is that it does not show how many resources are required. Let's say that you have a process that requires one machine and two people for a whole hour to produce a unit. You could set: time = 1 hour operator = linear asset_resources = [machine_type_1] employee_resources = ?? > > > > > > > > > class AssetResource: > > > product = fields.Many2One() > > > > > > > > > class EmployeResource: > > > group = fields.Many2One() > > > > > > > > > class Production: > > > operations = fields.One2Many() > > > > > > > > > class Operation: > > > production = fields.Many2One() > > > sequence = fields.Integer() > template = fields.Many2One() > > > time = fields.Float() > > > assets = fields.One2Many() > > > employees = fields.One2Many() > > > > > > > > > class OperationAsset: > > > product = fields.Many2One() > > > lot = fields.Many2One() # Optional > > > > > > > > > class OperationEmployee: > > > group = fields.Many2One() > > > employee = fields.Many2One() # Optional > > > > The reason for adding OperationType is because it allows the same you > > have with a product. Let me explain: > > > > Currently you can design a BOM and start producing. During production > > employees introduce the real quantities of products consumed. This > > allows the manager later aggregate historic data to check if the > > planned quantities for each of the products were actually the > > quantities planned and so he can change the bom accordingly if needed. > > > > With operation type you can create the operations in the BOM and > > during production employees introduce the real time spent but if we > > just have a "description" we cannot make any analysis of where we're > > spending most of our time. We just know that a given machine or > > employee group is spending more time than expected but not doing what. > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: cedric.kr...@b2ck.com > Tel: +32 472 54 46 59 > Website: http://www.b2ck.com/ > -- Albert Cervera i Areny Tel. 93 553 18 03 @albertnan www.NaN-tic.com