OpenERP::OOM::Object
package Package::OpenERP::Object::Account; use 5.010; use OpenERP::OOM::Object; openerp_model 'account.account'; has active => (is => 'rw', isa => 'Bool'); # Active has code => (is => 'rw', isa => 'Str'); # (required) Code ... relationship 'consolidated_children' => ( key => 'child_consol_ids', type => 'many2many', class => 'Account', ); # Consolidated Children ... 1;
Use this module to create the 'objects' for your models. It also implicitly loads Moose too.
The class is linked to a model in OpenERP.
Specify the model in OpenERP.
An internal method that hooks up the Moose internals and implicitly makes your new classes inherit from OpenERP::OOM::Object::Base. See the OpenERP::OOM::Object::Base documentation for a list of the methods your objects will have by default.
Used to specify relationships between this object and others in OpenERP.
Possible options for the type are many2one, one2many and many2many. These are specified in OpenERP in those terms.
Used to indicate links with other systems. Typically this is to another table in DBIC at the moment.
The key field is in OpenERP and is used for the ids of the objects to link to.
The class specifies a link class that is used to follow the link. These are in the namespace OpenERP::OOM::Link. When class is set to DBIC this means it loads OpenERP::OOM::Link::DBIC to follow the link to the DBIC rows.
Possible options for type are single and multiple.
single
multiple
has_link 'details' => ( key => 'x_dbic_link_id', type => 'single', class => 'DBIC', args => {class => 'AuctionHouseDetails'}, );
Copyright (C) 2011 OpusVL
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install OpenERP::OOM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenERP::OOM
CPAN shell
perl -MCPAN -e shell install OpenERP::OOM
For more information on module installation, please visit the detailed CPAN module installation guide.