RaffaeleT
RaffaeleT

Reputation: 264

Odoo change resource model and ID of attached document

in Odoo v7 Knowledge Management:

  1. if I upload from Knowledge > Document > Create, in the "Attached To" section the "Resource model" and "resource ID" fields remain empty:
  2. if I "attach" the file from a specific resource, eg. a partner, those fields get filled with corresponding values (eg. Resource model: partner, Resource ID: xxx)

How could I map a document to another resource (model and ID)? Those fields are non editable within the Document Creation form: is there any counterissue in making them editable?

Upvotes: 0

Views: 900

Answers (1)

Jainik Patel
Jainik Patel

Reputation: 2324

Static directories should never return files with res_model/res_id because static dirs are /never/ related to a record.

In fact, files related to some model and parented by the root dir (the default), will NOT be accessible in the node system unless a resource folder for that model exists (with resource_find_all=True).

Having resource attachments in a common folder is bad practice, because they would be visible to all users, and their names may be the same, conflicting.

Upvotes: 0

Related Questions