Skip to content

Invoice list: "Modify extrafields" mass action is missing #38926

@support-accellier

Description

@support-accellier

Description

The mass action edit_extrafields (Modify extrafields on selected records) is not wired up on the customer invoice list page (compta/facture/list.php). Other list pages (e.g. orders) support this mass action, but invoices do not, even though the extrafield editing template supports it.

Steps to reproduce

  1. Go to Billing → Customer invoices → List
  2. Select one or more invoices using the checkboxes
  3. Open the Mass action dropdown

Expected: A "Modify value of extrafields" option is available.
Actual: The option is absent.

Root cause

htdocs/compta/facture/list.php is missing two lines:

1. The mass action is never added to the menu:

$arrayofmassactions = array(
    'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
    // 'edit_extrafields' is absent here
    'generate_doc' => ...
);

2. The "clear toolbar when action is active" guard doesn't include edit_extrafields:

if (in_array($massaction, array('presend', 'predelete', 'makepayment'))) {
    $arrayofmassactions = array();
}

Fix

 $arrayofmassactions = array(
     'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
+    'edit_extrafields' => img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("ModifyValueExtrafields"),
     'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
 );

-if (in_array($massaction, array('presend', 'predelete', 'makepayment'))) {
+if (in_array($massaction, array('presend', 'predelete', 'makepayment', 'edit_extrafields'))) {
     $arrayofmassactions = array();
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions