can anyone explain me why the attachment section is showing in chatter section. can i shift this attachment to form view ?
Thank you :)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
Hi,
That is the default working of odoo. When you add an attachment, it will be displayed in the chatter section, to shift it to the form view, you need to customise it by adding a field and search the attachment from ir.attachment model and show that.
You can use compute function,
attachment_ids = fields.Many2many('ir.attachment',
compute='_compute_attachments')
def _compute_attachments(self):
attachment_ids = self.env['ir.attachment'].search([
('res_model', '=', self._name),
('res_id', '=', self.id)
])
self.attachment_ids = attachment_ids.ids
Now you can see all the attachments in the chatter in many2many field in form.
You can define the new field in the view
Hope it helps
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
2
août 24
|
9527 | ||
|
0
déc. 23
|
960 | ||
|
1
févr. 23
|
2158 | ||
|
0
févr. 23
|
157 | ||
|
1
févr. 23
|
3471 |