← Back to team overview

credativ team mailing list archive

[Bug 920267] Re: No Foreign key for company_id in account_period

 

Hello jordg,

I have checked your Issue at my end. Here we can use "fiscalyear_id" as
a foreign key, so fiscalyear_id are set to the company when create the
account period.

Let's See In deeply,
Company_id is related field in account.period object which has the relation with fiscalyear_id and our relation obejct is accoutn.fiscalyear.
So according to our fiscal year company will be set in our period.

Now comes to related field feature of OpenERP framework. By using this
field we have fetch the record form the another tabel(object) giving one
reference field and this reference field becomes our foreign key. So
here fiscalyear_id is our foreign key and which is related to
account.fiscalyear obejct as a reference.

So I think all are working as expected, would you please check It and  notify us where you have faced the problem.
Correct me If I am wrong!


Thank you and waiting for your reply!

** Changed in: openobject-addons
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/920267

Title:
  No Foreign key for company_id in account_period

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  In the table account_period the foreign key for company_id is not
  defined as a foreign key in the database however it acts like one via
  the API.

  psql db_name
  \d account_period

  NOTE: no FOREIGN KEY (company_id) 
  Foreign-key constraints:
      "account_period_create_uid_fkey" FOREIGN KEY (create_uid) REFERENCES res_users(id) ON DELETE SET NULL
      "account_period_fiscalyear_id_fkey" FOREIGN KEY (fiscalyear_id) REFERENCES account_fiscalyear(id) ON DELETE SET NULL
      "account_period_write_uid_fkey" FOREIGN KEY (write_uid) REFERENCES res_users(id) ON DELETE SET NULL

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/920267/+subscriptions


Follow ups

References