You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
633 B

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2018 Tecnativa - Jairo Llopis
  3. Copyright 2019 initOS GmbH - Florian Kantelberg
  4. License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
  5. <data>
  6. <record id="update_opt_out" model="ir.actions.server">
  7. <field name="name">Update partner's opt out</field>
  8. <field name="model_id" ref="model_privacy_consent"/>
  9. <field name="crud_model_id" ref="base.model_res_partner"/>
  10. <field name="state">code</field>
  11. <field name="code">records.mapped('partner_id').write({'opt_out': not record.accepted})</field>
  12. </record>
  13. </data>