Repository navigation
Conversation
|
I have just tried in runboat and seems to not work and give an error. |
|
@pedrobaeza Thanks for testing! The error comes from To see this PR's change on runboat: make the existing partner_id column of invoice_line_ids visible in account.view_move_form (it's there with
|
|
Please rebase now that the patch has been merged. |
The button did not show in the lines of invoices, sales and purchases. Their lists use a record row template that inherits the list renderer's one as a primary template, and Odoo only passes on extensions loaded before that template. Load the template extension right after the list renderer's templates so these lists inherit it too, without a glue module depending on account.
458bd27 to
bf2eefb
Compare
|
@pedrobaeza Rebased, thanks! |


The clickable button does not show in the lines of invoices, sales and purchases, which the ROADMAP said needed a glue module.
Those lists use
account.SectionAndNoteListRenderer.RecordRow(andsale.ListRenderer.RecordRowon top of it), a primary template inheritingweb.ListRenderer.RecordRow. In 19.0 a primary template only inherits the extensions of its parent that were loaded before it, and this module's extension loads afteraccount's templates.This PR loads the template extension right after
web/static/src/views/list/list_renderer.xml, the same approach as #3148 on 16.0. Every list renderer with its own primary record row template now gets the button, with no dependency onaccountand no glue module. The ROADMAP note about the glue module is removed. Fields displayed with a widget (like the product field) still don't get the button, as before.This is in production use at one of our clients on 19.0.
How to test
On runboat (or any 19.0 database with
account):account.view_move_formthat shows the line partner column, which is already in the list but hidden:With sale installed, the same works on order lines, e.g. by adding after product_uom_qty in sale.view_order_form. Purchase lines behave the same way.
Tested on a clean 19.0 database with
sale, in a headless browser:partner_idorder_partner_idcountry_idThere is an open 20.0 migration of this module (#3693); this change can be carried forward there once merged.