Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0] azi_mrp_product: needs improvement #17

Open
matt454357 opened this issue Jul 8, 2020 · 0 comments
Open

[12.0] azi_mrp_product: needs improvement #17

matt454357 opened this issue Jul 8, 2020 · 0 comments

Comments

@matt454357
Copy link
Contributor

  1. I'm not getting any attachments when I run the wizard. There are 2 things causing this:

    • We need to include the PDF attachment for the current product, not just the children
    • We need to search for product.template attachments on the children, not just the product.product attachments.
  2. We have a little misunderstanding on the objective of this module:

    • When I say "build a PDF that is a compilation of PDFs," I mean that I want to merge all of the selected PDF files into a single PDF file
    • The individual PDF files should be inserted in order by assembly level, and then by bom line sequence
  3. Let's move the button to the print menu

Note that the active_id element of the context dict should always be a single integer (product_child is a list):

product_child = products.ids
attach = self.env['ir.attachment'].search([('res_model', '=', 'product.product'),
('res_id', 'in', products.ids)])
attach and attachments.append(attach)
context['active_model'] = 'product.product'
context['active_id'] = product_child

Also note that this line of code seems to have no effect:

context.update(active_id=[context['active_id']])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant