def patch(self):
        """Contract Edit (partial)
        """
        contract = self.request.validated['contract']
        apply_patch(self.request, save=False, src=self.request.validated['contract_src'])

        validate_terminate_contract_without_amountPaid(self.request)

        if save_contract(self.request):
            self.LOGGER.info('Updated contract {}'.format(contract.id),
                            extra=context_unpack(self.request, {'MESSAGE_ID': 'contract_patch'}))
            return {'data': contract.serialize('view')}
Beispiel #2
0
    def patch(self):
        """Contract Edit (partial)
        """
        contract = self.request.validated["contract"]
        apply_patch(self.request, save=False, src=self.request.validated["contract_src"])

        validate_terminate_contract_without_amountPaid(self.request)
        validate_update_contracting_items_unit_value_amount(self.request)

        if save_contract(self.request):
            self.LOGGER.info(
                "Updated contract {}".format(contract.id),
                extra=context_unpack(self.request, {"MESSAGE_ID": "contract_patch"}),
            )
            return {"data": contract.serialize("view")}
Beispiel #3
0
    def patch(self):
        """Contract Edit (partial)
        """
        contract = self.request.validated['contract']
        apply_patch(self.request,
                    save=False,
                    src=self.request.validated['contract_src'])

        validate_terminate_contract_without_amountPaid(self.request)

        if save_contract(self.request):
            self.LOGGER.info(
                'Updated contract {}'.format(contract.id),
                extra=context_unpack(self.request,
                                     {'MESSAGE_ID': 'contract_patch'}))
            return {'data': contract.serialize('view')}