Add the department on agreement portfolios, with a related field on agreements.
It is filled in by default with the department of the user.
Note: agreement portfolios have been introduced in version 2.0 of the module framework_agreement. For older versions, please use the 1.0 series of framework_agreement_department.