← Back to team overview

openerp-connector-community team mailing list archive

Re: Help me understand jobs and backend ids

 

On 01/19/2015 04:27 PM, Ron wrote:
> Hi Guewen,
> 
> thank you for answering. 
> 
> 
> 
> So, as I understand it, this would create a new database table (sorry stil
> used to the database terminology of tables and columns), and the _inherit
> would cause orm to present it as it's own independent table.
Yes, from a DB point of view but the ORM presents it as a model (table)
added to the inherits-ed model.
> 
> And I will generate an update event on the new model, which will create
> the job. And my create() override would just fill in the extra fields like
> backend_id, openerp_id?
Right
> 
> Note that I am not sychronizing with an external table, just send a
> notify somewhere, and a remote process pulls the updated record using
> xml-rpc,
> so I won't need the external id.
Indeed, it seems useless with your use case.
> 
> Will orm also keep the derived model in sync with the product due to the
> _inherit?
That's the point of _inherits (with a final s), example if
magento.product.product inherits product.product, if you browse a
magento.product.product and read a field defined on product.product, it
will read the field on the related product (same thing for write). It is
called "inheritance by delegation" because it delegates the fields (not
owned by itself) to the model that it extends.

I suggest you to read:
https://www.odoo.com/forum/help-1/question/the-different-openerp-model-inheritance-mechanisms-whats-the-difference-between-them-and-when-should-they-be-used-46

> 
> Thanks,
> Ron
>  

Guewen


References