(self, vals_list)
return companies
Create immediately all the AEAT sequences when creating company.
Create immediately all the AEAT sequences when creating company.
Create immediately all the AEAT sequences when creating company .
def create(self, vals_list):
        """Create immediately all the AEAT sequences when creating company."""
        companies = super().create(vals_list)
        models = self.env["ir.model"].search(
            [("model", "=like", "l10n.es.aeat.%.report")]
        )
        for model in models:
            try:
                self.env[model.model]._register_hook(companies=companies)
            except Exception:
                pass
        return companies
def create ( self , vals_list ) : companies = super ( ) . create ( vals_list ) models = self . env [ "ir.model" ] . search ( [ ( "model" , "=like" , "l10n.es.aeat.%.report" ) ] ) for model in models : try : self . env [ model . model ] . _register_hook ( companies = companies ) except Exception : pass return companies